ATLAS Offline Software
GepCellMap.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef TRIGGEPPERF_GEPCELLMAP_H
6 #define TRIGGEPPERF_GEPCELLMAP_H
7 
8 #include "src/GepCaloCell.h"
9 #include <map>
10 #include <memory>
11 #include "AthenaKernel/CLASS_DEF.h"
12 
13 typedef std::unique_ptr<std::map<unsigned int,Gep::GepCaloCell>> pGepCellMap;
14 
15 namespace Gep{
16 
17  class GepCellMap {
18 
19  public:
20 
21  void insert(unsigned int id, const Gep::GepCaloCell & cell) {
22  m_cellMap.emplace(id, cell);
23  }
24 
25  unsigned int size() {
26  return m_cellMap.size();
27  }
28 
30  return std::make_unique<std::map<unsigned int,Gep::GepCaloCell>>(m_cellMap);
31  }
32 
33  private:
34 
35  std::map<unsigned int,Gep::GepCaloCell> m_cellMap;
36 
37  };
38 }
39 
40 CLASS_DEF(Gep::GepCellMap, 252505461, 1 )
41 
42 #endif //TRIGGEPPERF_GEPCELLMAP_H
Gep::GepCellMap
Definition: GepCellMap.h:17
Gep::GepCellMap::insert
void insert(unsigned int id, const Gep::GepCaloCell &cell)
Definition: GepCellMap.h:21
Gep::GepCellMap::getCellMap
pGepCellMap getCellMap()
Definition: GepCellMap.h:29
Gep::GepCellMap::size
unsigned int size()
Definition: GepCellMap.h:25
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
Gep::GepCellMap::m_cellMap
std::map< unsigned int, Gep::GepCaloCell > m_cellMap
Definition: GepCellMap.h:35
pGepCellMap
std::unique_ptr< GepCellMap > pGepCellMap
Definition: IClusterMaker.h:17
Gep
Definition: BasicGepClusterMaker.h:13
Gep::GepCaloCell
Definition: GepCaloCell.h:13
GepCaloCell.h
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
pGepCellMap
std::unique_ptr< std::map< unsigned int, Gep::GepCaloCell > > pGepCellMap
Definition: GepCellMap.h:13
CLASS_DEF.h
macros to associate a CLID to a type