LifetimeCalibProtoDUNE.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file LifetimeCalibProtoDUNE.h
3 //
4 // \brief header of class for accessing calibration data for ProtoDUNE
5 //
6 // \author tjyang@fnal.gov
7 // wwu@fnal.gov
8 //
9 ////////////////////////////////////////////////////////////////////////
10 #ifndef CALIB_LIFETIMECALIBPROTODUNE_H
11 #define CALIB_LIFETIMECALIBPROTODUNE_H
12 
13 
14 // FHiCL libraries
15 #include "fhiclcpp/ParameterSet.h"
16 
17 // ROOT includes
18 #include "TH1F.h"
19 #include "TH2F.h"
20 
21 // C/C++ standard libraries
22 #include <string>
23 #include <vector>
24 #include <map>
25 
26 // dunetpc includes
28 
29 namespace calib {
30 
31  typedef struct {
32  double center;
33  double low;
34  double high;
36 
38 
39  public:
40 
44  virtual ~LifetimeCalibProtoDUNE() = default;
45 
46  bool Configure(fhicl::ParameterSet const& pset);
47  bool Update(uint64_t ts=0);
48 
49  virtual double GetLifetime() override;
50  virtual double GetLifetimeLow() override;
51  virtual double GetLifetimeHigh() override;
52 
53  void SetIsMC(bool v) { fIsMC = v; }
54  void SetLifetime(double val);
55  void SetLifetimeLow(double val);
56  void SetLifetimeHigh(double val);
57  void SetUseCondb(bool v) { fUseCondbLifetime = v; }
59  void SetInterpolate(bool v) { fInterpolate = v; }
60 
61  protected:
62  bool LoadLifetime();
63 
66  bool fIsMC;
68  uint64_t fCurrentTS;
69 
72 
73  std::map<int,LifetimePurMon_t> fLifetimePurMon;
74 
75  }; // class LifetimeCalibProtoDUNE
76 } //namespace calib
77 #endif // CALIB_LIFETIMECALIBPROTODUNE_H
virtual ~LifetimeCalibProtoDUNE()=default
std::string string
Definition: nybbler.cc:12
std::map< int, LifetimePurMon_t > fLifetimePurMon
bool Configure(fhicl::ParameterSet const &pset)
void SetLifetimeLow(double val)
virtual double GetLifetime() override
virtual double GetLifetimeHigh() override
void SetLifetimeHigh(double val)
void SetLifetime(double val)
virtual double GetLifetimeLow() override