Belle II Software  release-05-01-25
RelationIndexManager.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010-2011 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Ritter *
7  * *
8  **************************************************************************/
9 
10 #include <framework/datastore/RelationIndexManager.h>
11 
12 using namespace Belle2;
13 
15 {
16  static RelationIndexManager instance;
17  return instance;
18 }
20 {
21  RelationMap& relations = m_cache[durability];
22  for (auto& e : relations) {
23  if (e.second) e.second->clear();
24  }
25 }
Belle2::RelationIndexManager::Instance
static RelationIndexManager & Instance()
Returns the singleton instance.
Definition: RelationIndexManager.cc:14
Belle2::RelationIndexManager::RelationMap
std::map< std::string, std::shared_ptr< RelationIndexBase > > RelationMap
Maptype to keep track of all Containers of one durability.
Definition: RelationIndexManager.h:128
Belle2::RelationIndexManager
Manager to keep a cache of existing RelationIndexContainers.
Definition: RelationIndexManager.h:38
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::RelationIndexManager::clear
void clear(DataStore::EDurability durability=DataStore::c_Event)
Clear the cache of RelationIndexContainers with the given durability.
Definition: RelationIndexManager.cc:19
Belle2::RelationIndexManager::m_cache
RelationCache m_cache
Cache for all Containers.
Definition: RelationIndexManager.h:132
Belle2::DataStore::EDurability
EDurability
Durability types.
Definition: DataStore.h:60