ATLAS Offline Software
Macros | Functions
CaloCell_IDDetDescrCnv.cxx File Reference

CaloCell_ID helper converter class. More...

#include "CaloIdCnv/CaloCell_IDDetDescrCnv.h"
#include "StoreGate/StoreGateSvc.h"
#include "CaloIdentifier/CaloID.h"
#include "CaloIdentifier/CaloCell_ID.h"
#include "AthenaKernel/errorcheck.h"
Include dependency graph for CaloCell_IDDetDescrCnv.cxx:

Go to the source code of this file.

Macros

#define GET_HELPER(TYPE, HELPER)
 

Functions

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

Detailed Description

CaloCell_ID helper converter class.

Author
RD Schaffer, F. Ledroit, scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
rewritten Aug, 2012

Definition in file CaloCell_IDDetDescrCnv.cxx.

Macro Definition Documentation

◆ GET_HELPER

#define GET_HELPER (   TYPE,
  HELPER 
)
Value:
const TYPE* HELPER=0; \
CHECK_WITH_CONTEXT( detStore->retrieve (HELPER, #TYPE), ctx )

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 }
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
GET_HELPER
#define GET_HELPER(TYPE, HELPER)
LArHEC_ID
Helper class for LArHEC offline identifiers.
Definition: LArHEC_ID.h:85
TileID
Helper class for TileCal offline identifiers.
Definition: TileID.h:68
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
TYPE
#define TYPE(CODE, TYP, IOTYP)
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
LArMiniFCAL_ID
Helper class for LArMiniFCAL offline identifiers.
Definition: LArMiniFCAL_ID.h:57
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
LArFCAL_ID
Helper class for LArFCAL offline identifiers.
Definition: LArFCAL_ID.h:60