GeometryIteratorLoopTest_module.cc
Go to the documentation of this file.
1 /**
2  * @file GeometryIteratorLoopTest_module.cc
3  * @brief Tests the correct iteration of the geo::Geometry iterators
4  * @author Gianluca Petrillo (petrillo@fnal.gov)
5  * @date August 25, 2014
6  */
7 
8 // LArSoft includes
11 
12 // Framework includes
16 
17 // C/C++ standard library
18 #include <memory> // std::unique_ptr<>
19 
20 
21 namespace art { class Event; } // art::Event declaration
22 namespace fhicl { class ParameterSet; }
23 
24 namespace geo {
25  /**
26  * @brief Performs tests on the geometry as seen by Geometry service
27  *
28  * Configuration parameters
29  * =========================
30  *
31  * See GeometryIteratorLoopTestAlg.
32  */
34  public:
35  explicit GeometryIteratorLoopTest(fhicl::ParameterSet const& pset);
36 
37  virtual void analyze(art::Event const&) {}
38  virtual void beginJob();
39 
40  private:
41 
42  std::unique_ptr<geo::GeometryIteratorLoopTestAlg> tester; ///< the test algorithm
43 
44  }; // class GeometryIteratorLoopTest
45 } // namespace geo
46 
47 
48 //******************************************************************************
49 namespace geo {
50 
51  //......................................................................
52  GeometryIteratorLoopTest::GeometryIteratorLoopTest(fhicl::ParameterSet const& pset)
53  : EDAnalyzer(pset)
54  , tester(new geo::GeometryIteratorLoopTestAlg(pset))
55  {
56  } // GeometryIteratorLoopTest::GeometryIteratorLoopTest()
57 
58 
59  //......................................................................
61  {
63 
64  // 1. we set it up with the geometry from the environment
65  tester->Setup(*geom);
66 
67  // 2. then we run it!
68  tester->Run();
69 
70  } // GeometryTest::beginJob()
71 
72 
73  //......................................................................
75 
76 } // namespace geo
Performs tests on the geometry as seen by Geometry service.
virtual void analyze(art::Event const &)
art framework interface to geometry description
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:67
void beginJob()
Definition: Breakpoints.cc:14
Definition: types.h:32
Tests the correct iteration of the geo::Geometry iterators.
LArSoft geometry interface.
Definition: ChannelGeo.h:16
std::unique_ptr< geo::GeometryIteratorLoopTestAlg > tester
the test algorithm