Go to the documentation of this file.
12 #include "FairLogger.h"
13 #include "FairRootManager.h"
14 #include "FairRunOnline.h"
16 #include "TClonesArray.h"
19 #include "THttpServer.h"
24 : FairTask(
"CbmMcbm2019TimeWinEventBuilderTask") {
40 FairRootManager* ioman = FairRootManager::Instance();
43 fEvents =
new TClonesArray(
"CbmEvent", 100);
45 "CbmEvent",
"Cbm Event",
fEvents, IsOutputBranchPersistent(
"CbmEvent"));
47 if (!
fEvents) LOG(fatal) <<
"Output branch was not created";
62 <<
"CbmMcbm2019TimeWinEventBuilderTask::Exec => Starting sequence";
68 LOG(debug2) <<
"CbmMcbm2019TimeWinEventBuilderTask::Exec => Done";
90 LOG(debug) <<
"Vector: " <<
event->ToString();
91 new ((*fEvents)[
fEvents->GetEntriesFast()])
CbmEvent(std::move(*event));
92 LOG(debug) <<
"TClonesArray: "
104 std::vector<std::pair<TNamed*, std::string>> vHistos =
108 TDirectory* oldDir = NULL;
109 TFile* histoFile = NULL;
117 for (UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto) {
119 TString sFolder = vHistos[uHisto].second.data();
120 if (
nullptr == gDirectory->Get(sFolder)) gDirectory->mkdir(sFolder);
121 gDirectory->cd(sFolder);
124 vHistos[uHisto].first->Write();
virtual void Exec(Option_t *)
CbmMcbm2019TimeWinEventBuilderAlgo * fpAlgo
void SetTriggerWindow(ECbmModuleId det, Double_t dWinBeg, Double_t dWinEnd)
CbmMcbm2019TimeWinEventBuilderTask()
virtual InitStatus ReInit()
void SetTriggerMinNumber(ECbmModuleId selDet, UInt_t uVal)
Bool_t fbFillHistos
output container of CbmEvents
void SetFillHistos(Bool_t var)
void SetTriggerMaxNumber(ECbmModuleId selDet, Int_t iVal)
TString fsOutFileName
Switch ON/OFF filling of histograms.
virtual InitStatus Init()
void SetEventOverlapMode(EOverlapMode mode)
Control flags.
void SetTriggerWindow(ECbmModuleId selDet, Double_t dWinBeg, Double_t dWinEnd)
void RemoveDetector(ECbmModuleId selDet) __attribute__((deprecated))
~CbmMcbm2019TimeWinEventBuilderTask()
void SetIgnoreTsOverlap(Bool_t bFlagIn=kTRUE)
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
void AddDetector(ECbmModuleId selDet, ECbmDataType dataTypeIn, std::string sNameIn, UInt_t uTriggerMinDigisIn=0, Int_t iTriggerMaxDigisIn=-1, Double_t fdTimeWinBegIn=-100, Double_t fdTimeWinEndIn=100)
std::vector< CbmEvent * > & GetEventVector()
Data output access.
void SetIgnoreTsOverlap(Bool_t bFlagIn)
void RemoveDetector(ECbmModuleId selDet) __attribute__((deprecated))
void SetReferenceDetector(ECbmModuleId refDet) __attribute__((deprecated))
void SetReferenceDetector(ECbmModuleId refDet, ECbmDataType dataTypeIn, std::string sNameIn, UInt_t uTriggerMinDigisIn=0, Int_t iTriggerMaxDigisIn=-1, Double_t fdTimeWinBegIn=-100, Double_t fdTimeWinEndIn=100)
virtual void SetParContainers()
void SetTriggerMinNumber(ECbmModuleId selDet, UInt_t uVal)
void AddDetector(ECbmModuleId selDet) __attribute__((deprecated))
void SetTriggerMaxNumber(ECbmModuleId selDet, Int_t iVal)
std::vector< std::pair< TNamed *, std::string > > GetHistoVector()
Class characterising one event by a collection of links (indices) to data objects,...
void SetEventOverlapMode(EOverlapMode mode)
void SetOutFilename(TString sNameIn)
std::string ToString(const T &value)
void SetFillHistos(Bool_t bFlag=kTRUE)