BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
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
6
void
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
()) {
25
conv->
SeparateEventsBySpills
();
26
conv->
OutputSpills
();
27
// conv->SeparateEventsBySpillsRDR();
28
}
else
29
conv->
SeparateEventsBySpillsTM
();
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_t
bool Bool_t
Int_t
int Int_t
UInt_t
unsigned int UInt_t
Double_t
double Double_t
BmnConverter
Definition
BmnConverter.h:62
BmnConverter::FeedFile
BmnStatus FeedFile(TString name, Bool_t getRunId=kTRUE, Bool_t getSubName=kTRUE)
Definition
BmnConverter.cxx:437
BmnConverter::SeparateEventsBySpills
void SeparateEventsBySpills()
Definition
BmnConverter.cxx:230
BmnConverter::SetPeriod
void SetPeriod(uint32_t v)
Definition
BmnConverter.h:93
BmnConverter::SeparateEventsBySpillsTM
void SeparateEventsBySpillsTM()
Definition
BmnConverter.cxx:300
BmnConverter::GetTempFileOnDisk
bool GetTempFileOnDisk()
Definition
BmnConverter.h:101
BmnConverter::OutputSpills
void OutputSpills()
Definition
BmnConverter.cxx:175
TStopwatch
TStopwatch::RealTime
Double_t RealTime()
TStopwatch::Start
void Start(Bool_t reset=kTRUE)
TStopwatch::CpuTime
Double_t CpuTime()
TStopwatch::Stop
void Stop()
TString
BmnDataToRootParallel
void BmnDataToRootParallel(vector< TString > files, UInt_t threadCount=1, UInt_t period=8, TString outDir="", Bool_t tempFileOnDisk=false)
Definition
BmnDataToRootParallel.C:6
macro
raw
BmnDataToRootParallel.C
Generated on
for BmnRoot by
1.17.0