53 BmnRawSource(TString file =
"", TString outfile =
"", ULong_t nEvents = 0, ULong_t period = 8,
bool save =
false);
69 LOGF(debug,
"%s", __func__);
75 LOGF(debug,
"%s", __func__);
81 LOGF(debug1,
"FillEventHeader does nothing");
125 return (nSmpl == 128) ? 1542 : 1992;
138 fDecoderConfigFileName = FileName;
163 const TTimeStamp TimeZero = TTimeStamp(time_t(0), 0);
164 Double_t workTime_cpu = 0.0;
165 Double_t workTime_real = 0.0;
174 bool isRawRootInputFile;
179 UInt_t fNTotalEvents;
180 UInt_t fNSignalEvents;
181 UInt_t fStartEventId;
186 TTimeStamp fRunStartTime;
187 TTimeStamp fRunEndTime;
189 Long64_t fLengthRawFile;
190 Long64_t fCurentPositionRawFile;
193 TTree* fRawTreeSpills;
194 string fDecoderConfigFileName;
195 TString fRootFileName;
196 TString fRawFileName;
198 TString fRawRunHdrName;
199 TString fMetadataName;
209 TClonesArray* adc128;
214 TClonesArray* tqdc_tdc;
215 TClonesArray* tqdc_adc;
216 TClonesArray* tdc_hgnd;
225 unique_ptr<DigiRunHeader> runHeader;
227 unique_ptr<BmnMetadataRaw> metadata;
229 UInt_t data[10000000];
236 Bool_t fExportJsonBlocks;
237 Bool_t fExportExternalSpillStat;
239 UInt_t n_msc_spill = 0;
240 UInt_t n_msc_spill_ar[16] = {};
242 std::map<uint8_t, uint32_t*> time_slice_map;
244 map<TTimeStamp, Int_t> leaps;
245 TTimeStamp utc_valid;
248 map<SysPoint, BmnSpillInfo> fSpillMap;
252 template<
typename BrType>
253 void BranchRegFun(TString name, BrType** ar, TTree* tree =
nullptr)
256 FairRootManager* frm = FairRootManager::Instance();
257 frm->Register(name, name +
"_dir", (*ar), fSaveOutput);
259 TBranch* b = tree->Branch(name, ar);
260 LOGF(debug,
"Register branch %p for obj %p : %s", (
void*)b, (
void*)ar,
name.Data());
266 Int_t GetUTCShift(TTimeStamp t);
267 BmnStatus GetT0Info(Double_t& t0time, Double_t& t0width);
268 BmnStatus ProcessEvent(UInt_t* data, UInt_t len);
269 void QuickProcessEvent(UInt_t*
d, UInt_t len);
276 BmnStatus Process_HRB(UInt_t* data, UInt_t len, UInt_t serial);
278 BmnStatus FillBlockTDC(UInt_t*
d, UInt_t serial, uint16_t& len, TClonesArray* ar, UInt_t modid);
279 BmnStatus FillBlockADC(UInt_t*
d, UInt_t serial, uint8_t channel, uint16_t& len, TClonesArray* ar);
280 BmnStatus FillTDC(UInt_t*
d, UInt_t serial, UInt_t slot, UInt_t modId, UInt_t& idx);
281 BmnStatus FillTQDC(UInt_t*
d, UInt_t serial, UInt_t slot, UInt_t modId, UInt_t& idx);
290 BmnStatus FillTQDC_E(UInt_t*
d, UInt_t serial, UInt_t& len);
299 BmnStatus FillMSC16VE_E(UInt_t*
d, DeviceHeader* dev_hdr);
303 BmnStatus FillTDC72VXS(UInt_t*
d, UInt_t serial, UInt_t& len, UInt_t modid);
307 BmnStatus FillTTVXS(UInt_t*
d, UInt_t serial, UInt_t& len);
308 BmnStatus ProcessGenericDevice(UInt_t*
d, DeviceHeader* dev_hdr);
312 BmnStatus FillTDC250HGND(UInt_t*
d, UInt_t serial, UInt_t len);
316 BmnStatus MapVSP(UInt_t*
d, DeviceHeader* dev_hdr);
327 BmnStatus FillUT24VE_TRC(UInt_t*
d, UInt_t& serial, UInt_t& len);
328 BmnStatus FillVirtualDevice(UInt_t*
d, DeviceHeader* dh);
329 BmnStatus FillFVME2TMWR(UInt_t*
d, UInt_t serial, UInt_t& idx, UInt_t& len);
330 inline BmnSyncDigit* FillWR(UInt_t iSerial, ULong64_t iEvent, Long64_t t_sec, Long64_t t_ns);
332 BmnStatus FillMSC(UInt_t*
d, UInt_t serial, UInt_t slot, UInt_t& idx);
334 void RegisterBranches();
335 void RegisterSpillBranches();