$treeview $search $mathjax $extrastylesheet
artdaq_core
v3_06_01
$projectbrief
|
$projectbrief
|
$searchbox |
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. | |
typedef detail::RawEventHeader::timestamp_t | timestamp_t |
Field size should be the same as the Fragment::timestamp field. | |
Public Member Functions | |
RawEvent (run_id_t run, subrun_id_t subrun, event_id_t event, sequence_id_t seq, timestamp_t ts) | |
Constructs a RawEvent with the given parameters. | |
RawEvent (detail::RawEventHeader hdr) | |
Constructs a RawEvent using the given RawEventHeader. | |
void | insertFragment (FragmentPtr &&pfrag) |
Insert the given (pointer to a) Fragment into this RawEvent. | |
void | markComplete () |
Mark the event as complete. | |
size_t | numFragments () const |
Return the number of fragments this RawEvent contains. | |
size_t | wordCount () const |
Return the sum of the word counts of all fragments in this RawEvent. | |
run_id_t | runID () const |
Retrieve the run number from the RawEventHeader. | |
subrun_id_t | subrunID () const |
Retrieve the subrun number from the RawEventHeader. | |
event_id_t | eventID () const |
Retrieve the event number from the RawEventHeader. | |
sequence_id_t | sequenceID () const |
Retrieve the sequence id from the RawEventHeader. | |
timestamp_t | timestamp () const |
Retrieve the timestamp from the RawEventHeader. | |
bool | isComplete () const |
Retrieve the value of the complete flag from the RawEventHeader. | |
void | print (std::ostream &os) const |
Print summary information about this RawEvent to the given stream. | |
std::unique_ptr< Fragments > | releaseProduct () |
Release all the Fragments from this RawEvent. | |
void | fragmentTypes (std::vector< Fragment::type_t > &type_list) |
Fills in a list of unique fragment types from this event. | |
std::unique_ptr< Fragments > | releaseProduct (Fragment::type_t type) |
Release Fragments from the RawEvent. |
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 97 of file RawEvent.hh.
artdaq::RawEvent::RawEvent | ( | run_id_t | run, | |
subrun_id_t | subrun, | |||
event_id_t | event, | |||
sequence_id_t | seq, | |||
timestamp_t | ts | |||
) | [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 | |
ts | The timestamp for the event |
Definition at line 232 of file RawEvent.hh.
artdaq::RawEvent::RawEvent | ( | detail::RawEventHeader | hdr | ) | [inline, explicit] |
Constructs a RawEvent using the given RawEventHeader.
hdr | Header to use for initializing RawEvent |
Definition at line 236 of file RawEvent.hh.
RawEvent::event_id_t artdaq::RawEvent::eventID | ( | ) | const [inline] |
Retrieve the event number from the RawEventHeader.
Definition at line 267 of file RawEvent.hh.
void artdaq::RawEvent::fragmentTypes | ( | std::vector< Fragment::type_t > & | type_list | ) | [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 289 of file RawEvent.hh.
void artdaq::RawEvent::insertFragment | ( | FragmentPtr && | pfrag | ) | [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 241 of file RawEvent.hh.
bool artdaq::RawEvent::isComplete | ( | ) | const [inline] |
Retrieve the value of the complete flag from the RawEventHeader.
Definition at line 270 of file RawEvent.hh.
size_t artdaq::RawEvent::numFragments | ( | ) | const [inline] |
Return the number of fragments this RawEvent contains.
Definition at line 253 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 18 of file RawEvent.cc.
std::unique_ptr< Fragments > artdaq::RawEvent::releaseProduct | ( | Fragment::type_t | type | ) | [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 306 of file RawEvent.hh.
std::unique_ptr< Fragments > artdaq::RawEvent::releaseProduct | ( | ) | [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 272 of file RawEvent.hh.
RawEvent::run_id_t artdaq::RawEvent::runID | ( | ) | const [inline] |
Retrieve the run number from the RawEventHeader.
Definition at line 265 of file RawEvent.hh.
RawEvent::sequence_id_t artdaq::RawEvent::sequenceID | ( | ) | const [inline] |
Retrieve the sequence id from the RawEventHeader.
Definition at line 268 of file RawEvent.hh.
RawEvent::subrun_id_t artdaq::RawEvent::subrunID | ( | ) | const [inline] |
Retrieve the subrun number from the RawEventHeader.
Definition at line 266 of file RawEvent.hh.
RawEvent::timestamp_t artdaq::RawEvent::timestamp | ( | ) | const [inline] |
Retrieve the timestamp from the RawEventHeader.
Definition at line 269 of file RawEvent.hh.
size_t artdaq::RawEvent::wordCount | ( | ) | const [inline] |
Return the sum of the word counts of all fragments in this RawEvent.
Definition at line 258 of file RawEvent.hh.