All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IHitHistogramTool.h
Go to the documentation of this file.
1 #ifndef IHITHISTOGRAMTOOL_H
2 #define IHITHISTOGRAMTOOL_H
3 ////////////////////////////////////////////////////////////////////////
4 //
5 // Class: IHitHistogramTool
6 // Module Type: tool
7 // File: IHitHistogramTool.h
8 //
9 // This provides an interface for tools which do histogramming
10 // of various quantities associated to recob::Hit objects
11 //
12 // Created by Tracy Usher (usher@slac.stanford.edu) on October 16, 2017
13 //
14 ////////////////////////////////////////////////////////////////////////
15 
16 #include "fhiclcpp/ParameterSet.h"
17 #include "art/Framework/Services/Registry/ServiceHandle.h"
18 #include "art_root_io/TFileService.h"
19 #include "canvas/Persistency/Common/Ptr.h"
21 
23 {
24 public:
25  /**
26  * @brief Virtual Destructor
27  */
28  virtual ~IHitHistogramTool() noexcept = default;
29 
30  /**
31  * @brief Interface for configuring the particular algorithm tool
32  *
33  * @param ParameterSet The input set of parameters for configuration
34  */
35  virtual void configure(const fhicl::ParameterSet&) = 0;
36 
37  /**
38  * @brief Interface for initializing the histograms to be filled
39  *
40  * @param TFileService handle to the TFile service
41  * @param string subdirectory to store the hists in
42  */
43  virtual void initializeHists(art::ServiceHandle<art::TFileService>&, const std::string&) = 0;
44 
45  /**
46  * @brief Interface for method to executve at the end of run processing
47  *
48  * @param int number of events to use for normalization
49  */
50  virtual void endJob(int numEvents) = 0;
51 
52  /**
53  * @brief Interface for filling histograms
54  */
55  using HitPtrVec = std::vector<art::Ptr<recob::Hit>>;
56 
57  virtual void fillHistograms(const HitPtrVec&) const = 0;
58 };
59 
60 #endif
Declaration of signal hit object.
virtual void configure(const fhicl::ParameterSet &)=0
Interface for configuring the particular algorithm tool.
virtual void fillHistograms(const HitPtrVec &) const =0
virtual void initializeHists(art::ServiceHandle< art::TFileService > &, const std::string &)=0
Interface for initializing the histograms to be filled.
virtual void endJob(int numEvents)=0
Interface for method to executve at the end of run processing.
virtual ~IHitHistogramTool() noexcept=default
Virtual Destructor.
std::vector< art::Ptr< recob::Hit >> HitPtrVec
Interface for filling histograms.