All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SpaceChargeServiceSBND_service.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 // SpaceChargeServiceSBND_service.cc; brief implementation of class for storing/accessing space charge distortions for SBND
3 // arbint@bnl.gov
4 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
5 
6 // C++ language includes
7 #include <iostream>
8 
9 // LArSoft includes
11 
12 // ROOT includes
13 #include "TMath.h"
14 
15 // Framework includes
16 #include "art/Framework/Services/Registry/ServiceDefinitionMacros.h"
17 #include "messagefacility/MessageLogger/MessageLogger.h"
18 #include "cetlib_except/exception.h"
19 
20 //-----------------------------------------------
21 spacecharge::SpaceChargeServiceSBND::SpaceChargeServiceSBND(fhicl::ParameterSet const& pset, art::ActivityRegistry &reg)
22 {
23  fProp.reset(new spacecharge::SpaceChargeSBND(pset));
24 
25  reg.sPreBeginRun.watch(this, &SpaceChargeServiceSBND::preBeginRun);
26 }
27 
28 //----------------------------------------------
30 {
31  fProp->Update(run.id().run());
32 }
33 
34 //------------------------------------------------
35 void spacecharge::SpaceChargeServiceSBND::reconfigure(fhicl::ParameterSet const& pset)
36 {
37  fProp->Configure(pset);
38  return;
39 }
40 
41 //------------------------------------------------
std::unique_ptr< spacecharge::SpaceChargeSBND > fProp
SpaceChargeServiceSBND(fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)
void reconfigure(fhicl::ParameterSet const &pset)