BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnDataToRootParallel.C
Go to the documentation of this file.
1// file: full path to raw file
2// nEvents: if 0 then decode all events
3// doConvert: convert RAW --> ROOT before decoding or use file converted before
4#define SORTED 1
5
6void BmnDataToRootParallel(vector<TString> files,
7 UInt_t threadCount = 1,
8 UInt_t period = 8,
9 TString outDir = "",
10 Bool_t tempFileOnDisk = false)
11{
12 Int_t iVerbose = 0; ///<- Verbosity level: 0 - summary info on progress; 1 - event level, 2 - event objects level,
13 ///< 3 - full debug output
14 FairLogger::GetLogger()->SetLogToScreen(true);
15 FairLogger::GetLogger()->SetLogScreenLevel("info"); // for info write "INFO"
16
17 TStopwatch timer;
18 timer.Start();
19
20 BmnConverter* conv = new BmnConverter(threadCount, period, outDir, tempFileOnDisk);
21 conv->SetPeriod(8);
22 for (TString& name : files)
23 conv->FeedFile(name);
24 if (conv->GetTempFileOnDisk()) {
26 conv->OutputSpills();
27 // conv->SeparateEventsBySpillsRDR();
28 } else
30 timer.Stop();
31 // if (decoStatus == kBMNSUCCESS) {
32 // if (!doHoldRawRoot) gSystem->Exec(TString::Format("rm -f %s", decoder->GetRootFileName().Data()));
33 printf("\tMacro finished successfully!\n\n"); // marker of successfully execution for software testing systems
34 Double_t rtime = timer.RealTime();
35 Double_t ctime = timer.CpuTime();
36 printf("Real time %f s, CPU time %f s\n", rtime, ctime);
37 // }
38
39 delete conv;
40}
bool Bool_t
int Int_t
unsigned int UInt_t
double Double_t
BmnStatus FeedFile(TString name, Bool_t getRunId=kTRUE, Bool_t getSubName=kTRUE)
void SeparateEventsBySpills()
void SetPeriod(uint32_t v)
void SeparateEventsBySpillsTM()
bool GetTempFileOnDisk()
Double_t RealTime()
void Start(Bool_t reset=kTRUE)
Double_t CpuTime()
void Stop()
void BmnDataToRootParallel(vector< TString > files, UInt_t threadCount=1, UInt_t period=8, TString outDir="", Bool_t tempFileOnDisk=false)