fire v0.19.0
Framework for sImulation and Reconstruction of Events
fire::Event::EventObjectTag Class Reference

Identification for a specific event object. More...

#include <Event.h>

Collaboration diagram for fire::Event::EventObjectTag:
[legend]

Public Member Functions

 EventObjectTag (const std::string &name, const std::string &pass, const std::string &type, int vers, bool keep)
 Wrap the three pieces of information in our class. More...
 
const std::stringname () const
 Get the object name. More...
 
const std::stringpass () const
 Get the pass name the object was produced on. More...
 
const std::stringtype () const
 Get the name of the type of the object. More...
 
int version () const
 Get the version number of the type of this object. More...
 
const bool keep () const
 Get if this object will be kept (i.e. More...
 
const bool loaded () const
 Get if this object is currently loaded in memory. More...
 
bool match (const std::regex &name, const std::regex &pass, const std::regex &type) const
 Checks if we match the passed regex for name, pass, and type.
 

Private Attributes

std::string name_
 Name given to the object.
 
std::string pass_
 Pass name given when object was generated.
 
std::string type_
 Type name of the object.
 
int version_
 The version of the type.
 
bool keep_
 If the object represented by this tag should be kept. More...
 
bool loaded_ {false}
 If the object represented by this tag has been loaded into a memory object. More...
 

Friends

class Event
 friends with our parent class Event so that it can modify our members after-the-fact More...
 
std::ostreamoperator<< (std::ostream &os, const EventObjectTag &t)
 String method for printing this tag in a helpful manner.
 

Detailed Description

Identification for a specific event object.

Each event object can be uniquely identified with three pieces of information:

  1. It's name (the string input with the object to Event::add)
  2. The name of the pass it was generated on
  3. The name of its type

In fact, this information overcontrains the list of objects because two objects in the same pass are not allowed to have the same name and two objects of the same name are not allowed to have different types.

Constructor & Destructor Documentation

◆ EventObjectTag()

fire::Event::EventObjectTag::EventObjectTag ( const std::string name,
const std::string pass,
const std::string type,
int  vers,
bool  keep 
)
inline

Wrap the three pieces of information in our class.

Parameters
namename of event object
passpass name
typename of type
keepif we should write this object into the output file

Member Function Documentation

◆ keep()

const bool fire::Event::EventObjectTag::keep ( ) const
inline

Get if this object will be kept (i.e.

written to the output file)

Returns
true if object will be written

◆ loaded()

const bool fire::Event::EventObjectTag::loaded ( ) const
inline

Get if this object is currently loaded in memory.

Returns
true if there is a memory representation of this object

◆ name()

const std::string & fire::Event::EventObjectTag::name ( ) const
inline

Get the object name.

Returns
name of event object

◆ pass()

const std::string & fire::Event::EventObjectTag::pass ( ) const
inline

Get the pass name the object was produced on.

Returns
pass name

◆ type()

const std::string & fire::Event::EventObjectTag::type ( ) const
inline

Get the name of the type of the object.

Returns
demangled type name

◆ version()

int fire::Event::EventObjectTag::version ( ) const
inline

Get the version number of the type of this object.

Returns
int version of the type

Friends And Related Function Documentation

◆ Event

friend class Event
friend

friends with our parent class Event so that it can modify our members after-the-fact

(mainly so that we can change the loaded_ boolean when an object transitions from being available to being in-memory)

Member Data Documentation

◆ keep_

bool fire::Event::EventObjectTag::keep_
private

If the object represented by this tag should be kept.

kept means written to output file

◆ loaded_

bool fire::Event::EventObjectTag::loaded_ {false}
mutableprivate

If the object represented by this tag has been loaded into a memory object.

We need to be mutable so that we can be changed during Event::get which is a const member function.


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