ATLAS Offline Software
Loading...
Searching...
No Matches
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>
12
13typedef std::unique_ptr<std::map<unsigned int,Gep::GepCaloCell>> pGepCellMap;
14
15namespace 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 const std::map<unsigned int, Gep::GepCaloCell>* getCellMapPtr() const {
34 return &m_cellMap;
35 }
36
38
40
41 private:
42
43 std::map<unsigned int,Gep::GepCaloCell> m_cellMap;
45
46 };
47}
48
49CLASS_DEF(Gep::GepCellMap, 252505461, 1 )
50
51#endif //TRIGGEPPERF_GEPCELLMAP_H
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
std::unique_ptr< GepCellMap > pGepCellMap
int getNumberOfOverflowingFEB2s()
Definition GepCellMap.h:39
const std::map< unsigned int, Gep::GepCaloCell > * getCellMapPtr() const
Definition GepCellMap.h:33
void setNumberOfOverflowingFEB2s(int n)
Definition GepCellMap.h:37
unsigned int size()
Definition GepCellMap.h:25
void insert(unsigned int id, const Gep::GepCaloCell &cell)
Definition GepCellMap.h:21
pGepCellMap getCellMap() const
Definition GepCellMap.h:29
std::map< unsigned int, Gep::GepCaloCell > m_cellMap
Definition GepCellMap.h:43