1 #ifndef artdaq_ArtModules_detail_RawEventQueueReader_hh
2 #define artdaq_ArtModules_detail_RawEventQueueReader_hh
4 #include "art/Framework/Core/Frameworkfwd.h"
6 #include "art/Framework/Core/FileBlock.h"
7 #include "art/Framework/Core/ProductRegistryHelper.h"
8 #include "art/Framework/IO/Sources/SourceHelper.h"
9 #include "art/Framework/IO/Sources/SourceTraits.h"
10 #include "art/Framework/Principal/EventPrincipal.h"
11 #include "art/Framework/Principal/RunPrincipal.h"
12 #include "art/Framework/Principal/SubRunPrincipal.h"
13 #include "artdaq-core/Core/GlobalQueue.hh"
14 #include "fhiclcpp/ParameterSet.h"
62 art::ProductRegistryHelper& help,
63 art::SourceHelper
const& pm);
74 art::ProductRegistryHelper& help,
75 art::SourceHelper
const& pm,
87 void readFile(std::string
const&, art::FileBlock*& fb);
105 bool readNext(art::RunPrincipal*
const & inR,
106 art::SubRunPrincipal*
const & inSR,
107 art::RunPrincipal*& outR,
108 art::SubRunPrincipal*& outSR,
109 art::EventPrincipal*& outE);
124 struct Source_generator<artdaq::detail::RawEventQueueReader>
126 static constexpr
bool value =
true;
std::string pretend_module_name
The module name to store data under.
bool readNext(art::RunPrincipal *const &inR, art::SubRunPrincipal *const &inSR, art::RunPrincipal *&outR, art::SubRunPrincipal *&outSR, art::EventPrincipal *&outE)
Dequeue a RawEvent and declare its Fragment contents to art, creating Run, SubRun, and EventPrincipal objects as necessary.
bool shutdownMsgReceived
Whether a shutdown message has been received.
bool hasMoreData() const
Whether more data is expected from the RawEventQueueReader.
RawEventQueueReader(RawEventQueueReader const &)=delete
Copy Constructor is deleted.
RawEventQueueReader & operator=(RawEventQueueReader const &)=delete
Copy Assignment operator is deleted.
The RawEventQueueReader is a class which implements the methods needed by art::Source.
std::string unidentified_instance_name
The name to use for unknown Fragment types.
void readFile(std::string const &, art::FileBlock *&fb)
Emulate opening a file.
RawEventQueueReader(fhicl::ParameterSet const &ps, art::ProductRegistryHelper &help, art::SourceHelper const &pm, art::MasterProductRegistry &)
RawEventQueueReader Constructor.
void closeCurrentFile()
Emulate closing a file. No-Op.
bool outputFileCloseNeeded
If an explicit output file close message is needed.
bool resume_after_timeout
Whether to resume if the dequeue action times out.
RawEventQueue & incoming_events
The events from the EventStore.
std::map< Fragment::type_t, std::string > fragment_type_map_
The Fragment type names that this RawEventQueueReader knows about.
artdaq::detail::seconds waiting_time
The amount of time to wait for an event from the queue.
unsigned readNext_calls_
The number of times readNext has been called.
art::SourceHelper const pmaker
An art::SourceHelper instance.