Falaise  4.0.1
SuperNEMO Software Toolkit
Public Types | Public Member Functions | Static Public Member Functions | List of all members
snemo::datamodel::event_header Class Reference

A event header class to be embedded as a bank in a 'datatools::things' event record. More...

#include <falaise/snemo/datamodels/event_header.h>

Inheritance diagram for snemo::datamodel::event_header:
datatools::i_serializable datatools::i_clear datatools::i_tree_dumpable

Public Types

enum  generation_type { GENERATION_INVALID = -1, GENERATION_REAL = 0, GENERATION_SIMULATED = 1 }
 Generation type of the event record. More...
 
- Public Types inherited from datatools::i_tree_dumpable
enum  ostream_type
 

Public Member Functions

const datatools::event_idget_id () const
 Return the event ID. More...
 
datatools::event_idgrab_id ()
 Return the mutable event ID. More...
 
void set_id (const datatools::event_id &)
 Set the event ID. More...
 
const datatools::propertiesget_properties () const
 Return the constant list of properties. More...
 
datatools::propertiesgrab_properties ()
 Return the mutable list of properties. More...
 
void set_properties (const datatools::properties &)
 Set the list of properties. More...
 
const snemo::datamodel::timestampget_timestamp () const
 Return the timestamp. More...
 
snemo::datamodel::timestampgrab_timestamp ()
 Return the mutable timestamp. More...
 
void set_timestamp (const snemo::datamodel::timestamp &)
 Set the timestamp. More...
 
generation_type get_generation () const
 Return the generation. More...
 
void set_generation (generation_type)
 Set the generation. More...
 
bool is_real () const
 Check if event record is real (collected by the experiment DAQ) More...
 
bool is_simulated () const
 Check if event record is simulated. More...
 
 event_header ()
 Constructor. More...
 
virtual ~event_header ()
 Destructor. More...
 
virtual void clear ()
 Clear the event header internal data. More...
 
virtual void tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
 Smart print. More...
 
void dump () const
 Basic print. More...
 
- Public Member Functions inherited from datatools::i_serializable
 i_serializable ()
 
virtual ~i_serializable ()
 
virtual const std::string & get_serial_tag () const=0
 
- Public Member Functions inherited from datatools::i_clear
virtual ~i_clear ()
 
- Public Member Functions inherited from datatools::i_tree_dumpable
 i_tree_dumpable ()
 
virtual ~i_tree_dumpable ()
 
virtual void print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const
 
void print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const
 
void print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const
 
void tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const
 
void tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const
 
void smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const
 

Static Public Member Functions

static const std::string & event_header_label ()
 Return the default label/name of a 'event header' bank. More...
 
- Static Public Member Functions inherited from datatools::i_tree_dumpable
static const boost::property_tree::ptree & empty_options ()
 
static boost::property_tree::ptree make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false)
 
static std::ostream & last_skip_tag (std::ostream &out_)
 
static std::ostream & skip_tag (std::ostream &out_)
 
static std::ostream & last_tag (std::ostream &out_)
 
static std::ostream & tag (std::ostream &out_)
 

Additional Inherited Members

- Public Attributes inherited from datatools::i_tree_dumpable
 OSTREAM_COUT
 
 OSTREAM_CERR
 
 OSTREAM_CLOG
 

Detailed Description

A event header class to be embedded as a bank in a 'datatools::things' event record.

Member Enumeration Documentation

◆ generation_type

Generation type of the event record.

Enumerator
GENERATION_INVALID 

Invalid generation type.

GENERATION_REAL 

Real event from the detector's DAQ.

GENERATION_SIMULATED 

Simulated event from the MC application.

Constructor & Destructor Documentation

◆ event_header()

snemo::datamodel::event_header::event_header ( )

Constructor.

◆ ~event_header()

virtual snemo::datamodel::event_header::~event_header ( )
virtual

Destructor.

Member Function Documentation

◆ clear()

virtual void snemo::datamodel::event_header::clear ( )
virtual

Clear the event header internal data.

Implements datatools::i_clear.

◆ dump()

void snemo::datamodel::event_header::dump ( ) const

Basic print.

◆ event_header_label()

static const std::string& snemo::datamodel::event_header::event_header_label ( )
static

Return the default label/name of a 'event header' bank.

◆ get_generation()

generation_type snemo::datamodel::event_header::get_generation ( ) const

Return the generation.

◆ get_id()

const datatools::event_id& snemo::datamodel::event_header::get_id ( ) const

Return the event ID.

◆ get_properties()

const datatools::properties& snemo::datamodel::event_header::get_properties ( ) const

Return the constant list of properties.

◆ get_timestamp()

const snemo::datamodel::timestamp& snemo::datamodel::event_header::get_timestamp ( ) const

Return the timestamp.

◆ grab_id()

datatools::event_id& snemo::datamodel::event_header::grab_id ( )

Return the mutable event ID.

◆ grab_properties()

datatools::properties& snemo::datamodel::event_header::grab_properties ( )

Return the mutable list of properties.

◆ grab_timestamp()

snemo::datamodel::timestamp& snemo::datamodel::event_header::grab_timestamp ( )

Return the mutable timestamp.

◆ is_real()

bool snemo::datamodel::event_header::is_real ( ) const

Check if event record is real (collected by the experiment DAQ)

◆ is_simulated()

bool snemo::datamodel::event_header::is_simulated ( ) const

Check if event record is simulated.

◆ set_generation()

void snemo::datamodel::event_header::set_generation ( generation_type  )

Set the generation.

◆ set_id()

void snemo::datamodel::event_header::set_id ( const datatools::event_id )

Set the event ID.

◆ set_properties()

void snemo::datamodel::event_header::set_properties ( const datatools::properties )

Set the list of properties.

◆ set_timestamp()

void snemo::datamodel::event_header::set_timestamp ( const snemo::datamodel::timestamp )

Set the timestamp.

◆ tree_dump()

virtual void snemo::datamodel::event_header::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart print.

Reimplemented from datatools::i_tree_dumpable.


The documentation for this class was generated from the following file: