22 DoRegister( ModuleType(
"Decoder::F1TDCModule" , 3201 ));
25 VmeModule(crate, slot), fNumHits(0), fResol(ILO),
27 IsInit(false), slotmask(0), chanmask(0), datamask(0)
37 fName =
"F1 TDC 3201";
107 const UInt_t DATA_CHK = F1_HIT_OFLW | F1_OUT_OFLW | F1_RES_LOCK;
110 const UInt_t *loc = evbuffer;
115 while ( loc <= pstop &&
IsSlot(*loc) ) {
116 if ( !( (*loc) & DATA_MARKER ) ) {
120 *
fDebugFile<<
"[" << (loc-evbuffer) <<
"] header/trailer 0x"
121 <<hex<<*loc<<dec<<endl;
128 *
fDebugFile<<
"[" << (loc-evbuffer) <<
"] data 0x"
129 <<hex<<*loc<<dec<<endl;
140 if( ((*loc) & DATA_CHK) != F1_RES_LOCK ) {
141 UInt_t f1slot = ((*loc) & 0xf8000000) >> 27;
142 cout <<
"\tWarning: F1 TDC " << hex << (*loc) << dec;
143 cout <<
"\tSlot (Ch) = " << f1slot <<
"(" <<
chan <<
")";
144 if( (*loc) & F1_HIT_OFLW ) {
145 cout <<
"\tHit-FIFO overflow";
147 if( (*loc) & F1_OUT_OFLW ) {
148 cout <<
"\tOutput FIFO overflow";
150 if( !((*loc) & F1_RES_LOCK) ) {
151 cout <<
"\tResolution lock failure!";
156 UInt_t raw = (*loc) & 0xffff;
160 <<
" 0x"<<hex<<raw<<dec<<endl;
Bool_t IsHiResolution() const
UInt_t LoadSlot(THaSlotData *sldat, const UInt_t *evbuffer, const UInt_t *pstop)
virtual void Clear(Option_t *opt="")
std::vector< UInt_t > fTdcData
virtual Bool_t IsSlot(UInt_t rdata)
void SetResolution(Int_t which=0)
virtual UInt_t GetData(UInt_t chan, UInt_t hit) const
static TypeIter_t fgThisType
std::ofstream * fDebugFile
TypeSet_t::iterator TypeIter_t
Int_t loadData(const char *type, UInt_t chan, UInt_t dat, UInt_t raw)
void Clear(Option_t *option="") override