BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnDataToRaw.C
Go to the documentation of this file.
1
2#include <FairLogger.h>
3
4// file: full path to raw data file
5// nEvents: if 0 then convert all events
6
7void BmnDataToRaw(TString file = "", TString outfile = "", Long_t nEvents = 0, UInt_t period = 8, Int_t port = 7777)
8{
9 gSystem->ExpandPathName(file);
10 gSystem->ExpandPathName(outfile);
11
12 Int_t iVerbose = 1; ///<- Verbosity level: 0 - Progress Bar; 1 - short info on passed events
13 FairLogger::GetLogger()->SetLogToScreen(true);
14 FairLogger::GetLogger()->SetLogScreenLevel("INFO");
15
16 TStopwatch timer;
17 timer.Start();
18
19 BmnRawSource* source = new BmnRawSource(file, outfile, nEvents, period, false);
20 source->SetVerbose(iVerbose);
21 source->SetDecoderConfigFileName(string(getenv("VMCWORKDIR")) + "/config/bmnconf.json");
22 source->ConvertRawToRoot();
23
24 timer.Stop();
25 printf("\tMacro finished successfully!\n\n"); // marker of successfully execution for software testing systems
26 Double_t rtime = timer.RealTime();
27 Double_t ctime = timer.CpuTime();
28 printf("Real time %f s, CPU time %f s\n", rtime, ctime);
29}
int Int_t
long Long_t
unsigned int UInt_t
double Double_t
R__EXTERN TSystem * gSystem
BmnStatus ConvertRawToRoot()
void SetDecoderConfigFileName(string FileName)
void SetVerbose(Int_t v)
Double_t RealTime()
void Start(Bool_t reset=kTRUE)
Double_t CpuTime()
void Stop()
void BmnDataToRaw(TString file="", TString outfile="", Long_t nEvents=0, UInt_t period=8, Int_t port=7777)
Definition BmnDataToRaw.C:7