All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
daq::DaqDecoderICARUSPMT Class Reference
Inheritance diagram for daq::DaqDecoderICARUSPMT:

Classes

struct  Config
 FHiCL configuration of the module. More...
 

Public Types

using Parameters = art::EDProducer::Table< Config >
 

Public Member Functions

 DaqDecoderICARUSPMT (Parameters const &params)
 
 DaqDecoderICARUSPMT (DaqDecoderICARUSPMT const &)=delete
 
 DaqDecoderICARUSPMT (DaqDecoderICARUSPMT &&)=delete
 
DaqDecoderICARUSPMToperator= (DaqDecoderICARUSPMT const &)=delete
 
DaqDecoderICARUSPMToperator= (DaqDecoderICARUSPMT &&)=delete
 
void beginRun (art::Run &run) override
 Initiates PMT configuration reading at run transition. More...
 
void produce (art::Event &e) override
 

Private Attributes

std::unique_ptr< IDecoderfDecoderTool
 Decoder tools. More...
 
art::InputTag const fInputTag
 
bool const fSurviveExceptions
 

Detailed Description

Definition at line 39 of file DaqDecoderICARUSPMTnotThatOld_module.cc.

Member Typedef Documentation

using daq::DaqDecoderICARUSPMT::Parameters = art::EDProducer::Table<Config>

Definition at line 70 of file DaqDecoderICARUSPMTnotThatOld_module.cc.

Constructor & Destructor Documentation

daq::DaqDecoderICARUSPMT::DaqDecoderICARUSPMT ( Parameters const &  params)
explicit

Definition at line 104 of file DaqDecoderICARUSPMTnotThatOld_module.cc.

105  : art::EDProducer{params}
106  , fInputTag{ params().FragmentsLabel() }
107  , fSurviveExceptions{ params().SurviveExceptions() }
108 {
109  fDecoderTool = art::make_tool<IDecoder>
110  (params().DecoderTool.get<fhicl::ParameterSet>());
111  // Recover the PMT decoder tool
112 
113  consumes<artdaq::Fragments>(fInputTag);
114 
115  // Announce what the tool will do
116  fDecoderTool->consumes(consumesCollector());
117  fDecoderTool->produces(producesCollector());
118 
119  return;
120 }
std::unique_ptr< IDecoder > fDecoderTool
Decoder tools.
fDetProps &fDetProps fDetProps &fDetProps consumesCollector())
daq::DaqDecoderICARUSPMT::DaqDecoderICARUSPMT ( DaqDecoderICARUSPMT const &  )
delete
daq::DaqDecoderICARUSPMT::DaqDecoderICARUSPMT ( DaqDecoderICARUSPMT &&  )
delete

Member Function Documentation

void daq::DaqDecoderICARUSPMT::beginRun ( art::Run &  run)
override

Initiates PMT configuration reading at run transition.

Definition at line 122 of file DaqDecoderICARUSPMTnotThatOld_module.cc.

122  {
123  assert(fDecoderTool);
124  fDecoderTool->setupRun(run);
125 }
std::unique_ptr< IDecoder > fDecoderTool
Decoder tools.
DaqDecoderICARUSPMT& daq::DaqDecoderICARUSPMT::operator= ( DaqDecoderICARUSPMT const &  )
delete
DaqDecoderICARUSPMT& daq::DaqDecoderICARUSPMT::operator= ( DaqDecoderICARUSPMT &&  )
delete
void daq::DaqDecoderICARUSPMT::produce ( art::Event &  e)
override

Definition at line 127 of file DaqDecoderICARUSPMTnotThatOld_module.cc.

128 {
129  assert(fDecoderTool);
130  fDecoderTool->setupEvent(event);
131 
132  // storage for waveform
133  fDecoderTool->initializeDataProducts();
134 
135  // Protect for runs with no PMT info
136  try
137  {
138  // Recover the data fragments for the PMT
139  auto const& fragments = event.getProduct<artdaq::Fragments>(fInputTag);
140 
141  // Make sure data available
142  if (!fragments.empty())
143  {
144  for (auto const &rawFrag: fragments) fDecoderTool->process_fragment(rawFrag);
145  }
146  }
147  catch(cet::exception const& e) {
148  if (!fSurviveExceptions) throw;
149  std::cout << "DaqDecoderICARUSPMT: Did not find daq data products to decode:"
150  << "\n" << e.what() << std::endl;
151  }
152  catch(...)
153  {
154  if (!fSurviveExceptions) throw;
155  std::cout << "DaqDecoderICARUSPMT: Did not find daq data products to decode" << std::endl;
156  }
157 
158  fDecoderTool->outputDataProducts(event);
159 
160  return;
161 }
std::unique_ptr< IDecoder > fDecoderTool
Decoder tools.
do i e
BEGIN_PROLOG could also be cout

Member Data Documentation

std::unique_ptr<IDecoder> daq::DaqDecoderICARUSPMT::fDecoderTool
private

Decoder tools.

Definition at line 93 of file DaqDecoderICARUSPMTnotThatOld_module.cc.

art::InputTag const daq::DaqDecoderICARUSPMT::fInputTag
private

Definition at line 96 of file DaqDecoderICARUSPMTnotThatOld_module.cc.

bool const daq::DaqDecoderICARUSPMT::fSurviveExceptions
private

Definition at line 98 of file DaqDecoderICARUSPMTnotThatOld_module.cc.


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