LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
GeometryBuilder.h
Go to the documentation of this file.
1 
10 #ifndef LARCOREALG_GEOMETRY_GEOMETRYBUILDER_H
11 #define LARCOREALG_GEOMETRY_GEOMETRYBUILDER_H
12 
13 // LArSoft libraries
17 
18 // ROOT libraries
19 #include "TGeoNode.h"
20 
21 // C++ standard library
22 #include <algorithm> // std::transform()
23 #include <iterator> // std::back_inserter()
24 #include <string>
25 #include <vector>
26 
27 namespace geo {
28 
53 
54  public:
55  // --- BEGIN Data types ----------------------------------------------------
58 
60  template <typename GeoObj>
61  using GeoColl_t = std::vector<GeoObj>;
62 
63  // --- END Data types ------------------------------------------------------
64 
65  // --- BEGIN Constructors and destructor -----------------------------------
67  virtual ~GeometryBuilder() = default;
68 
69  // --- END Constructors and destructor -------------------------------------
70 
71  // --- BEGIN Cryostat information ------------------------------------------
74 
77 
88  {
89  auto myPath = path;
90  return doExtractCryostats(myPath);
91  }
92 
94  // --- END Cryostat information --------------------------------------------
95 
96  // --- BEGIN Auxiliary detector information --------------------------------
99 
102 
113  {
114  auto myPath = path;
115  return doExtractAuxiliaryDetectors(myPath);
116  }
117 
119  // --- END Auxiliary detector information ----------------------------------
120 
121  // --- END Static utility methods ------------------------------------------
122 
123  protected:
125  virtual Cryostats_t doExtractCryostats(Path_t& path) = 0;
126 
128  virtual AuxDets_t doExtractAuxiliaryDetectors(Path_t& path) = 0;
129 
130  }; // class GeometryBuilder
131 
132 } // namespace geo
133 
134 #endif // LARCOREALG_GEOMETRY_GEOMETRYBUILDER_H
virtual Cryostats_t doExtractCryostats(Path_t &path)=0
Custom implementation of extractCryostats().
Encapsulate the construction of a single cyostat.
Cryostats_t extractCryostats(Path_t const &path)
Looks for all cryostats under the specified path.
Class representing a path in ROOT geometry.
GeoColl_t< geo::AuxDetGeo > AuxDets_t
Collection of auxiliary detector information objects.
virtual ~GeometryBuilder()=default
Virtual destructor.
AuxDets_t extractAuxiliaryDetectors(Path_t const &path)
Looks for all auxiliary detectors under the specified path.
GeoColl_t< geo::CryostatGeo > Cryostats_t
Collection of cryostat information objects.
Encapsulate the geometry of an auxiliary detector.
virtual AuxDets_t doExtractAuxiliaryDetectors(Path_t &path)=0
Custom implementation of extractAuxiliaryDetectors().
Manages the extraction of LArSoft geometry information from ROOT.
Representation of a node and its ancestry.
Definition: GeoNodePath.h:37
Namespace collecting geometry-related classes utilities.
std::vector< GeoObj > GeoColl_t
Type of direct collection of geometry objects.