29 : fInheritNumberTimeSamples(pset.
get<
bool>(
"InheritNumberTimeSamples",
false))
45 fProp = std::make_unique<detinfo::DetectorPropertiesStandard>(pset,
51 std::set<std::string>({
"InheritNumberTimeSamples" })
55 fProp->CheckIfConfigured();
65 fProp->ValidateAndConfigure(p, {
"InheritNumberTimeSamples" });
77 fProp->UpdateClocks(lar::providerFrom<detinfo::DetectorClocksService>());
114 if(filename.size() != 0) {
116 TFile*
file = TFile::Open(filename.c_str(),
"READ");
117 if(file != 0 && !file->IsZombie() && file->IsOpen()) {
125 unsigned int iNumberTimeSamples = 0;
126 unsigned int nNumberTimeSamples = 0;
128 sqlite3_stmt * stmt = 0;
129 sqlite3_prepare_v2(sqliteDB,
"SELECT PSetBlob from ParameterSets;", -1, &stmt, NULL);
130 while (sqlite3_step(stmt) == SQLITE_ROW) {
141 unsigned int newNumberTimeSamples = ps.
get<
unsigned int>(
"NumberTimeSamples");
145 if(newNumberTimeSamples !=
fPS.
get<
unsigned int>(
"NumberTimeSamples")) {
146 if(nNumberTimeSamples == 0)
147 iNumberTimeSamples = newNumberTimeSamples;
148 else if(newNumberTimeSamples != iNumberTimeSamples) {
150 <<
"Historical values of NumberTimeSamples do not agree: " 151 << iNumberTimeSamples <<
" " << newNumberTimeSamples <<
"\n" ;
153 ++nNumberTimeSamples;
163 nNumberTimeSamples != 0 &&
164 iNumberTimeSamples !=
fProp->NumberTimeSamples()) {
166 <<
"Overriding configuration parameter NumberTimeSamples using historical value.\n" 167 <<
" Configured value: " <<
fProp->NumberTimeSamples() <<
"\n" 168 <<
" Historical (used) value: " << iNumberTimeSamples <<
"\n";
169 fProp->SetNumberTimeSamples(iNumberTimeSamples);
194 (ps.
get<std::string>(
"service_type",
"") ==
"DetectorPropertiesService")
195 && (ps.
get<std::string>(
"service_provider",
"") ==
"DetectorPropertiesServiceStandard")
Utilities to manage ProviderPack objects with art.
ProviderPackFromServices< Services... > extractProviders()
Returns a provider pack with providers from specified services.
Encapsulate the construction of a single cyostat.
#define DEFINE_ART_SERVICE_INTERFACE_IMPL(svc, iface)
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
void make_ParameterSet(intermediate_table const &tbl, ParameterSet &ps)
DetectorPropertiesServiceStandard(fhicl::ParameterSet const &pset, art::ActivityRegistry ®)
void preProcessEvent(const art::Event &evt)
std::unique_ptr< detinfo::DetectorPropertiesStandard > fProp
T get(std::string const &key) const
bool get_if_present(std::string const &key, T &value) const
fhicl::ParameterSet fPS
Original parameter set.
General LArSoft Utilities.
The geometry of one entire detector, as served by art.
bool isDetectorPropertiesServiceStandard(const fhicl::ParameterSet &ps) const
"Standard" implementation of DetectorProperties service
Encapsulate the construction of a single detector plane.
bool fInheritNumberTimeSamples
Flag saying whether to inherit NumberTimeSamples.
GlobalSignal< detail::SignalResponseType::FIFO, void(Event const &)> sPreProcessEvent
GlobalSignal< detail::SignalResponseType::LIFO, void(std::string const &)> sPostOpenFile
virtual void reconfigure(fhicl::ParameterSet const &pset) override
void postOpenFile(const std::string &filename)
art framework interface to geometry description
cet::coded_exception< error, detail::translate > exception
Encapsulate the construction of a single detector plane.