Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Fun4RealDst.C
Go to the documentation of this file.
1 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3 R__LOAD_LIBRARY(libana_real_dst)
4 #endif
5 
7 int Fun4RealDst(const int run=1666, const int nevent=0)
8 {
9  gSystem->Load("libana_real_dst.so");
10 
12  //se->Verbosity(1);
13 
14  string fn_in = UtilOnline::GetDstFilePath(run);
15  cout << "DST file = " << fn_in << endl;
16  Fun4AllInputManager *in = new Fun4AllDstInputManager("RealDst");
17  in->fileopen(fn_in);
18  se->registerInputManager(in);
19 
20  se->registerSubsystem(new AnaRealDst());
21  se->registerSubsystem(new AnaEffHodo());
22  //se->registerSubsystem(new AnaEffCham(AnaEffCham::D3p));
23 
24  se->run(nevent);
25  se->End();
26  delete se;
27  return 0;
28 }
29 
31 
38 int Fun4MultiRealDst(const char* fn_list_run="list_run.txt")
39 {
40  gSystem->Load("libana_real_dst.so");
42  //se->Verbosity(1);
43  Fun4AllInputManager *in = new Fun4AllDstInputManager("RealDst");
44  se->registerInputManager(in);
45 
46  se->registerSubsystem(new AnaEffHodo());
47  //se->registerSubsystem(new AnaEffCham(AnaEffCham::D3p));
48 
49  ifstream ifs(fn_list_run);
50  int run;
51  while (ifs >> run) {
52  string fn_in = UtilOnline::GetDstFileDir() + "/" + UtilOnline::RunNum2DstFile(run);
53  cout << "Run " << run << ": " << fn_in << endl;
54  in->fileopen(fn_in);
55  se->run();
56  }
57  ifs.close();
58 
59  se->End();
60  delete se;
61  return 0;
62 }
int registerInputManager(Fun4AllInputManager *InManager)
virtual int End()
int Fun4MultiRealDst(const char *fn_list_run="list_run.txt")
Function to analyze multiple DST files.
Definition: Fun4RealDst.C:38
static Fun4AllServer * instance()
Fun4AllServer * se
int Fun4RealDst(const int run=1666, const int nevent=0)
Fun4MainDaq.C: Fun4all macro to decode the MainDAQ data.
Definition: Fun4RealDst.C:7
int run(const int nEvents=1)
Definition: run.C:10
int registerSubsystem(SubsysReco *subsystem, const std::string &topnodename="TOP")
static std::string GetDstFilePath(const int run)
Definition: UtilOnline.cc:74
int run(const int nevnts=0, const bool require_nevents=false)
run n events (0 means up to end of file)
An example class to analyze the E1039 DST file.
Definition: AnaRealDst.h:10
static std::string RunNum2DstFile(const int run)
Convert a run number to the corresponding name of DST file.
Definition: UtilOnline.cc:49
virtual int fileopen(const std::string &)
static std::string GetDstFileDir()
Definition: UtilOnline.h:25