ATLAS Offline Software
Reconstruction
Jet
JetEvent
src
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
5
#include "
JetEvent/JetMomentMapManager.h
"
6
#include "
JetEvent/JetMomentMap.h
"
7
8
JetMomentMapManager
JetMomentMapManager::s_instance
;
9
10
void
JetMomentMapManager::add
(
JetMomentMap
*
m
){
11
12
if
(
m
!= &
OrphanJetMomentMap::instance
)
m_maps
.insert(
m
);
13
}
14
15
void
JetMomentMapManager::remove
(
const
JetMomentMap
*
m
){
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
23
JetMomentMapManager::~JetMomentMapManager
(){
24
clear
();
25
}
26
void
JetMomentMapManager::clear
(){
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
}
xAOD::iterator
JetConstituentVector::iterator iterator
Definition:
JetConstituentVector.cxx:68
JetMomentMap
Definition:
JetMomentMap.h:21
JetMomentMap.h
python.SystemOfUnits.m
int m
Definition:
SystemOfUnits.py:91
JetMomentMapManager.h
skel.it
it
Definition:
skel.GENtoEVGEN.py:396
JetMomentMapManager::~JetMomentMapManager
~JetMomentMapManager()
Definition:
JetMomentMapManager.cxx:23
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::remove
void remove(const JetMomentMap *m)
Definition:
JetMomentMapManager.cxx:15
JetMomentMapManager::add
void add(JetMomentMap *m)
Definition:
JetMomentMapManager.cxx:10
JetMomentMapManager::s_instance
static JetMomentMapManager s_instance
Definition:
JetMomentMapManager.h:36
JetMomentMapManager
////////////////////////////////////////
Definition:
JetMomentMapManager.h:28
JetMomentMapManager::m_maps
std::set< JetMomentMap * > m_maps
Definition:
JetMomentMapManager.h:38
JetMomentMapManager::clear
void clear()
Definition:
JetMomentMapManager.cxx:26
Generated on Thu Nov 7 2024 21:18:16 for ATLAS Offline Software by
1.8.18