LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
SIOVPmtGainProvider.h
Go to the documentation of this file.
1 
11 #ifndef SIOVPMTGAINPROVIDER_H
12 #define SIOVPMTGAINPROVIDER_H
13 
14 #include "larevt/CalibrationDBI/IOVData/PmtGain.h"
15 #include "larevt/CalibrationDBI/IOVData/Snapshot.h"
16 #include "larevt/CalibrationDBI/IOVData/IOVDataConstants.h"
17 #include "larevt/CalibrationDBI/Interface/PmtGainProvider.h"
18 #include "DatabaseRetrievalAlg.h"
19 
20 namespace lariov {
21 
38  class SIOVPmtGainProvider : public DatabaseRetrievalAlg, public PmtGainProvider {
39 
40  public:
41 
44 
46  void Reconfigure(fhicl::ParameterSet const& p) override;
47 
49  void UpdateTimeStamp(DBTimeStamp_t ts);
50 
52  bool Update(DBTimeStamp_t ts);
53 
55  const PmtGain& PmtGainObject(DBChannelID_t ch) const;
56  float Gain(DBChannelID_t ch) const override;
57  float GainErr(DBChannelID_t ch) const override;
58  CalibrationExtraInfo const& ExtraInfo(DBChannelID_t ch) const override;
59 
60  private:
61 
63 
64  bool DBUpdate() const; // Uses current event time.
65  bool DBUpdate(DBTimeStamp_t ts) const;
66 
67  // Time stamps.
68 
69  DBTimeStamp_t fEventTimeStamp; // Most recently seen time stamp.
70  mutable DBTimeStamp_t fCurrentTimeStamp; // Time stamp of cached data.
71 
72  DataSource::ds fDataSource;
73 
74  mutable Snapshot<PmtGain> fData;
75  };
76 }//end namespace lariov
77 
78 #endif
79 
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. ...
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