LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
MagneticFieldServiceStandard_service.cc
Go to the documentation of this file.
1
// \file MagneticFieldServiceStandard_service.cc
3
//
4
// \brief implementation of class for storing/accessing magnetic fields
5
//
6
// \author ebrianne@fnal.gov
7
//
9
10
#include "
nug4/MagneticField/MagneticFieldStandard.h
"
11
#include "
nug4/MagneticFieldServices/MagneticFieldService.h
"
12
13
#include "
art/Framework/Services/Registry/ActivityRegistry.h
"
14
#include "
art/Framework/Services/Registry/GlobalSignal.h
"
15
#include "
art/Framework/Services/Registry/ServiceDeclarationMacros.h
"
16
#include "
art/Framework/Services/Registry/ServiceHandle.h
"
17
#include "
art/Framework/Principal/Run.h
"
18
#include "
fhiclcpp/ParameterSet.h
"
19
20
namespace
mag
{
21
class
MagneticFieldServiceStandard
:
public
MagneticFieldService
{
22
public
:
23
MagneticFieldServiceStandard
(
fhicl::ParameterSet
const
& pset,
art::ActivityRegistry
& reg);
24
25
private
:
26
void
reconfigure
(
fhicl::ParameterSet
const
& pset);
27
void
preBeginRun
(
const
art::Run
& run);
28
29
const
provider_type
*
provider
()
const override
{
return
&
fProp
; }
30
31
mag::MagneticFieldStandard
fProp
;
32
};
33
}
34
35
DECLARE_ART_SERVICE_INTERFACE_IMPL
(
mag::MagneticFieldServiceStandard
,
36
mag::MagneticFieldService
,
37
SHARED)
38
39
40
#include "art/Framework/Services/Registry/ServiceDefinitionMacros.h"
41
// \file MagneticFieldServiceStandard_service.cc
43
//
44
// \brief implementation of class for storing/accessing magnetic fields
45
//
46
// \author ebrianne@fnal.gov
47
//
49
50
// C++ language includes
51
52
//Framework includes
53
54
//-----------------------------------------------
55
mag::MagneticFieldServiceStandard::MagneticFieldServiceStandard
(
fhicl::ParameterSet
const
& pset,
art::ActivityRegistry
& reg)
56
:
fProp
{pset}
57
{
58
reg.sPreBeginRun.watch(
this
, &MagneticFieldServiceStandard::preBeginRun);
59
}
60
61
//----------------------------------------------
62
void
mag::MagneticFieldServiceStandard::preBeginRun
(
const
art::Run
& run)
63
{
64
65
}
66
67
//------------------------------------------------
68
void
mag::MagneticFieldServiceStandard::reconfigure
(
fhicl::ParameterSet
const
& pset)
69
{
70
fProp
.
reconfigure
(pset);
71
}
72
73
74
//------------------------------------------------
75
DEFINE_ART_SERVICE_INTERFACE_IMPL
(
mag::MagneticFieldServiceStandard
,
mag::MagneticFieldService
)
mag::MagneticFieldServiceStandard::reconfigure
void reconfigure(fhicl::ParameterSet const &pset)
Definition:
MagneticFieldServiceStandard_service.cc:68
mag::MagneticFieldServiceStandard::fProp
mag::MagneticFieldStandard fProp
Definition:
MagneticFieldServiceStandard_service.cc:31
mag
Definition:
GlobalMagneticField.cxx:26
mag::MagneticFieldStandard::reconfigure
void reconfigure(fhicl::ParameterSet const &pset)
Definition:
MagneticFieldStandard.cxx:32
mag::MagneticField
Definition:
MagneticField.h:82
art::Run
Definition:
Run.h:37
ParameterSet.h
mag::MagneticFieldStandard
Definition:
MagneticFieldStandard.h:26
ServiceHandle.h
ServiceDeclarationMacros.h
mag::MagneticFieldService
Definition:
MagneticFieldService.h:17
mag::MagneticFieldServiceStandard::preBeginRun
void preBeginRun(const art::Run &run)
Definition:
MagneticFieldServiceStandard_service.cc:62
mag::MagneticFieldServiceStandard::provider
const provider_type * provider() const override
Definition:
MagneticFieldServiceStandard_service.cc:29
MagneticFieldStandard.h
DECLARE_ART_SERVICE_INTERFACE_IMPL
DECLARE_ART_SERVICE_INTERFACE_IMPL(mag::MagneticFieldServiceStandard, mag::MagneticFieldService, SHARED) mag
Definition:
MagneticFieldServiceStandard_service.cc:35
art::ActivityRegistry
Definition:
ActivityRegistry.h:52
ActivityRegistry.h
mag::MagneticFieldServiceStandard
Definition:
MagneticFieldServiceStandard_service.cc:21
MagneticFieldService.h
Run.h
mag::MagneticFieldServiceStandard::MagneticFieldServiceStandard
MagneticFieldServiceStandard(fhicl::ParameterSet const &pset, art::ActivityRegistry ®)
GlobalSignal.h
fhicl::ParameterSet
Definition:
ParameterSet.h:36
DEFINE_ART_SERVICE_INTERFACE_IMPL
#define DEFINE_ART_SERVICE_INTERFACE_IMPL(svc, iface)
Definition:
ServiceDefinitionMacros.h:42
nug4
MagneticFieldServices
MagneticFieldServiceStandard_service.cc
Generated on Thu May 2 2024 20:59:53 for LArSoft by
1.8.11