ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloCnv
CaloIdCnv
src
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
12
#include "
CaloIdCnv/CaloCell_IDDetDescrCnv.h
"
13
#include "
StoreGate/StoreGateSvc.h
"
14
#include "
CaloIdentifier/CaloID.h
"
15
#include "
CaloIdentifier/CaloCell_ID.h
"
16
#include "
AthenaKernel/errorcheck.h
"
17
18
27
StatusCode
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
make_CaloIDHelper
StatusCode make_CaloIDHelper(ISvcLocator *svcloc, const std::string &, CaloCell_ID *&idhelper)
Helper function to actually create a new helper.
Definition
CaloCell_IDDetDescrCnv.cxx:27
GET_HELPER
#define GET_HELPER(TYPE, HELPER)
CaloCell_IDDetDescrCnv.h
CaloCell_ID helper converter class.
CaloCell_ID.h
CaloID.h
errorcheck.h
Helpers for checking error return status codes and reporting errors.
CHECK_WITH_CONTEXT
#define CHECK_WITH_CONTEXT(...)
Evaluate an expression and check for errors, with an explicitly specified context name.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:396
StoreGateSvc.h
CaloCell_ID
Helper class for offline cell identifiers.
Definition
CaloCell_ID.h:34
LArEM_ID
Helper class for LArEM offline identifiers.
Definition
LArEM_ID.h:111
LArFCAL_ID
Helper class for LArFCAL offline identifiers.
Definition
LArFCAL_ID.h:49
LArHEC_ID
Helper class for LArHEC offline identifiers.
Definition
LArHEC_ID.h:76
LArMiniFCAL_ID
Helper class for LArMiniFCAL offline identifiers.
Definition
LArMiniFCAL_ID.h:51
TileID
Helper class for TileCal offline identifiers.
Definition
TileID.h:67
Generated on
for ATLAS Offline Software by
1.17.0