29 DoRegister(ModuleType(
"Decoder::Caen1190Module", 1190));
53 fName =
"Caen TDC 1190 Module";
62 return LoadSlot(sldat, evbuffer, 0, pstop + 1 - evbuffer);
74 const auto*
p = evbuffer + pos;
75 const auto*
const q =
p +
len;
98 *
fDebugFile <<
"Caen1190Module:: 1190 GLOBAL HEADER >> data = "
99 << hex << *
p <<
" >> event number = " << dec
112 *
fDebugFile <<
"Caen1190Module:: 1190 TDC HEADER >> data = "
113 << hex << *
p <<
" >> chip id = " << dec
128 *
fDebugFile <<
"Caen1190Module:: 1190 MEASURED DATA >> data = "
129 << hex << *
p <<
" >> channel = " << dec
150 *
fDebugFile <<
"Caen1190Module:: 1190 TDC TRAILER >> data = "
151 << hex << *
p <<
" >> chip id = " << dec
166 *
fDebugFile <<
"Caen1190Module:: 1190 TDC ERROR >> data = "
167 << hex << *
p <<
" >> chip header = " << dec
178 *
fDebugFile <<
"Caen1190Module:: 1190 GLOBAL TRIGGER TIME >> data = "
179 << hex << *
p <<
" >> trigger time = " << dec
191 *
fDebugFile <<
"Caen1190Module:: 1190 GLOBAL TRAILER >> data = "
192 << hex << *
p <<
" >> status = "
201 cout <<
"unknown word for TDC1190: " << hex << (*p) << dec << endl;
243 const char*
const here =
"LoadBank";
249 cerr <<
Here(
here) <<
"FATAL ERROR: Bank too short. Expected >= "
250 << MINLEN <<
", got " <<
len <<
" words. Skipping event." << endl;
263 while( cur < pos+
len &&
266 const UInt_t*
p = evbuffer + ihdr;
267 UInt_t next_evtnum = (*
p & 0x07FFFFE0) >> 5;
269 if( next_evtnum != evtnum + 1 ) {
270 cerr <<
Here(
here) <<
"WARNING: event numbers in block not "
271 "sequential, prev/next = "
272 << evtnum <<
"/" << next_evtnum << endl;
275 evtnum = next_evtnum;
281 <<
"FATAL ERROR: No global trailer found for slot " <<
fSlot
282 <<
" event " << evtnum <<
", skipping block" << endl;
286 UInt_t nwords_trl = (*
p & 0x1FFFE0) >> 5;
287 if( nwords_trl != itrl-ihdr+1 ) {
288 cerr <<
Here(
here) <<
"Warning: global trailer word count mismatch, "
289 <<
"got " << nwords_trl <<
", expected " << itrl-ihdr+1 << endl;
296 <<
"FATAL ERROR: No global header found in bank. Call expert." << endl;
308 const UInt_t*
p = evbuffer + iend - 1;
309 while( ++
p-evbuffer < pos+
len && (*
p >> 27) ==
kFiller ) {
325 return LoadSlot(sldat, evbuffer, ibeg, iend-ibeg)
338 assert( ii+1 <
evtblk.size() );
343 assert(ibeg > 0 && iend > ibeg);
368 os <<
"Caen1190Module::" <<
function <<
": slot/crate "
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
static const char *const here
virtual UInt_t LoadSlot(THaSlotData *sldat, const UInt_t *evbuffer, const UInt_t *pstop)
std::vector< UInt_t > fTdcData
virtual UInt_t LoadNextEvBuffer(THaSlotData *sldat)
virtual UInt_t GetData(UInt_t chan, UInt_t hit) const
virtual UInt_t LoadBank(THaSlotData *sldat, const UInt_t *evbuffer, UInt_t pos, UInt_t len)
std::string Here(const char *function)
std::vector< UInt_t > fNumHits
virtual Int_t Decode(const UInt_t *p)
static TypeIter_t fgThisType
virtual void Clear(Option_t *opt="")
class Decoder::Caen1190Module::tdcData tdc_data
virtual UInt_t GetOpt(UInt_t chan, UInt_t hit) const
static Long64_t Find1190Word(const uint32_t *buf, size_t start, size_t len, EDataType type, uint32_t slot)
std::vector< UInt_t > fTdcOpt
std::ofstream * fDebugFile
TypeSet_t::iterator TypeIter_t
std::vector< Long64_t > evtblk
virtual void Clear(Option_t *opt="")
Int_t loadData(const char *type, UInt_t chan, UInt_t dat, UInt_t raw)
void function(const Char_t *name_, T fun, const Char_t *docstring=0)