Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dunedataprep
dunedataprep
DataPrep
Service
ConfigurableAdcChannelDataCopyService_service.cc
Go to the documentation of this file.
1
// ConfigurableAdcChannelDataCopyService_service.cc
2
3
#include "
ConfigurableAdcChannelDataCopyService.h
"
4
#include <iostream>
5
#include "
art/Framework/Services/Registry/ServiceHandle.h
"
6
#include "
art/Framework/Services/Registry/ServiceDefinitionMacros.h
"
7
8
using
std::string
;
9
using
std::cout;
10
using
std::endl
;
11
12
//**********************************************************************
13
14
ConfigurableAdcChannelDataCopyService::
15
ConfigurableAdcChannelDataCopyService
(
fhicl::ParameterSet
const
& pset,
art::ActivityRegistry
&) {
16
const
string
myname =
"ConfigurableAdcChannelDataCopyService::ctor: "
;
17
pset.
get_if_present
<
int
>(
"LogLevel"
,
m_LogLevel
);
18
pset.
get_if_present
<
bool
>(
"CopyChannel"
,
m_CopyChannel
);
19
pset.
get_if_present
<
bool
>(
"CopyPedestal"
,
m_CopyPedestal
);
20
pset.
get_if_present
<
bool
>(
"CopyRaw"
,
m_CopyRaw
);
21
pset.
get_if_present
<
bool
>(
"CopySamples"
,
m_CopySamples
);
22
pset.
get_if_present
<
bool
>(
"CopyFlags"
,
m_CopyFlags
);
23
pset.
get_if_present
<
bool
>(
"CopySignal"
,
m_CopySignal
);
24
pset.
get_if_present
<
bool
>(
"CopyRois"
,
m_CopyRois
);
25
pset.
get_if_present
<
bool
>(
"CopyDigit"
,
m_CopyDigit
);
26
pset.
get_if_present
<
bool
>(
"CopyWire"
,
m_CopyWire
);
27
pset.
get_if_present
<
bool
>(
"CopyDigitIndex"
,
m_CopyDigitIndex
);
28
pset.
get_if_present
<
bool
>(
"CopyWireIndex"
,
m_CopyWireIndex
);
29
print
(cout, myname);
30
}
31
32
//**********************************************************************
33
34
int
ConfigurableAdcChannelDataCopyService::
35
copy
(
const
AdcChannelData
& acdin,
AdcChannelData
& acdout)
const
{
36
const
string
myname =
"ConfigurableAdcChannelDataCopyService:copy: "
;
37
if
(
m_LogLevel
>= 2 ) cout << myname <<
"Copying channel "
<< acdin.
channel
() <<
endl
;
38
if
(
m_CopyChannel
) acdout.
setChannelInfo
(acdin.
getChannelInfoPtr
());
39
if
(
m_CopyPedestal
) acdout.
pedestal
= acdin.
pedestal
;
40
if
(
m_CopyRaw
) acdout.
raw
= acdin.
raw
;
41
if
(
m_CopySamples
) acdout.
samples
= acdin.
samples
;
42
if
(
m_CopyFlags
) acdout.
flags
= acdin.
flags
;
43
if
(
m_CopySignal
) acdout.
signal
= acdin.
signal
;
44
if
(
m_CopyRois
) acdout.
rois
= acdin.
rois
;
45
if
(
m_CopyDigit
) acdout.
digit
= acdin.
digit
;
46
if
(
m_CopyWire
) acdout.
wire
= acdin.
wire
;
47
if
(
m_CopyDigitIndex
) acdout.
digitIndex
= acdin.
digitIndex
;
48
if
(
m_CopyWireIndex
) acdout.
wireIndex
= acdin.
wireIndex
;
49
return
0;
50
}
51
52
//**********************************************************************
53
54
std::ostream&
ConfigurableAdcChannelDataCopyService::
55
print
(std::ostream& out,
std::string
prefix
)
const
{
56
out << prefix <<
"ConfigurableAdcChannelDataCopyService:"
<<
endl
;
57
out << prefix <<
" LogLevel: "
<<
m_LogLevel
<<
endl
;
58
out << prefix <<
" CopyChannel: "
<<
m_CopyChannel
<<
endl
;
59
out << prefix <<
" CopyPedestal: "
<<
m_CopyPedestal
<<
endl
;
60
out << prefix <<
" CopyRaw: "
<<
m_CopyRaw
<<
endl
;
61
out << prefix <<
" CopySamples: "
<<
m_CopySamples
<<
endl
;
62
out << prefix <<
" CopyFlags: "
<<
m_CopyFlags
<<
endl
;
63
out << prefix <<
" CopySignal: "
<<
m_CopySignal
<<
endl
;
64
out << prefix <<
" CopyRois: "
<<
m_CopyRois
<<
endl
;
65
out << prefix <<
" CopyDigit: "
<<
m_CopyDigit
<<
endl
;
66
out << prefix <<
" CopyWire: "
<<
m_CopyWire
<<
endl
;
67
out << prefix <<
" CopyDigitIndex: "
<<
m_CopyDigitIndex
<<
endl
;
68
out << prefix <<
" CopyWireIndex: "
<<
m_CopyWireIndex
<<
endl
;
69
return
out;
70
}
71
72
//**********************************************************************
73
74
DEFINE_ART_SERVICE_INTERFACE_IMPL
(
ConfigurableAdcChannelDataCopyService
,
AdcChannelDataCopyService
)
75
76
//**********************************************************************
ConfigurableAdcChannelDataCopyService::print
std::ostream & print(std::ostream &out=std::cout, std::string prefix="") const
Definition:
ConfigurableAdcChannelDataCopyService_service.cc:55
AdcChannelData::getChannelInfoPtr
ChannelInfoPtr getChannelInfoPtr() const
Definition:
AdcChannelData.h:195
AdcChannelDataCopyService
Definition:
AdcChannelDataCopyService.h:14
submit_ppfxjobs.prefix
string prefix
Definition:
submit_ppfxjobs.py:128
ConfigurableAdcChannelDataCopyService
Definition:
ConfigurableAdcChannelDataCopyService.h:27
string
std::string string
Definition:
nybbler.cc:12
ConfigurableAdcChannelDataCopyService::m_LogLevel
int m_LogLevel
Definition:
ConfigurableAdcChannelDataCopyService.h:40
AdcChannelData::wire
const recob::Wire * wire
Definition:
AdcChannelData.h:145
AdcChannelData
Definition:
AdcChannelData.h:95
AdcChannelData::digit
const raw::RawDigit * digit
Definition:
AdcChannelData.h:144
ServiceHandle.h
ConfigurableAdcChannelDataCopyService::m_CopySamples
bool m_CopySamples
Definition:
ConfigurableAdcChannelDataCopyService.h:44
ConfigurableAdcChannelDataCopyService::copy
int copy(const AdcChannelData &acdin, AdcChannelData &acdout) const
Definition:
ConfigurableAdcChannelDataCopyService_service.cc:35
AdcChannelData::setChannelInfo
void setChannelInfo(ChannelInfoPtr pchi)
Definition:
AdcChannelData.h:184
AdcChannelData::rois
AdcRoiVector rois
Definition:
AdcChannelData.h:137
ConfigurableAdcChannelDataCopyService::m_CopyDigit
bool m_CopyDigit
Definition:
ConfigurableAdcChannelDataCopyService.h:48
ConfigurableAdcChannelDataCopyService::m_CopyFlags
bool m_CopyFlags
Definition:
ConfigurableAdcChannelDataCopyService.h:45
ConfigurableAdcChannelDataCopyService::ConfigurableAdcChannelDataCopyService
ConfigurableAdcChannelDataCopyService(fhicl::ParameterSet const &pset, art::ActivityRegistry &)
Definition:
ConfigurableAdcChannelDataCopyService_service.cc:15
ConfigurableAdcChannelDataCopyService::m_CopyWireIndex
bool m_CopyWireIndex
Definition:
ConfigurableAdcChannelDataCopyService.h:51
ConfigurableAdcChannelDataCopyService::m_CopyRois
bool m_CopyRois
Definition:
ConfigurableAdcChannelDataCopyService.h:47
AdcChannelData::raw
AdcCountVector raw
Definition:
AdcChannelData.h:130
ConfigurableAdcChannelDataCopyService::m_CopyPedestal
bool m_CopyPedestal
Definition:
ConfigurableAdcChannelDataCopyService.h:42
ConfigurableAdcChannelDataCopyService::m_CopyChannel
bool m_CopyChannel
Definition:
ConfigurableAdcChannelDataCopyService.h:41
ConfigurableAdcChannelDataCopyService.h
ConfigurableAdcChannelDataCopyService::m_CopyRaw
bool m_CopyRaw
Definition:
ConfigurableAdcChannelDataCopyService.h:43
AdcChannelData::channel
Channel channel() const
Definition:
AdcChannelData.h:199
ConfigurableAdcChannelDataCopyService::m_CopyDigitIndex
bool m_CopyDigitIndex
Definition:
ConfigurableAdcChannelDataCopyService.h:50
AdcChannelData::pedestal
AdcSignal pedestal
Definition:
AdcChannelData.h:128
AdcChannelData::signal
AdcFilterVector signal
Definition:
AdcChannelData.h:136
art::ActivityRegistry
Definition:
ActivityRegistry.h:52
fhicl::ParameterSet::get_if_present
std::optional< T > get_if_present(std::string const &key) const
Definition:
ParameterSet.h:224
ConfigurableAdcChannelDataCopyService::m_CopyWire
bool m_CopyWire
Definition:
ConfigurableAdcChannelDataCopyService.h:49
ServiceDefinitionMacros.h
AdcChannelData::digitIndex
AdcIndex digitIndex
Definition:
AdcChannelData.h:146
AdcChannelData::wireIndex
AdcIndex wireIndex
Definition:
AdcChannelData.h:147
AdcChannelData::samples
AdcSignalVector samples
Definition:
AdcChannelData.h:131
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
ConfigurableAdcChannelDataCopyService::m_CopySignal
bool m_CopySignal
Definition:
ConfigurableAdcChannelDataCopyService.h:46
AdcChannelData::flags
AdcFlagVector flags
Definition:
AdcChannelData.h:135
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