Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dunedataprep
dunedataprep
DataPrep
Service
AdcSuppressSignalFindingService_service.cc
Go to the documentation of this file.
1
// AdcSuppressSignalFindingService_service.cc
2
3
#include "
AdcSuppressSignalFindingService.h
"
4
#include <iostream>
5
#include <sstream>
6
#include "
art/Framework/Services/Registry/ServiceHandle.h
"
7
#include "
art/Framework/Services/Registry/ServiceDefinitionMacros.h
"
8
#include "
dunecore/DuneInterface/Service/AdcSuppressService.h
"
9
10
using
std::vector
;
11
using
std::string
;
12
using
std::ostream;
13
using
std::cout;
14
using
std::endl
;
15
using
art::ServiceHandle
;
16
17
//**********************************************************************
18
19
AdcSuppressSignalFindingService::
20
AdcSuppressSignalFindingService
(
fhicl::ParameterSet
const
& pset,
art::ActivityRegistry
&)
21
: m_psup(&*
ServiceHandle
<
AdcSuppressService
>()) { }
22
23
//**********************************************************************
24
25
int
AdcSuppressSignalFindingService::find
(
AdcChannelData
&
data
)
const
{
26
const
string
myname =
"AdcSuppressSignalFindingService:find: "
;
27
const
AdcCountVector
&
raw
= data.
raw
;
28
if
( raw.size() == 0 && data.
samples
.size() != 0 ) {
29
cout <<
"ERROR: Input data does not include raw counts."
<<
endl
;
30
return
1;
31
}
32
if
( raw.size() != data.
samples
.size() ) {
33
cout <<
"ERROR: Input prep and raw data have inconsistent sizes."
<<
endl
;
34
return
2;
35
}
36
m_psup
->
filter
(raw, data.
channel
(), data.
pedestal
, data.
signal
);
37
return
0;
38
}
39
40
//**********************************************************************
41
42
ostream&
AdcSuppressSignalFindingService::
43
print
(ostream& out,
string
prefix
)
const
{
44
out << prefix <<
"AdcSuppressSignalFindingService:"
<<
endl
;
45
return
out;
46
}
47
48
//**********************************************************************
49
50
DEFINE_ART_SERVICE_INTERFACE_IMPL
(
AdcSuppressSignalFindingService
,
AdcSignalFindingService
)
51
52
//**********************************************************************
AdcCountVector
std::vector< AdcCount > AdcCountVector
Definition:
AdcTypes.h:19
art::ServiceHandle
Definition:
ServiceHandle.h:37
AdcSuppressSignalFindingService
Definition:
AdcSuppressSignalFindingService.h:16
AdcSuppressService.h
AdcSuppressSignalFindingService::m_psup
const AdcSuppressService * m_psup
Definition:
AdcSuppressSignalFindingService.h:29
submit_ppfxjobs.prefix
string prefix
Definition:
submit_ppfxjobs.py:128
string
std::string string
Definition:
nybbler.cc:12
vector
struct vector vector
raw
Raw data description.
Definition:
AdcChannelData.h:88
AdcChannelData
Definition:
AdcChannelData.h:95
ServiceHandle.h
AdcSuppressSignalFindingService::find
int find(AdcChannelData &data) const
Definition:
AdcSuppressSignalFindingService_service.cc:25
AdcSuppressSignalFindingService::print
std::ostream & print(std::ostream &out=std::cout, std::string prefix="") const
Definition:
AdcSuppressSignalFindingService_service.cc:43
AdcChannelData::raw
AdcCountVector raw
Definition:
AdcChannelData.h:130
AdcSuppressSignalFindingService::AdcSuppressSignalFindingService
AdcSuppressSignalFindingService(fhicl::ParameterSet const &pset, art::ActivityRegistry &)
Definition:
AdcSuppressSignalFindingService_service.cc:20
AdcSuppressSignalFindingService.h
make_THn_beam_input.data
data
Definition:
make_THn_beam_input.py:80
AdcChannelData::channel
Channel channel() const
Definition:
AdcChannelData.h:199
AdcChannelData::pedestal
AdcSignal pedestal
Definition:
AdcChannelData.h:128
AdcChannelData::signal
AdcFilterVector signal
Definition:
AdcChannelData.h:136
art::ActivityRegistry
Definition:
ActivityRegistry.h:52
AdcSuppressService::filter
virtual int filter(const AdcCountVector &sigs, Channel chan, AdcPedestal ped, AdcFilterVector &keep) const =0
ServiceDefinitionMacros.h
AdcSignalFindingService
Definition:
AdcSignalFindingService.h:14
AdcChannelData::samples
AdcSignalVector samples
Definition:
AdcChannelData.h:131
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
AdcSuppressService
Definition:
AdcSuppressService.h:27
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