Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dunedataprep
dunedataprep
DataPrep
Service
KeepAllRoiBuildingService_service.cc
Go to the documentation of this file.
1
// KeepAllRoiBuildingService_service.cc
2
3
#include "
KeepAllRoiBuildingService.h
"
4
#include <iostream>
5
#include <sstream>
6
#include <iomanip>
7
#include "
art/Framework/Services/Registry/ServiceHandle.h
"
8
#include "
art/Framework/Services/Registry/ServiceDefinitionMacros.h
"
9
10
using
std::vector
;
11
using
std::string
;
12
using
std::ostream;
13
using
std::cout;
14
using
std::endl
;
15
using
std::setw
;
16
using
art::ServiceHandle
;
17
18
//**********************************************************************
19
20
KeepAllRoiBuildingService::
21
KeepAllRoiBuildingService
(
fhicl::ParameterSet
const
& pset,
art::ActivityRegistry
&)
22
: m_LogLevel(1) {
23
const
string
myname =
"KeepAllRoiBuildingService::ctor: "
;
24
pset.
get_if_present
<
int
>(
"LogLevel"
,
m_LogLevel
);
25
if
(
m_LogLevel
> 0 )
print
(cout, myname);
26
}
27
28
29
//**********************************************************************
30
31
int
KeepAllRoiBuildingService::build
(
AdcChannelData
&
data
)
const
{
32
const
string
myname =
"KeepAllRoiBuildingService:build: "
;
33
if
(
m_LogLevel
>= 2 ) cout << myname <<
"Building ROIs for channel "
34
<< data.
channel
() <<
"."
<<
endl
;
35
data.
signal
.clear();
36
data.
signal
.resize(data.
samples
.size(),
true
);
37
data.
roisFromSignal
();
38
return
0;
39
}
40
41
//**********************************************************************
42
43
ostream&
KeepAllRoiBuildingService::
44
print
(ostream& out,
string
prefix
)
const
{
45
out << prefix <<
"KeepAllRoiBuildingService:"
<<
endl
;
46
out << prefix <<
" LogLevel: "
<<
m_LogLevel
<<
endl
;
47
return
out;
48
}
49
50
//**********************************************************************
51
52
DEFINE_ART_SERVICE_INTERFACE_IMPL
(
KeepAllRoiBuildingService
,
AdcRoiBuildingService
)
53
54
//**********************************************************************
art::ServiceHandle
Definition:
ServiceHandle.h:37
KeepAllRoiBuildingService.h
AdcRoiBuildingService
Definition:
AdcRoiBuildingService.h:14
submit_ppfxjobs.prefix
string prefix
Definition:
submit_ppfxjobs.py:128
string
std::string string
Definition:
nybbler.cc:12
vector
struct vector vector
KeepAllRoiBuildingService
Definition:
KeepAllRoiBuildingService.h:19
AdcChannelData
Definition:
AdcChannelData.h:95
ServiceHandle.h
KeepAllRoiBuildingService::KeepAllRoiBuildingService
KeepAllRoiBuildingService(fhicl::ParameterSet const &pset, art::ActivityRegistry &)
Definition:
KeepAllRoiBuildingService_service.cc:21
AdcChannelData::roisFromSignal
void roisFromSignal()
Definition:
AdcChannelData.h:413
setw
Q_EXPORT QTSManip setw(int w)
Definition:
qtextstream.h:331
make_THn_beam_input.data
data
Definition:
make_THn_beam_input.py:80
AdcChannelData::channel
Channel channel() const
Definition:
AdcChannelData.h:199
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
KeepAllRoiBuildingService::m_LogLevel
int m_LogLevel
Definition:
KeepAllRoiBuildingService.h:32
ServiceDefinitionMacros.h
KeepAllRoiBuildingService::print
std::ostream & print(std::ostream &out=std::cout, std::string prefix="") const
Definition:
KeepAllRoiBuildingService_service.cc:44
KeepAllRoiBuildingService::build
int build(AdcChannelData &data) const
Definition:
KeepAllRoiBuildingService_service.cc:31
AdcChannelData::samples
AdcSignalVector samples
Definition:
AdcChannelData.h:131
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
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