All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeometryIteratorTestAlg.h
Go to the documentation of this file.
1 /**
2  * @file GeometryIteratorTestAlg.h
3  * @brief Tests the correct iteration of the geo::Geometry iterators
4  * @author Gianluca Petrillo (petrillo@fnal.gov)
5  * @date May 7th, 2015
6  */
7 
8 #ifndef GEO_GEOMETRYITERATORTESTALG_H
9 #define GEO_GEOMETRYITERATORTESTALG_H
10 
11 
12 namespace fhicl {
13  class ParameterSet;
14 }
15 
16 namespace geo {
17 
18  class GeometryCore; // forward declaration
19 
20  //----------------------------------------------------------------------------
21 
23  public:
24 
25  /// Constructor: reads configuration, does nothing
26  GeometryIteratorTestAlg(fhicl::ParameterSet const& /* pset */) {}
27 
28  /// Virtual destructor
29  virtual ~GeometryIteratorTestAlg() = default;
30 
31  /// Algorithm set up
32  virtual void Setup(geo::GeometryCore const& new_geo) { geom = &new_geo; }
33 
34  /// Executes the test
35  virtual unsigned int Run() const;
36 
37  /// @{
38  /// @name ID iterator tests
39  void CryostatIDIteratorsTest() const;
40  void TPCIDIteratorsTest() const;
41  void PlaneIDIteratorsTest() const;
42  void WireIDIteratorsTest() const;
43  void TPCsetIDIteratorsTest() const;
44  void ROPIDIteratorsTest() const;
45  /// @}
46 
47  /// @{
48  /// @name Element iterator tests
49  void CryostatIteratorsTest() const;
50  void TPCIteratorsTest() const;
51  void PlaneIteratorsTest() const;
52  void WireIteratorsTest() const;
53  /// @}
54 
55  protected:
56  GeometryCore const* geom = nullptr; ///< pointer to the geometry description
57 
58  }; // class GeometryIteratorTestAlg
59 
60 
61 } // namespace geo
62 
63 
64 #endif // GEO_GEOMETRYITERATORTESTALG_H
GeometryCore const * geom
pointer to the geometry description
virtual void Setup(geo::GeometryCore const &new_geo)
Algorithm set up.
Description of geometry of one entire detector.
virtual unsigned int Run() const
Executes the test.
virtual ~GeometryIteratorTestAlg()=default
Virtual destructor.
GeometryIteratorTestAlg(fhicl::ParameterSet const &)
Constructor: reads configuration, does nothing.