7 #include "art/Framework/Core/EDProducer.h"
8 #include "art/Framework/Core/ModuleMacros.h"
9 #include "art/Utilities/make_tool.h"
10 #include "art/Framework/Services/Registry/ServiceHandle.h"
11 #include "art/Framework/Principal/Event.h"
12 #include "art/Framework/Principal/Handle.h"
14 #include "canvas/Utilities/InputTag.h"
15 #include "fhiclcpp/ParameterSet.h"
16 #include "messagefacility/MessageLogger/MessageLogger.h"
18 #include "artdaq-core/Data/Fragment.hh"
37 void beginRun(art::Run& run)
override;
38 void produce(art::Event &
e)
override;
50 consumes<artdaq::Fragments>(fInputTag);
52 fDecoderTool = art::make_tool<IDecoder>(params.get<fhicl::ParameterSet>(
"DecoderTool"));
53 fDecoderTool->produces(producesCollector());
67 auto const & daq_handle =
event.getValidHandle<artdaq::Fragments>(
fInputTag);
68 if(daq_handle.isValid() && daq_handle->size() > 0)
70 for (
auto const & rawFrag: *daq_handle)
fDecoderTool->process_fragment(rawFrag);
73 std::cout <<
"No Trigger Fragment Information Found!" << std::endl;
DaqDecoderICARUSTrigger & operator=(DaqDecoderICARUSTrigger const &)=delete
This provides an art tool interface definition for tools which "decode" artdaq fragments into LArSoft...
DaqDecoderICARUSTrigger(fhicl::ParameterSet const &p)
void beginRun(art::Run &run) override
void produce(art::Event &e) override
std::unique_ptr< IDecoder > fDecoderTool
BEGIN_PROLOG could also be cout