LinCalibProtoDUNE.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file LinCalibProtoDUNE.h
3 //
4 // \brief header of class for accessing linearity calibration
5 // data for ProtoDUNE
6 //
7 // \author jpaley@fnal.gov
8 //
9 ////////////////////////////////////////////////////////////////////////
10 #ifndef CALIB_LINCALIBPROTODUNE_H
11 #define CALIB_LINCALIBPROTODUNE_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  int status;
33  float gain;
34  float offset;
35  float shape;
36  float chi2;
37  int adc_low;
38  int adc_high;
39  float nl[20];
40  } LinConsts_t;
41 
42  class LinCalibProtoDUNE : public LinCalib {
43 
44  public:
45 
48  LinCalibProtoDUNE(LinCalibProtoDUNE const&) = delete;
49  virtual ~LinCalibProtoDUNE() = default;
50 
51  bool Configure(fhicl::ParameterSet const& pset);
52  bool Update(uint64_t ts=0);
53 
54  LinConsts_t GetLinConsts(int chanId);
55 
56  void SetIsMC(bool v) { fIsMC = v; }
57 
58  void SetUseCondb(bool v) { fUseCondb = v; }
60  void SetTag(std::string t) { fDBTag = t; }
61 
62  protected:
63  bool LoadConsts();
64 
65  bool fUseCondb;
67  bool fIsMC;
68  uint64_t fCurrentTS;
69 
72 
73  std::map<int,LinConsts_t> fLinConsts;
74 
75  }; // class LinCalibProtoDUNE
76 } //namespace calib
77 #endif // CALIB_LINCALIBPROTODUNE_H
bool Configure(fhicl::ParameterSet const &pset)
std::string string
Definition: nybbler.cc:12
bool Update(uint64_t ts=0)
virtual ~LinCalibProtoDUNE()=default
std::map< int, LinConsts_t > fLinConsts
std::string nl(std::size_t i=1)
LinConsts_t GetLinConsts(int chanId)
void SetCSVFileName(std::string f)
void SetTag(std::string t)