Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PHGeomUtility.h
Go to the documentation of this file.
1 #ifndef PHGeomUtility_HH__
2 #define PHGeomUtility_HH__
3 
4 #include <ctime>
5 #include <map>
6 #include <set>
7 #include <string>
8 #include <iostream>
9 
10 class PHCompositeNode;
11 class TGeoManager;
12 class PHGeomTGeo;
13 class PHGeomIOTGeo;
14 
17 {
18 
19 protected:
20 
21  // static tool sets only
22  PHGeomUtility();
23  virtual
25 
26 public:
27 
29  static TGeoManager *
31 
33  static int
34  ImportGeomFile(PHCompositeNode *topNode, const std::string & geometry_file);
35 
37  static int
39 
41  static void
42  ExportGeomtry(PHCompositeNode *topNode, const std::string & geometry_file);
43 
45  static PHGeomTGeo *
46  GetGeomTGeoNode(PHCompositeNode *topNode, bool build_new = true);
47 
49  static PHGeomIOTGeo *
50  GetGeomIOTGeoNode(PHCompositeNode *topNode, bool build_new = true);
51 
54  static PHGeomIOTGeo *
55  UpdateIONode(PHCompositeNode *topNode);
56 
59  static PHGeomTGeo *
61 
65  static std::string
66  GenerateGeometryFileName(const std::string & filename_extension = "gdml");
67 
69  static bool
70  RemoveGeometryFile(const std::string & file_name);
71 
73  static void SetVerbosity(int v);
74 
76  static int GetVerbosity();
77 
79  static std::string
81  {
82  return std::string("GEOMETRY");
83  }
84 
86  static std::string
88  {
89  return std::string("GEOMETRY_IO");
90  }
91 protected:
92 
93 };
94 
95 #endif /* PHGeomUtility_HH__ */
static int ImportCurrentTGeoManager(PHCompositeNode *topNode)
gGeoManager -&gt; DST node
Toolsets to do geometry operations.
Definition: PHGeomUtility.h:16
PHGeomTGeo provide run-time access to TGeoManger. It is transient object and it shall NOT be saved to...
Definition: PHGeomTGeo.h:24
static bool RemoveGeometryFile(const std::string &file_name)
delete the geometry file after use
virtual ~PHGeomUtility()
static PHGeomTGeo * GetGeomTGeoNode(PHCompositeNode *topNode, bool build_new=true)
Get non-persistent PHGeomTGeo from DST nodes. If not found, make a new one.
static void ExportGeomtry(PHCompositeNode *topNode, const std::string &geometry_file)
DST node -&gt; TGeoManager -&gt; export files, like gdml, .root or .C formats.
static int ImportGeomFile(PHCompositeNode *topNode, const std::string &geometry_file)
TGeo ROOT/GDML/Macro file -&gt; DST node with automatic file type discrimination based on file names...
static int GetVerbosity()
Verbosity for geometry IO like, TGeoMangers.
static PHGeomIOTGeo * GetGeomIOTGeoNode(PHCompositeNode *topNode, bool build_new=true)
Get persistent PHGeomIOTGeo from DST nodes. If not found, make a new one.
static void SetVerbosity(int v)
Verbosity for geometry IO like, TGeoMangers.
static std::string GetDSTIONodeName()
DST node name for persistent geometry storage node.
Definition: PHGeomUtility.h:87
static PHGeomTGeo * LoadFromIONode(PHCompositeNode *topNode)
static std::string GenerateGeometryFileName(const std::string &filename_extension="gdml")
static TGeoManager * GetTGeoManager(PHCompositeNode *topNode)
Main user interface: DST node -&gt; TGeoManager for downstream use.
PHGeomIOTGeo store geometry information to DST files in the format of binary streamed TGeoVolume...
Definition: PHGeomIOTGeo.h:25
static PHGeomIOTGeo * UpdateIONode(PHCompositeNode *topNode)
static std::string GetDSTNodeName()
DST node name for RunTime geometry object.
Definition: PHGeomUtility.h:80