Belle II Software development
RelationContainer.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/dataobjects/RelationContainer.h>
10
11#include <framework/dataobjects/RelationElement.h>
12
13using namespace std;
14using namespace Belle2;
15
17 m_elements(RelationElement::Class()),
18 m_fromName(""), m_fromDurability(-1),
19 m_toName(""), m_toDurability(-1), m_modified(true)
20{
21}
22
24{
25 return *static_cast<RelationElement*>(m_elements.At(i));
26}
28{
29 m_elements.Delete();
30 m_fromName.clear();
31 m_toName.clear();
32 m_modified = true;
34}
virtual void Clear(Option_t *="")
Clear container to free memory.
TClonesArray m_elements
TClonesArray to store all elements.
const RelationElement & getElement(int i) const
Get reference to RelationElement at index i.
RelationContainer()
Default constructor, initialize all values to sane default.
int m_toDurability
durability of the StoreArray we relate to.
std::string m_fromName
name of the StoreArray we relate from.
bool m_modified
check for modification since creation or deserialization.
std::string m_toName
name of the StoreArray we relate to.
int m_fromDurability
durability of the StoreArray we relate from.
Class to store a single element of a relation.
Abstract base class for different kinds of events.
STL namespace.