BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
testZdcScheme.C
Go to the documentation of this file.
1void testZdcScheme(const char* input_file = "evetest.root")
2{
3 TStopwatch timer;
4 timer.Start();
5 gDebug = 0;
6
7 gROOT->LoadMacro("$VMCWORKDIR/macro/run/bmnloadlibs.C");
8 bmnloadlibs(); // load libraries
9
10 Int_t iVerbose = 2;
11 Int_t nEvents = 1;
12
13 TString inFile = input_file;
14 TString parFile = input_file;
15 TString outFile = "tmp.root";
16
17 FairRunAna* fRun = new FairRunAna();
18 fRun->SetInputFile(inFile);
19 fRun->SetOutputFile(outFile);
20
21 FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
22 FairParRootFileIo* io1 = new FairParRootFileIo();
23 io1->open(parFile.Data());
24 rtdb->setFirstInput(io1);
25
26 fRun->Init();
27
28 rtdb->activateParIo(rtdb->getFirstInput());
29 BmnZdcGeoPar* p = (BmnZdcGeoPar*)gROOT->FindObject("BmnZdcGeoPar");
30 p->print();
31 fDigiScheme = BmnZdcDigiScheme::Instance();
32 fDigiScheme->Init(p, 0, iVerbose);
33
34 fDigiScheme->Print();
35
36 fDigiScheme->PrintVolume(33, 33);
37 fDigiScheme->PrintVolume(29, 1);
38
39 timer.Stop();
40 Double_t rtime = timer.RealTime();
41 Double_t ctime = timer.CpuTime();
42 printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime);
43}
int Int_t
Int_t gDebug
double Double_t
#define gROOT
static BmnZdcDigiScheme * Instance()
Double_t RealTime()
void Start(Bool_t reset=kTRUE)
Double_t CpuTime()
void Stop()
const char * Data() const
void testZdcScheme(const char *input_file="evetest.root")