ATLAS Offline Software
Loading...
Searching...
No Matches
CaloCell_IDDetDescrCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
10
11
17
18
27StatusCode make_CaloIDHelper (ISvcLocator* svcloc,
28 const std::string& /*helperKey*/,
29 CaloCell_ID* & idhelper)
30{
31 const char* ctx = "CaloCell_IDDetDescrCnv";
32 // get DetectorStore service
33 SmartIF<StoreGateSvc> detStore{svcloc->service("DetectorStore")};
34 CHECK_WITH_CONTEXT( detStore.isValid(), ctx );
35
36 // retrieve LAr and Tile helpers
37#define GET_HELPER(TYPE, HELPER) \
38 const TYPE* HELPER=0; \
39 CHECK_WITH_CONTEXT( detStore->retrieve (HELPER, #TYPE), ctx )
40
41 GET_HELPER (LArEM_ID, em_id);
42 GET_HELPER (LArHEC_ID, hec_id);
43 GET_HELPER (LArFCAL_ID, fcal_id);
44 GET_HELPER (LArMiniFCAL_ID, minifcal_id);
45 GET_HELPER (TileID, tile_id);
46
47 // create the helper
48 idhelper = new CaloCell_ID (em_id,
49 hec_id,
50 fcal_id,
51 minifcal_id,
52 tile_id);
53 return StatusCode::SUCCESS;
54}
55
56
StatusCode make_CaloIDHelper(ISvcLocator *svcloc, const std::string &, CaloCell_ID *&idhelper)
Helper function to actually create a new helper.
#define GET_HELPER(TYPE, HELPER)
CaloCell_ID helper converter class.
Helpers for checking error return status codes and reporting errors.
#define CHECK_WITH_CONTEXT(...)
Evaluate an expression and check for errors, with an explicitly specified context name.
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
Helper class for LArEM offline identifiers.
Definition LArEM_ID.h:111
Helper class for LArFCAL offline identifiers.
Definition LArFCAL_ID.h:49
Helper class for LArHEC offline identifiers.
Definition LArHEC_ID.h:76
Helper class for LArMiniFCAL offline identifiers.
Helper class for TileCal offline identifiers.
Definition TileID.h:67