LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
WireReadoutDumper.h
Go to the documentation of this file.
1 
9 #ifndef LARCOREALG_GEOMETRY_WIREREADOUTDUMPER_H
10 #define LARCOREALG_GEOMETRY_WIREREADOUTDUMPER_H
11 
12 // LArSoft libraries
16 
17 // C++ libraries
18 #include <iosfwd> // std::ostream
19 #include <string>
20 #include <utility> // std::move()
21 
22 // -----------------------------------------------------------------------------
23 namespace geo {
24  class WireReadoutDumper;
25 }
60 
62  geo::GeometryCore const* fGeom = nullptr;
63 
65  geo::WireReadoutGeom const* fWireGeom = nullptr;
66 
69 
71  struct StreamAdapter {
73  std::string indent;
74  std::string firstIndent;
75  };
76 
77  friend std::ostream& operator<<(std::ostream& out, StreamAdapter const& dumpAdapter);
78 
79 public:
82  geo::WireReadoutGeom const* wireGeom,
83  geo::AuxDetGeometryCore const* auxGeom);
84 
105  void dump(std::ostream& out, std::string const& indent, std::string const& firstIndent) const;
106 
117  void dump(std::ostream& out, std::string const& indent = "") const { dump(out, indent, indent); }
118 
133  StreamAdapter toStream(std::string indent, std::string firstIndent) const;
134 
148  auto toStream(std::string indent = "") const { return toStream(indent, std::move(indent)); }
149 
150 private:
152  void dumpDetectorInfo(std::ostream& out,
153  std::string const& indent,
154  std::string const& firstIndent) const;
155 
157  void dumpCryostat(std::ostream& out,
158  geo::CryostatGeo const& cryostat,
159  std::string const& indent,
160  std::string const& firstIndent) const;
161 
163  void dumpTPCplane(std::ostream& out,
164  geo::PlaneGeo const& plane,
165  std::string const& indent,
166  std::string const& firstIndent) const;
167 
169  void dumpAuxiliaryDetectors(std::ostream& out,
170  std::string const& indent,
171  std::string const& firstIndent) const;
172 
173 }; // geo::WireReadoutDumper
174 
175 // -----------------------------------------------------------------------------
176 namespace geo {
178  std::ostream& operator<<(std::ostream& out, WireReadoutDumper::StreamAdapter const& dumpAdapter);
179 }
180 
181 // -----------------------------------------------------------------------------
182 
183 #endif // LARCOREALG_GEOMETRY_WIREREADOUTDUMPER_H
void dumpTPCplane(std::ostream &out, geo::PlaneGeo const &plane, std::string const &indent, std::string const &firstIndent) const
Dumps the information from the specified plane (including wires).
auto toStream(std::string indent="") const
Adapter to send the dump to a C++ output stream via insertion.
friend std::ostream & operator<<(std::ostream &out, StreamAdapter const &dumpAdapter)
Helper for geo::WireReadoutDumper::toStream().
geo::WireReadoutGeom const * fWireGeom
Cached wire readout service provider.
geo::GeometryCore const * fGeom
Cached geometry service provider.
void dumpCryostat(std::ostream &out, geo::CryostatGeo const &cryostat, std::string const &indent, std::string const &firstIndent) const
Dumps all content of the specified cryostat.
Geometry information for a single cryostat.
Definition: CryostatGeo.h:42
Description of physical geometry of one set of auxiliary detectors.
StreamAdapter toStream(std::string indent, std::string firstIndent) const
Adapter to send the dump to a C++ output stream via insertion.
Access the description of auxiliary detector geometry.
WireReadoutDumper(geo::GeometryCore const *geom, geo::WireReadoutGeom const *wireGeom, geo::AuxDetGeometryCore const *auxGeom)
Constructor: acquires geometry service providers.
Access the description of the physical detector geometry.
void dumpAuxiliaryDetectors(std::ostream &out, std::string const &indent, std::string const &firstIndent) const
Dumps all auxiliary detector information.
Interface for a class providing readout channel mapping to geometry.
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
Definition: PlaneGeo.h:67
void dumpDetectorInfo(std::ostream &out, std::string const &indent, std::string const &firstIndent) const
Dumps the general detector information.
Description of the physical geometry of one entire detector.
Definition: GeometryCore.h:91
Helper for insertion into C++ output streams.
void dump(std::ostream &out, std::string const &indent, std::string const &firstIndent) const
Dumps the full geometry information into a stream.
geo::AuxDetGeometryCore const * fAuxGeom
Cached auxiliary detector geometry service provider.
void dump(std::ostream &out, std::string const &indent="") const
Dumps the full geometry information into a stream.
ROOT libraries.
Algorithm dumping the full detector geometry down to wires.
Interface to geometry for wire readouts .