artdaq_core
v3_05_00
|
RawEvent is the artdaq view of a generic event, containing a header and zero or more Fragments. More...
#include <artdaq-core/Data/RawEvent.hh>
Public Types | |
typedef detail::RawEventHeader::run_id_t | run_id_t |
Run numbers are 32 bits. | |
typedef detail::RawEventHeader::subrun_id_t | subrun_id_t |
Subrun numbers are 32 bits. | |
typedef detail::RawEventHeader::event_id_t | event_id_t |
Event numbers are 32 bits. | |
typedef detail::RawEventHeader::sequence_id_t | sequence_id_t |
Field size should be the same as the Fragment::sequence_id field. | |
Public Member Functions | |
RawEvent (run_id_t run, subrun_id_t subrun, event_id_t event, sequence_id_t seq) | |
Constructs a RawEvent with the given parameters. More... | |
RawEvent (detail::RawEventHeader hdr) | |
Constructs a RawEvent using the given RawEventHeader. More... | |
void | insertFragment (FragmentPtr &&pfrag) |
Insert the given (pointer to a) Fragment into this RawEvent. More... | |
void | markComplete () |
Mark the event as complete. | |
size_t | numFragments () const |
Return the number of fragments this RawEvent contains. More... | |
size_t | wordCount () const |
Return the sum of the word counts of all fragments in this RawEvent. More... | |
run_id_t | runID () const |
Retrieve the run number from the RawEventHeader. More... | |
subrun_id_t | subrunID () const |
Retrieve the subrun number from the RawEventHeader. More... | |
event_id_t | eventID () const |
Retrieve the event number from the RawEventHeader. More... | |
sequence_id_t | sequenceID () const |
Retrieve the sequence id from the RawEventHeader. More... | |
bool | isComplete () const |
Retrieve the value of the complete flag from the RawEventHeader. More... | |
void | print (std::ostream &os) const |
Print summary information about this RawEvent to the given stream. More... | |
std::unique_ptr< Fragments > | releaseProduct () |
Release all the Fragments from this RawEvent. More... | |
void | fragmentTypes (std::vector< Fragment::type_t > &type_list) |
Fills in a list of unique fragment types from this event. More... | |
std::unique_ptr< Fragments > | releaseProduct (Fragment::type_t type) |
Release Fragments from the RawEvent. More... | |
RawEvent is the artdaq view of a generic event, containing a header and zero or more Fragments.
RawEvent should be a class, not a struct; it should be enforcing invariants (the contained Fragments should all have the correct event id).
Definition at line 69 of file RawEvent.hh.
|
inline |
Constructs a RawEvent with the given parameters.
run | The current Run number |
subrun | The current Subrun number |
event | The current Event number |
seq | The current sequence_id |
Definition at line 197 of file RawEvent.hh.
|
inlineexplicit |
Constructs a RawEvent using the given RawEventHeader.
hdr | Header to use for initializing RawEvent |
Definition at line 201 of file RawEvent.hh.
|
inline |
Retrieve the event number from the RawEventHeader.
Definition at line 234 of file RawEvent.hh.
|
inline |
Fills in a list of unique fragment types from this event.
type_list | Any Fragment types not included in this list will be added |
Definition at line 257 of file RawEvent.hh.
|
inline |
Insert the given (pointer to a) Fragment into this RawEvent.
pfrag | The FragmentPtr to insert into the RawEvent |
cet::exception | if pfrag is nullptr |
Insert the given (pointer to a) Fragment into this RawEvent. This takes ownership of the Fragment referenced by the FragmentPtr, unless an exception is thrown.
Definition at line 206 of file RawEvent.hh.
|
inline |
Retrieve the value of the complete flag from the RawEventHeader.
Definition at line 236 of file RawEvent.hh.
|
inline |
Return the number of fragments this RawEvent contains.
Definition at line 219 of file RawEvent.hh.
void artdaq::RawEvent::print | ( | std::ostream & | os | ) | const |
Print summary information about this RawEvent to the given stream.
os | The target stream for summary information |
Definition at line 6 of file RawEvent.cc.
|
inline |
Release all the Fragments from this RawEvent.
Release all the Fragments from this RawEvent, returning them to the caller through a unique_ptr that manages a vector into which the Fragments have been moved.
Definition at line 239 of file RawEvent.hh.
|
inline |
Release Fragments from the RawEvent.
type | The type of Fragments to release |
Release the Fragments from this RawEvent with the specified fragment type, returning them to the caller through a unique_ptr that manages a vector into which the Fragments have been moved. PLEASE NOTE that releaseProduct and releaseProduct(type_t) can not both be used on the same RawEvent since each one gives up ownership of the fragments within the event.
Definition at line 275 of file RawEvent.hh.
|
inline |
Retrieve the run number from the RawEventHeader.
Definition at line 232 of file RawEvent.hh.
|
inline |
Retrieve the sequence id from the RawEventHeader.
Definition at line 235 of file RawEvent.hh.
|
inline |
Retrieve the subrun number from the RawEventHeader.
Definition at line 233 of file RawEvent.hh.
|
inline |
Return the sum of the word counts of all fragments in this RawEvent.
Definition at line 225 of file RawEvent.hh.