Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_CaloTreeGen.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_CaloTreeGen.C
1 #pragma once
2 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3 #include <fun4all/SubsysReco.h>
7 
10 #include <fun4all/Fun4AllServer.h>
11 
12 #include <phool/PHRandomSeed.h>
13 #include <phool/recoConsts.h>
14 
15 #include <calotreegen/caloTreeGen.h>
16 
17 R__LOAD_LIBRARY(libfun4all.so)
18 R__LOAD_LIBRARY(libcaloTreeGen.so)
19 #endif
20 
21 void Fun4All_CaloTreeGen(const int nEvents = 0, const char *listFile = "fileList_withGeo_timingCut_Template.list", const char *inName = "commissioning.root")
22 {
25 
26  caloTreeGen *calo = new caloTreeGen(inName);
27  calo -> setClusters(1);
28  calo -> setFineClusters(1);
29  se->registerSubsystem(calo);
30 
32  in->AddListFile(listFile);
33 
34 
35  se->registerInputManager(in);
36 
37  se->run(nEvents);
38  se->End();
39  se->PrintTimer();
40  std::cout << "All done!" << std::endl;
41 
42  gSystem->Exit(0);
43 }