Hall C ROOT/C++ Analyzer (hcana)
THcHitList.cxx
Go to the documentation of this file.
1 // Remove this line to restore missing ADC reference time messages
11 #include "THcHitList.h"
12 #include "TError.h"
13 #include "TClass.h"
14 
15 #include "THcConfigEvtHandler.h"
16 #include "THaGlobals.h"
17 #include "THcGlobals.h"
18 #include "THcParmList.h"
19 #include "TList.h"
20 
21 using namespace std;
22 
23 #define SUPPRESSMISSINGADCREFTIMEMESSAGES 1
24 THcHitList::THcHitList() : fMap(0), fTISlot(0), fDisableSlipCorrection(kFALSE)
25 {
27 
28  fRawHitList = NULL;
29  fPSE125 = NULL;
30  fFADCSlotMap.clear();
31 
32 }
33 
36  delete fRawHitList;
37  delete [] fSignalTypes;
38 }
56 /* InitHitList should make a list of ROCs that have FADCs in them. (Probably
57 just one.) It then needs to figure out where the TI is and make sure
58 the decoder is setup for pulling out the event time.
59 
60 Do we need to somehow configure this in the Hall C style map file. Is there
61 a method to ask the OO decoder what kind of module is in a given slot?
62 
63 */
64 
65 void THcHitList::InitHitList(THaDetMap* detmap,
66  const char *hitclass, Int_t maxhits,
67  Int_t tdcref_cut, Int_t adcref_cut) {
68  cout << "InitHitList: " << hitclass << " RefTimeCuts: " << tdcref_cut << " " << adcref_cut << endl;
69  fRawHitList = new TClonesArray(hitclass, maxhits);
71  fNMaxRawHits = maxhits;
72  fNRawHits = 0;
73 
74  if(tdcref_cut >= 0) {
76  fTDC_RefTimeCut = tdcref_cut;
77  } else {
79  fTDC_RefTimeCut = -tdcref_cut;
80  }
81  if(adcref_cut >= 0) {
83  fADC_RefTimeCut = adcref_cut;
84  } else {
86  fADC_RefTimeCut = -adcref_cut;
87  }
88 
89  for(Int_t i=0;i<maxhits;i++) {
91  }
92  // Query a raw hit object to see what kind of data to deliver
93  THcRawHit* rawhit = (THcRawHit*) (*fRawHitList)[0];
94  fNSignals = rawhit->GetNSignals();
96  for(UInt_t isig=0;isig<fNSignals;isig++) {
97  fSignalTypes[isig] = rawhit->GetSignalType(isig);
98  }
99 
100  fdMap = detmap;
101 
102  /* Pull out all the reference channels */
103  fNRefIndex = 0;
104  fRefIndexMaps.clear();
105  /* Find the biggest refindex */
106  for (UInt_t i=0; i < fdMap->GetSize(); i++) {
107  THaDetMap::Module* d = fdMap->GetModule(i);
108  if(d->plane >= 1000) {
109  Int_t refindex = d->signal;
110  if(refindex>=fNRefIndex) {
111  fNRefIndex = refindex+1;
112  }
113  }
114  }
115  // Create the vector. Could roll this into last loop
116  for(Int_t i=0;i<fNRefIndex;i++) {
117  RefIndexMap map;
118  map.defined = kFALSE;
119  map.hashit = kFALSE;
120  fRefIndexMaps.push_back(map);
121  }
122  // Put the refindex mapping information in the vector
123  for (UInt_t i=0; i < fdMap->GetSize(); i++) {
124  THaDetMap::Module* d = fdMap->GetModule(i);
125  if(d->plane >= 1000) { // This is a reference time definition
126  Int_t refindex = d->signal;
127  if(refindex >= 0) {
128  fRefIndexMaps[refindex].crate = d->crate;
129  fRefIndexMaps[refindex].slot = d->slot;
130  fRefIndexMaps[refindex].channel = d->lo;
131  fRefIndexMaps[refindex].defined = kTRUE;
132  } else {
133  cout << "Hitlist: Invalid refindex mapping" << endl;
134  }
135  }
136  }
137  // Loop to check that requested refindex's are defined
138  // and that signal #'s are in range
139  for (UInt_t i=0; i < fdMap->GetSize(); i++) {
140  THaDetMap::Module* d = fdMap->GetModule(i);
141  Int_t refindex = d->refindex;
142  if(d->plane < 1000) {
143  if(d->signal >= fNSignals) {
144  cout << "Invalid signal " << d->signal << " for " <<
145  " (" << d->crate << ", " << d->slot <<
146  ", " << d->lo << ")" << endl;
147  }
148  if(refindex >= 0) {
149  if(!fRefIndexMaps[refindex].defined) {
150  cout << "Refindex " << refindex << " not defined for " <<
151  " (" << d->crate << ", " << d->slot <<
152  ", " << d->lo << ")" << endl;
153  }
154  }
155  }
156  }
157 
158  // Find the Event 125 handler
159  TObjLink *lnk = gHaEvtHandlers->FirstLink();
160  while (lnk) {
161  if(strcmp(lnk->GetObject()->ClassName(),"THcConfigEvtHandler")==0) {
162  break;
163  }
164  lnk = lnk->Next();
165  }
166  if(lnk) {
167  fPSE125 = static_cast<THcConfigEvtHandler*>(lnk->GetObject());
168  } else {
169  cout << "THcHitList::InitHitList : Prestart event 125 not found." << endl;
170  fPSE125 = 0;
171  }
173 
174  fNTDCRef_miss = 0;
175  fNADCRef_miss = 0;
176 
177  // DisableSlipCorrection();
178 }
179 
191 Int_t THcHitList::DecodeToHitList( const THaEvData& evdata, Bool_t suppresswarnings ) {
192 
193  if(!fMap) { // Find the TI slot for ADCs
194  // Assumes that all FADCs are in the same crate
195  cout << "Got the Crate map" << endl;
196  fMap = evdata.GetCrateMap();
197  for (UInt_t i=0; i < fdMap->GetSize(); i++) { // Look for a FADC250
198  THaDetMap::Module* d = fdMap->GetModule(i);
199  Decoder::Fadc250Module* isfadc = dynamic_cast<Decoder::Fadc250Module*>(evdata.GetModule(d->crate, d->slot));
200  if(isfadc) {
201  // Scan this crate to find the TI.
202  for(UInt_t slot=0;slot<Decoder::MAXSLOT;slot++) {
203  if(fMap->getModel(d->crate, slot) == 4) {
204  fTISlot = slot;
205  fTICrate = d->crate;
206  cout << "TI Slot = " << fTISlot << endl;
207  break;
208  }
209  }
210  // Now make a map of all the FADCs in this crate
211  if(fTISlot>0) {
212  for(UInt_t slot=0;slot<Decoder::MAXSLOT;slot++) {
213  Decoder::Fadc250Module* fadc = dynamic_cast<Decoder::Fadc250Module*>
214  (evdata.GetModule(d->crate, slot));
215  if(fadc) {
216  fFADCSlotMap[slot] = fadc;
217  }
218  }
219  }
220  break;
221  }
222  }
223  }
225 
226  UInt_t titime = 0;
227  Bool_t TI_TRIGGER_TIME_FOUND = kFALSE;
228  if(fTISlot>0) {
229  UInt_t FUDGE=7;
230  if (evdata.GetNumHits(fTICrate, fTISlot, 2) > 0) {
231  TI_TRIGGER_TIME_FOUND = kTRUE;
232  titime = evdata.GetData(fTICrate, fTISlot, 2, 0)-FUDGE;
233  // Need to get the FADC time for all modules in this crate
234  // that have hits. Make a map with these times.
235  fTrigTimeShiftMap.clear();
236  }
237  }
238 
239  // cout << " Clearing TClonesArray " << endl;
240  fRawHitList->Clear( );
241  fNRawHits = 0;
242  Bool_t tdcref_miss = kFALSE;
243  Bool_t adcref_miss = kFALSE;
244 
245  // Get the indexed reference times for this event
246  for(Int_t i=0;i<fNRefIndex;i++) {
247  if(fRefIndexMaps[i].defined) {
248 
249  if(evdata.IsMultifunction(fRefIndexMaps[i].crate,
250  fRefIndexMaps[i].slot)) { // Multifunction module (e.g. FADC)
251  // Make sure at least one pulse
252  UInt_t nrefhits = evdata.GetNumEvents(Decoder::kPulseTime,
253  fRefIndexMaps[i].crate,
254  fRefIndexMaps[i].slot,
255  fRefIndexMaps[i].channel);
256  Int_t timeshift=0;
257  if(fTISlot>0 && TI_TRIGGER_TIME_FOUND) { // Get the trigger time for this module
258  if(fTrigTimeShiftMap.find(fRefIndexMaps[i].slot)
259  == fTrigTimeShiftMap.end()) { //
260  if(fFADCSlotMap.find(fRefIndexMaps[i].slot) != fFADCSlotMap.end()) {
262  = fFADCSlotMap[fRefIndexMaps[i].slot]->GetTriggerTime() - titime;
263  }
264  timeshift = fTrigTimeShiftMap[fRefIndexMaps[i].slot];
265  }
266  }
267  fRefIndexMaps[i].hashit = kFALSE;
268  Bool_t goodreftime=kFALSE;
269  Int_t reftime = 0;
270  Int_t prevtime = 0;
271  Int_t difftime = 0;
272  for(UInt_t ihit=0; ihit<nrefhits; ihit++) {
273  reftime = evdata.GetData(Decoder::kPulseTime,fRefIndexMaps[i].crate,
274  fRefIndexMaps[i].slot, fRefIndexMaps[i].channel,ihit);
275  reftime += 64*timeshift;
276  if (ihit != 0) difftime=reftime-prevtime;
277  prevtime = reftime;
278  if(reftime >= fADC_RefTimeCut) {
279  goodreftime = kTRUE;
280  break;
281  }
282  }
283  if(goodreftime || (nrefhits>0 && fADC_RefTimeBest)) {
284  fRefIndexMaps[i].reftime = reftime;
285  fRefIndexMaps[i].refdifftime = difftime;
286  fRefIndexMaps[i].hashit = kTRUE;
287  }
288  } else { // Assume this is a TDC
289  Int_t nrefhits = evdata.GetNumHits(fRefIndexMaps[i].crate,
290  fRefIndexMaps[i].slot,
291  fRefIndexMaps[i].channel);
292  fRefIndexMaps[i].hashit = kFALSE;
293  // Only take first hit in this reference channel that is bigger
294  // then fTDC_RefTimeCut
295  Bool_t goodreftime=kFALSE;
296  Int_t reftime = 0;
297  Int_t prevtime = 0;
298  Int_t difftime = 0;
299  for(Int_t ihit=0; ihit<nrefhits; ihit++) {
300  reftime = evdata.GetData(fRefIndexMaps[i].crate,fRefIndexMaps[i].slot,
301  fRefIndexMaps[i].channel,ihit);
302  if( ihit != 0) difftime=reftime-prevtime;
303  prevtime=reftime;
304  if(reftime >= fTDC_RefTimeCut) {
305  goodreftime = kTRUE;
306  break;
307  }
308  }
309  if(goodreftime || (nrefhits>0 && fTDC_RefTimeBest)) {
310  fRefIndexMaps[i].reftime = reftime;
311  fRefIndexMaps[i].refdifftime = difftime;
312  fRefIndexMaps[i].hashit = kTRUE;
313  }
314  }
315  }
316  }
317  for ( UInt_t i=0; i < fdMap->GetSize(); i++ ) {
318  THaDetMap::Module* d = fdMap->GetModule(i);
319 
320  // Loop over all channels that have a hit.
321  // cout << "Crate/Slot: " << d->crate << "/" << d->slot << endl;
322  Int_t plane = d->plane;
323  if (plane >= 1000) continue; // Skip reference times
324  Int_t signal = d->signal;
325  UInt_t signaltype = fSignalTypes[signal];
326  Bool_t multifunction = evdata.IsMultifunction(d->crate, d->slot);
327  // Should probably get the Decoder::Module object and use it's
328  // methods. Saving a THaEvData::GetModule call every time
329 
330  for ( UInt_t j=0; j < evdata.GetNumChan( d->crate, d->slot); j++) {
331  THcRawHit* rawhit=0;
332 
333  UInt_t chan = evdata.GetNextChan( d->crate, d->slot, j );
334  if( chan < d->lo || chan > d->hi ) continue; // Not one of my channels
335 
336  // Need to convert crate, slot, chan into plane, counter, signal
337  // Search hitlist for this plane,counter,signal
338  Int_t counter = d->reverse ? d->first + d->hi - chan : d->first + chan - d->lo;
339  //cout << d->crate << " " << d->slot << " " << chan << " " << plane << " "
340  // << counter << " " << signal << endl;
341  // Search hit list for plane and counter
342  // We could do sorting
343  UInt_t thishit = 0;
344  while(thishit < fNRawHits) {
345  rawhit = (THcRawHit*) (*fRawHitList)[thishit];
346  if (plane == rawhit->fPlane
347  && counter == rawhit->fCounter) {
348  // cout << "Found as " << thishit << "/" << fNRawHits << endl;
349  break;
350  }
351  thishit++;
352  }
353 
354  if(thishit == fNRawHits) {
355  rawhit = (THcRawHit*) fRawHitList->ConstructedAt(thishit,"");
356  fNRawHits++;
357  rawhit->fPlane = plane;
358  rawhit->fCounter = counter;
359  }
360 
361  // Get the data from this channel
362  // Allow for multiple hits
363  if(signaltype == THcRawHit::kTDC || !multifunction) {
364  UInt_t nMHits = evdata.GetNumHits(d->crate, d->slot, chan);
365  for (UInt_t mhit = 0; mhit < nMHits; mhit++) {
366  UInt_t data = evdata.GetData( d->crate, d->slot, chan, mhit);
367  // cout << "Signal " << signal << "=" << data << endl;
368  rawhit->SetData(signal,data);
369  }
370  // Get the reference time.
371  if(d->refchan >= 0) {
372  UInt_t nrefhits = evdata.GetNumHits(d->crate,d->slot,d->refchan);
373  Bool_t goodreftime=kFALSE;
374  Int_t reftime=0;
375  Int_t prevtime=0;
376  Int_t difftime=0;
377  for(UInt_t ihit=0; ihit<nrefhits; ihit++) {
378  reftime = evdata.GetData(d->crate, d->slot, d->refchan, ihit);
379  if (ihit != 0 ) difftime=reftime-prevtime;
380  prevtime = reftime;
381  if(reftime >= fTDC_RefTimeCut) {
382  goodreftime = kTRUE;
383  break;
384  }
385  }
386  // If RefTimeBest flag set, take the last hit if none of the
387  // hits make the RefTimeCut
388  if(goodreftime || (nrefhits>0 && fTDC_RefTimeBest)) {
389  rawhit->SetReference(signal, reftime);
390  rawhit->SetReferenceDiff(signal, difftime);
391  } else if (!suppresswarnings) {
392  cout << "HitList(event=" << evdata.GetEvNum() << "): refchan " << d->refchan <<
393  " missing for (" << d->crate << ", " << d->slot <<
394  ", " << chan << ")" << endl;
395  tdcref_miss = kTRUE;
396  }
397  } else {
398  if(d->refindex >=0 && d->refindex < fNRefIndex) {
399  if(fRefIndexMaps[d->refindex].hashit) {
400  rawhit->SetReference(signal, fRefIndexMaps[d->refindex].reftime);
401  rawhit->SetReferenceDiff(signal, fRefIndexMaps[d->refindex].refdifftime);
402  } else {
403  if(!suppresswarnings) {
404  cout << "HitList(event=" << evdata.GetEvNum() << "): refindex " << d->refindex <<
405  " (" << fRefIndexMaps[d->refindex].crate <<
406  ", " << fRefIndexMaps[d->refindex].slot <<
407  ", " << fRefIndexMaps[d->refindex].channel << ")" <<
408  " missing for (" << d->crate << ", " << d->slot <<
409  ", " << chan << ")" << endl;
410  tdcref_miss = kTRUE;
411  }
412  }
413  }
414  }
415  } else { // This is a Flash ADC
416 
417  if (fPSE125) {
418  if(!fHaveFADCInfo) {
419  fNSA = fPSE125->GetNSA(d->crate);
420  fNSB = fPSE125->GetNSB(d->crate);
421  fNPED = fPSE125->GetNPED(d->crate);
423  }
424  // Set F250 parameters.
425  rawhit->SetF250Params(fNSA, fNSB, fNPED);
426  }
427 
428  // Copy the samples
429  UInt_t nsamples=evdata.GetNumEvents(Decoder::kSampleADC, d->crate, d->slot, chan);
430 
431  // If nsamples comes back zero, may want to suppress further attempts to
432  // get sample data for this or all modules
433  for (UInt_t isamp=0;isamp<nsamples;isamp++) {
434  rawhit->SetSample(signal,evdata.GetData(Decoder::kSampleADC, d->crate, d->slot, chan, isamp));
435  }
436  // Now get the pulse mode data
437  // Pulse area will go into regular SetData, others will use special hit methods
438  UInt_t npulses=evdata.GetNumEvents(Decoder::kPulseIntegral, d->crate, d->slot, chan);
439  // Assume that the # of pulses for kPulseTime, kPulsePeak and kPulsePedestal are same;
440  Int_t timeshift=0;
441  if(fTISlot>0 && TI_TRIGGER_TIME_FOUND) { // Get the trigger time for this module
442  if(fTrigTimeShiftMap.find(d->slot)
443  == fTrigTimeShiftMap.end()) { //
444  if(fFADCSlotMap.find(d->slot) != fFADCSlotMap.end()) {
445  fTrigTimeShiftMap[d->slot]
446  = fFADCSlotMap[d->slot]->GetTriggerTime() - titime;
447  }
448  }
449  timeshift = fTrigTimeShiftMap[d->slot];
450  }
451  for (UInt_t ipulse=0;ipulse<npulses;ipulse++) {
452  rawhit->SetDataTimePedestalPeak(signal,
453  evdata.GetData(Decoder::kPulseIntegral, d->crate, d->slot, chan, ipulse),
454  evdata.GetData(Decoder::kPulseTime, d->crate, d->slot, chan, ipulse)+64*timeshift,
455  evdata.GetData(Decoder::kPulsePedestal, d->crate, d->slot, chan, ipulse),
456  evdata.GetData(Decoder::kPulsePeak, d->crate, d->slot, chan, ipulse));
457  }
458  // Get the reference time for the FADC pulse time
459  if(d->refchan >= 0) { // Reference time for the slot
460  UInt_t nrefhits = evdata.GetNumEvents(Decoder::kPulseIntegral,
461  d->crate, d->slot, d->refchan);
462  Bool_t goodreftime=kFALSE;
463  Int_t reftime = 0;
464  Int_t prevtime = 0;
465  Int_t difftime = 0;
466  timeshift=0;
467  if(fTISlot>0 && TI_TRIGGER_TIME_FOUND) { // Get the trigger time for this module
468  if(fTrigTimeShiftMap.find(d->slot)
469  == fTrigTimeShiftMap.end()) { //
470  if(fFADCSlotMap.find(d->slot) != fFADCSlotMap.end()) {
471  fTrigTimeShiftMap[d->slot]
472  = fFADCSlotMap[d->slot]->GetTriggerTime() - titime;
473  }
474  }
475  timeshift = fTrigTimeShiftMap[d->slot];
476  }
477  for(UInt_t ihit=0; ihit<nrefhits; ihit++) {
478  reftime = evdata.GetData(Decoder::kPulseTime, d->crate, d->slot, d->refchan, ihit);
479  reftime += 64*timeshift;
480  if (ihit != 0) difftime=reftime-prevtime;
481  prevtime=reftime;
482  if(reftime >= fADC_RefTimeCut) {
483  goodreftime=kTRUE;
484  break;
485  }
486  }
487  // If RefTimeBest flag set, take the last hit if none of the
488  // hits make the RefTimeCut
489  if(goodreftime || (nrefhits>0 && fADC_RefTimeBest)) {
490  rawhit->SetReference(signal, reftime);
491  rawhit->SetReferenceDiff(signal, difftime);
492  } else if (!suppresswarnings) {
493 #ifndef SUPPRESSMISSINGADCREFTIMEMESSAGES
494  cout << "HitList(event=" << evdata.GetEvNum() << "): refchan " << d->refchan <<
495  " missing for (" << d->crate << ", " << d->slot <<
496  ", " << chan << ")" << endl;
497 #endif
498  adcref_miss = kTRUE;
499  }
500  } else {
501  if(d->refindex >=0 && d->refindex < fNRefIndex) {
502  if(fRefIndexMaps[d->refindex].hashit) {
503  rawhit->SetReference(signal, fRefIndexMaps[d->refindex].reftime);
504  rawhit->SetReferenceDiff(signal, fRefIndexMaps[d->refindex].refdifftime);
505  } else {
506  if(!suppresswarnings) {
507 #ifndef SUPPRESSMISSINGADCREFTIMEMESSAGES
508  cout << "HitList(event=" << evdata.GetEvNum() << "): refindex " << d->refindex <<
509  " (" << fRefIndexMaps[d->refindex].crate <<
510  ", " << fRefIndexMaps[d->refindex].slot <<
511  ", " << fRefIndexMaps[d->refindex].channel << ")" <<
512  " missing for (" << d->crate << ", " << d->slot <<
513  ", " << chan << ")" << endl;
514 #endif
515  adcref_miss = kTRUE;
516  }
517  }
518  }
519  }
520  }
521  }
522  }
523 #if 1
524  if(fTISlot>0 && TI_TRIGGER_TIME_FOUND) {
525  // cout << "TI ROC: " << fTICrate << " TI Time: " << titime << endl;
526  map<Int_t, Int_t>::iterator it;
527  for(it=fTrigTimeShiftMap.begin(); it!=fTrigTimeShiftMap.end(); it++) {
528  if(it->second < -3 || it->second > 3) {
529  cout << "Big ADC Trigger Time Shift, ROC " << fTICrate << endl;
530  cout << it->first << " " << it->second << endl;
531  }
532  }
533  } else if ( fTISlot>0 && !TI_TRIGGER_TIME_FOUND) {
534  cout << "TI Trigger Time Not found for event type = " << evdata.GetEvType() << " event num = " << evdata.GetEvNum() << " TI Crate = " << fTICrate << " TI Slot = " << fTISlot<< endl;
535  }
536 
537 #endif
539 
540  fNTDCRef_miss += (tdcref_miss ? 1 : 0);
541  fNADCRef_miss += (adcref_miss ? 1 : 0);
542  return fNRawHits; // Does anything care what is returned
543 }
544 void THcHitList::CreateMissReportParms(const char *prefix)
545 {
553  cout << "Defining " << Form("%s_tdcref_miss", prefix) << " and " << Form("%s_adcref_miss", prefix) << endl;
554  gHcParms->Define(Form("%s_tdcref_miss", prefix), "Missing TDC reference times", fNTDCRef_miss);
555  gHcParms->Define(Form("%s_adcref_miss", prefix), "Missing ADC reference times", fNADCRef_miss);
556 }
557 void THcHitList::MissReport(const char *name)
558 {
559  cout << "Missing Ref times:" << setw(20) << name << setw(10) << fNTDCRef_miss << setw(10) << fNADCRef_miss << endl;
560 }
561 
Bool_t IsMultifunction(UInt_t crate, UInt_t slot) const
Bool_t fTDC_RefTimeBest
Definition: THcHitList.h:49
Bool_t fHaveFADCInfo
Definition: THcHitList.h:76
virtual Decoder::Module * GetModule(UInt_t roc, UInt_t slot) const
Int_t fNSB
Definition: THcHitList.h:78
virtual Int_t GetNSA(Int_t crate)
virtual void SetF250Params(Int_t NSA, Int_t NSB, Int_t NPED)
Definition: THcRawHit.h:46
void MissReport(const char *name)
Definition: THcHitList.cxx:557
virtual ESignalType GetSignalType(Int_t signal)
Definition: THcRawHit.h:38
Builds a Hall C ENGINE style list of raw hits from raw data.
Definition: THcHitList.h:27
UInt_t fNSignals
Definition: THcHitList.h:72
UInt_t GetEvNum() const
int Int_t
bool Bool_t
STL namespace.
Int_t fNADCRef_miss
Definition: THcHitList.h:82
TClonesArray * fRawHitList
Definition: THcHitList.h:51
Int_t fCounter
Definition: THcRawHit.h:55
Int_t fTDC_RefTimeCut
Definition: THcHitList.h:47
Int_t fNPED
Definition: THcHitList.h:79
TObject * ConstructedAt(Int_t idx)
Decoder::THaCrateMap * GetCrateMap() const
virtual Int_t GetNSignals()
Definition: THcRawHit.h:39
tuple signal
std::vector< RefIndexMap > fRefIndexMaps
Definition: THcHitList.h:67
Int_t fTICrate
Definition: THcHitList.h:86
THcConfigEvtHandler * fPSE125
Definition: THcHitList.h:75
virtual void SetReferenceDiff(Int_t signal, Int_t reference)
Definition: THcRawHit.h:42
Int_t fNTDCRef_miss
Definition: THcHitList.h:81
Int_t fTISlot
Definition: THcHitList.h:85
virtual void Clear(Option_t *option="")
TClass * fRawHitClass
Definition: THcHitList.h:52
void InitHitList(THaDetMap *detmap, const char *hitclass, Int_t maxhits, Int_t tdcref_cut=0, Int_t adcref_cut=0)
Save the electronics module to detector mapping and initialize a hit array of hits of class hitclass...
Definition: THcHitList.cxx:65
UInt_t GetNumHits(UInt_t crate, UInt_t slot, UInt_t chan) const
virtual const char * ClassName() const
tuple data
Int_t fNSA
Definition: THcHitList.h:77
unsigned int UInt_t
Analyze Hall C Configuration events. (Event type 125).
char * Form(const char *fmt,...)
void CreateMissReportParms(const char *prefix)
Definition: THcHitList.cxx:544
virtual void SetReference(Int_t signal, Int_t reference)
Definition: THcRawHit.h:41
UInt_t GetData(UInt_t crate, UInt_t slot, UInt_t chan, UInt_t hit) const
virtual Int_t GetNSB(Int_t crate)
Base class detector specific raw hit that go into hit lists.
Definition: THcRawHit.h:11
UInt_t GetNumEvents(Decoder::EModuleType type, UInt_t crate, UInt_t slot, UInt_t chan) const
const Bool_t kFALSE
Int_t getModel(UInt_t crate, UInt_t slot) const
virtual Int_t GetNPED(Int_t crate)
TClass * GetClass() const
Bool_t fADC_RefTimeBest
Definition: THcHitList.h:50
std::map< Int_t, Int_t > fTrigTimeShiftMap
Definition: THcHitList.h:88
Decoder::THaCrateMap * fMap
Definition: THcHitList.h:84
virtual ~THcHitList()
Definition: THcHitList.cxx:34
Int_t fPlane
Definition: THcRawHit.h:54
UInt_t GetEvType() const
virtual void SetSample(Int_t signal, Int_t data)
Definition: THcRawHit.h:33
ClassImp(THcDCLookupTTDConv) THcDCLookupTTDConv
UInt_t fNRawHits
Definition: THcHitList.h:45
UInt_t GetNextChan(UInt_t crate, UInt_t slot, UInt_t index) const
virtual void Sort(Int_t upto=kMaxInt)
UInt_t GetNumChan(UInt_t crate, UInt_t slot) const
THcRawHit::ESignalType * fSignalTypes
Definition: THcHitList.h:73
R__EXTERN class THcParmList * gHcParms
Definition: THcGlobals.h:11
THaDetMap * fdMap
Definition: THcHitList.h:54
Int_t fNRefIndex
Definition: THcHitList.h:71
const Bool_t kTRUE
Int_t fADC_RefTimeCut
Definition: THcHitList.h:48
virtual void SetData(Int_t signal, Int_t data)
Definition: THcRawHit.h:32
virtual Int_t DecodeToHitList(const THaEvData &evdata, Bool_t suppress=kFALSE)
Populate the hitlist from the raw event data.
Definition: THcHitList.cxx:191
virtual void SetDataTimePedestalPeak(Int_t signal, Int_t data, Int_t time, Int_t pedestal, Int_t peak)
Definition: THcRawHit.h:34
Double_t fDisableSlipCorrection
Definition: THcHitList.h:87
std::map< Int_t, Decoder::Fadc250Module * > fFADCSlotMap
Definition: THcHitList.h:89
Int_t fNMaxRawHits
Definition: THcHitList.h:46