ATLAS Offline Software
Loading...
Searching...
No Matches
JetMomentMapManager.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
7
9
14
16 if(m_noRemoveMode) return;
17 JetMomentMap* map = const_cast<JetMomentMap*>(m);
18 std::set<JetMomentMap*>::iterator it= m_maps.find(map);
19 if( it != m_maps.end() ) m_maps.erase(it);
20
21}
22
27 std::set<JetMomentMap*>::iterator it= m_maps.begin();
28 std::set<JetMomentMap*>::iterator itE= m_maps.end();
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}
////////////////////////////////////////
std::set< JetMomentMap * > m_maps
void remove(const JetMomentMap *m)
void add(JetMomentMap *m)
static JetMomentMapManager s_instance
static OrphanJetMomentMap instance
STL class.