ATLAS Offline Software
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
JetMomentMapManager Class Reference

//////////////////////////////////////// More...

#include <JetMomentMapManager.h>

Collaboration diagram for JetMomentMapManager:

Public Member Functions

 JetMomentMapManager ()
 
 ~JetMomentMapManager ()
 
void add (JetMomentMap *m)
 
void remove (const JetMomentMap *m)
 
void clear ()
 

Static Public Attributes

static JetMomentMapManager s_instance
 

Protected Attributes

std::set< JetMomentMap * > m_maps
 
bool m_noRemoveMode
 

Detailed Description

////////////////////////////////////////

temporary fix to memory leaks.

The trigger navigation system doesn't work well with the 16.0.0 implementation of JetMomentMap This class avoids memory leak with minimal c++ change to the core of 16.0.0 (cache compatible).

This is a temporary class ! It shouldn't been needed anymore when a proper design for JetCollection/JetMomentMap/StoreGate is found.

Definition at line 28 of file JetMomentMapManager.h.

Constructor & Destructor Documentation

◆ JetMomentMapManager()

JetMomentMapManager::JetMomentMapManager ( )
inline

Definition at line 31 of file JetMomentMapManager.h.

31 : m_noRemoveMode(false) {};

◆ ~JetMomentMapManager()

JetMomentMapManager::~JetMomentMapManager ( )

Definition at line 23 of file JetMomentMapManager.cxx.

23  {
24  clear();
25 }

Member Function Documentation

◆ add()

void JetMomentMapManager::add ( JetMomentMap m)

Definition at line 10 of file JetMomentMapManager.cxx.

10  {
11 
12  if (m != &OrphanJetMomentMap::instance ) m_maps.insert(m);
13 }

◆ clear()

void JetMomentMapManager::clear ( )

Definition at line 26 of file JetMomentMapManager.cxx.

26  {
29 
30  m_noRemoveMode = true; // we don't remove anything now (be sure itE doesn't get wrong)
31  for(;it !=itE;++it) {
32  delete *it;
33  }
34  m_noRemoveMode = false;
35  m_maps.clear();
36 }

◆ remove()

void JetMomentMapManager::remove ( const JetMomentMap m)

Definition at line 15 of file JetMomentMapManager.cxx.

15  {
16  if(m_noRemoveMode) return;
17  JetMomentMap* map = const_cast<JetMomentMap*>(m);
19  if( it != m_maps.end() ) m_maps.erase(it);
20 
21 }

Member Data Documentation

◆ m_maps

std::set<JetMomentMap*> JetMomentMapManager::m_maps
protected

Definition at line 38 of file JetMomentMapManager.h.

◆ m_noRemoveMode

bool JetMomentMapManager::m_noRemoveMode
protected

Definition at line 40 of file JetMomentMapManager.h.

◆ s_instance

JetMomentMapManager JetMomentMapManager::s_instance
static

Definition at line 36 of file JetMomentMapManager.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
JetMomentMap
Definition: JetMomentMap.h:21
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
skel.it
it
Definition: skel.GENtoEVGEN.py:396
JetMomentMapManager::m_noRemoveMode
bool m_noRemoveMode
Definition: JetMomentMapManager.h:40
TruthTest.itE
itE
Definition: TruthTest.py:25
OrphanJetMomentMap::instance
static OrphanJetMomentMap instance
Definition: JetMomentMap.h:59
JetMomentMapManager::m_maps
std::set< JetMomentMap * > m_maps
Definition: JetMomentMapManager.h:38
JetMomentMapManager::clear
void clear()
Definition: JetMomentMapManager.cxx:26