Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_ExportGeom.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_ExportGeom.C
1 // $Id: $
2 
11 
12 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