Belle II Software development
IntraRunDependency Class Referenceabstract

Base class for handling changing conditions during a run. More...

#include <IntraRunDependency.h>

Inheritance diagram for IntraRunDependency:
EventDependency

Public Member Functions

 IntraRunDependency (TObject *object=0, bool owner=true)
 Constructor for intra run depenent conditions.
 
virtual ~IntraRunDependency ()
 Destructor.
 
TObject * getObject (const EventMetaData &event) const
 Get the conditions object that is valid for the given event.
 
TObject * getAnyObject () const
 Get any of the objects.
 
bool isOwner () const
 Flag for ownership.
 
virtual const std::vector< unsigned int > & getBoundaries () const =0
 Get a vector with the intra-run boundaries.
 

Protected Member Functions

virtual int getIndex (const EventMetaData &event) const =0
 Get the index of the object that is valid for the given event.
 
 ClassDef (IntraRunDependency, 1)
 base class for intra run dependent conditions.
 

Protected Attributes

TObjArray m_objects
 Array of intra-run dependent objects.
 

Detailed Description

Base class for handling changing conditions during a run.

Note that the IntraRunDependency object takes ownership of the individual payload objects by default.

Definition at line 26 of file IntraRunDependency.h.

Constructor & Destructor Documentation

◆ IntraRunDependency()

IntraRunDependency ( TObject *  object = 0,
bool  owner = true 
)
inlineexplicit

Constructor for intra run depenent conditions.

Parameters
objectthe first valid object in the run.
ownerflag that indicates whether the IntraRunDependency takes ownership of the payload objects or not.

Definition at line 34 of file IntraRunDependency.h.

34{m_objects.SetOwner(owner); if (object) m_objects.Add(object);};
TObjArray m_objects
Array of intra-run dependent objects.

◆ ~IntraRunDependency()

virtual ~IntraRunDependency ( )
inlinevirtual

Destructor.

Virtual because this is a base class.

Definition at line 40 of file IntraRunDependency.h.

40{};

Member Function Documentation

◆ getAnyObject()

TObject * getAnyObject ( ) const
inline

Get any of the objects.

To be used only by the DBStore for type checking.

Returns
any of the intra-run dependent objects.

Definition at line 53 of file IntraRunDependency.h.

53{return m_objects.At(0);};

◆ getBoundaries()

virtual const std::vector< unsigned int > & getBoundaries ( ) const
pure virtual

Get a vector with the intra-run boundaries.

In case of no intra-run dependence, the vector is empty. In general for n payloads there are n-1 boundaries. The method must be implemented by the derived classes.

Implemented in EventDependency.

◆ getIndex()

virtual int getIndex ( const EventMetaData event) const
protectedpure virtual

Get the index of the object that is valid for the given event.

Parameters
eventmeta data of the event for which we want to have the conditions.
Returns
array index of the object valid for the given event.

Implemented in EventDependency.

◆ getObject()

TObject * getObject ( const EventMetaData event) const
inline

Get the conditions object that is valid for the given event.

Parameters
eventmeta data of the event for which we want to have the conditions.
Returns
object valid for the given event.

Definition at line 47 of file IntraRunDependency.h.

47{return m_objects.At(getIndex(event));};
virtual int getIndex(const EventMetaData &event) const =0
Get the index of the object that is valid for the given event.

◆ isOwner()

bool isOwner ( ) const
inline

Flag for ownership.

Returns
true if the IntraRunDependency owns the individual objects.

Definition at line 59 of file IntraRunDependency.h.

59{return m_objects.IsOwner();}

Member Data Documentation

◆ m_objects

TObjArray m_objects
protected

Array of intra-run dependent objects.

Definition at line 70 of file IntraRunDependency.h.


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