fire v0.19.0
Framework for sImulation and Reconstruction of Events
|
Header information of an event such as event number and timestamp. More...
#include <EventHeader.h>
Public Member Functions | |
int | getEventNumber () const |
Return the event number. More... | |
int | number () const |
Return the event number. More... | |
int | getRun () const |
Return the run number. More... | |
int | run () const |
Return the run number. More... | |
double | getWeight () const |
Get the event weight (default of 1.0). More... | |
double | weight () const |
Get the event weight (default of 1.0). More... | |
bool | isRealData () const |
Is this a real data event? More... | |
void | setEventNumber (int number) |
Set the event number. More... | |
void | setRun (int run) |
Set the run number. More... | |
void | setTimestamp () |
Set the timestamp. More... | |
void | setWeight (double weight) |
Set the event weight. More... | |
void | clear () |
clear the event header, required by serialization technique | |
template<typename ParameterType > | |
const ParameterType & | get (const std::string &name) const |
get a parameter from storage More... | |
template<typename ParameterType > | |
void | set (const std::string &name, const ParameterType &val) |
set a parameter in storage More... | |
Static Public Attributes | |
static const std::string | NAME |
Name of EventHeader branch. More... | |
Private Member Functions | |
template<typename DataSet > | |
void | attach (DataSet &d) |
attach to the serializing h5::Data wrapper More... | |
Private Attributes | |
int | eventNumber_ {-1} |
The event number. | |
int | run_ {-1} |
The run number. | |
long int | time_ |
The event timestamp. | |
double | weight_ {1.0} |
The event weight. | |
bool | isRealData_ {false} |
Is this event real data? | |
fire::io::ParameterStorage | parameters_ |
Event parameters three types of parameters are allowed: int, float, string. | |
Friends | |
class | fire::io::access |
allow data set access for reading/writing | |
std::ostream & | operator<< (std::ostream &s, const EventHeader &eh) |
Stream an event header. More... | |
Header information of an event such as event number and timestamp.
|
inlineprivate |
attach to the serializing h5::Data wrapper
We use h5::constants::NUMBER_NAME so that the serialization method can deduce the number of events in a file using the size of our eventNumber_ dataset.
[in] | d | h5::Data to attach to |
|
inline |
get a parameter from storage
ParameterType | type of parameter |
[in] | name | parameter name |
|
inline |
Return the event number.
|
inline |
Return the run number.
|
inline |
Get the event weight (default of 1.0).
|
inline |
Is this a real data event?
|
inline |
Return the event number.
|
inline |
Return the run number.
|
inline |
set a parameter in storage
ParameterType | type of parameter |
[in] | name | parameter name |
[in] | val | parameter value |
|
inline |
Set the event number.
number | The event number. |
|
inline |
Set the run number.
run | The run number. |
|
inline |
Set the timestamp.
timestamp | The timestamp. |
|
inline |
Set the event weight.
weight | The event weight. |
|
inline |
Get the event weight (default of 1.0).
|
friend |
Stream an event header.
Streaming the header only involves printing the information we know exists for all event headers (i.e. everything not in ParameterStorage).
[in] | s | ostream to write to |
[in] | eh | header to stream out |
|
static |
Name of EventHeader branch.
Defined in fire::h5 so that the serialization method knows where to look for the number of events in a file.