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