Belle II Software light-2406-ragdoll
RelationIndexManager.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/datastore/RelationIndexManager.h>
10
11using namespace Belle2;
12
14{
15 static RelationIndexManager instance;
16 return instance;
17}
19{
20 RelationMap& relations = m_cache[durability];
21 for (auto& e : relations) {
22 if (e.second) e.second->clear();
23 }
24}
EDurability
Durability types.
Definition: DataStore.h:58
Manager to keep a cache of existing RelationIndexContainers.
RelationCache m_cache
Cache for all Containers.
static RelationIndexManager & Instance()
Returns the singleton instance.
std::map< std::string, std::shared_ptr< RelationIndexBase > > RelationMap
Maptype to keep track of all Containers of one durability.
void clear(DataStore::EDurability durability=DataStore::c_Event)
Clear the cache of RelationIndexContainers with the given durability.
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24