ATLAS Offline Software
CaloTowerBuilderTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CALOREC_CALOTOWERBUILDERTOOL_H
6 #define CALOREC_CALOTOWERBUILDERTOOL_H
7 
18 
21 
22 
23 
24 #include <string>
25 #include <vector>
26 
27 class CaloTower;
28 class CaloTowerStore;
29 class CaloTowerContainer;
30 class StoreGateSvc;
31 class MsgStream;
32 
34 {
35 public:
38 
40  CaloTowerBuilderTool(const std::string& name, const std::string& type,
41  const IInterface* parent);
43 
44 
60  virtual StatusCode execute(const EventContext& ctx,
61  CaloTowerContainer* theContainer,
62  const CaloCellContainer* theCell=0,
63  const CaloTowerSeg::SubSeg* subseg = 0) const override;
64 
65 
74  virtual StatusCode execute (const EventContext& ctx,
75  CaloTowerContainer* theContainer) override;
76 
77 
78  virtual void setCalos( const std::vector<CaloCell_ID::SUBCALO>& v);
79 
80  virtual StatusCode initializeTool() override;
81 
82 
83 protected:
88  virtual std::vector<CaloCell_ID::SUBCALO> parseCalos
89  (const std::vector<std::string>& includedCalos) const;
90 
91 
92 private:
93 
95  // Properties //
97 
98  std::vector<std::string> m_includedCalos;
99 
101  // Store and Services //
103 
104  std::vector<CaloCell_ID::SUBCALO> m_caloIndices;
105 
107  // Specific Initialization //
109 
112  mutable std::atomic_bool m_cellStoreInit{false};
113 
114  virtual StatusCode checkSetup(MsgStream& log);
115  static void addTower (const CaloTowerStore::tower_iterator tower_it,
116  const ElementLink<CaloCellContainer>& cellsEL,
117  CaloTower* tower) ;
119  const ElementLink<CaloCellContainer>& cellsEL) const;
121  const ElementLink<CaloCellContainer>& cellsEL,
122  const CaloTowerSeg::SubSeg* subseg) const;
123 
124 
128  StatusCode rebuildLookup(const EventContext& ctx);
129 
130 };
131 #endif
CaloTowerBuilderTool::CaloTowerBuilderTool
CaloTowerBuilderTool(const CaloTowerBuilderTool &)=delete
CaloTowerStore.h
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
CaloTowerBuilderTool::setCalos
virtual void setCalos(const std::vector< CaloCell_ID::SUBCALO > &v)
Definition: CaloTowerBuilderTool.cxx:264
CaloTowerBuilderTool::initializeTool
virtual StatusCode initializeTool() override
Definition: CaloTowerBuilderTool.cxx:52
CaloTowerBuilderTool::parseCalos
virtual std::vector< CaloCell_ID::SUBCALO > parseCalos(const std::vector< std::string > &includedCalos) const
Convert calorimeter strings to enums.
Definition: CaloTowerBuilderTool.cxx:283
CaloTowerBuilderTool::m_cellStoreInit
std::atomic_bool m_cellStoreInit
Definition: CaloTowerBuilderTool.h:112
CaloCell_ID.h
CaloTowerSeg::SubSeg
A rectangular window within the segmentation.
Definition: CaloTowerSeg.h:220
CaloTowerBuilderTool::rebuildLookup
StatusCode rebuildLookup(const EventContext &ctx)
Rebuild the cell lookup table.
Definition: CaloTowerBuilderTool.cxx:307
CaloTowerBuilderTool::addTower
static void addTower(const CaloTowerStore::tower_iterator tower_it, const ElementLink< CaloCellContainer > &cellsEL, CaloTower *tower)
Definition: CaloTowerBuilderTool.cxx:64
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
CaloTowerBuilderTool::checkSetup
virtual StatusCode checkSetup(MsgStream &log)
Definition: CaloTowerBuilderTool.cxx:244
CaloTowerContainer
Storable container class for CaloTower.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:77
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloTowerBuilderTool::operator=
CaloTowerBuilderTool & operator=(const CaloTowerBuilderTool &)=delete
CaloTowerBuilderTool::execute
virtual StatusCode execute(const EventContext &ctx, CaloTowerContainer *theContainer, const CaloCellContainer *theCell=0, const CaloTowerSeg::SubSeg *subseg=0) const override
Run tower building and add results to the tower container.
Definition: CaloTowerBuilderTool.cxx:165
CaloTowerStore
Definition: CaloTowerStore.h:157
CaloTowerBuilderTool::m_cellStore
CaloTowerStore m_cellStore
Definition: CaloTowerBuilderTool.h:110
CaloTower
Data class for calorimeter cell towers.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTower.h:55
CaloTowerBuilderTool::~CaloTowerBuilderTool
virtual ~CaloTowerBuilderTool()
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
CaloTowerStore::tower_iterator
Definition: CaloTowerStore.h:292
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
CaloTowerBuilderTool::iterateSubSeg
void iterateSubSeg(CaloTowerContainer *towers, const ElementLink< CaloCellContainer > &cellsEL, const CaloTowerSeg::SubSeg *subseg) const
Definition: CaloTowerBuilderTool.cxx:114
python.PyAthena.v
v
Definition: PyAthena.py:154
CaloTowerBuilderTool::m_cellStoreMutex
std::mutex m_cellStoreMutex
Definition: CaloTowerBuilderTool.h:111
RunTileMonitoring.towers
towers
Definition: RunTileMonitoring.py:133
CaloTowerBuilderTool::m_includedCalos
std::vector< std::string > m_includedCalos
Definition: CaloTowerBuilderTool.h:98
CaloTowerBuilderToolBase
Definition: CaloTowerBuilderToolBase.h:31
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
CaloTowerBuilderTool::iterateFull
void iterateFull(CaloTowerContainer *towers, const ElementLink< CaloCellContainer > &cellsEL) const
Definition: CaloTowerBuilderTool.cxx:98
CaloTowerBuilderTool
Definition: CaloTowerBuilderTool.h:34
CaloTowerBuilderToolBase.h
CaloTowerBuilderTool::m_caloIndices
std::vector< CaloCell_ID::SUBCALO > m_caloIndices
Definition: CaloTowerBuilderTool.h:104