Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Fun4All_ImportGeom.C
Go to the documentation of this file.
1 // $Id: $
2 
11 #include <string>
12 using namespace std;
13 
15 void
16 Fun4All_ImportGeom(const string & geom_file = "./sPHENIX.root")
17 {
18  gSystem->Load("libphgeom.so");
19 
21  se->Verbosity(1);
22  // just if we set some flags somewhere in this macro
24 
25  PHGeomFileImport * import = new PHGeomFileImport(geom_file);
26  se->registerSubsystem(import);
27 
28  // dummy input
30  se->registerInputManager(in);
31 
32  // output in DST
34  geom_file + "_DST.root");
35  se->registerOutputManager(out);
36 
37  // run one event as example
38  se->run(1);
39 
40  PHGeomUtility::ExportGeomtry(se->topNode(),geom_file + "_export.root");
41 
42  se->End();
43  std::cout << "All done" << std::endl;
44  delete se;
45  gSystem->Exit(0);
46 
47 }
48 
int registerInputManager(Fun4AllInputManager *InManager)
virtual int End()
void Fun4All_ImportGeom(const string &geom_file="./sPHENIX.root")
Read in a Geometry file, and output DST and ROOT TGeo files.
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.
static recoConsts * instance()
Definition: recoConsts.cc:7
int registerSubsystem(SubsysReco *subsystem, const std::string &topnodename="TOP")
int run(const int nevnts=0, const bool require_nevents=false)
run n events (0 means up to end of file)
int registerOutputManager(Fun4AllOutputManager *manager)
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
Fun4All module to import TGeo ROOT Geometry at run time.