21static void PrintBlock(
const uint32_t* codabuffer, uint32_t pos, uint32_t len )
24 while( idx < pos+
len ) {
25 while( idx < pos+
len && !
TESTBIT(codabuffer[idx], 31) )
29 uint32_t
data = codabuffer[idx];
33 cout <<
"Block header"
35 <<
" slot = " << ((
data >> 22) & 0x1F)
36 <<
" blksz = " << ((
data >> 0) & 0xFF)
37 <<
" iblkn = " << ((
data >> 8) & 0x3FF);
40 cout <<
"Block trailer"
42 <<
" slot = " << ((
data >> 22) & 0x1F)
43 <<
" nwords = " << (
data & 0x3FFFFF);
46 cout <<
" Event header"
48 <<
" slot = " << ((
data >> 22) & 0x1F)
50 <<
" time = " << ((
data >>12) & 0x3FF)
51 <<
" trignum = " << (
data & 0xFFF);
54 cout <<
" Type = " <<
type
89 vector<ConfigStrReq> req = { {
"debug", debug } };
115 return LoadBank(sldat, evbuffer, 0, pstop+1-evbuffer);
135 if( ++iend < pos+
len ) {
136 cerr <<
"WARNING: Block trailer misidentification, slot " <<
fSlot
137 <<
", roc " <<
fCrate <<
", data 0x" << hex << evbuffer[iend-1] << dec
138 <<
". Attempting recovery." << endl;
142 cerr <<
"ERROR: Block trailer NOT found, slot " <<
fSlot
143 <<
", roc " <<
fCrate <<
". Corrupt data. Giving up." << endl;
144 cout <<
"Block data:" << endl;
188 assert( ibeg >= pos && iend > ibeg && iend < pos+
len );
194 evtblk.push_back(iend + 1);
200 size_t blklen = iend + 1 - ibeg;
202 memcpy(
fBuffer.data(), evbuffer+ibeg, blklen *
sizeof(
fBuffer[0]));
206 [ibeg](
UInt_t pos ) { return pos-ibeg; });
223 assert( ibeg >= pos && iend > ibeg && iend < pos+
len );
225 return LoadSlot(sldat, evbuffer, ibeg, iend+1-ibeg);
236 assert( ii+1 <
evtblk.size() );
241 assert(ibeg > 0 && iend > ibeg &&
static_cast<size_t>(iend) <=
fBuffer.size());
static void PrintBlock(const uint32_t *codabuffer, uint32_t pos, uint32_t len)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
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
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 type
static void ParseConfigStr(const char *configstr, const std::vector< ConfigStrReq > &req)
virtual UInt_t LoadNextEvBuffer(THaSlotData *sldat)
static Long64_t FindIDWord(const uint32_t *buf, size_t start, size_t len, uint32_t type)
std::vector< Long64_t > evtblk
virtual UInt_t LoadBank(THaSlotData *sldat, const UInt_t *evbuffer, UInt_t pos, UInt_t len)
virtual void Clear(Option_t *opt="")
virtual UInt_t LoadBlock(THaSlotData *sldat, const UInt_t *evbuffer, const UInt_t *pstop)
static Long64_t FindEventsInBlock(const uint32_t *buf, size_t start, size_t len, uint32_t evthdr, uint32_t blktrl, std::vector< Long64_t > &evtpos, uint32_t slot)
Long64_t VerifyBlockTrailer(const UInt_t *evbuffer, UInt_t pos, UInt_t len, Long64_t ibeg, Long64_t iend) const
virtual UInt_t LoadSlot(THaSlotData *sldat, const UInt_t *evbuffer, const UInt_t *pstop)
void Clear(Option_t *option="") override