LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
DetPedestalRetrievalAlg.h
Go to the documentation of this file.
1 
14 #ifndef WEBDBI_DETPEDESTALRETRIEVALALG_H
15 #define WEBDBI_DETPEDESTALRETRIEVALALG_H
16 
17 // C/C++ standard libraries
18 #include <string>
19 #include <array>
20 
21 // LArSoft libraries
22 #include "larevt/CalibrationDBI/IOVData/DetPedestal.h"
23 #include "larevt/CalibrationDBI/IOVData/Snapshot.h"
24 #include "larevt/CalibrationDBI/IOVData/IOVDataConstants.h"
25 #include "larevt/CalibrationDBI/Interface/DetPedestalProvider.h"
27 
28 namespace lariov {
29 
54  class DetPedestalRetrievalAlg : public DatabaseRetrievalAlg, public DetPedestalProvider {
55 
56  public:
57 
59  DetPedestalRetrievalAlg(const std::string& foldername,
60  const std::string& url,
61  const std::string& tag="");
62 
64 
66  void Reconfigure(fhicl::ParameterSet const& p) override;
67 
69  bool Update(DBTimeStamp_t ts);
70 
72  const DetPedestal& Pedestal(DBChannelID_t ch) const;
73  float PedMean(DBChannelID_t ch) const override;
74  float PedRms(DBChannelID_t ch) const override;
75  float PedMeanErr(DBChannelID_t ch) const override;
76  float PedRmsErr(DBChannelID_t ch) const override;
77 
78  //hardcoded information about database folder - useful for debugging cross checks
79  static constexpr unsigned int NCOLUMNS = 5;
80  static constexpr const char* FIELD_NAMES[NCOLUMNS]
81  = {"channel", "mean", "mean_err", "rms", "rms_err"};
82  static constexpr const char* FIELD_TYPES[NCOLUMNS]
83  = {"unsigned int", "float", "float", "float", "float"};
84 
85  private:
86 
87  DataSource::ds fDataSource;
88 
89  Snapshot<DetPedestal> fData;
90  };
91 }//end namespace lariov
92 
93 #endif
94  // end of doxygen group
float PedRmsErr(DBChannelID_t ch) const override
float PedRms(DBChannelID_t ch) const override
float PedMeanErr(DBChannelID_t ch) const override
bool Update(DBTimeStamp_t ts)
Update Snapshot and inherited DBFolder if using database. Return true if updated. ...
const DetPedestal & Pedestal(DBChannelID_t ch) const
Retrieve pedestal information.
static constexpr const char * FIELD_NAMES[NCOLUMNS]
static constexpr unsigned int NCOLUMNS
Retrieves channel information: pedestal and RMS.
DetPedestalRetrievalAlg(const std::string &foldername, const std::string &url, const std::string &tag="")
Constructors.
Class def header for a class DatabaseRetrievalAlg.
Filters for channels, events, etc.
float PedMean(DBChannelID_t ch) const override
static constexpr const char * FIELD_TYPES[NCOLUMNS]
void Reconfigure(fhicl::ParameterSet const &p) override
Reconfigure function called by fhicl constructor.