ATLAS Offline Software
Loading...
Searching...
No Matches
CaloCell_IDDetDescrCnv.h File Reference

CaloCell_ID helper converter class. More...

Include dependency graph for CaloCell_IDDetDescrCnv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef CaloIdCnv::CaloIDHelper_IDDetDescrCnv_T< CaloCell_IDCaloCell_IDDetDescrCnv
 Alias for the converter class.

Functions

StatusCode make_CaloIDHelper (ISvcLocator *, const std::string &, CaloCell_ID *&idhelper)
 Helper function to actually create a new helper.

Detailed Description

CaloCell_ID helper converter class.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Refactored Aug, 2012 from original code

Definition in file CaloCell_IDDetDescrCnv.h.

Typedef Documentation

◆ CaloCell_IDDetDescrCnv

Alias for the converter class.

Definition at line 39 of file CaloCell_IDDetDescrCnv.h.

Function Documentation

◆ make_CaloIDHelper()

StatusCode make_CaloIDHelper ( ISvcLocator * svcloc,
const std::string & ,
CaloCell_ID *& idhelper )

Helper function to actually create a new helper.

Parameters
svclocGaudi service locator.
helperKeyThe StoreGate key of the helper being created.
idhelper[out]Set to the created helper.

We override this for the case of CaloCell_ID.

Definition at line 27 of file CaloCell_IDDetDescrCnv.cxx.

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}
#define GET_HELPER(TYPE, HELPER)
#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