LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
SIOVDetPedestalService_service.cc
Go to the documentation of this file.
1 #ifndef SIOVDETPEDESTALSERVICE_CC
2 #define SIOVDETPEDESTALSERVICE_CC
3 
8 #include "larevt/CalibrationDBI/Interface/DetPedestalService.h"
10 
11 namespace lariov{
12 
19  class SIOVDetPedestalService : public DetPedestalService {
20 
21  public:
22 
25 
26  void PreProcessEvent(const art::Event& evt) {
27  fProvider.Update(evt.time().value());
28  }
29 
30  private:
31 
32  const DetPedestalProvider& DoGetPedestalProvider() const override {
33  return fProvider;
34  }
35 
37  };
38 }//end namespace lariov
39 
40 DECLARE_ART_SERVICE_INTERFACE_IMPL(lariov::SIOVDetPedestalService, lariov::DetPedestalService, LEGACY)
41 
42 
43 namespace lariov{
44 
46  : fProvider(pset.get<fhicl::ParameterSet>("DetPedestalRetrievalAlg"))
47  {
48  //register callback to update local database cache before each event is processed
49  //reg.sPreProcessEvent.watch(&SIOVDetPedestalService::PreProcessEvent, *this);
51  }
52 
53 }//end namespace lariov
54 
56 
57 #endif
const DetPedestalProvider & DoGetPedestalProvider() const override
#define DEFINE_ART_SERVICE_INTERFACE_IMPL(svc, iface)
Class def header for a class DetPedestalRetrievalAlg.
constexpr TimeValue_t value() const
Definition: Timestamp.h:24
bool Update(DBTimeStamp_t ts)
Update Snapshot and inherited DBFolder if using database. Return true if updated. ...
parameter set interface
Retrieves channel information: pedestal and RMS.
Filters for channels, events, etc.
SIOVDetPedestalService(fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)
GlobalSignal< detail::SignalResponseType::FIFO, void(Event const &)> sPreProcessEvent
Timestamp time() const
Definition: Event.h:61
#define DECLARE_ART_SERVICE_INTERFACE_IMPL(svc, iface, scope)