| 22 |
*/ |
*/ |
| 23 |
std::string NeutronDetectorReader::GetVersionInfo(void) const { |
std::string NeutronDetectorReader::GetVersionInfo(void) const { |
| 24 |
return |
return |
| 25 |
"$Header: /home/cvsmanager/yoda/techmodel/physics/NeutronDetectorReader.cpp,v 2.2 2004/12/09 08:48:54 kusanagi Exp $"; |
"$Header: /home/cvsmanager/yoda/techmodel/physics/NeutronDetectorReader.cpp,v 2.3 2005/01/13 14:50:01 kusanagi Exp $"; |
| 26 |
} |
} |
| 27 |
|
|
| 28 |
/** |
/** |
| 29 |
* Initialize the algorithm with a special run. This will initialize the |
* Initialize the algorithm with a special run. This will initialize the |
| 30 |
* event reader routines for all packet types. |
* event reader routines for all packet types. |
| 31 |
|
* For definition the definition for Neutron detector data is located in the |
| 32 |
|
* end of the physics packet. |
| 33 |
|
* More explicitely the neutronData is composed by 4 bytes; |
| 34 |
|
* a pattern 00 0F TR BK |
| 35 |
|
* where: |
| 36 |
|
* 00 0f is a fixed pattern |
| 37 |
|
* TR is the NeutronCounter for a trigger event |
| 38 |
|
* BK is the NeutronCounter beetween two trigger events |
| 39 |
*/ |
*/ |
| 40 |
void NeutronDetectorReader::Init(PamelaRun *run) { |
void NeutronDetectorReader::Init(PamelaRun *run) { |
| 41 |
logger->debug(_T("Initialize")); |
logger->debug(_T("Initialize")); |
| 77 |
delete[] data; |
delete[] data; |
| 78 |
} |
} |
| 79 |
|
|
| 80 |
/* For definition the definition for Neutron detector data is |
|
|
* "The last data bunch in the phyics packet" */ |
|
| 81 |
bool NeutronDetectorReader::haveData(const char data[], long int lenght){ |
bool NeutronDetectorReader::haveData(const char data[], long int lenght){ |
| 82 |
bool ret = false; |
bool ret = false; |
| 83 |
if (((data[lenght-1] && data[lenght - 5] && data[lenght - 9]) && 0x0F) && |
if (((data[lenght-1] && data[lenght - 5] && data[lenght - 9]) && 0x0F) && |