ATLAS Offline Software
CaloTester.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
4 */
5 /*
6  */
15 #ifndef CALOEVENT_CALOTESTER_H
16 #define CALOEVENT_CALOTESTER_H
17 
18 
19 #include "CaloEvent/CaloCell.h"
22 #include "CaloDetDescr/CaloDetDescrElement.h"
25 #include <memory>
26 #include <vector>
27 
28 
41 {
42 public:
50  CaloTester();
51 
52 
58 
59 
66  const CaloDetDescriptor* find_dd (int hashid);
67 
68 
75  const CaloDetDescriptor* find_dd (const Identifier& cell_id);
76 
77 
82  std::unique_ptr<CaloCell> make_cell (int hashid);
83 
84 
89  std::vector<CaloCell*> get_cells();
90 
91 
96  std::vector<const CaloCell*> get_const_cells();
97 
98 
104  std::unique_ptr<CaloCellContainer> make_ccc();
105 
106 
108  CaloDetDescrManager& mgr() { return *m_mgr; }
109 
110 
112  const CaloHelpersTest& helpers() const { return m_helpers; }
113 
114 
116  const LArEM_ID& emID() const { return m_helpers.emID(); }
117 
118 
120  const LArHEC_ID& hecID() const { return m_helpers.hecID(); }
121 
122 
124  const LArFCAL_ID& fcalID() const { return m_helpers.fcalID(); }
125 
126 
128  const LArMiniFCAL_ID& minifcalID() const { return m_helpers.minifcalID(); }
129 
130 
132  const TileID& tileID() const { return m_helpers.tileID(); }
133 
134 
136  const CaloCell_ID& caloID() const { return m_helpers.caloID(); }
137 
138 
139 private:
143  void make_cells();
144 
147 
150  std::vector<std::unique_ptr<CaloDetDescrElement> > m_tileddes;
151 
153  std::vector<std::unique_ptr<CaloCell> > m_cells;
154 
157 
160  std::unique_ptr<CaloDetDescrManager> m_mgr_up;
161 };
162 
163 
164 #endif // not CALOEVENT_CALOTESTER_H
CaloHelpersTest::hecID
const LArHEC_ID & hecID() const
Definition: CaloHelpersTest.cxx:74
CaloTester::m_mgr_up
std::unique_ptr< CaloDetDescrManager > m_mgr_up
Owning pointer to the manager object.
Definition: CaloTester.h:160
CaloTester::m_cells
std::vector< std::unique_ptr< CaloCell > > m_cells
The cells made by make_cells().
Definition: CaloTester.h:153
CaloTester::find_dd
const CaloDetDescriptor * find_dd(int hashid)
Return a region descriptor corresponding to a given cell.
Definition: CaloTester.cxx:61
CaloTester::make_cells
void make_cells()
Create all calo cells and save in internal list.
Definition: CaloTester.cxx:173
CaloTester::make_cell
std::unique_ptr< CaloCell > make_cell(int hashid)
Create a calorimeter cell.
Definition: CaloTester.cxx:130
CaloHelpersTest::tileID
const TileID & tileID() const
Definition: CaloHelpersTest.cxx:92
CaloCell.h
LArHEC_ID
Helper class for LArHEC offline identifiers.
Definition: LArHEC_ID.h:85
CaloHelpersTest::minifcalID
const LArMiniFCAL_ID & minifcalID() const
Definition: CaloHelpersTest.cxx:86
CaloHelpersTest.h
Helper to initialize ID helpers for unit tests.
CaloTester::make_ccc
std::unique_ptr< CaloCellContainer > make_ccc()
Return a CaloCellContainer for all cells.
Definition: CaloTester.cxx:223
CaloTester::tileID
const TileID & tileID() const
Return the Tile ID helper.
Definition: CaloTester.h:132
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
CaloDetDescriptor.h
Definition of CaloDetDescriptor.
CaloHelpersTest
Helper to initialize ID helpers for unit tests.
Definition: CaloHelpersTest.h:38
CaloTester::m_tileddes
std::vector< std::unique_ptr< CaloDetDescrElement > > m_tileddes
All Tile detdescr elements.
Definition: CaloTester.h:150
CaloTester::mgr
CaloDetDescrManager & mgr()
Return the CaloDetDescrManager.
Definition: CaloTester.h:108
TileID
Helper class for TileCal offline identifiers.
Definition: TileID.h:68
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CaloTester
Helpers for creating calorimeter objects for unit tests.
Definition: CaloTester.h:41
CaloTester::m_helpers
CaloHelpersTest m_helpers
The ID helpers.
Definition: CaloTester.h:146
CaloTester::minifcalID
const LArMiniFCAL_ID & minifcalID() const
Return the LArMiniFCAL ID helper.
Definition: CaloTester.h:128
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
CaloTester::hecID
const LArHEC_ID & hecID() const
Return the LArHEC ID helper.
Definition: CaloTester.h:120
CaloTester::caloID
const CaloCell_ID & caloID() const
Return the Calorimeter ID helper.
Definition: CaloTester.h:136
CaloTester::record_mgr
StatusCode record_mgr()
Record the CaloDetDescrManager in the detector store.
Definition: CaloTester.cxx:41
CaloTester::CaloTester
CaloTester()
Constructor.
Definition: CaloTester.cxx:28
CaloCellContainer.h
CaloTester::fcalID
const LArFCAL_ID & fcalID() const
Return the LArFCAL ID helper.
Definition: CaloTester.h:124
CaloHelpersTest::fcalID
const LArFCAL_ID & fcalID() const
Definition: CaloHelpersTest.cxx:80
CaloTester::m_mgr
CaloDetDescrManager * m_mgr
The manager object.
Definition: CaloTester.h:156
CaloHelpersTest::caloID
const CaloCell_ID & caloID() const
Definition: CaloHelpersTest.cxx:98
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloDetDescriptor
This is a base class for LAr and Tile Descriptors The primary goal is to speed up loops over all the ...
Definition: CaloDetDescriptor.h:58
LArMiniFCAL_ID
Helper class for LArMiniFCAL offline identifiers.
Definition: LArMiniFCAL_ID.h:57
CaloTester::get_const_cells
std::vector< const CaloCell * > get_const_cells()
Return a vector of all cells as const pointers.
Definition: CaloTester.cxx:204
CaloTester::get_cells
std::vector< CaloCell * > get_cells()
Return a vector of all cells.
Definition: CaloTester.cxx:186
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
CaloTester::helpers
const CaloHelpersTest & helpers() const
Return the ID helpers.
Definition: CaloTester.h:112
CaloTester::emID
const LArEM_ID & emID() const
Return the LArEM ID helper.
Definition: CaloTester.h:116
LArFCAL_ID
Helper class for LArFCAL offline identifiers.
Definition: LArFCAL_ID.h:60
CaloHelpersTest::emID
const LArEM_ID & emID() const
Definition: CaloHelpersTest.cxx:68
Identifier
Definition: IdentifierFieldParser.cxx:14