Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dunesim
dunesim
SpaceChargeServices
SpaceChargeServiceProtoDUNE_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/SpaceChargeServiceProtoDUNE.h
"
16
#include "
art/Framework/Services/Registry/ServiceDefinitionMacros.h
"
17
#include "
lardata/DetectorInfoServices/DetectorPropertiesService.h
"
18
19
// ROOT includes
20
#include "TMath.h"
21
22
// Framework includes
23
#include "
messagefacility/MessageLogger/MessageLogger.h
"
24
#include "cetlib_except/exception.h"
25
26
//-----------------------------------------------
27
spacecharge::SpaceChargeServiceProtoDUNE::SpaceChargeServiceProtoDUNE
(
fhicl::ParameterSet
const
& pset,
art::ActivityRegistry
&
reg
)
28
{
29
fProp
.reset(
new
spacecharge::SpaceChargeProtoDUNE
(pset));
30
31
auto
const
detProp =
art::ServiceHandle<detinfo::DetectorPropertiesService const>
()->DataForJob();
32
fProp
->Configure(pset,detProp);
33
34
reg.
sPreBeginRun
.watch(
this
, &
SpaceChargeServiceProtoDUNE::preBeginRun
);
35
}
36
37
//----------------------------------------------
38
void
spacecharge::SpaceChargeServiceProtoDUNE::preBeginRun
(
const
art::Run
&
run
)
39
{
40
fProp
->Update(run.
id
().
run
());
41
}
42
43
//------------------------------------------------
44
void
spacecharge::SpaceChargeServiceProtoDUNE::reconfigure
(
fhicl::ParameterSet
const
& pset)
45
{
46
auto
const
detProp =
art::ServiceHandle<detinfo::DetectorPropertiesService const>
()->DataForJob();
47
fProp
->Configure(pset,detProp);
48
return
;
49
}
50
51
//------------------------------------------------
52
DEFINE_ART_SERVICE_INTERFACE_IMPL
(
spacecharge::SpaceChargeServiceProtoDUNE
,
spacecharge::SpaceChargeService
)
art::ServiceHandle
Definition:
ServiceHandle.h:37
spacecharge::SpaceChargeServiceProtoDUNE::reconfigure
void reconfigure(fhicl::ParameterSet const &pset)
Definition:
SpaceChargeServiceProtoDUNE_service.cc:44
art::Run::id
RunID id() const
Definition:
Run.cc:17
spacecharge::SpaceChargeServiceProtoDUNE
Definition:
SpaceChargeServiceProtoDUNE.h:22
DetectorPropertiesService.h
art::RunID::run
RunNumber_t run() const
Definition:
RunID.h:64
filelisting.run
int run
Definition:
filelisting.py:13
art::Run
Definition:
Run.h:17
MessageLogger.h
spacecharge::SpaceChargeServiceProtoDUNE::preBeginRun
void preBeginRun(const art::Run &run)
Definition:
SpaceChargeServiceProtoDUNE_service.cc:38
ServiceUtil.h
spacecharge::SpaceChargeServiceProtoDUNE::SpaceChargeServiceProtoDUNE
SpaceChargeServiceProtoDUNE(fhicl::ParameterSet const &pset, art::ActivityRegistry ®)
Definition:
SpaceChargeServiceProtoDUNE_service.cc:27
spacecharge::SpaceChargeService
Definition:
SpaceChargeService.h:17
SpaceChargeServiceProtoDUNE.h
art::ActivityRegistry::sPreBeginRun
GlobalSignal< detail::SignalResponseType::FIFO, void(Run const &)> sPreBeginRun
Definition:
ActivityRegistry.h:146
spacecharge::SpaceChargeServiceProtoDUNE::fProp
std::unique_ptr< spacecharge::SpaceChargeProtoDUNE > fProp
Definition:
SpaceChargeServiceProtoDUNE.h:38
art::ActivityRegistry
Definition:
ActivityRegistry.h:52
ServiceDefinitionMacros.h
cet::registry_via_id
Definition:
registry_via_id.h:19
spacecharge::SpaceChargeProtoDUNE
Definition:
SpaceChargeProtoDUNE.h:29
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