1 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3 R__LOAD_LIBRARY(libinterface_main)
4 R__LOAD_LIBRARY(libfun4all)
5 R__LOAD_LIBRARY(libg4detectors)
6 R__LOAD_LIBRARY(libg4eval)
7 R__LOAD_LIBRARY(libktracker)
8 R__LOAD_LIBRARY(libtrigger_ana)
12 const char* fn_list_dst=
"list_dst.txt",
13 const char* fn_udst=
"uDST.root")
31 out->
AddNode(
"SQTruthTrackVector");
32 out->
AddNode(
"SQTruthDimuonVector");
37 vector<string> list_dst;
39 ifstream ifs(fn_list_dst);
40 while (ifs >> fn_dst) list_dst.push_back(fn_dst);
44 int n_dst = list_dst.size();
45 cout <<
"N of DSTs: all = " << n_dst;
46 if (n_dst_ana > 0 && n_dst > n_dst_ana) n_dst = n_dst_ana;
47 cout <<
", to be analyzed = " << n_dst << endl;
48 for (
int i_dst = 0; i_dst < n_dst; i_dst++) {
49 string fn_dst = list_dst[i_dst];
50 cout <<
"DST: " << i_dst <<
"/" << n_dst <<
": " << fn_dst << endl;
int registerInputManager(Fun4AllInputManager *InManager)
int AddNode(const std::string &nodename)
add a node in outputmanager
static Fun4AllServer * instance()
int run(const int nevnts=0, const bool require_nevents=false)
run n events (0 means up to end of file)
int registerOutputManager(Fun4AllOutputManager *manager)
static GeomSvc * instance()
singlton instance
int Fun4SimDst(const int n_dst_ana=0, const char *fn_list_dst="list_dst.txt", const char *fn_udst="uDST.root")
Fun4SimDst.C: Fun4all macro to analyze the E1039 simulated DST files.