ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_ReadDST_eIDML.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_ReadDST_eIDML.C
1 #ifndef MACRO_FUN4ALL_READDST_C
2 #define MACRO_FUN4ALL_READDST_C
3 
4 #include <G4_Input.C>
5 #include <GlobalVariables.C>
6 
7 #include <eidml/eIDMLInterface.h>
8 
9 #include <TROOT.h>
12 #include <fun4all/Fun4AllServer.h>
13 
14 #include <phool/recoConsts.h>
15 
16 R__LOAD_LIBRARY(libfun4all.so)
17 // Use libg4eicdst for campaign 2 DSTs
18 R__LOAD_LIBRARY(libg4eicdst.so)
19 // Use libg4dst for campaign 1 DSTs
20 //R__LOAD_LIBRARY(libg4dst.so)
21 R__LOAD_LIBRARY(libeidml.so)
22 
23 int Fun4All_ReadDST_eIDML(const int nEvents = 200,
24  // const string &inputFile = "singleElectron.lst" //
25  const string &inputFile = "single.prop.7.1.lst" //
26 )
27 
28 {
29  //---------------
30  // Fun4All server
31  //---------------
33  se->Verbosity(1);
34 
35  // just if we set some flags somewhere in this macro
37 
38  Input::READHITS = true;
39 // INPUTREADHITS::filename[0] = inputFile;
40  INPUTREADHITS::listfile[0] = inputFile;
41 
42  {
43  eIDMLInterface *anaTutorial = new eIDMLInterface(
44  {"BECAL", "HCALIN", "HCALOUT"},
45  inputFile + "_BECAL_" + to_string(nEvents) + ".root");
46 // anaTutorial->Verbosity(1);
47  anaTutorial->setEtaRange(-2, 2);
48  se->registerSubsystem(anaTutorial);
49  }
50 
51  {
52  eIDMLInterface *anaTutorial = new eIDMLInterface({"EEMC"}, inputFile + "_EEMC_" + to_string(nEvents) + ".root");
53 // anaTutorial->Verbosity(1);
54  anaTutorial->setEtaRange(-4, 1);
55  se->registerSubsystem(anaTutorial);
56  }
57 
58  {
59  eIDMLInterface *anaTutorial = new eIDMLInterface({"FEMC"
60  ,"LFHCAL_0"
61  ,"LFHCAL_1"
62  ,"LFHCAL_2"
63  ,"LFHCAL_3"
64  ,"LFHCAL_4"
65  ,"LFHCAL_5"
66  ,"LFHCAL_6"
67  }, inputFile + "_FEMC_" + to_string(nEvents) + ".root");
68 // anaTutorial->Verbosity(2);
69  anaTutorial->setEtaRange(1, 4);
70  se->registerSubsystem(anaTutorial);
71  }
72 
73  InputManagers();
74 
75  se->run(nEvents);
76 
77  se->End();
78 
79  delete se;
80  std::cout << "All done processing" << std::endl;
81  gSystem->Exit(0);
82  return 0;
83 }
84 #endif