Belle II Software light-2406-ragdoll
EventDependency.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <framework/database/IntraRunDependency.h>
11#include <vector>
12
13namespace Belle2 {
23 public:
24
30 explicit EventDependency(TObject* object = 0, bool owner = true): IntraRunDependency(object, owner) {};
31
38 void add(unsigned int event, TObject* object);
39
45 const std::vector<unsigned int>& getEventNumbers() const { return m_eventNumbers; }
46
51 TObject* getObjectByIndex(int indx) const {return m_objects.At(indx);}
52
58 const std::vector<unsigned int>& getBoundaries() const override { return getEventNumbers(); }
59
60 protected:
66 virtual int getIndex(const EventMetaData& event) const override;
67
68 private:
70 std::vector<unsigned int> m_eventNumbers;
71
73 };
75}
Class for handling changing conditions as a function of event number.
EventDependency(TObject *object=0, bool owner=true)
Constructor for event depenent conditions.
const std::vector< unsigned int > & getBoundaries() const override
Get a vector with the intra-run boundaries (in this case, event numbers).
ClassDefOverride(EventDependency, 1)
class for event number dependent conditions.
void add(unsigned int event, TObject *object)
Add an object to the intra run dependency.
TObject * getObjectByIndex(int indx) const
Get the stored object according to indx.
std::vector< unsigned int > m_eventNumbers
Vector of event number boundaries.
const std::vector< unsigned int > & getEventNumbers() const
Get a vector with event number boundaries In case of no intra-run dependence, the vector is empty In ...
virtual int getIndex(const EventMetaData &event) const override
Get the index of the object that is valid for the given event.
Store event, run, and experiment numbers.
Definition: EventMetaData.h:33
Base class for handling changing conditions during a run.
TObjArray m_objects
Array of intra-run dependent objects.
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24