61 static const char*
const here =
"THcConfigEvtHandler::Analyze";
66 cout <<
"------------------\n Event type 125"<<endl;
67 const char* whereami =
Here(here);
81 ostr << whereami <<
": CODA3 bank decoding error \""
82 << bankinfo.Errtxt() <<
"\"";
88 ostr << whereami <<
": CODA3 bank does not contain 32-bit integer "
89 "data, found " << bankinfo.Typtxt();
92 if( ip + bankinfo.len_ > evlen ) {
94 ostr << whereami <<
": CODA3 bank size too large, pos+len = "
95 << ip+bankinfo.len_ <<
", evlen = " << evlen;
101 UInt_t roc = header & 0xff;
103 cout << whereami <<
": Found config for ROC " << roc << endl;
108 auto& cinfo = ins.first->second;
115 while( ip < evlen ) {
118 if( (thisword & 0xffffff00) == 0xdafadc00 ) {
122 }
else if( thisword == 0xdedc1190 ) {
126 }
else if( thisword == 0xd0000000 ) {
131 cerr << whereami <<
": Expected header missing"
132 <<
"pos " << ip <<
", data " << hex << thisword << dec << endl;
138 cout << whereami <<
": Making Parms for ROC " << roc <<
" Event type " << evdata->
GetEvType() << endl;
139 cinfo.MakeParms(*
this);
144 const auto& TI = cinfo.TI;
145 if(
gHaRun && TI.present ) {
147 for(
Int_t i = 0; i < Podd::SSIZE(TI.ps_factors); ++i ) {
148 prescales[i] = TI.ps_factors[i];
160 static const char* here =
"THcConfigEvtHandler::DecodeFADC250Config";
161 const char* whereami =
Here(here);
165 cout << whereami <<
": FADC250 config: Block level " << (thisword & 0xff) << endl;
167 if( (versionword & 0xffff0000) == 0xabcd0000 ) {
183 if( lastword != 0xdafadcff ) {
184 cerr << whereami <<
": Unexpected FADC250 configuration block trailer"
185 <<
", expected " << hex << 0xdafadcff <<
", got " << lastword << dec << endl;
188 cerr << whereami <<
": Unexpected FADC250 version word "
189 << hex << thisword << dec <<
", expected 0xabcdNNNN" << endl;
195 if( (thisword & 0xffffff00) == 0xfadcf000 ) {
197 cout << whereami <<
": FADC250 thresholds for slot";
198 while( (thisword & 0xffffff00) == 0xfadcf000 ) {
199 UInt_t slot = thisword & 0x1f;
204 cfg.
thresholds.emplace(slot, std::array<UInt_t, NTHR>{});
208 for(
auto&
threshold: ithr.first->second )
211 if( lastword != (0xfadcff00 | slot) ) {
214 cerr << whereami <<
": Unexpected FADC250 threshold block trailer"
215 <<
", expected " << hex << (0xfadcff00 | slot)
216 <<
", got " << lastword << dec
217 <<
". Thresholds for this slot may be incorrect." << endl;
387 auto& parm_names =
h.fParms;
388 const auto& modname =
h.
fName;
394 auto slot = islot.first;
395 const auto& thresholds = islot.second;
397 parm_names.emplace_back(
Form(
"g%s_adc_thresholds_%u_%u[%u]", modname.Data(),
roc, slot,
NTHR));
399 gHcParms->
Define(parm_names.back().c_str(),
"ADC Thresholds", *thresholds.data());
403 parm_names.emplace_back(
Form(
"g%s_adc_mode_%u_%u", modname.Data(),
roc, slot));
406 parm_names.emplace_back(
Form(
"g%s_adc_latency_%u_%u", modname.Data(),
roc, slot));
410 parm_names.emplace_back(
Form(
"g%s_adc_width_%u_%u", modname.Data(),
roc, slot));
414 parm_names.emplace_back(
Form(
"g%s_adc_daclevel_%u_%u", modname.Data(),
roc, slot));
417 parm_names.emplace_back(
Form(
"g%s_adc_nped_%u_%u", modname.Data(),
roc, slot));
420 parm_names.emplace_back(
Form(
"g%s_adc_nsa_%u_%u", modname.Data(),
roc, slot));
423 parm_names.emplace_back(
Form(
"g%s_adc_maxped_%u_%u", modname.Data(),
roc, slot));
426 parm_names.emplace_back(
Form(
"g%s_adc_np_%u_%u", modname.Data(),
roc, slot));
429 parm_names.emplace_back(
Form(
"g%s_adc_blocklevel_%u_%u", modname.Data(),
roc, slot));
438 parm_names.emplace_back(
Form(
"g%s_tdc_resolution_%d", modname.Data(),
roc));
441 parm_names.emplace_back(
Form(
"g%s_tdc_offset_%d", modname.Data(),
roc));
444 parm_names.emplace_back(
Form(
"g%s_tdc_width_%d", modname.Data(),
roc));
453 parm_names.emplace_back(
Form(
"g%s_ti_nped", modname.Data()));
456 "Number of Pedestal events",
TI.
nped);
457 parm_names.emplace_back(
Form(
"g%s_ti_scaler_period", modname.Data()));
461 parm_names.emplace_back(
Form(
"g%s_ti_sync_count", modname.Data()));
465 parm_names.emplace_back(
Form(
"g%s_ti_ps[%d]", modname.Data(),
NPS));
468 parm_names.emplace_back(
Form(
"g%s_ti_ps_factors[%d]", modname.Data(),
NPS));