Public Member Functions | Private Attributes | List of all members
AdcResultDumper Class Reference

#include <AdcResultDumper.h>

Inheritance diagram for AdcResultDumper:
TpcDataTool AdcChannelTool

Public Member Functions

 AdcResultDumper (fhicl::ParameterSet const &ps)
 
 ~AdcResultDumper () override=default
 
DataMap view (const AdcChannelData &acd) const override
 
DataMap update (AdcChannelData &acd) const override
 
DataMap viewMap (const AdcChannelDataMap &acds) const override
 
DataMap updateMap (AdcChannelDataMap &acds) const override
 
- Public Member Functions inherited from TpcDataTool
virtual DataMap updateTpcData (TpcData &) const
 
virtual DataMap viewTpcData (const TpcData &) const
 
virtual int forwardTpcData () const
 
- Public Member Functions inherited from AdcChannelTool
virtual ~AdcChannelTool ()=default
 
virtual bool updateWithView () const
 
virtual bool viewWithUpdate () const
 
virtual DataMap beginEvent (const DuneEventInfo &) const
 
virtual DataMap endEvent (const DuneEventInfo &) const
 
virtual DataMap close (const DataMap *dmin=nullptr)
 

Private Attributes

int m_LogLevel
 
std::string m_Tool
 
std::unique_ptr< TpcDataToolm_ptool
 

Additional Inherited Members

- Public Types inherited from AdcChannelTool
using Index = unsigned int
 
- Static Public Member Functions inherited from AdcChannelTool
static int interfaceNotImplemented ()
 

Detailed Description

Definition at line 21 of file AdcResultDumper.h.

Constructor & Destructor Documentation

AdcResultDumper::AdcResultDumper ( fhicl::ParameterSet const &  ps)

Definition at line 17 of file AdcResultDumper_tool.cc.

18 : m_LogLevel(ps.get<int>("LogLevel")),
19  m_Tool(ps.get<string>("Tool"))
20 {
21  const string myname = "AdcResultDumper::ctor: ";
22  if ( m_LogLevel ) {
23  cout << myname << "Configuration: " << endl;
24  cout << myname << " LogLevel: " << m_LogLevel << endl;
25  cout << myname << " Tool: " << m_Tool << endl;
26  }
27  if ( m_LogLevel ) cout << myname << "Retrieving tool." << endl;
30  if ( m_ptool == nullptr ) {
31  cout << myname << "Tool retrieval failed." << endl;
32  } else if ( m_LogLevel ) {
33  cout << myname << "Tool retrieval succeeded." << endl;
34  }
35 }
std::string m_Tool
std::unique_ptr< TpcDataTool > m_ptool
static constexpr double ps
Definition: Units.h:99
std::unique_ptr< T > getPrivate(std::string name)
static DuneToolManager * instance(std::string fclname="", int dbg=1)
QTextStream & endl(QTextStream &s)
AdcResultDumper::~AdcResultDumper ( )
overridedefault

Member Function Documentation

DataMap AdcResultDumper::update ( AdcChannelData acd) const
overridevirtual

Reimplemented from AdcChannelTool.

Definition at line 50 of file AdcResultDumper_tool.cc.

50  {
51  const string myname = "AdcResultDumper::updateMap: ";
52  if ( m_ptool == nullptr ) return DataMap(101);
53  if ( m_LogLevel >= 2 ) cout << myname << "Calling tool " << m_Tool << endl;
54  DataMap ret = m_ptool->update(acd);
55  ret.print();
56  return ret;
57 }
void print(std::ostream *pout) const
Definition: DataMap.h:245
std::string m_Tool
std::unique_ptr< TpcDataTool > m_ptool
QTextStream & endl(QTextStream &s)
DataMap AdcResultDumper::updateMap ( AdcChannelDataMap acds) const
overridevirtual

Reimplemented from AdcChannelTool.

Definition at line 72 of file AdcResultDumper_tool.cc.

72  {
73  const string myname = "AdcResultDumper::updateMap: ";
74  if ( m_ptool == nullptr ) return DataMap(101);
75  if ( m_LogLevel >= 2 ) cout << myname << "Calling tool " << m_Tool << endl;
76  DataMap ret = m_ptool->updateMap(acds);
77  ret.print();
78  return ret;
79 }
void print(std::ostream *pout) const
Definition: DataMap.h:245
std::string m_Tool
std::unique_ptr< TpcDataTool > m_ptool
QTextStream & endl(QTextStream &s)
DataMap AdcResultDumper::view ( const AdcChannelData acd) const
overridevirtual

Reimplemented from AdcChannelTool.

Definition at line 39 of file AdcResultDumper_tool.cc.

39  {
40  const string myname = "AdcResultDumper::view: ";
41  if ( m_ptool == nullptr ) return DataMap(101);
42  if ( m_LogLevel >= 2 ) cout << myname << "Calling tool " << m_Tool << endl;
43  DataMap ret = m_ptool->view(acd);
44  ret.print();
45  return ret;
46 }
void print(std::ostream *pout) const
Definition: DataMap.h:245
std::string m_Tool
std::unique_ptr< TpcDataTool > m_ptool
QTextStream & endl(QTextStream &s)
DataMap AdcResultDumper::viewMap ( const AdcChannelDataMap acds) const
overridevirtual

Reimplemented from AdcChannelTool.

Definition at line 61 of file AdcResultDumper_tool.cc.

61  {
62  const string myname = "AdcResultDumper::viewMap: ";
63  if ( m_ptool == nullptr ) return DataMap(101);
64  if ( m_LogLevel >= 2 ) cout << myname << "Calling tool " << m_Tool << endl;
65  DataMap ret = m_ptool->viewMap(acds);
66  ret.print();
67  return ret;
68 }
void print(std::ostream *pout) const
Definition: DataMap.h:245
std::string m_Tool
std::unique_ptr< TpcDataTool > m_ptool
QTextStream & endl(QTextStream &s)

Member Data Documentation

int AdcResultDumper::m_LogLevel
private

Definition at line 38 of file AdcResultDumper.h.

std::unique_ptr<TpcDataTool> AdcResultDumper::m_ptool
private

Definition at line 41 of file AdcResultDumper.h.

std::string AdcResultDumper::m_Tool
private

Definition at line 39 of file AdcResultDumper.h.


The documentation for this class was generated from the following files: