Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
run_macro_2.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file run_macro_2.C
2  std::string infile = "G4sPHENIX_2.root",
3  std::string outfile = "test.root"
4  )
5 {
6 
7  gSystem->Load("libfun4all.so");
8  gSystem->Load("libg4detectors.so");
9  gSystem->Load("libphhepmc.so");
10  gSystem->Load("libg4testbench.so");
11  gSystem->Load("libg4hough.so");
12  gSystem->Load("libcemc.so");
13  gSystem->Load("libg4eval.so");
14  gSystem->Load("libcalotrigger.so");
15  gSystem->Load("libjetbackground.so");
16 
17  gSystem->Load("libTreeMaker.so");
18 
20  se->Verbosity( 0 );
21  // just if we set some flags somewhere in this macro
23 
24  Fun4AllInputManager *hitsin = new Fun4AllDstInputManager("DSTin");
25  //hitsin->fileopen("");
26  //hitsin->fileopen("$SPHENIX/blank/macros/macros/g4simulations/output/outputDijetTrig_35.root");
27  hitsin->fileopen( infile );
28  se->registerInputManager(hitsin);
29 
30  TreeMaker *tt = new TreeMaker( outfile );
31  se->registerSubsystem( tt );
32 
33  se->run( 1 );
34 
35  se->End();
36  std::cout << "All done" << std::endl;
37  delete se;
38 
39  gSystem->Exit(0);
40 }