20 #include "hcategory.h"
21 #include "hdatasource.h"
25 #include "hldsource.h"
26 #include "hldsubevt.h"
27 #include "hlocation.h"
65 if (NULL == trbNetUnpacker) {
68 if (source->InheritsFrom(
"HldSource")) {
71 Warning(
"init",
"DataSource not inherited from HldSource! trbNetUnpacker == 0 ");
74 Warning(
"init",
"Could not retrieve Datasource! trbNetUnpacker == 0 ");
88 Error(
"init",
"Can not build HRichCal category.");
105 UInt_t sourceSector = 10;
113 if (NULL == pSubEvt) {
125 for (UInt_t i = 0; i < pSubEvt->getDataLen(); i++) {
127 if (0xaaaaaaaa == pSubEvt->getData()[i]) {
132 dHeader.
getEvent(pSubEvt->getData()[i]);
141 Info(
"execute",
"Only debug info will follow, skiping.");
143 decodeTrbNet((pSubEvt->getData() + i),
fRichId);
153 (dHeader.
getSource() & 0xff00) != 0x3000) {
154 Error(
"execute",
"Wrong ADSM number: 0x%x", dHeader.
getSource());
156 sourceSector = (dHeader.
getSource() >> 4) & 0xf;
159 for (UInt_t j = 0; j < dHeader.
getSize(); j++, i++) {
161 if (0 != ((pSubEvt->getData()[i] >> 31) & 0x01)) {
163 Info(
"execute",
"debug info %x", pSubEvt->getData()[i]);
184 Error(
"execute",
"Evt %i SubEvtId %x Source %x: Wrong address (sec,adc,apv,ch) = (%i,%i,%i,%i)",
192 Error(
"execute",
"Evt %i SubEvtId %x Source %x: Unpacked sector %i differs from assigned sector %i (0x%x)",
200 Error(
"execute",
"Evt %i SubEvtId %x Source %x: addr: %x: APV channel (sec,adc,apv,ch) = (%i,%i,%i,%i) is unconnected.",
202 cerr <<
"printDataWord says:" << endl;
204 cerr <<
"printMapping says:" << endl;
211 loc.setIndex(1, row);
222 pCell =
new(pCell)
HRichCal(loc[0], loc[1], loc[2]);
224 pCell =
new(pCell)
HRichCalSim(loc[0], loc[1], loc[2]);
229 Error(
"Execute",
"getSlot(loc) returned NULL! (sec,row,col) = (%i,%i,%i), addr: 0x%x (%i,%i)", loc[0], loc[1], loc[2],
getAddress(
fDataWord), row, col);
245 cerr <<
"SubEvtId:" <<
fRichId <<
" RICH: Number of evts processed: " <<
fEventNr << endl;
253 cout <<
"*****************************************************************************" << endl;
254 cout <<
"Event Nr: " <<
fEventNr << endl;
255 cout <<
" SEC: " << addr.
sector
256 <<
" ADC: " << addr.
adc
257 <<
" APV: " << addr.
apv
259 <<
" CHRG: " << addr.
charge << endl;
267 cout <<
"Event Nr: " <<
fEventNr << endl;
269 cout <<
"Col: " << col << endl;
270 cout <<
"Row: " << row << endl;
271 cout <<
"*****************************************************************************" << endl;
288 fSize = (word >> 16) & 0xffff;
294 Info(
"dump",
"%c size: 0x%04x source: 0x%04x\n",
'%',
fSize,
fSource);
virtual Bool_t addCategory(Cat_t aCat, HCategory *cat, Option_t opt[])=0
#define RICH_CHARGE_OFFSET
#define RICH_MAX_CHANNELS
HCategory * fpCalCat
structure for channel address
UInt_t fSecMisMatchCntr
start unpacking with event #
static const UInt_t kHubDebugId
#define RICH_SECTOR_OFFSET
HRichMappingPar * fpMapPar
HDataSource * getDataSource(void) const
HRuntimeDb * getRuntimeDb(void)
HEvent *& getCurrentEvent(void)
static const UInt_t kADCZero
Identification of debug "subsubevent".
virtual HEventHeader * getHeader(void) const
ClassImp(HDbColumn) HDbColumn
UInt_t fStartEvt
current event #
Int_t getAddress(const DataWord &addr) const
#define RICH_CHANNEL_MASK
HSpectrometer * getSetup(void)
HDetector * getDetector(const Char_t *name)
HCategory * buildMatrixCat(const Text_t *classname, const Float_t fillRate)
UInt_t fEventNr
current event #
Bool_t getSWAddress(Int_t address, Int_t &row, Int_t &col)
HCategory * buildCategory(Cat_t cat)
void printMapping(const DataWord &addr)
HParSet * getContainer(const Text_t *)
void printDataWord(const DataWord &addr)
virtual HCategory * getCategory(Cat_t aCat)=0
struct HRichUnpacker::DataWord fDataWord
#define RICH_CHANNEL_OFFSET
void setCharge(Float_t q)
UInt_t fRichId
ADC module ZERO offset.