Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Fun4All_ExportGeom.C
Go to the documentation of this file.
1 // $Id: $
2 
11 void
13 Fun4All_ExportGeom(string DST_file_name = "sPHENIX.root_DST.root")
14 {
15 
16  gSystem->Load("libphgeom.so");
17 
18  // in case DST contains sPHENIX stuff
19  gSystem->Load("libg4calo.so");
20  gSystem->Load("libg4vertex.so");
21  gSystem->Load("libg4eval.so");
22 
24  se->Verbosity(1);
26  rc->set_IntFlag("RUNNUMBER", 12345);
27 
28  Fun4AllInputManager *hitsin = new Fun4AllDstInputManager("DSTin");
29  hitsin->fileopen(DST_file_name);
30  se->registerInputManager(hitsin);
31 
32  // run one event as example
33  se->run(1);
34 
35  string output = DST_file_name + "_export.root";
36  PHGeomUtility::ExportGeomtry(se->topNode(),DST_file_name + "_export.root");
37  cout <<"Done export Geometry to "<<output<<endl;
38 
39  se->End();
40  delete se;
41  cout <<"All done"<<endl;
42  gSystem->Exit(0);
43 
44 }
45 
46 
47 
int registerInputManager(Fun4AllInputManager *InManager)
virtual int End()
static Fun4AllServer * instance()
Fun4AllServer * se
static void ExportGeomtry(PHCompositeNode *topNode, const std::string &geometry_file)
DST node -&gt; TGeoManager -&gt; export files, like gdml, .root or .C formats.
virtual void set_IntFlag(const std::string &name, const int flag)
Definition: PHFlag.cc:145
static recoConsts * instance()
Definition: recoConsts.cc:7
int run(const int nevnts=0, const bool require_nevents=false)
run n events (0 means up to end of file)
void Fun4All_ExportGeom(string DST_file_name="sPHENIX.root_DST.root")
get geometry from DST file and output TGeoManager ROOT files or other formats of geometry files ...
PHCompositeNode * topNode() const
Definition: Fun4AllServer.h:59
virtual void Verbosity(const int ival)
Sets the verbosity of this module (0 by default=quiet).
Definition: Fun4AllBase.h:58
virtual int fileopen(const std::string &)