BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
run_prof_deco.C
Go to the documentation of this file.
1
R__ADD_INCLUDE_PATH
($VMCWORKDIR)
2
3
void
run_prof_deco
(
TString
inputFileName =
"localhost"
,
4
TString
bmndstFileName =
"$VMCWORKDIR/macro/monitor/prodigi.root"
,
5
Int_t
nStartEvent = 0,
6
Int_t
nEvents = 10)
7
{
8
gDebug
= 0;
// Debug option
9
// Verbosity level (0 = quiet (progress bar), 1 = event-level, 2 = track-level, 3 = full debug)
10
Int_t
period = 9;
11
Int_t
run = 0;
12
Int_t
iVerbose = 0;
13
// ----- Timer ---------------------------------------------------------
14
TStopwatch
timer;
15
timer.
Start
();
16
17
// // check input file exists
18
// if (!BmnFunctionSet::CheckFileExist(inputFileName, 1)) exit(-1);
19
20
// ----- Reconstruction run --------------------------------------------
21
// FairRunAna* fRunAna = new FairRunAna();
22
FairRunOnline* fRunAna =
new
FairRunOnline();
23
// fRunAna->SetEventHeader(new DstEventHeader());
24
25
// Declare input source as simulation file or experimental data
26
BmnProfilometerSource
* source =
new
BmnProfilometerSource
(
27
{
Form
(
"tcp://%s:5601"
, inputFileName.Data()),
Form
(
"tcp://%s:5602"
, inputFileName.Data())},
28
{
"board1"
,
"board2"
});
29
fRunAna->SetSource(source);
30
31
// if directory for the output file does not exist, then create
32
// if (BmnFunctionSet::CreateDirectoryTree(bmndstFileName, 1) < 0) exit(-2);
33
// fRunAna->SetGenerateRunInfo(false);
34
35
BmnProfAsic2Raw
* proTask =
new
BmnProfAsic2Raw
(period, 0, iVerbose);
36
fRunAna->AddTask(proTask);
37
// fRunAna->SetSink(new FairRootFileSink(bmndstFileName));
38
fRunAna->SetSink(
new
BmnMQSink
(5603));
39
40
// -------------------------------------------------------------------------
41
// ----- Initialize and run --------------------------------------------
42
fRunAna->GetMainTask()->SetVerbose(iVerbose);
43
fRunAna->Init();
44
cout <<
"Starting run"
<< endl;
45
fRunAna->Run(-1, -1);
46
// -------------------------------------------------------------------------
47
// ----- Finish --------------------------------------------------------
48
timer.
Stop
();
49
Double_t
rtime = timer.
RealTime
();
50
Double_t
ctime = timer.
CpuTime
();
51
cout << endl << endl;
52
cout <<
"Macro finished successfully."
<< endl;
// marker of successful execution for CDASH
53
cout <<
"Input file is "
+ inputFileName << endl;
54
cout <<
"Output file is "
+ bmndstFileName << endl;
55
cout <<
"Real time "
<< rtime <<
" s, CPU time "
<< ctime <<
" s"
<< endl;
56
cout << endl;
57
// ------------------------------------------------------------------------
58
}
Int_t
int Int_t
gDebug
Int_t gDebug
Double_t
double Double_t
R__ADD_INCLUDE_PATH
#define R__ADD_INCLUDE_PATH(PATH)
Form
char * Form(const char *fmt,...)
BmnMQSink
Definition
BmnMQSink.h:36
BmnProfAsic2Raw
Definition
BmnProfAsic2Raw.h:22
BmnProfilometerSource
Definition
BmnProfilometerSource.h:42
TStopwatch
TStopwatch::RealTime
Double_t RealTime()
TStopwatch::Start
void Start(Bool_t reset=kTRUE)
TStopwatch::CpuTime
Double_t CpuTime()
TStopwatch::Stop
void Stop()
TString
run_prof_deco
void run_prof_deco(TString inputFileName="localhost", TString bmndstFileName="$VMCWORKDIR/macro/monitor/prodigi.root", Int_t nStartEvent=0, Int_t nEvents=10)
Definition
run_prof_deco.C:3
macro
monitor
run_prof_deco.C
Generated on
for BmnRoot by
1.17.0