BmnRoot 26.10.0-19-g6979a6c6
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnDecoder.h
Go to the documentation of this file.
1#ifndef BMNDECODER_H
2#define BMNDECODER_H 1
3
4#pragma GCC system_header
5#include <deque>
6#include <fstream>
7#include <map>
8#include <vector>
9// Boost
10#include <boost/property_tree/json_parser.hpp>
11#include <boost/property_tree/ptree.hpp>
12// ROOT
13#include "TClonesArray.h"
14#include "TFile.h"
15#include "TPRegexp.h"
16#include "TString.h"
17#include "TTimeStamp.h"
18#include "TTree.h"
19// FairRoot
20#include "FairRootManager.h"
21// BmnRoot
22#include "BmnAdcQA.h"
23#include "BmnCscRaw2Digit.h"
24#include "BmnDchRaw2Digit.h"
25#include "BmnECALRaw2Digit.h"
26#include "BmnEventHeader.h"
27#include "BmnFHCalRaw2Digit.h"
28#include "BmnGemRaw2Digit.h"
29#include "BmnHgndRaw2Digit.h"
30#include "BmnHodoRaw2Digit.h"
31#include "BmnMetadataRaw.h"
32#include "BmnMscRaw2Digit.h"
33#include "BmnMwpcRaw2Digit.h"
34#include "BmnNdetRaw2Digit.h"
35#include "BmnScWallRaw2Digit.h"
36#include "BmnSiBTRaw2Digit.h"
37#include "BmnSiliconRaw2Digit.h"
38#include "BmnTask.h"
39#include "BmnTof1Raw2Digit.h"
40// #include "BmnTof2Raw2DigitNew.h"
41#include "BmnTof701Raw2Digit.h"
42#include "BmnTrigRaw2Digit.h"
43#include "BmnVspRaw2Digit.h"
44#include "BmnZDCRaw2Digit.h"
45#include "DigiArrays.h"
46/********************************************************/
47// wait limit for input data (ms)
48#define WAIT_LIMIT 40000000
49#define UNKNOWN_RUNID 1000000
50// Debug ADC processor
51// #define ADC_QA true
52
53using std::map;
54using std::vector;
55namespace pt = boost::property_tree;
56
57using json = nlohmann::json;
58
59class BmnDecoder : public BmnTask
60{
61 public:
62 BmnDecoder(TString file = "", TString outfile = "", ULong_t nEvents = 0, ULong_t period = 8);
63 virtual ~BmnDecoder();
64
65 InitStatus Init();
66 InitStatus ReInit();
67 void Exec(Option_t* opt);
68 void AssignInputs();
69 // void AssignInputs(std::function<TObject*(TString) > branch_assignment_fun);
70 void InitMappers(std::function<void(TString, TObject*)> branch_reg_fun);
71 void ClearDigiArrays();
74 void FillAdcQa();
75 void SaveAdcQa();
76 void FillProfiles();
77 void FillNoisyChannels();
85
87 {
88 // fDigiTree->GetEntry(GetEventId());
89 DigiArrays d; // = new DigiArrays();
90 d.silicon = silicon;
91 d.gem = gem;
92 d.csc = csc;
93 d.vsp = vsp;
94 d.tof400 = tof400;
95 d.tof700 = tof700;
96 d.tof701 = tof701;
97 d.zdc = zdc;
98 d.scwall = scwall;
99 d.fhcal = fhcal;
100 d.hodo = hodo;
101 d.ndet = ndet;
102 d.hgnd = hgnd;
103 d.ecal = ecal;
104 d.dch = dch;
105 d.mwpc = mwpc;
106 d.sibt = sibt;
107 d.msc = msc_copy;
108 d.header = eventHeader;
109 if (fTrigMapper)
110 d.trigAr = fTrigMapper->GetTrigArrays();
111 return d;
112 }
113
114 void SetRawTree(TTree* tree) { fRawTree = tree; }
115
116 void SetRawTreeSpills(TTree* tree) { fRawTreeSpills = tree; }
117
119
121
123
124 void SetRunId(UInt_t v) { fRunId = v; }
125
126 void SetPeriodId(UInt_t v) { fPeriodId = v; }
127
128 void SetApplyThreshold(bool b) { fApplyThreshold = b; }
129
130 unordered_map<UInt_t, Long64_t> GetTimeShifts() { return fTimeShifts; }
131
132 UInt_t GetRunId() const { return fRunId; }
133
134 UInt_t GetPeriodId() const { return fPeriodId; }
135
136 UInt_t GetNevents() const { return fNTotalEvents; }
137
138 UInt_t GetEventId() const { return fEventId; }
139
141
143
144 // BmnTof2Raw2DigitNew* GetTof700Mapper() { return fTof700Mapper; }
145
147
149
151
153
155
157
159
161
163
165
167
169
171
173
175
177
178 void SetTof400Mapping(TString PlaceMap, TString StripMap)
179 {
180 fTof400PlaceMapFileName = PlaceMap;
181 fTof400StripMapFileName = StripMap;
182 }
183
184 void SetTof701Mapping(TString PlaceMap, TString StripMap)
185 {
186 fTof701PlaceMapFileName = PlaceMap;
187 fTof701StripMapFileName = StripMap;
188 }
189
191
193
194 // Legacy
195 // void SetTof700SlewingReference(Int_t chamber, Int_t refrun, Int_t refchamber);
196
198
200
202
204
206
208
210
212
214
216
218
220
222
224
226
228
229 void SetDetectorSetup(std::map<DetectorId, bool> setup) { fDetectorSetup = setup; }
230
232
234
235 void SetBmnSetup(BmnSetup v) { fBmnSetup = v; }
236
237 BmnSetup GetBmnSetup() const { return fBmnSetup; }
238
240
241 Int_t GetVerbose() const { return fVerbose; }
242
244
245 bool GetUseCalibFile() const { return fUseCalibFile; }
246
247 void SetSaveOutput(bool v) { fSaveOutput = v; }
248
249 bool GetSaveOutput() const { return fSaveOutput; }
250
251 void SetTaskMode(bool v = true) { isTaskMode = v; }
252
253 bool GetTaskMode() const { return isTaskMode; }
254
255 /***
256 Set forward mode (without intermediate raw root file)
257 */
258 void SetForwardMode(bool v = true) { isForwardMode = v; }
259
260 bool GetForwardMode() const { return isForwardMode; }
261
262 UInt_t GetBoundaryRun(UInt_t nSmpl)
263 {
264 // format for SILICON data was changed during March 2017 seance (run 1542)
265 // format for GEM was changed after March 2017 seance (run 1992)
266 // so we have to use this crutch.
267 return (nSmpl == 128) ? 1542 : 1992;
268 }
269
270 void SetRawRootFile(TString filename) { fRootFileName = filename; }
271
272 void SetDigiRootFile(TString filename) { fDigiFileName = filename; }
273
275
276 void SetDecoderConfigFileName(string FileName) { fDecoderConfigFileName = FileName; }
277
280 void* GetMapper(DetectorId id);
281
282 private:
283 const TTimeStamp TimeZero = TTimeStamp(time_t(0), 0);
286 // constexpr static const TPRegexp re_data = ".*\\w+_\\w+_\\w+_(\\d+)([^/]*)\\.data";
287 // constexpr static const TPRegexp re_raw = ".*\\w+_run(\\d+)([^/]*)_raw\\.root";
288
289 std::map<DetectorId, bool> fDetectorSetup;
290 pt::ptree conf;
296
299
300 UInt_t fRunId;
301 UInt_t fPeriodId;
302 UInt_t fEventId;
306 // for event
309 // for run
312
315 // TTree* fRawTreeSpillsT0;
356
361
362 // DAQ arrays
364 TClonesArray* adc32; // gem & csc
367 TClonesArray* adc; // zdc & ecal & scwall & fhcal
377 // Spill tree arrays
380
381 // Digi arrays
401
402 // header array
405
409
419 // BmnTof2Raw2DigitNew* fTof700Mapper;
429
433
435 BmnEventType fCurEventType; // for decoder
436 BmnEventType fPrevEventType; // for decoder
437 BmnSetup fBmnSetup;
449 UInt_t fT0Serial;
450
451 // Map to store pairs <Crate serial> - <crate time - T0 time>
452 unordered_map<UInt_t, Long64_t> fTimeShifts;
456 map<TTimeStamp, Int_t> leaps;
460 map<TTimeStamp, BmnSpillInfo> fSpillMap;
461 map<uint32_t, uint32_t> _dfl_run_id;
462
463#if 1
464#define DECL_TIMERS 1
465#define NAME_CONCAT(name, DetMapper) name##DetMapper
466#define NAME_DETECTOR_TIMER_REA(DetMapper) NAME_CONCAT(workTime_real_, DetMapper)
467#define NAME_DETECTOR_TIMER_CPU(DetMapper) NAME_CONCAT(workTime_cpu_, DetMapper)
468
469#define DECL_DETECTOR_TIMERS(DetMapper) \
470 Double_t NAME_DETECTOR_TIMER_REA(DetMapper) = 0.0; \
471 Double_t NAME_DETECTOR_TIMER_CPU(DetMapper) = 0.0;
472
473#define PRINT_DETECTOR_TIMERS(DetMapper) \
474 printf("Fill of the %22s: Real time %3.3f s, CPU time %3.3f s\n", typeid(DetMapper).name(), \
475 NAME_DETECTOR_TIMER_REA(DetMapper), NAME_DETECTOR_TIMER_CPU(DetMapper));
476
477#define FILL_DETECTOR(DetMapper, ...) \
478 timer.Start(); \
479 if (DetMapper) \
480 DetMapper->FillEvent(__VA_ARGS__); \
481 timer.Stop(); \
482 fRTime = timer.RealTime(); \
483 fCTime = timer.CpuTime(); \
484 NAME_DETECTOR_TIMER_REA(DetMapper) += fRTime; \
485 NAME_DETECTOR_TIMER_CPU(DetMapper) += fCTime; \
486 // printf("Real time %f s, CPU time %f s %s\n", fRTime, fCTime, typeid(DetMapper).name());
487
488#else
489#define FILL_DETECTOR(DetMapper, ...) \
490 if (DetMapper) \
491 DetMapper->FillEvent(__VA_ARGS__);
492#endif
493
494#ifdef DECL_TIMERS
515#endif
516
517 // int refrun_tof700_slewing[60];
518 // int refchamber_tof700_slewing[60];
519 // int type_tof700_slewing[60];
520
521 template<typename BrType>
522 void Assignment_Fun(const TString name, BrType** ob, TTree* tree = nullptr)
523 {
524 if (isTaskMode) {
525 FairRootManager* frm = FairRootManager::Instance();
526 *ob = static_cast<BrType*>(frm->GetObject(name));
527 LOG(debug) << "Getting: " << name << " p: " << ob;
528 } else {
529 TBranch* b = tree->GetBranch(name);
530 // LOGF(debug, "branch dir: %p path: %s", (void*) b->GetDirectory(),
531 // b->GetDirectory()->GetPath());
532 auto brAddr = b->GetAddress();
533 if (brAddr) {
534 LOG(debug) << "Assigning branch " << b << " name " << name << " addr " << (void*)brAddr;
535 *ob = reinterpret_cast<BrType*>(*(reinterpret_cast<void**>(brAddr)));
536 } else {
537 tree->SetBranchAddress(name, ob);
538 LOG(debug) << " Set branch " << b << " name " << name << " addr " << (void*)*ob;
539 }
540 }
541 };
542
543 template<typename BrType>
544 void Register_Fun(const TString name, BrType** ob)
545 {
546 if (isTaskMode) {
547 FairRootManager* frm = FairRootManager::Instance();
548 frm->Register(name, name + "_dir", *ob, fSaveOutput);
549 } else {
550 TBranch* b = fDigiTree->Branch(name, ob);
551 LOGF(debug1, "Register branch %p : %s", (void*)b, name.Data());
552 }
553 };
554
557 BmnStatus GetT0Info(Double_t& t0time, Double_t& t0width);
558 inline void FillWR(UInt_t iSerial, ULong64_t iEvent, Long64_t t_sec, Long64_t t_ns);
562
563 void CopyDataToPedMap(UInt_t ev);
565
567};
568
569#endif
#define DECL_DETECTOR_TIMERS(DetMapper)
Definition BmnDecoder.h:469
DetectorId
BM@N DetectorID enumerator.
BmnStatus
Define status code.
Definition BmnEnums.h:93
__m128 v
Definition P4_F32vec4.h:1
int Int_t
double Double_t
long long Long64_t
unsigned long long ULong64_t
const char Option_t
#define ClassDef(name, id)
void InitMappers(std::function< void(TString, TObject *)> branch_reg_fun)
UInt_t GetBoundaryRun(UInt_t nSmpl)
Definition BmnDecoder.h:262
BmnNdetRaw2Digit * fNdetMapper
Definition BmnDecoder.h:425
UInt_t fPeriodId
Definition BmnDecoder.h:301
void SetRawTree(TTree *tree)
Definition BmnDecoder.h:114
void SetApplyThreshold(bool b)
Definition BmnDecoder.h:128
TClonesArray * sibt
Definition BmnDecoder.h:383
bool fSaveCalibFile
Definition BmnDecoder.h:446
BmnZDCRaw2Digit * fZDCMapper
Definition BmnDecoder.h:421
TFile * fDigiFileOut
Definition BmnDecoder.h:359
Int_t tai_utc_dif
Definition BmnDecoder.h:458
TString fTrigChannelMapFileName
Definition BmnDecoder.h:352
Int_t GetVerbose() const
Definition BmnDecoder.h:241
TString fDigiRunHdrName
Definition BmnDecoder.h:322
TClonesArray * tdc_hgnd
Definition BmnDecoder.h:373
BmnStatus DecodeOffline()
bool fExportJsonBocks
Definition BmnDecoder.h:447
bool fPedEnough
Definition BmnDecoder.h:443
void Assignment_Fun(const TString name, BrType **ob, TTree *tree=nullptr)
Definition BmnDecoder.h:522
TTimeStamp fRunStartTime
Definition BmnDecoder.h:310
bool GetSaveOutput() const
Definition BmnDecoder.h:249
BmnSpillHeader * spillHeader
Definition BmnDecoder.h:404
BmnTof1Raw2Digit * fTof400Mapper
Definition BmnDecoder.h:418
TClonesArray * tdc
Definition BmnDecoder.h:370
void SetVspMapping(TString map)
Definition BmnDecoder.h:176
pt::ptree conf
Definition BmnDecoder.h:290
unordered_map< UInt_t, Long64_t > fTimeShifts
Definition BmnDecoder.h:452
UInt_t fPedEvCntrBySpill
Definition BmnDecoder.h:438
map< uint32_t, uint32_t > _dfl_run_id
Definition BmnDecoder.h:461
TString GetSubNameAfterRunId(TString name)
void SetBmnSetup(BmnSetup v)
Definition BmnDecoder.h:235
BmnEventHeader * eventHeader
Definition BmnDecoder.h:403
BmnScWallRaw2Digit * fScWallMapper
Definition BmnDecoder.h:422
Int_t fVerbose
Definition BmnDecoder.h:459
TString fTof701StripMapFileName
Definition BmnDecoder.h:330
TClonesArray * hodo
Definition BmnDecoder.h:393
UInt_t fNoiseEvCntr
Definition BmnDecoder.h:440
BmnStatus FillTimeShiftsMap()
TString fVspMapFileName
Definition BmnDecoder.h:326
TString fSiliconMapFileName
Definition BmnDecoder.h:348
void SetTOF700ReferenceRun(Int_t n)
Definition BmnDecoder.h:120
bool fUseCalibFile
Definition BmnDecoder.h:445
TString fCalibFileName
Definition BmnDecoder.h:321
TClonesArray * gem
Definition BmnDecoder.h:384
TClonesArray * zdc
Definition BmnDecoder.h:390
TString fZDCMapFileName
Definition BmnDecoder.h:333
TString fScWallCalibrationFileName
Definition BmnDecoder.h:336
UInt_t fEventId
Definition BmnDecoder.h:302
TString fTrigPlaceMapFileName
Definition BmnDecoder.h:351
TString fTof701PlaceMapFileName
Definition BmnDecoder.h:329
BmnStatus DecodeDataToDigiIterate()
void ConfigureStripMappers()
BmnDchRaw2Digit * fDchMapper
Definition BmnDecoder.h:415
Long64_t fT0SyncTime
Definition BmnDecoder.h:453
void CopyDataToPedMap(UInt_t ev)
TString fHgndCalibrationFileName
Definition BmnDecoder.h:344
UInt_t GetPeriodId() const
Definition BmnDecoder.h:134
BmnTrigRaw2Digit * fTrigMapper
Definition BmnDecoder.h:417
void SetRunId(UInt_t v)
Definition BmnDecoder.h:124
Int_t fTOF700ReferenceChamber
Definition BmnDecoder.h:298
TString fCscMapFileName
Definition BmnDecoder.h:350
void SetHgndMapping(TString map)
Definition BmnDecoder.h:217
BmnStatus GetT0Info(Double_t &t0time, Double_t &t0width)
BmnTof701Raw2Digit * fTof701Mapper
Definition BmnDecoder.h:420
BmnStatus SaveCalibFile(TString &FileName)
ULong_t fNTotalEvents
Definition BmnDecoder.h:303
BmnEventHeader * eventHeaderDAQ
Definition BmnDecoder.h:374
TString fGemMapFileName
Definition BmnDecoder.h:325
BmnNdetRaw2Digit * GetNdetMapper()
Definition BmnDecoder.h:154
Double_t fT0Width
Definition BmnDecoder.h:455
void SetTof700Geom(TString geom)
Definition BmnDecoder.h:192
TClonesArray * tqdc_adc
Definition BmnDecoder.h:372
bool isTaskMode
Definition BmnDecoder.h:294
TClonesArray * mwpc
Definition BmnDecoder.h:398
void SetRawRootFile(TString filename)
Definition BmnDecoder.h:270
void SetForwardMode(bool v=true)
Definition BmnDecoder.h:258
std::map< DetectorId, bool > fDetectorSetup
Definition BmnDecoder.h:289
void SetFHCalCalibration(TString cal)
Definition BmnDecoder.h:207
BmnStatus LoadCalibFile(TString &FileName)
BmnStatus InitUTCShift()
TString fDigiFileName
Definition BmnDecoder.h:320
void AssignInputs()
TString fNdetCalibrationFileName
Definition BmnDecoder.h:342
TClonesArray * sync
Definition BmnDecoder.h:363
void SetHgndCalibration(TString cal)
Definition BmnDecoder.h:219
void ClearSpillDigiArrays()
BmnHodoRaw2Digit * fHodoMapper
Definition BmnDecoder.h:424
UInt_t fSpillCntr
Definition BmnDecoder.h:292
UInt_t GetNevents() const
Definition BmnDecoder.h:136
BmnSiliconRaw2Digit * fSiliconMapper
Definition BmnDecoder.h:413
TString fDchMapFileName
Definition BmnDecoder.h:323
void SetDetectorSetup(std::map< DetectorId, bool > setup)
Definition BmnDecoder.h:229
UInt_t fT0Serial
Definition BmnDecoder.h:449
bool GetTaskMode() const
Definition BmnDecoder.h:253
void SetDigiRootFile(TString filename)
Definition BmnDecoder.h:272
UInt_t GetEvForPedestals()
Definition BmnDecoder.h:233
TString fScWallMapFileName
Definition BmnDecoder.h:335
TClonesArray * csc
Definition BmnDecoder.h:385
UInt_t fEvForPedestals
Definition BmnDecoder.h:441
TClonesArray * tof701
Definition BmnDecoder.h:389
Long64_t fMaxEvent
Definition BmnDecoder.h:408
TFile * fRootFileIn
Definition BmnDecoder.h:357
TClonesArray * scwall
Definition BmnDecoder.h:391
BmnSetup GetBmnSetup() const
Definition BmnDecoder.h:237
TString GetDigiFileName()
Definition BmnDecoder.h:274
bool fApplyThreshold
Definition BmnDecoder.h:293
BmnVspRaw2Digit * fVspMapper
Definition BmnDecoder.h:412
UInt_t fRunId
Definition BmnDecoder.h:300
void SetFHCalMapping(TString map)
Definition BmnDecoder.h:205
TString fRawRunHdrName
Definition BmnDecoder.h:354
TString fTof400PlaceMapFileName
Definition BmnDecoder.h:327
BmnMwpcRaw2Digit * fMwpcMapper
Definition BmnDecoder.h:416
void SetMSCMapping(TString map)
Definition BmnDecoder.h:225
void SetECALCalibration(TString cal)
Definition BmnDecoder.h:223
TTree * GetDigiTree()
Definition BmnDecoder.h:118
void SetZDCCalibration(TString cal)
Definition BmnDecoder.h:199
void SetTof701Mapping(TString PlaceMap, TString StripMap)
Definition BmnDecoder.h:184
TTimeStamp GetRunEndTime() const
Definition BmnDecoder.h:142
void SetDecoderConfigFileName(string FileName)
Definition BmnDecoder.h:276
void SetPeriodId(UInt_t v)
Definition BmnDecoder.h:126
void FillProfiles()
void SetMwpcMapping(TString map)
Definition BmnDecoder.h:172
TFile * fRootFileOut
Definition BmnDecoder.h:358
UInt_t fStartEventId
Definition BmnDecoder.h:305
bool GetForwardMode() const
Definition BmnDecoder.h:260
TString fSubName
Definition BmnDecoder.h:353
TClonesArray * msc_copy
Definition BmnDecoder.h:399
Int_t GetUTCShift(TTimeStamp t)
Int_t fTOF700ReferenceRun
Definition BmnDecoder.h:297
TTree * fRawTreeSpills
Definition BmnDecoder.h:314
BmnMetadataRaw * metadata
Definition BmnDecoder.h:376
BmnECALRaw2Digit * fECALMapper
Definition BmnDecoder.h:427
TClonesArray * dch
Definition BmnDecoder.h:397
TClonesArray * t0raw
Definition BmnDecoder.h:379
BmnAdcQA * fFsdQa
Definition BmnDecoder.h:430
TClonesArray * msc
Definition BmnDecoder.h:378
BmnStatus LoadConfig()
void SetUseCalibFile(bool v)
Definition BmnDecoder.h:243
Double_t fT0Time
Definition BmnDecoder.h:454
Long64_t NRawTreeEvents
Definition BmnDecoder.h:406
void SetECALMapping(TString map)
Definition BmnDecoder.h:221
bool isSpillStart
Definition BmnDecoder.h:291
BmnHgndRaw2Digit * GetHgndMapper()
Definition BmnDecoder.h:156
void * GetMapper(DetectorId id)
void SetNdetCalibration(TString cal)
Definition BmnDecoder.h:215
BmnFHCalRaw2Digit * fFHCalMapper
Definition BmnDecoder.h:423
TString fMSCMapFileName
Definition BmnDecoder.h:347
TClonesArray * silicon
Definition BmnDecoder.h:382
void FillWR(UInt_t iSerial, ULong64_t iEvent, Long64_t t_sec, Long64_t t_ns)
void SetTrigPlaceMapping(TString map)
Definition BmnDecoder.h:160
TString fRootFileName
Definition BmnDecoder.h:319
TString fTof700MapFileName
Definition BmnDecoder.h:331
UInt_t GetRunId() const
Definition BmnDecoder.h:132
void SetGemMapping(TString map)
Definition BmnDecoder.h:174
void SetZDCMapping(TString map)
Definition BmnDecoder.h:197
TClonesArray * t0_copy
Definition BmnDecoder.h:400
DigiRunHeader * rawRunHeader
Definition BmnDecoder.h:375
BmnMscRaw2Digit * fMSCMapper
Definition BmnDecoder.h:428
TString fHodoCalibrationFileName
Definition BmnDecoder.h:340
BmnEventType fCurEventType
Definition BmnDecoder.h:435
BmnStatus DecodeDataToDigi()
BmnEventType fPrevEventType
Definition BmnDecoder.h:436
Double_t fCTime
Definition BmnDecoder.h:496
virtual ~BmnDecoder()
BmnScWallRaw2Digit * GetScWallMapper()
Definition BmnDecoder.h:148
map< TTimeStamp, Int_t > leaps
Definition BmnDecoder.h:456
Int_t GetRunIdFromFile(TString name)
string fDecoderConfigFileName
Definition BmnDecoder.h:318
BmnStatus PreInitOffline()
void SetHodoCalibration(TString cal)
Definition BmnDecoder.h:211
ULong_t fNSignalEvents
Definition BmnDecoder.h:304
void SaveAdcQa()
BmnSiBTRaw2Digit * fSiBTMapper
Definition BmnDecoder.h:414
void FillNoisyChannels()
TString fZDCCalibrationFileName
Definition BmnDecoder.h:334
InitStatus ReInit()
TClonesArray * adc128
Definition BmnDecoder.h:366
unordered_map< UInt_t, Long64_t > GetTimeShifts()
Definition BmnDecoder.h:130
TClonesArray * hrb
Definition BmnDecoder.h:369
TString fFHCalMapFileName
Definition BmnDecoder.h:337
TClonesArray * hgnd
Definition BmnDecoder.h:395
void SetTof700Mapping(TString map)
Definition BmnDecoder.h:190
TFile * fCalibFile
Definition BmnDecoder.h:360
TString fHgndMapFileName
Definition BmnDecoder.h:343
TString fMetadataName
Definition BmnDecoder.h:355
BmnFHCalRaw2Digit * GetFHCalMapper()
Definition BmnDecoder.h:150
void SetRawTreeSpills(TTree *tree)
Definition BmnDecoder.h:116
TClonesArray * ecal
Definition BmnDecoder.h:396
void SetTrigChannelMapping(TString file)
Definition BmnDecoder.h:168
TString fMwpcMapFileName
Definition BmnDecoder.h:324
TClonesArray * vsp
Definition BmnDecoder.h:386
BmnAdcQA * fGemQa
Definition BmnDecoder.h:431
Long64_t NRawTreeSpills
Definition BmnDecoder.h:407
TClonesArray * fhcal
Definition BmnDecoder.h:392
UInt_t nSpillEvents
Definition BmnDecoder.h:434
TClonesArray * ndet
Definition BmnDecoder.h:394
BmnHodoRaw2Digit * GetHodoMapper()
Definition BmnDecoder.h:152
void ClearDigiArrays()
void SetEvForPedestals(UInt_t v)
Definition BmnDecoder.h:231
void FillAdcQa()
UInt_t fEvForNoiseCorr
Definition BmnDecoder.h:442
void SetScWallMapping(TString map)
Definition BmnDecoder.h:201
TClonesArray * tqdc_tdc
Definition BmnDecoder.h:371
void SetCSCMapping(TString map)
Definition BmnDecoder.h:166
void Register_Fun(const TString name, BrType **ob)
Definition BmnDecoder.h:544
map< TTimeStamp, BmnSpillInfo > fSpillMap
Definition BmnDecoder.h:460
void SetDchMapping(TString map)
Definition BmnDecoder.h:170
TTimeStamp fRunEndTime
Definition BmnDecoder.h:311
void Exec(Option_t *opt)
Double_t workTime_real
Definition BmnDecoder.h:285
Long64_t fTime_s
Definition BmnDecoder.h:307
Double_t workTime_cpu
Definition BmnDecoder.h:284
TClonesArray * adc32
Definition BmnDecoder.h:364
BmnDecoder(TString file="", TString outfile="", ULong_t nEvents=0, ULong_t period=8)
const TTimeStamp TimeZero
Definition BmnDecoder.h:283
void RecalculatePedestals()
BmnStatus Finalize()
void SetSiliconMapping(TString map)
Definition BmnDecoder.h:162
BmnECALRaw2Digit * GetECALMapper()
Definition BmnDecoder.h:158
TString fFHCalCalibrationFileName
Definition BmnDecoder.h:338
BmnCscRaw2Digit * fCscMapper
Definition BmnDecoder.h:410
TString fECALCalibrationFileName
Definition BmnDecoder.h:346
void SetVerbose(Int_t v)
Definition BmnDecoder.h:239
TString fTof400StripMapFileName
Definition BmnDecoder.h:328
UInt_t GetEventId() const
Definition BmnDecoder.h:138
void SetTof400Mapping(TString PlaceMap, TString StripMap)
Definition BmnDecoder.h:178
bool fNoiseEnough
Definition BmnDecoder.h:444
void SetScWallCalibration(TString cal)
Definition BmnDecoder.h:203
TTree * fDigiTreeSpills
Definition BmnDecoder.h:317
BmnStatus InitDecoder()
void SetTOF700ReferenceChamber(Int_t n)
Definition BmnDecoder.h:122
TString GetRootFileName()
Definition BmnDecoder.h:227
void SetHodoMapping(TString map)
Definition BmnDecoder.h:209
void SetNdetMapping(TString map)
Definition BmnDecoder.h:213
Double_t fRTime
Definition BmnDecoder.h:495
BmnHgndRaw2Digit * fHgndMapper
Definition BmnDecoder.h:426
TClonesArray * tof700
Definition BmnDecoder.h:388
void SetSaveOutput(bool v)
Definition BmnDecoder.h:247
BmnAdcQA * fCscQa
Definition BmnDecoder.h:432
bool fSaveOutput
Definition BmnDecoder.h:448
TString fNdetMapFileName
Definition BmnDecoder.h:341
void SetSiBTMapping(TString map)
Definition BmnDecoder.h:164
BmnSetup fBmnSetup
Definition BmnDecoder.h:437
bool GetUseCalibFile() const
Definition BmnDecoder.h:245
BmnGemRaw2Digit * fGemMapper
Definition BmnDecoder.h:411
TClonesArray * adc
Definition BmnDecoder.h:367
TString fSiBTMapFileName
Definition BmnDecoder.h:349
BmnZDCRaw2Digit * GetZDCMapper()
Definition BmnDecoder.h:146
InitStatus Init()
TClonesArray * vsp_raw
Definition BmnDecoder.h:368
TTree * fRawTree
Definition BmnDecoder.h:313
TClonesArray * tof400
Definition BmnDecoder.h:387
DigiArrays GetDigiArraysObject()
Definition BmnDecoder.h:86
Long64_t fTime_ns
Definition BmnDecoder.h:308
bool isForwardMode
Definition BmnDecoder.h:295
TString fHodoMapFileName
Definition BmnDecoder.h:339
UInt_t fPedEvCntr
Definition BmnDecoder.h:439
TTimeStamp GetRunStartTime() const
Definition BmnDecoder.h:140
TStopwatch timer
Definition BmnDecoder.h:497
TTree * fDigiTree
Definition BmnDecoder.h:316
TString fTof700GeomFileName
Definition BmnDecoder.h:332
TClonesArray * adc64
Definition BmnDecoder.h:365
void SetTaskMode(bool v=true)
Definition BmnDecoder.h:251
TTimeStamp utc_valid
Definition BmnDecoder.h:457
TString fECALMapFileName
Definition BmnDecoder.h:345
Class BmnMetadataRaw for the configuration and raw spill information.
BmnTask()
Default constructor.
Definition BmnTask.cxx:3
virtual char * GetAddress() const
const char * Data() const