File indexing completed on 2025-12-17 09:20:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <phgeom/PHGeomUtility.h>
0012 #include <phgeom/PHGeomFileImport.h>
0013
0014 #include <fun4all/Fun4AllDummyInputManager.h>
0015 #include <fun4all/Fun4AllDstOutputManager.h>
0016 #include <fun4all/Fun4AllInputManager.h>
0017 #include <fun4all/Fun4AllServer.h>
0018
0019 #include <TSystem.h>
0020
0021 #include <string>
0022
0023
0024 void
0025 Fun4All_ImportGeom(const std::string & geom_file = "./sPHENIX.root")
0026 {
0027 gSystem->Load("libphgeom.so");
0028
0029 Fun4AllServer *se = Fun4AllServer::instance();
0030 se->Verbosity(1);
0031
0032 PHGeomFileImport * import = new PHGeomFileImport(geom_file);
0033 se->registerSubsystem(import);
0034
0035
0036 Fun4AllInputManager *in = new Fun4AllDummyInputManager("JADE");
0037 se->registerInputManager(in);
0038
0039
0040 Fun4AllDstOutputManager *out = new Fun4AllDstOutputManager("DSTOUT",
0041 geom_file + "_DST.root");
0042 se->registerOutputManager(out);
0043
0044
0045 se->run(1);
0046
0047 PHGeomUtility::ExportGeomtry(se->topNode(),geom_file + "_export.root");
0048
0049 se->End();
0050 std::cout << "All done" << std::endl;
0051 delete se;
0052 gSystem->Exit(0);
0053
0054 }
0055