Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dunesim
dunesim
SpaceChargeServices
SpaceChargeServiceProtoDUNEdp_service.cc
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
// \file SpaceChargeProtoDUNE.cxx
3
//
4
// \brief implementation of class for storing/accessing space charge distortions for ProtoDUNE
5
//
6
// \author mrmooney@bnl.gov
7
//
8
////////////////////////////////////////////////////////////////////////
9
10
// C++ language includes
11
#include <iostream>
12
13
// LArSoft includes
14
#include "
larcore/CoreUtils/ServiceUtil.h
"
15
#include "
dunesim/SpaceChargeServices/SpaceChargeServiceProtoDUNEdp.h
"
16
#include "
art/Framework/Services/Registry/ServiceDefinitionMacros.h
"
17
#include "
lardata/DetectorInfoServices/DetectorPropertiesService.h
"
18
19
20
// ROOT includes
21
#include "TMath.h"
22
23
// Framework includes
24
#include "
messagefacility/MessageLogger/MessageLogger.h
"
25
#include "cetlib_except/exception.h"
26
27
//-----------------------------------------------
28
spacecharge::SpaceChargeServiceProtoDUNEdp::SpaceChargeServiceProtoDUNEdp
(
fhicl::ParameterSet
const
& pset,
art::ActivityRegistry
&
reg
)
29
{
30
fProp
.reset(
new
spacecharge::SpaceChargeProtoDUNEdp
(pset));
31
32
auto
const
detProp =
art::ServiceHandle<detinfo::DetectorPropertiesService const>
()->DataForJob();
33
fProp
->Configure(pset,detProp);
34
35
reg.
sPreBeginRun
.watch(
this
, &
SpaceChargeServiceProtoDUNEdp::preBeginRun
);
36
}
37
38
//----------------------------------------------
39
void
spacecharge::SpaceChargeServiceProtoDUNEdp::preBeginRun
(
const
art::Run
&
run
)
40
{
41
fProp
->Update(run.
id
().
run
());
42
}
43
44
//------------------------------------------------
45
void
spacecharge::SpaceChargeServiceProtoDUNEdp::reconfigure
(
fhicl::ParameterSet
const
& pset)
46
{
47
auto
const
detProp =
art::ServiceHandle<detinfo::DetectorPropertiesService const>
()->DataForJob();
48
fProp
->Configure(pset,detProp);
49
return
;
50
}
51
52
//------------------------------------------------
53
DEFINE_ART_SERVICE_INTERFACE_IMPL
(
spacecharge::SpaceChargeServiceProtoDUNEdp
,
spacecharge::SpaceChargeService
)
art::ServiceHandle
Definition:
ServiceHandle.h:37
art::Run::id
RunID id() const
Definition:
Run.cc:17
spacecharge::SpaceChargeServiceProtoDUNEdp::preBeginRun
void preBeginRun(const art::Run &run)
Definition:
SpaceChargeServiceProtoDUNEdp_service.cc:39
DetectorPropertiesService.h
art::RunID::run
RunNumber_t run() const
Definition:
RunID.h:64
spacecharge::SpaceChargeServiceProtoDUNEdp::fProp
std::unique_ptr< spacecharge::SpaceChargeProtoDUNEdp > fProp
Definition:
SpaceChargeServiceProtoDUNEdp.h:38
filelisting.run
int run
Definition:
filelisting.py:13
art::Run
Definition:
Run.h:17
MessageLogger.h
SpaceChargeServiceProtoDUNEdp.h
spacecharge::SpaceChargeServiceProtoDUNEdp
Definition:
SpaceChargeServiceProtoDUNEdp.h:22
spacecharge::SpaceChargeServiceProtoDUNEdp::reconfigure
virtual void reconfigure(fhicl::ParameterSet const &pset)
Definition:
SpaceChargeServiceProtoDUNEdp_service.cc:45
ServiceUtil.h
spacecharge::SpaceChargeService
Definition:
SpaceChargeService.h:17
art::ActivityRegistry::sPreBeginRun
GlobalSignal< detail::SignalResponseType::FIFO, void(Run const &)> sPreBeginRun
Definition:
ActivityRegistry.h:146
art::ActivityRegistry
Definition:
ActivityRegistry.h:52
ServiceDefinitionMacros.h
cet::registry_via_id
Definition:
registry_via_id.h:19
spacecharge::SpaceChargeServiceProtoDUNEdp::SpaceChargeServiceProtoDUNEdp
SpaceChargeServiceProtoDUNEdp(fhicl::ParameterSet const &pset, art::ActivityRegistry ®)
Definition:
SpaceChargeServiceProtoDUNEdp_service.cc:28
spacecharge::SpaceChargeProtoDUNEdp
Definition:
SpaceChargeProtoDUNEdp.h:28
fhicl::ParameterSet
Definition:
ParameterSet.h:36
DEFINE_ART_SERVICE_INTERFACE_IMPL
#define DEFINE_ART_SERVICE_INTERFACE_IMPL(svc, iface)
Definition:
ServiceDefinitionMacros.h:42
Generated by
1.8.11