Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_TowerBuilder.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_TowerBuilder.C
1 #pragma once
2 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3 
4 #include <runtowerinfo/SaveTowerInfo.h>
5 #include <runtowerinfo/RunTowerInfo.h>
6 
7 #include <fun4all/SubsysReco.h>
13 
14 R__LOAD_LIBRARY(libfun4all.so)
15 R__LOAD_LIBRARY(libfun4allraw.so)
16 R__LOAD_LIBRARY(libruntowerinfo.so)
17 
18 #endif
19 
20 void Fun4All_TowerBuilder(vector<string> myInputLists = {"productionFiles-PYTHIA8_PP_MB-dst_calo_cluster-00000.list", "productionFiles-PYTHIA8_PP_MB-dst_vertex-00000.list", "productionFiles-PYTHIA8_PP_MB-dst_tracks-00000.list"}, const int nEvents = 100)
21 {
22  gSystem->Load("libg4dst");
24 
25 
26  for (unsigned int i = 0; i < myInputLists.size(); ++i)
27  {
29  infile->AddListFile(myInputLists[i]);
30  se->registerInputManager(infile);
31  }
32 
33  SaveTowerInfo *sti = new SaveTowerInfo();
34  se->registerSubsystem(sti);
35 
36  RunTowerInfo *rti = new RunTowerInfo();
37  se->registerSubsystem(rti);
38 
39  se->run(nEvents);
40  se->End();
41  se->PrintTimer();
42  gSystem->Exit(0);
43 }