Belle II Software development
EventDependency.cc
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
9#include <framework/database/EventDependency.h>
10#include <framework/dataobjects/EventMetaData.h>
11
12using namespace Belle2;
13
14void EventDependency::add(unsigned int event, TObject* object)
15{
16 m_objects.Add(object);
17 m_eventNumbers.push_back(event);
18}
19
20
22{
23 int result = 0;
24 for (unsigned int eventNumber : m_eventNumbers) {
25 if (eventNumber > event.getEvent()) return result;
26 result++;
27 }
28 return result;
29}
30
void add(unsigned int event, TObject *object)
Add an object to the intra run dependency.
std::vector< unsigned int > m_eventNumbers
Vector of event number boundaries.
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
TObjArray m_objects
Array of intra-run dependent objects.
Abstract base class for different kinds of events.