ATLAS Offline Software
eTowerContainer.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // Stolen shamelessly from CaloCellContainer.h and modified as required
8 
9 #ifndef ETOWERCONTAINER_H
10 #define ETOWERCONTAINER_H
11 
22 #include "AthenaKernel/CLASS_DEF.h"
23 #include "L1CaloFEXSim/eTower.h"
24 
26 #include "CxxUtils/PackedArray.h"
27 #include "CxxUtils/CachedValue.h"
29 
30 #include <unordered_map>
31 
32 namespace LVL1 {
33 
34 class eTowerContainer : public DataVector<LVL1::eTower>
35 {
36 
37  public:
38 
39 
41  typedef std::vector<const LVL1::eTower> eTowerVector;
42 
44  typedef std::vector<LVL1::eTower> MutableeTowerVector;
45 
48  //eTowerContainer() ;
49 
52 
54  virtual ~eTowerContainer() { };
55 
57  void push_back(float eta, float phi, float keybase, int posneg);
58 
60  bool fillContainerMap();
61 
63  void print() const;
64 
66  const LVL1::eTower * findTower(int towerID) const;
67 
69  LVL1::eTower * findTower(int towerID);
70 
72  void clearContainerMap();
73 
74  private:
76  IMessageSvc* msgSvc() const;
77 
78  //* @brief Keeps track of the towerID of each eTower associated to each MAP index *.
79  std::unordered_map<int,int> m_map_towerID_containerIndex;
80 };
81 
82 }
83 CLASS_DEF( LVL1::eTowerContainer , 1143075806 , 1 )
85 
86 #endif
87 
eTowerContainer
Container class for eTower.
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
LVL1::eTower
The eTower class is an interface object for eFEX trigger algorithms The purposes are twofold:
Definition: eTower.h:38
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
LVL1::eTowerContainer::push_back
void push_back(float eta, float phi, float keybase, int posneg)
reimplementation of const push_back
Definition: eTowerContainer.cxx:19
LVL1::eTowerContainer::clearContainerMap
void clearContainerMap()
clear map
Definition: eTowerContainer.cxx:49
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::eTowerContainer::MutableeTowerVector
std::vector< LVL1::eTower > MutableeTowerVector
Return from non-const findTowerVector.
Definition: eTowerContainer.h:44
SG::OwnershipPolicy
OwnershipPolicy
describes the possible element ownership policies (see e.g. DataVector)
Definition: OwnershipPolicy.h:16
LVL1::eTowerContainer::m_map_towerID_containerIndex
std::unordered_map< int, int > m_map_towerID_containerIndex
Definition: eTowerContainer.h:79
LVL1::eTowerContainer::~eTowerContainer
virtual ~eTowerContainer()
destructor
Definition: eTowerContainer.h:54
SG::OWN_ELEMENTS
@ OWN_ELEMENTS
this data object owns its elements
Definition: OwnershipPolicy.h:17
beamspotman.n
n
Definition: beamspotman.py:731
LVL1::eTowerContainer::eTowerVector
std::vector< const LVL1::eTower > eTowerVector
type to be used for the internal lookup table, and to return list of towers
Definition: eTowerContainer.h:41
LVL1::eTowerContainer::msgSvc
IMessageSvc * msgSvc() const
get message service
LVL1::eTowerContainer::fillContainerMap
bool fillContainerMap()
utility function to help speed up accessing towers
Definition: eTowerContainer.cxx:54
LVL1::eTowerContainer::eTowerContainer
eTowerContainer(size_t n, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Sized constructor.
LVL1::eTowerContainer::print
void print() const
dump (obsolete)
Definition: eTowerContainer.cxx:24
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
LVL1::eTowerContainer
Definition: eTowerContainer.h:35
CachedValue.h
Cached value with atomic update.
IdentifierHash.h
findInContainer.h
Define a specializable method for finding the index of an object within a container.
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
SG_BASE
SG_BASE(LVL1::eTowerContainer, DataVector< LVL1::eTower >)
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:64
DataVector< LVL1::eTower >::ownPolicy
SG::OwnershipPolicy ownPolicy() const
Return the ownership policy setting for this container.
PackedArray.h
An array of unsigned values of some bit size, packed tightly.
LVL1::eTowerContainer::eTowerContainer
eTowerContainer(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Main constructor.
Definition: eTowerContainer.cxx:13
LVL1::eTowerContainer::findTower
const LVL1::eTower * findTower(int towerID) const
fast find method given identifier.
Definition: eTowerContainer.cxx:29
eTower.h
CLASS_DEF.h
macros to associate a CLID to a type