1 R__LOAD_LIBRARY(libana_sim_dst)
5 const
char* fn_list_dst="list_dst.txt",
6 const
char* fn_udst="uDST.root")
21 out->
AddNode(
"SQTruthTrackVector");
22 out->
AddNode(
"SQTruthDimuonVector");
24 vector<string> list_dst;
26 ifstream ifs(fn_list_dst);
27 while (ifs >> fn_dst) list_dst.push_back(fn_dst);
30 int n_dst = list_dst.size();
31 cout <<
"N of DSTs: all = " << n_dst;
32 if (n_dst_ana > 0 && n_dst > n_dst_ana) n_dst = n_dst_ana;
33 cout <<
", to be analyzed = " << n_dst << endl;
34 for (
int i_dst = 0; i_dst < n_dst; i_dst++) {
35 string fn_dst = list_dst[i_dst];
36 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)
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.