Hall C ROOT/C++ Analyzer (hcana)
Loading...
Searching...
No Matches
THcConfigEvtHandler.cxx
Go to the documentation of this file.
1
24#include "THcConfigEvtHandler.h"
25#include "CodaDecoder.h"
26#include "THcGlobals.h"
27#include "THcParmList.h"
28#include "THaGlobals.h"
29#include "THaRunBase.h"
30#include "THaRunParameters.h"
31#include "Helper.h"
32#include <iostream>
33#include <iomanip>
34#include <sstream>
35#include <cassert>
36
37using namespace std;
38
39THcConfigEvtHandler::THcConfigEvtHandler(const char *name, const char* description)
40 : THaEvtTypeHandler(name,description)
41{
42}
43
45{
46 // Remove the parameters we've added to gHcParms. Otherwise they would
47 // reference deallocated memory once this object goes away
48 for( const auto& name : fParms )
49 gHcParms->RemoveName( name.c_str() );
50}
51
52//Float_t THcConfigEvtHandler::GetData(const std::string& tag)
53//{
54// // A public method which other classes may use
55// if (theDataMap.find(tag) == theDataMap.end())
56// return 0;
57// return theDataMap[tag];
58//}
59
61{
62 static const char* const here = "THcConfigEvtHandler::Analyze";
63
64 if ( !IsMyEvent(evdata->GetEvType()) )
65 return -1;
66 if (fDebug)
67 cout << "------------------\n Event type 125"<<endl;
68 const char* whereami = Here(here);
69
70 UInt_t evlen = evdata->GetEvLength();
71 UInt_t ip = 1; // index of next word to be processed (for CODA 2)
72
73 if( evdata->GetDataVersion() > 2 ) {
74 // Unpack CODA 3 bank structure
75 auto bankinfo =
76 Decoder::CodaDecoder::GetBank(evdata->GetRawDataBuffer(), 0, evlen);
77 ip = bankinfo.pos_;
78
79 // Check for errors
80 if( bankinfo.status_ != Decoder::CodaDecoder::BankInfo::kOK ) {
81 ostringstream ostr;
82 ostr << whereami << ": CODA3 bank decoding error \""
83 << bankinfo.Errtxt() << "\"";
85 }
86 if( bankinfo.GetDataSize() != Decoder::CodaDecoder::BankInfo::k32bit ||
87 bankinfo.GetFloat() != Decoder::CodaDecoder::BankInfo::kInteger ) {
88 ostringstream ostr;
89 ostr << whereami << ": CODA3 bank does not contain 32-bit integer "
90 "data, found " << bankinfo.Typtxt();
92 }
93 if( ip + bankinfo.len_ > evlen ) {
94 ostringstream ostr;
95 ostr << whereami << ": CODA3 bank size too large, pos+len = "
96 << ip+bankinfo.len_ << ", evlen = " << evlen;
98 }
99 }
100
101 UInt_t header = evdata->GetRawData(ip++);
102 UInt_t roc = header & 0xff;
103 if (fDebug)
104 cout << whereami << ": Found config for ROC " << roc << endl;
105 // Using a map as opposed to a vector ensures that none of the iterators into
106 // it are invalidated as more elements are added. This is important since we
107 // define parameters on _references_ to the map elements (see MakeParms()).
108 auto ins = fCrateInfoMap.emplace(roc, CrateConfig(roc));
109 auto& cinfo = ins.first->second;
110
111 // Possible blocks of config data
112 // 0xdafadcNN - FADC information for the crate (NN = blocklevel), optionally
113 // followed by set of thresholds by slot/channel
114 // 0xdedc1190 - 1190 TDC information for the crate
115 // 0xd0000000 - TI configuration (for TI master crate only)
116 while( ip < evlen ) {
117 UInt_t thisword = evdata->GetRawData(ip);
118
119 if( (thisword & 0xffffff00) == 0xdafadc00 ) {
120 // FADC250 information
121 ip = DecodeFADC250Config(evdata, ip, evlen, cinfo.FADC250);
122
123 } else if( thisword == 0xdedc1190 ) {
124 // CAEN 1190 information
125 ip = DecodeCAEN1190Config(evdata, ip, evlen, cinfo.CAEN1190);
126
127 } else if( thisword == 0xd0000000 ) {
128 // TI setup data
129 ip = DecodeTIConfig(evdata, ip, evlen, cinfo.TI);
130
131 } else {
132 cerr << whereami << ": Expected header missing"
133 << "pos " << ip << ", data " << hex << thisword << dec << endl;
134 break;
135 }
136 }
137
138 if( fDebug > 1 )
139 cout << whereami << ": Making Parms for ROC " << roc << " Event type " << evdata->GetEvType() << endl;
140 cinfo.MakeParms(*this);
141
142 // Copy prescales to run parameters stored in the run object.
143 // The run object will be saved in the output ROOT file, so
144 // users will have easy access to these numbers.
145 const auto& TI = cinfo.TI;
146 if( gHaRun && TI.present ) {
147 auto& prescales = gHaRun->GetParameters()->Prescales();
148 for( Int_t i = 0; i < Podd::SSIZE(TI.ps_factors); ++i ) {
149 prescales[i] = TI.ps_factors[i];
150 }
151 }
152
153 if( fDebug > 1 )
154 PrintConfig();
155 return 1;
156}
157
159 THaEvData* evdata, UInt_t ip, UInt_t len, CrateConfig::FADC250_t& cfg )
160{
161 static const char* here = "THcConfigEvtHandler::DecodeFADC250Config";
162 const char* whereami = Here(here);
163
164 assert(ip < len);
165 UInt_t thisword = evdata->GetRawData(ip);
166 if( fDebug )
167 cout << whereami << ": FADC250 config: Block level " << (thisword & 0xff) << endl;
168 if( ip+13 >= len ) {
169 cerr << whereami << ": FADC250 config block unexpectedly too short. "
170 "Call expert." << endl;
171 return len;
172 }
173 UInt_t versionword = evdata->GetRawData(ip + 1);
174 if( (versionword & 0xffff0000) == 0xabcd0000 ) {
175 //UInt_t version = versionword & 0xffff;
176 cfg.present = true;
177 cfg.blocklevel = thisword & 0xff;
178 cfg.dac_level = evdata->GetRawData(ip + 2);
179 cfg.threshold = evdata->GetRawData(ip + 3);
180 cfg.mode = evdata->GetRawData(ip + 4);
181 cfg.window_lat = evdata->GetRawData(ip + 5);
182 cfg.window_width = evdata->GetRawData(ip + 6);
183 cfg.nsb = evdata->GetRawData(ip + 7);
184 cfg.nsa = evdata->GetRawData(ip + 8);
185 cfg.np = evdata->GetRawData(ip + 9);
186 cfg.nped = evdata->GetRawData(ip + 10);
187 cfg.maxped = evdata->GetRawData(ip + 11);
188 cfg.nsat = evdata->GetRawData(ip + 12);
189 UInt_t lastword = evdata->GetRawData(ip + 13);
190 if( lastword != 0xdafadcff ) {
191 cerr << whereami << ": Unexpected FADC250 configuration block trailer"
192 << ", expected " << hex << 0xdafadcff << ", got " << lastword << dec << endl;
193 }
194 } else {
195 cerr << whereami << ": Unexpected FADC250 version word "
196 << hex << thisword << dec << ", expected 0xabcdNNNN" << endl;
197 }
198 ip += 14;
199 if( ip >= len ) {
200 assert(ip == len);
201 return ip;
202 }
203
204 // A set of per-slot ADC thresholds may follow
205 thisword = evdata->GetRawData(ip);
206 if( (thisword & 0xffffff00) != 0xfadcf000 )
207 return ip;
208
209 if( fDebug )
210 cout << whereami << ": FADC250 thresholds for slot";
211 while( (thisword & 0xffffff00) == 0xfadcf000 ) {
212 UInt_t slot = thisword & 0x1f;
213 if( fDebug )
214 cout << " " << slot;
215 if( ip+1+NTHR >= len ) {
216 cerr << whereami << ": FADC250 threshold data block unexpectedly too "
217 "short. Call expert." << endl;
218 return len;
219 }
220 auto ithr =
221 cfg.thresholds.emplace(slot, std::array<UInt_t, NTHR>{});
222 if( ithr.second ) // if insertion successful, then we've added a module
223 cfg.nmodules++;
224 ip++;
225 for( auto& threshold: ithr.first->second ) { // assigns NTHR (=16) values
226 assert(ip < len);
227 threshold = evdata->GetRawData(ip++);
228 }
229 assert(ip < len);
230 UInt_t lastword = evdata->GetRawData(ip++);
231 if( lastword != (0xfadcff00 | slot) ) {
232 if( fDebug )
233 cout << endl;
234 cerr << whereami << ": Unexpected FADC250 threshold block trailer"
235 << ", expected " << hex << (0xfadcff00 | slot)
236 << ", got " << lastword << dec
237 << ". Thresholds for this slot may be incorrect." << endl;
238 }
239 if( ip >= len ) {
240 assert(ip == len);
241 break;
242 }
243 thisword = evdata->GetRawData(ip);
244 }
245 if( fDebug )
246 cout << endl;
247
248 return ip;
249}
250
251UInt_t
253 THaEvData* evdata, UInt_t ip, UInt_t len, CrateConfig::CAEN1190_t& cfg )
254{
255 static const char* here = "THcConfigEvtHandler::DecodeCAEN1190Config";
256 const char* whereami = Here(here);
257 constexpr UInt_t trailer = 0xdedc119f;
258
259 if( ip+5 >= len ) {
260 cerr << whereami << ": CAEN1190 config block unexpectedly too short. "
261 "Call expert." << endl;
262 return len;
263 }
264 if (fDebug)
265 cout << whereami << ": CAEN1190 TDC information" << endl;
266 UInt_t versionword = evdata->GetRawData(ip + 1);
267 if( (versionword & 0xffff0000) == 0xabcd0000 ) {
268 //UInt_t version = versionword & 0xffff;
269 cfg.present = true;
270 cfg.resolution = evdata->GetRawData(ip + 2);
271 cfg.timewindow_offset = evdata->GetRawData(ip + 3);
272 cfg.timewindow_width = evdata->GetRawData(ip + 4);
273 UInt_t lastword = evdata->GetRawData(ip + 5);
274 if( lastword != trailer ) {
275 cerr << whereami << ": Unexpected 1190 configuration block trailer"
276 << ", expected " << hex << trailer << ", got " << lastword << dec << endl;
277 }
278 ip += 6;
279 assert(ip <= len);
280 } else {
281 cerr << whereami << ": Unexpected 1190 version word "
282 << hex << versionword << dec << ", expected 0xabcdNNNN" << endl;
283 ip = len; // We don't know the data length. Give up on this event.
284 }
285 return ip;
286}
287
289 THaEvData* evdata, UInt_t ip, UInt_t len, CrateConfig::TI_t& cfg )
290{
291 static const char* here = "THcConfigEvtHandler::DecodeTIConfig";
292 const char* whereami = Here(here);
293
294 if( ip+2+NPS >= len ) {
295 cerr << whereami << ": CAEN1190 config block unexpectedly too short. "
296 "Call expert." << endl;
297 return len;
298 }
299 if (fDebug)
300 cout << whereami << ": TI setup data" << endl;
301
302 UInt_t versionword = evdata->GetRawData(ip + 1);
303 if( (versionword & 0xffff0000) == 0xabcd0000 ) {
304 UInt_t version = versionword & 0xffff;
305 ip += 2;
306 cfg.present = true;
307 cfg.nped = evdata->GetRawData(ip++);
308 if( version >= 2 ) {
309 if( ip+1+NPS >= len ) {
310 cerr << whereami << ": CAEN1190 config block unexpectedly too short. "
311 "Call expert." << endl;
312 return len;
313 }
314 cfg.scaler_period = evdata->GetRawData(ip++);
315 cfg.sync_count = evdata->GetRawData(ip++);
316 } else {
317 cfg.scaler_period = 2;
318 cfg.sync_count = -1;
319 }
320 // Prescale factors
321 for( UInt_t i = 0; i < NPS; i++ ) {
322 assert(ip < len);
323 auto ps = cfg.prescales[i] = static_cast<Int_t>(evdata->GetRawData(ip++));
324 if( evdata->GetDataVersion() > 2 ) {
325 // CODA3: Calculate actual factor from "exponent" format
326 auto& fact = cfg.ps_factors[i];
327 if( ps > 0 && ps <= 16 )
328 fact = (1 << (ps - 1)) + 1;
329 else if( ps == 0 )
330 fact = 1;
331 else if( ps == -1 )
332 fact = -1;
333 else {
334 cerr << whereami << ": Invalid CODA3 prescale = " << ps << ". "
335 << "Must be between -1 and 16 (inclusive)" << endl;
336 fact = -1;
337 }
338 } else
339 cfg.ps_factors = cfg.prescales;
340 }
341 assert(ip < len);
342 UInt_t lastword = evdata->GetRawData(ip++);
343 if( lastword != 0xd000000f ) {
344 cerr << whereami << ": Unexpected last word of TI information block "
345 << hex << lastword << dec << endl;
346 }
347 } else {
348 cerr << whereami << ": Unexpected TI info word " << hex << versionword
349 << dec << endl << " Expected 0xabcdNNNN" << endl;
350 ip = len; // We don't know the data length. Give up on this event.
351 }
352 return ip;
353}
354
359 auto it = fCrateInfoMap.find(roc);
360 assert(it != fCrateInfoMap.end()); // else bug in Analyze
361
362 const auto& cinfo = it->second;
363 cinfo.MakeParms(*this);
364}
365
366// Pretty print the config data
368{
369 for( const auto& crate_config : fCrateInfoMap ) {
370 cout << "+================= Configuration Data ROC "
371 << crate_config.first << " ==================" << endl;
372 crate_config.second.Print();
373 }
374}
375
377{
378 auto it = fCrateInfoMap.find(crate);
379 if( it != fCrateInfoMap.end() ) {
380 const auto& cinfo = it->second;
381 return cinfo.FADC250.present;
382 }
383 return false;
384}
386{
387 auto it = fCrateInfoMap.find(crate);
388 if( it != fCrateInfoMap.end() ) {
389 const auto& cinfo = it->second;
390 if( cinfo.FADC250.present )
391 return cinfo.FADC250.nsa;
392 }
393 return -1;
394}
396{
397 auto it = fCrateInfoMap.find(crate);
398 if( it != fCrateInfoMap.end() ) {
399 const auto& cinfo = it->second;
400 if( cinfo.FADC250.present )
401 return cinfo.FADC250.nsb;
402 }
403 return -1;
404}
406{
407 auto it = fCrateInfoMap.find(crate);
408 if( it != fCrateInfoMap.end() ) {
409 const auto& cinfo = it->second;
410 if( cinfo.FADC250.present )
411 return cinfo.FADC250.nped;
412 }
413 return -1;
414}
416{
417 if( eventtypes.empty() ) {
418 eventtypes.push_back(125); // what events to look for
419 }
420
421 fCrateInfoMap.clear();
422
423 return THaEvtTypeHandler::Init(date);
424}
425
427{
428 // Create Hall C parameters referencing these configuration data
429
430 auto& parm_names = h.fParms;
431 const auto& modname = h.fName;
432
433 // FADC configuration
434 if( FADC250.present ) {
435 // Loop over FADC slots
436 for( const auto& islot: FADC250.thresholds ) {
437 auto slot = islot.first;
438 const auto& thresholds = islot.second;
439
440 parm_names.emplace_back(Form("g%s_adc_thresholds_%u_%u[%u]", modname.Data(), roc, slot, NTHR));
441 gHcParms->RemoveName(parm_names.back().c_str());
442 gHcParms->Define(parm_names.back().c_str(), "ADC Thresholds", *thresholds.data());
443
444 // FIXME: The following parameters are labeled "per slot", but their
445 // values are identical for all slots.
446 parm_names.emplace_back(Form("g%s_adc_mode_%u_%u", modname.Data(), roc, slot));
447 gHcParms->RemoveName(parm_names.back().c_str());
448 gHcParms->Define(parm_names.back().c_str(), "ADC Mode", FADC250.mode);
449 parm_names.emplace_back(Form("g%s_adc_latency_%u_%u", modname.Data(), roc, slot));
450 gHcParms->RemoveName(parm_names.back().c_str());
451 gHcParms->Define(parm_names.back().c_str(), "Window Latency", FADC250.window_lat);
452
453 parm_names.emplace_back(Form("g%s_adc_width_%u_%u", modname.Data(), roc, slot));
454 gHcParms->RemoveName(parm_names.back().c_str());
455 gHcParms->Define(parm_names.back().c_str(), "Window Width", FADC250.window_width);
456
457 parm_names.emplace_back(Form("g%s_adc_daclevel_%u_%u", modname.Data(), roc, slot));
458 gHcParms->RemoveName(parm_names.back().c_str());
459 gHcParms->Define(parm_names.back().c_str(), "DAC Level", FADC250.dac_level);
460 parm_names.emplace_back(Form("g%s_adc_nped_%u_%u", modname.Data(), roc, slot));
461 gHcParms->RemoveName(parm_names.back().c_str());
462 gHcParms->Define(parm_names.back().c_str(), "NPED", FADC250.nped);
463 parm_names.emplace_back(Form("g%s_adc_nsa_%u_%u", modname.Data(), roc, slot));
464 gHcParms->RemoveName(parm_names.back().c_str());
465 gHcParms->Define(parm_names.back().c_str(), "NSA", FADC250.nsa);
466 parm_names.emplace_back(Form("g%s_adc_maxped_%u_%u", modname.Data(), roc, slot));
467 gHcParms->RemoveName(parm_names.back().c_str());
468 gHcParms->Define(parm_names.back().c_str(), "MAXPED", FADC250.maxped);
469 parm_names.emplace_back(Form("g%s_adc_np_%u_%u", modname.Data(), roc, slot));
470 gHcParms->RemoveName(parm_names.back().c_str());
471 gHcParms->Define(parm_names.back().c_str(), "NP", FADC250.np);
472 parm_names.emplace_back(Form("g%s_adc_blocklevel_%u_%u", modname.Data(), roc, slot));
473 gHcParms->RemoveName(parm_names.back().c_str());
474 gHcParms->Define(parm_names.back().c_str(), "Blocklevel", FADC250.blocklevel);
475 }
476 }
477
478 // CAEN 1190 TDC information
479 if( CAEN1190.present ) {
480 // FIXME: shouldn't this info be per slot?
481 parm_names.emplace_back(Form("g%s_tdc_resolution_%d", modname.Data(), roc));
482 gHcParms->RemoveName(parm_names.back().c_str());
483 gHcParms->Define(parm_names.back().c_str(), "TDC resolution", CAEN1190.resolution);
484 parm_names.emplace_back(Form("g%s_tdc_offset_%d", modname.Data(), roc));
485 gHcParms->RemoveName(parm_names.back().c_str());
486 gHcParms->Define(parm_names.back().c_str(), "TDC Time Window Offset", CAEN1190.timewindow_offset);
487 parm_names.emplace_back(Form("g%s_tdc_width_%d", modname.Data(), roc));
488 gHcParms->RemoveName(parm_names.back().c_str());
489 gHcParms->Define(parm_names.back().c_str(), "TDC Time Window Width", CAEN1190.timewindow_width);
490 }
491
492 // TI Configuration
493 // We assume that this information is only provided by the master TI crate.
494 // If that is not true we will get "Variable XXX already exists." warnings
495 if( TI.present ) {
496 parm_names.emplace_back(Form("g%s_ti_nped", modname.Data()));
497 gHcParms->RemoveName(parm_names.back().c_str());
498 gHcParms->Define(parm_names.back().c_str(),
499 "Number of Pedestal events", TI.nped);
500 parm_names.emplace_back(Form("g%s_ti_scaler_period", modname.Data()));
501 gHcParms->RemoveName(parm_names.back().c_str());
502 gHcParms->Define(parm_names.back().c_str(),
503 "Number of Pedestal events", TI.scaler_period);
504 parm_names.emplace_back(Form("g%s_ti_sync_count", modname.Data()));
505 gHcParms->RemoveName(parm_names.back().c_str());
506 gHcParms->Define(parm_names.back().c_str(),
507 "Number of Pedestal events", TI.sync_count);
508 parm_names.emplace_back(Form("g%s_ti_ps[%d]", modname.Data(), NPS));
509 gHcParms->RemoveName(parm_names.back().c_str());
510 gHcParms->Define(parm_names.back().c_str(), "TI Event Prescale Internal Value", *TI.prescales.data());
511 parm_names.emplace_back(Form("g%s_ti_ps_factors[%d]", modname.Data(), NPS));
512 gHcParms->RemoveName(parm_names.back().c_str());
513 gHcParms->Define(parm_names.back().c_str(), "TI Event Prescale Factor", *TI.ps_factors.data());
514 }
515
516 return 0;
517}
518
520{
521 // Print configuration info
522
523 if( CAEN1190.present ) {
524 cout << " CAEN 1190 Configuration" << endl;
525 cout << " Resolution: " << CAEN1190.resolution << " ps" << endl;
526 cout << " T Offset: " << CAEN1190.timewindow_offset << endl;
527 cout << " T Width: " << CAEN1190.timewindow_width << endl;
528 }
529 if( FADC250.present ) {
530 cout << " FADC250 Configuration" << endl;
531 cout << " Mode: " << FADC250.mode << endl;
532 cout << " Blocklevel: " << FADC250.blocklevel << endl;
533 cout << " Latency: " << FADC250.window_lat << " Width: "<< FADC250.window_width << endl;
534 cout << " DAC Level: " << FADC250.dac_level << " Threshold: " << FADC250.threshold << endl;
535 cout << " NPED: " << FADC250.nped << " NSA: " << FADC250.nsa << " NSB: " << FADC250.nsb << endl;
536 cout << " MAXPED: " << FADC250.maxped << " NP: " << FADC250.np << " NSAT: " << FADC250.nsat << endl;
537
538 if( !FADC250.thresholds.empty() ) {
539 cout << " Thresholds";
540 for( const auto& thr: FADC250.thresholds ) {
541 auto slot = thr.first;
542 cout << " " << setw(5) << slot;
543 }
544 cout << endl;
545 for( UInt_t ichan = 0; ichan < NTHR; ichan++ ) {
546 cout << " " << setw(2) << ichan << " ";
547 for( const auto& chan: FADC250.thresholds ) {
548 const auto& thresholds = chan.second;
549 cout << " " << setw(5) << thresholds[ichan];
550 }
551 cout << endl;
552 }
553 }
554 }
555 if( TI.present ) {
556 cout << " TI Configuration" << endl;
557 cout << " N Pedestals: " << TI.nped << " events" << endl;
558 cout << " Scaler Period: " << TI.scaler_period << " seconds" << endl;
559 cout << " Sync interval: " << TI.sync_count << " events" << endl;
560 cout << " Prescale exponents: ";
561 for( auto ps: TI.prescales )
562 cout << " " << ps;
563 cout << endl;
564 cout << " Prescale factors: ";
565 for( auto ps: TI.ps_factors )
566 cout << " " << ps;
567 cout << endl;
568 }
569}
570
572 : present{false}
573 , blocklevel{0}
574 , dac_level{0}
575 , threshold{0}
576 , mode{0}
577 , window_lat{0}
578 , window_width{0}
579 , nsb{0}
580 , nsa{0}
581 , np{0}
582 , nped{0}
583 , maxped{0}
584 , nsat{0}
585 , nmodules{0}
586{}
587
589 : present{false}
590 , resolution{0}
591 , timewindow_offset{0}
592 , timewindow_width{0}
593{}
594
596 : present{false}
597 , nped{0}
598 , scaler_period{0}
599 , sync_count{0}
600 , prescales{}
601 , ps_factors{}
602{
603 for( auto& ps : prescales )
604 ps = 0;
605}
606
int Int_t
unsigned int UInt_t
uint32_t chan
bool Bool_t
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 np
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 mode
R__EXTERN class THaRunBase * gHaRun
ClassImp(VDC::AnalyticTTDConv) using namespace std
R__EXTERN class THcParmList * gHcParms
Definition THcGlobals.h:11
char * Form(const char *fmt,...)
UInt_t threshold[NUMSLOTS][NADCCHAN]
virtual const char * Here(const char *) const
UInt_t GetEvType() const
UInt_t GetRawData(UInt_t crate, UInt_t i) const
Int_t GetDataVersion() const
const UInt_t * GetRawDataBuffer() const
UInt_t GetEvLength() const
std::vector< UInt_t > eventtypes
virtual Bool_t IsMyEvent(UInt_t type) const
THaRunParameters * GetParameters() const
TArrayI & Prescales()
virtual Int_t RemoveName(const char *name)
THaVar * Define(const char *name, const Byte_t &var, const Int_t *count=nullptr)
Analyze Hall C Configuration events. (Event type 125).
UInt_t DecodeCAEN1190Config(THaEvData *evdata, UInt_t ip, UInt_t len, CrateConfig::CAEN1190_t &cfg)
static constexpr UInt_t NTHR
std::vector< std::string > fParms
Bool_t IsPresent(UInt_t crate)
UInt_t GetNSA(UInt_t crate)
virtual Int_t Analyze(THaEvData *evdata)
virtual void MakeParms(UInt_t roc)
THcConfigEvtHandler(const char *name, const char *description)
static constexpr UInt_t NPS
UInt_t GetNSB(UInt_t crate)
std::map< UInt_t, CrateConfig > fCrateInfoMap
UInt_t GetNPED(UInt_t crate)
UInt_t DecodeTIConfig(THaEvData *evdata, UInt_t ip, UInt_t len, CrateConfig::TI_t &cfg)
UInt_t DecodeFADC250Config(THaEvData *evdata, UInt_t ip, UInt_t len, CrateConfig::FADC250_t &cfg)
TString fName
TH1 * h
STL namespace.
std::map< UInt_t, std::array< UInt_t, NTHR > > thresholds
Int_t MakeParms(THcConfigEvtHandler &h) const