#include <StandardAdcWireBuildingService.h>
Definition at line 23 of file StandardAdcWireBuildingService_service.cc.
25 const string myname =
"StandardAdcWireBuildingService::ctor: ";
26 pset.get_if_present<
int>(
"LogLevel",
m_LogLevel);
std::ostream & print(std::ostream &out=std::cout, std::string prefix="") const
Implements AdcWireBuildingService.
Definition at line 34 of file StandardAdcWireBuildingService_service.cc.
35 const string myname =
"StandardAdcWireBuildingService:build: ";
36 if (
m_LogLevel >= 2 ) cout << myname <<
"Building recob::Wire for channel " 38 if ( data.
wire !=
nullptr ) {
39 cout << myname <<
"WARNING: Wire already exists for channel " << data.
channel()
40 <<
". No action taken." <<
endl;
43 if ( data.
digit ==
nullptr ) {
44 cout << myname <<
"WARNING: No digit is specified for channel " << data.
channel()
45 <<
". No action taken." <<
endl;
49 cout << myname <<
"WARNING: Input data channel differs from digit: " << data.
channel()
53 if ( data.
samples.size() == 0 ) {
54 cout << myname <<
"WARNING: Channel " << data.
channel() <<
" has no samples." <<
endl;
58 cout << myname <<
" Channel " << data.
channel() <<
" has " << data.
rois.size() <<
" ROI" 59 << (data.
rois.size()==1 ?
"" :
"s") <<
"." <<
endl;
64 unsigned int lastROI = 0;
68 for (
unsigned int isig=roi.first; isig<=roi.second; ++isig ) {
78 for(
unsigned int isig = 0; isig < data.
samples.size(); ++isig) {
80 for(
const auto& roi : data.
rois) {
81 if(isig >= roi.first && isig <= roi.second) {
87 if(data.
samples[isig] == 0)
continue;
97 double arg = sum2 - cnt * ped * ped;
98 if(arg > 0) rms = sqrt(arg / (cnt - 1));
109 bool dataOwnsWire = (pwires ==
nullptr) || (data.
rois.size() == 0);
110 if ( ! dataOwnsWire ) {
111 if ( pwires->size() == pwires->capacity() ) {
112 cout << myname <<
"ERROR: Wire vector capacity " << pwires->capacity()
113 <<
" is too small. Wire is not recorded." <<
endl;
117 pwires->push_back(
wc.move());
118 data.
wire = &pwires->back();
120 cout << myname <<
" Channel " << data.
channel() <<
" ROIs stored in container." <<
endl;
123 if ( dataOwnsWire ) {
double rms(sqlite3 *db, std::string const &table_name, std::string const &column_name)
ChannelID_t Channel() const
DAQ channel this raw data was read from.
std::pair< AdcIndex, AdcIndex > AdcRoi
const datarange_t & add_range(size_type offset, ITER first, ITER last)
Adds a sequence of elements as a range with specified offset.
Class managing the creation of a new recob::Wire object.
const raw::RawDigit * digit
std::vector< AdcSignal > AdcSignalVector
void push_back(value_type value)
QTextStream & endl(QTextStream &s)
ostream & StandardAdcWireBuildingService::print |
( |
std::ostream & |
out = std::cout , |
|
|
std::string |
prefix = "" |
|
) |
| const |
|
virtual |
int StandardAdcWireBuildingService::m_LogLevel |
|
private |
bool StandardAdcWireBuildingService::m_SaveChanPedRMS |
|
private |
The documentation for this class was generated from the following files: