24 ISvcLocator* pSvcLocator)
33 return StatusCode::SUCCESS;
41 size_t sz = store.size();
43 for (
size_t i = 0; i <
sz; ++i, ++it) {
46 for (; cit != cit_end; ++cit)
47 tows[i].push_back (std::make_pair (cit.
hash(), cit.
weight()));
60 for (
size_t i = 0; i <
sz; ++i, ++it) {
61 size_t itower = it.itower();
64 for (; cit != cit_end; ++cit)
65 tows[itower].push_back (std::make_pair (cit.
hash(), cit.
weight()));
73 for (
size_t i = 0; i < t.size(); i++) {
75 std::cout <<
" " << i <<
": ";
76 for (
size_t j = 0; j < tt.size(); j++)
77 std::cout << tt[j].first <<
"/" << tt[j].second <<
" ";
85 const std::vector<CaloCell_ID::SUBCALO>& calos,
94 assert (subseg.
size() == store2.
size());
102 assert (tows_full == tows_subseg);
108 std::cout <<
"test1\n";
112 if(!caloMgrHandle.
isValid()) std::abort();
117 std::vector<CaloCell_ID::SUBCALO> calos;
122 if (!store.buildLookUp (*caloDDM, seg, calos)) {
140 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Regression test for CaloTowerStore.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
This class provides the client interface for accessing the detector description information common to...
A rectangular window within the segmentation.
size_t size() const
The number of towers in this window.
CaloTowerSeg segmentation() const
Return a new segmentation object corresponding to this window.
Data object stores CaloTower segmentation.
SubSeg subseg(double eta, double deta, double phi, double dphi) const
Return a window within the current segmentation.
CaloTowerStoreTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
std::vector< std::pair< unsigned, double > > test_tow_t
virtual StatusCode execute() override
Standard Gaudi execute method.
static void dump_tows(const test_tows_t &t)
static void iterate_subseg(const CaloTowerStore &store, const CaloTowerSeg::SubSeg &subseg, test_tows_t &tows)
static void test_subseg_iter(const CaloDetDescrManager *, const CaloTowerStore &, const std::vector< CaloCell_ID::SUBCALO > &, const CaloTowerSeg::SubSeg &)
static void iterate_full(const CaloTowerStore &store, test_tows_t &tows)
std::vector< test_tow_t > test_tows_t
virtual StatusCode initialize() override
Standard Gaudi initialize method.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
bool buildLookUp(const CaloDetDescrManager &theManager, const CaloTowerSeg &theTowerSeg, const std::vector< CaloCell_ID::SUBCALO > &theCalos)
setup trigger
CaloTowerSeg::SubSegIterator< tower_iterator > tower_subseg_iterator