LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
SIOVChannelStatusService_service.cc File Reference

Go to the source code of this file.

Classes

class  lariov::SIOVChannelStatusService
 

Namespaces

 lariov
 Filters for channels, events, etc.
 

Functions

 DECLARE_ART_SERVICE_INTERFACE_IMPL (lariov::SIOVChannelStatusService, lariov::ChannelStatusService, SHARED) namespace lariov
 

Function Documentation

DECLARE_ART_SERVICE_INTERFACE_IMPL ( lariov::SIOVChannelStatusService  ,
lariov::ChannelStatusService  ,
SHARED   
)

Definition at line 35 of file SIOVChannelStatusService_service.cc.

References DEFINE_ART_SERVICE_INTERFACE_IMPL, tca::evt, lariov::SIOVChannelStatusService::fProvider, fhicl::ParameterSet::get(), lariov::SIOVChannelStatusService::PreProcessEvent(), lariov::SIOVChannelStatusService::SIOVChannelStatusService(), art::ActivityRegistry::sPreProcessEvent, art::Event::time(), lariov::SIOVChannelStatusProvider::UpdateTimeStamp(), and art::Timestamp::value().

39  {
40 
41  SIOVChannelStatusService::SIOVChannelStatusService(fhicl::ParameterSet const& pset,
43  : fProvider(pset.get<fhicl::ParameterSet>("ChannelStatusProvider"))
44  {
45 
46  //register callback to update local database cache before each event is processed
47  reg.sPreProcessEvent.watch(this, &SIOVChannelStatusService::PreProcessEvent);
48  }
49 
50  void SIOVChannelStatusService::PreProcessEvent(const art::Event& evt, art::ScheduleContext)
51  {
52 
53  //First grab an update from the database
54  fProvider.UpdateTimeStamp(evt.time().value());
55  }
56 
57 } //end namespace lariov
constexpr TimeValue_t value() const
Definition: Timestamp.h:23
parameter set interface
GlobalSignal< detail::SignalResponseType::FIFO, void(Event const &, ScheduleContext)> sPreProcessEvent
decltype(auto) get(T &&obj)
ADL-aware version of std::to_string.
Definition: StdUtils.h:120
Timestamp time() const
Definition: Event.cc:47
TCEvent evt
Definition: DataStructs.cxx:8