LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
"Standard" implementation of DetectorProperties service More...
#include "DetectorPropertiesServiceStandard.h"
Classes | |
struct | ServiceConfiguration_t |
Public Types | |
using | Parameters = art::ServiceTable< ServiceConfiguration_t > |
typedef detinfo::DetectorProperties | provider_type |
Public Member Functions | |
DetectorPropertiesServiceStandard (fhicl::ParameterSet const &pset, art::ActivityRegistry ®) | |
virtual void | reconfigure (fhicl::ParameterSet const &pset) override |
void | preProcessEvent (const art::Event &evt) |
void | postOpenFile (const std::string &filename) |
virtual const provider_type * | provider () const override |
Private Member Functions | |
bool | isDetectorPropertiesServiceStandard (const fhicl::ParameterSet &ps) const |
Private Attributes | |
std::unique_ptr< detinfo::DetectorPropertiesStandard > | fProp |
fhicl::ParameterSet | fPS |
Original parameter set. More... | |
bool | fInheritNumberTimeSamples |
Flag saying whether to inherit NumberTimeSamples. More... | |
"Standard" implementation of DetectorProperties service
This class wraps DetectorPropertiesStandard provider into a art service. It delivers the provider via the standard interface:
detinfo::DetectorProperties const* detprop = art::ServiceHandle<detinfo::DetectorPropertiesStandard>() ->provider();
or, using the standard interface in "CoreUtils/ServiceUtil.h":
auto const* detprop = lar::providerFrom<detinfo::DetectorPropertiesStandard>();
In addition to the functionality of the provider, this service allows to read the configuration from the input file, inherited from a previous run.
This service passes the whole configuration down to its service provider, but it also reacts to:
Definition at line 55 of file DetectorPropertiesServiceStandard.h.
using detinfo::DetectorPropertiesServiceStandard::Parameters = art::ServiceTable<ServiceConfiguration_t> |
Definition at line 77 of file DetectorPropertiesServiceStandard.h.
|
inherited |
Definition at line 22 of file DetectorPropertiesService.h.
detinfo::DetectorPropertiesServiceStandard::DetectorPropertiesServiceStandard | ( | fhicl::ParameterSet const & | pset, |
art::ActivityRegistry & | reg | ||
) |
Definition at line 28 of file DetectorPropertiesServiceStandard_service.cc.
References lar::extractProviders(), postOpenFile(), preProcessEvent(), art::ActivityRegistry::sPostOpenFile, and art::ActivityRegistry::sPreProcessEvent.
|
private |
Definition at line 187 of file DetectorPropertiesServiceStandard_service.cc.
References d, DEFINE_ART_SERVICE_INTERFACE_IMPL, fhicl::ParameterSet::get(), fhicl::ParameterSet::get_if_present(), and s.
Referenced by postOpenFile().
void detinfo::DetectorPropertiesServiceStandard::postOpenFile | ( | const std::string & | filename | ) |
Definition at line 83 of file DetectorPropertiesServiceStandard_service.cc.
References file, fInheritNumberTimeSamples, fProp, fPS, fhicl::ParameterSet::get(), isDetectorPropertiesServiceStandard(), and fhicl::make_ParameterSet().
Referenced by DetectorPropertiesServiceStandard().
void detinfo::DetectorPropertiesServiceStandard::preProcessEvent | ( | const art::Event & | evt | ) |
Definition at line 74 of file DetectorPropertiesServiceStandard_service.cc.
References fProp.
Referenced by DetectorPropertiesServiceStandard().
|
inlineoverridevirtual |
Implements detinfo::DetectorPropertiesService.
Definition at line 86 of file DetectorPropertiesServiceStandard.h.
References fProp.
|
overridevirtual |
Implements detinfo::DetectorPropertiesService.
Definition at line 63 of file DetectorPropertiesServiceStandard_service.cc.
|
private |
Flag saying whether to inherit NumberTimeSamples.
Definition at line 93 of file DetectorPropertiesServiceStandard.h.
Referenced by postOpenFile().
|
private |
Definition at line 90 of file DetectorPropertiesServiceStandard.h.
Referenced by postOpenFile(), preProcessEvent(), provider(), and reconfigure().
|
private |
Original parameter set.
Definition at line 91 of file DetectorPropertiesServiceStandard.h.
Referenced by postOpenFile(), and reconfigure().