#include <MicrorocReader.hh>
Inheritance diagram for MicrorocReader:
Public Member Functions | |
MicrorocReader (Run &aRun, FILE *aFile, ui32 lastEventId) | |
~MicrorocReader () | |
virtual int | getNextEvent (Event &eventToFill)=0 |
Static Public Member Functions | |
static const char * | type (const int subtype=0) |
Protected Member Functions | |
virtual int | getScData ()=0 |
void | reset () |
int | storeEvent (Event &event) |
int | newHit (Event &event, const Detector &detector, int digital, i16 analog, const int chNum, const int chipId, const int difId, const ui16 memoryOrder=0) |
Protected Attributes | |
unsigned short | CRC |
int | difId |
ui32 | difTriggerCounter |
ui32 | usbBusyTrigger |
ui32 | informationCounter |
ui32 | globalTriggerCounter |
ui32 | bcPeriod |
i64 | bcId_Abs |
i64 | bcId_AbsOrg |
i64 | bcId_Dif |
i64 | bcId_Hit |
i64 | eventTime |
i32 | difSynchro |
int | SkippedBcId |
Definition at line 25 of file MicrorocReader.hh.
MicrorocReader::MicrorocReader | ( | Run & | aRun, | |
FILE * | aFile, | |||
ui32 | lastEventId | |||
) |
Definition at line 49 of file MicrorocReader.cpp.
00049 : DifReader(aRun, aFile, lastEventId) 00050 { 00051 FILE_LOG(logDEBUG1) << "--MicrorocReader constructor()"<< endl; 00052 FILE_LOG(logDEBUG) << "MicrorocReader Constructeur crc adr[" << crc << "]" << endl; 00053 reset(); 00054 }
MicrorocReader::~MicrorocReader | ( | ) |
static const char* MicrorocReader::type | ( | const int | subtype = 0 |
) | [static] |
Reimplemented in MicrorocLabviewReader, and MicrorocXDaqReader.
virtual int MicrorocReader::getNextEvent | ( | Event & | eventToFill | ) | [pure virtual] |
virtual int MicrorocReader::getScData | ( | ) | [protected, pure virtual] |
Implemented in MicrorocLabviewReader, and MicrorocXDaqReader.
void MicrorocReader::reset | ( | ) | [protected] |
Definition at line 63 of file MicrorocReader.cpp.
Referenced by MicrorocLabviewReader::getNextEvent(), MicrorocXDaqReader::localReset(), MicrorocLabviewReader::MicrorocLabviewReader(), and MicrorocReader().
00063 { 00064 bcId_AbsOrg = -1; // the bcId origin in milliseconds 00065 CRC = 0; // current CRC for the whole file 00066 SkippedBcId = 0; 00067 00068 // following initializations are useless 00069 globalTime = 0; 00070 difId = -1; 00071 difTriggerCounter = usbBusyTrigger = globalTriggerCounter = informationCounter = 0; 00072 bcPeriod = 200; 00073 bcId_Abs = bcId_Dif = bcId_Hit = 0; 00074 } // MicrorocReader.reset
int MicrorocReader::storeEvent | ( | Event & | event | ) | [protected] |
int MicrorocReader::newHit | ( | Event & | event, | |
const Detector & | detector, | |||
int | digital, | |||
i16 | analog, | |||
const int | chNum, | |||
const int | chipId, | |||
const int | difId, | |||
const ui16 | memoryOrder = 0 | |||
) | [protected] |
Definition at line 78 of file MicrorocReader.cpp.
Referenced by MicrorocXDaqReader::getAcqData(), and MicrorocLabviewReader::getAcqData().
00079 { 00080 // cannot be binary pattern 10 00081 00082 const ChamberMap_t &chambers = detector.getChambers(); 00083 for (ChamberMap_t::const_iterator it = chambers.begin(); it != chambers.end(); ++it) { 00084 try { 00085 Chamber& chamber = *(it->second); 00086 // if failed continue throw cath 00087 const BoardMap_t& boards = chamber.getBoardsByDifId(difId); 00088 00089 // store new event data 00090 try { 00091 const Channel& channel = chamber.getChannelById(chNum, chipId, difId); 00092 //i32 analogValue = 0; 00093 ChannelHit *hit = new ChannelHit(channel, digital, analogValue); 00094 hit->setMemoryOrder(_memoryOrder); 00095 00096 hit->setHardrocTime(globalTime, bcId_Abs, bcId_Dif, bcId_Hit,0); 00097 event.insertHit(chamber, hit); 00098 FILE_LOG(logDEBUG) << " new Hit : ch " << chNum << ", chip " << chipId << " ,dif " << difId 00099 << ", Time=" << globalTime << " abs=" << bcId_Abs << " dif=" << bcId_Dif << " hit=" << bcId_Hit << " Data=" << digital << " analogValue[" << analogValue << "] " << endl; 00100 return(1); 00101 } 00102 catch (MicroException &e) { 00103 FILE_LOG(logDEBUG) << "ch " << chNum << ", chip " << chipId << " chip 0x" << hex << chipId << dec << ", dif " << difId << " : " << e.getMessage() << endl; 00104 event.setValidFlag(BAD_CHIP_ID); 00105 00106 return(0); 00107 } 00108 } 00109 catch (...) { 00110 FILE_LOG(logDEBUG1) << " board list not found - try next" << endl; 00111 continue; 00112 } 00113 00114 } // for 00115 if (detector.getMonitoringId() == difId) 00116 { 00117 return 0; 00118 } 00119 00120 FILE_LOG(logDEBUG) << " ch " << chNum << ", chip " << chipId << ", dif " << difId << " : geometry element not found" << endl; 00121 return(0); 00122 } // MicrorocReader.newHit
unsigned short MicrorocReader::CRC [protected] |
int MicrorocReader::difId [protected] |
Definition at line 46 of file MicrorocReader.hh.
Referenced by MicrorocXDaqReader::getAcqData(), MicrorocLabviewReader::getAcqData(), MicrorocLabviewReader::getAnalogData(), MicrorocLabviewReader::getScData(), and reset().
ui32 MicrorocReader::difTriggerCounter [protected] |
Definition at line 47 of file MicrorocReader.hh.
Referenced by MicrorocXDaqReader::getAcqData(), MicrorocLabviewReader::getAcqData(), and reset().
ui32 MicrorocReader::usbBusyTrigger [protected] |
Definition at line 48 of file MicrorocReader.hh.
Referenced by MicrorocLabviewReader::getAcqData(), and reset().
ui32 MicrorocReader::informationCounter [protected] |
Definition at line 49 of file MicrorocReader.hh.
Referenced by MicrorocXDaqReader::getAcqData(), and reset().
ui32 MicrorocReader::globalTriggerCounter [protected] |
Definition at line 50 of file MicrorocReader.hh.
Referenced by MicrorocXDaqReader::getAcqData(), MicrorocLabviewReader::getAcqData(), and reset().
ui32 MicrorocReader::bcPeriod [protected] |
Definition at line 51 of file MicrorocReader.hh.
Referenced by MicrorocXDaqReader::getAcqData(), MicrorocLabviewReader::getAcqData(), and reset().
i64 MicrorocReader::bcId_Abs [protected] |
Definition at line 52 of file MicrorocReader.hh.
Referenced by MicrorocXDaqReader::getAcqData(), MicrorocLabviewReader::getAcqData(), newHit(), and reset().
i64 MicrorocReader::bcId_AbsOrg [protected] |
Definition at line 53 of file MicrorocReader.hh.
Referenced by MicrorocXDaqReader::getAcqData(), MicrorocLabviewReader::getAcqData(), and reset().
i64 MicrorocReader::bcId_Dif [protected] |
Definition at line 54 of file MicrorocReader.hh.
Referenced by MicrorocXDaqReader::getAcqData(), MicrorocLabviewReader::getAcqData(), newHit(), and reset().
i64 MicrorocReader::bcId_Hit [protected] |
Definition at line 55 of file MicrorocReader.hh.
Referenced by MicrorocXDaqReader::getAcqData(), MicrorocLabviewReader::getAcqData(), newHit(), and reset().
i64 MicrorocReader::eventTime [protected] |
Definition at line 56 of file MicrorocReader.hh.
Referenced by MicrorocXDaqReader::getAcqData(), and MicrorocLabviewReader::getAcqData().
i32 MicrorocReader::difSynchro [protected] |
Definition at line 57 of file MicrorocReader.hh.
int MicrorocReader::SkippedBcId [protected] |
Definition at line 59 of file MicrorocReader.hh.
Referenced by MicrorocXDaqReader::getAcqData(), MicrorocLabviewReader::getAcqData(), and reset().