Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_TPC_EventDisplayPrep.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_TPC_EventDisplayPrep.C
1 
2 #ifndef MACRO_FUN4ALL_READDST_C
3 #define MACRO_FUN4ALL_READDST_C
4 
5 #include <tpcrawtottree/TPCRawDataTree.h>
6 
9 
10 #include <phool/recoConsts.h>
11 
12 R__LOAD_LIBRARY(libfun4allraw.so)
13 R__LOAD_LIBRARY(libTPCRawDataTree.so)
14 
16  const string &outDir = "/sphenix/user/rosstom/test/testFiles/",
17  const string &inputFile = "/sphenix/lustre01/sphnxpro/rawdata/commissioning/TPC_ebdc00_pedestal-00010619-0000.prdf" //
18 )
19 {
20  //---------------
21  // Fun4All server
22  //---------------
24  se->Verbosity(1);
25 
26  string fileName = inputFile;
27  size_t pos = fileName.find("TPC_ebdc");
28  fileName.erase(fileName.begin(),fileName.begin()+pos);
29 
30  TPCRawDataTree *r2tree = new TPCRawDataTree(outDir + fileName + "_TPCRawDataTree.root");
31 
32  // add all possible TPC packet that we need to analyze
33  for (int packet = 4000; packet<=4230; packet+=10)
34  {
35  r2tree->AddPacket(packet);
36  r2tree->AddPacket(packet+1);
37  }
38 
39  se->registerSubsystem(r2tree);
40 
42  in1->AddFile(inputFile);
43  se->registerInputManager(in1);
44 
45  se->run(nEvents);
46 
47  se->End();
48 
49  delete se;
50  std::cout << "All done processing" << std::endl;
51  gSystem->Exit(0);
52  return 0;
53 }
54 #endif