22 m_pDigitReadTool(nullptr),
23 m_pROIBuilderTool(nullptr),
25 const string myname =
"StandardRawDigitExtractService::ctor: ";
34 if ( ptm ==
nullptr ) {
35 cout << myname <<
"ERROR: Unable to retrieve tool manaager." <<
endl;
40 cout << myname <<
"ERROR: Unable to retrieve digit reader " << m_DigitReadTool <<
endl;
42 if (
m_LogLevel ) cout << myname <<
"Retrieved digit read tool " << m_DigitReadTool <<
endl;
46 if ( m_PedestalOption == 2 ) {
47 if (
m_LogLevel ) cout << myname <<
"Fetching pedestal provider." <<
endl;
51 if ( m_PedestalOption == 3 ) {
52 if (
m_LogLevel ) cout << myname <<
"Fetching pedestal evaluation service." <<
endl;
54 if (
m_LogLevel ) cout << myname <<
" Pedestal evaluation service: @" 63 const string myname =
"StandardRawDigitExtractService:extract: ";
65 if ( pdig ==
nullptr ) {
66 cout << myname <<
"ERROR: ADC channel does not have a larsoft digit." <<
endl;
71 cout << myname <<
"Entering..." <<
endl;
72 cout << myname <<
"Input vector size: " << dig.
Samples() <<
endl;
75 cout << myname <<
"ERROR: Channel has data." <<
endl;
78 if ( acd.
flags.size() ) {
79 cout << myname <<
"ERROR: Channel has flags." <<
endl;
85 cout << myname <<
"ERROR: Digit read tool " <<
m_DigitReadTool <<
" was not found." <<
endl;
87 unsigned int nsig = acd.
raw.size();
103 for (
unsigned int isig=0; isig<nsig; ++isig ) {
121 for (
unsigned int isig=0; isig<nsig; ++isig ) {
133 out << prefix <<
"StandardRawDigitExtractService:" <<
endl;
float GetPedestal() const
ULong64_t Samples() const
Number of samples in the uncompressed ADC data.
AcdModifierPtr m_pDigitReadTool
Collection of charge vs time digitized from a single readout channel.
std::string m_ROIBuilderTool
const AdcFlag AdcUnderflow
virtual int evaluate(const AdcChannelData &data, AdcSignal *pped=nullptr, AdcSignal *prms=nullptr, AdcSignal *ppederr=nullptr, AdcSignal *prmserr=nullptr) const =0
const raw::RawDigit * digit
StandardRawDigitExtractService(fhicl::ParameterSet const &pset, art::ActivityRegistry &)
int extract(AdcChannelData &acd) const
std::string m_DigitReadTool
const AdcFlag AdcOverflow
T get(std::string const &key) const
PedestalEvaluationService * m_PedestalEvaluationService
const AdcFlag AdcStuckOff
std::optional< T > get_if_present(std::string const &key) const
virtual float PedMean(raw::ChannelID_t ch) const =0
Retrieve pedestal information.
const lariov::DetPedestalProvider * m_pPedProv
float GetSigma() const
TODO RMS of the pedestal level?
AcdModifierPtr m_pROIBuilderTool
std::ostream & print(std::ostream &out=std::cout, std::string prefix="") const
QTextStream & endl(QTextStream &s)
#define DEFINE_ART_SERVICE_INTERFACE_IMPL(svc, iface)