LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
SIOVPmtGainProvider.h
Go to the documentation of this file.
1 
11 #ifndef SIOVPMTGAINPROVIDER_H
12 #define SIOVPMTGAINPROVIDER_H
13 
14 #include "DatabaseRetrievalAlg.h"
18 #include "larevt/CalibrationDBI/Interface/PmtGainProvider.h"
19 
20 namespace lariov {
21 
38  class SIOVPmtGainProvider : public DatabaseRetrievalAlg, public PmtGainProvider {
39 
40  public:
43 
45  void Reconfigure(fhicl::ParameterSet const& p) override;
46 
48  void UpdateTimeStamp(DBTimeStamp_t ts);
49 
51  bool Update(DBTimeStamp_t ts);
52 
54  const PmtGain& PmtGainObject(DBChannelID_t ch) const;
55  float Gain(DBChannelID_t ch) const override;
56  float GainErr(DBChannelID_t ch) const override;
57  CalibrationExtraInfo const& ExtraInfo(DBChannelID_t ch) const override;
58 
59  private:
61 
62  bool DBUpdate() const; // Uses current event time.
63  bool DBUpdate(DBTimeStamp_t ts) const;
64 
65  // Time stamps.
66 
67  DBTimeStamp_t fEventTimeStamp; // Most recently seen time stamp.
68  mutable DBTimeStamp_t fCurrentTimeStamp; // Time stamp of cached data.
69 
71 
73  };
74 } //end namespace lariov
75 
76 #endif
bool DBUpdate() const
Do actual database updates.
const PmtGain & PmtGainObject(DBChannelID_t ch) const
Retrieve gain information.
bool Update(DBTimeStamp_t ts)
Update Snapshot and inherited DBFolder if using database. Return true if updated. ...
Class def header for a class Snapshot.
Class def header for a class PmtGain.
SIOVPmtGainProvider(fhicl::ParameterSet const &p)
Constructors.
CalibrationExtraInfo const & ExtraInfo(DBChannelID_t ch) const override
Retrieves information: pmt gain.
void UpdateTimeStamp(DBTimeStamp_t ts)
Update event time stamp.
Class def header for a class DatabaseRetrievalAlg.
Filters for channels, events, etc.
void Reconfigure(fhicl::ParameterSet const &p) override
Reconfigure function called by fhicl constructor.
float Gain(DBChannelID_t ch) const override
float GainErr(DBChannelID_t ch) const override