Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_GeoExtract.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_GeoExtract.C
1 #pragma once
2 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3 
4 #include <fun4all/SubsysReco.h>
8 
11 #include <fun4all/Fun4AllServer.h>
12 
13 #include <phool/PHRandomSeed.h>
14 #include <phool/recoConsts.h>
15 
16 
17 
18 R__LOAD_LIBRARY(libfun4all.so)
19 
20 
21 #endif
22 
23 
24 void Fun4All_GeoExtract(const char *filegeometry = "G4Hits_sHijing_pAu_0_10fm-0000000006-00000.root",
25  const char * oufilename = "tree_test.root"
26  )
27 {
28  gSystem->Load("libg4dst.so");
29 
31  int verbosity = 0;
32 
33  se->Verbosity(verbosity);
35 
36  //===============
37  // conditions DB flags
38  //===============
39 
40  rc->set_StringFlag("CDB_GLOBALTAG","MDC2");
41  rc->set_uint64Flag("TIMESTAMP",6);
42 
43 
44 
45 
46  Fun4AllInputManager *intrue = new Fun4AllDstInputManager("DSTgeo");
47  intrue->AddFile(filegeometry);
48  se->registerInputManager(intrue);
49 
50 
51  Fun4AllDstOutputManager *out = new Fun4AllDstOutputManager("DSTOUT", "updated_geo.root");
52  out->AddRunNode("CYLINDERGEOM_CEMC");
53  out->AddRunNode("RunHeader");
54  out->AddNode("just_pick_an_invalid_name");
55  se->registerOutputManager(out);
56 
57 
58  se->run(1);
59  se->End();
60 
61  gSystem->Exit(0);
62  return 0;
63 
64 }