Belle II Software  release-08-01-10
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 
13 using namespace std;
14 using namespace Belle2;
15 
16 RelationContainer::RelationContainer():
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 }
27 void RelationContainer::Clear(Option_t*)
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.
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.