ATLAS Offline Software
CaloCell_SuperCell_IDDetDescrCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
13 #include "StoreGate/StoreGateSvc.h"
14 #include "CaloIdentifier/CaloID.h"
17 
26 StatusCode make_CaloIDHelper (ISvcLocator* svcloc,
27  const std::string& /*helperKey*/,
28  CaloCell_SuperCell_ID* & idhelper)
29 {
30  const char* ctx = "CaloCell_SuperCell_IDDetDescrCnv";
31  // get DetectorStore service
32  StoreGateSvc * detStore = 0;
33  CHECK_WITH_CONTEXT( svcloc->service("DetectorStore", detStore), ctx );
34 
35  // retrieve LAr and Tile helpers
36 #define GET_HELPER(TYPE, HELPER) \
37  const TYPE* HELPER=0; \
38  CHECK_WITH_CONTEXT( detStore->retrieve (HELPER, #TYPE), ctx )
39 
43  GET_HELPER (LArMiniFCAL_ID, minifcal_id);
44  GET_HELPER (Tile_SuperCell_ID, tile_id);
45 
46  // create the helper
47  idhelper = new CaloCell_SuperCell_ID (em_id,
48  hec_id,
49  fcal_id,
50  minifcal_id,
51  tile_id);
52  return StatusCode::SUCCESS;
53 }
54 
55 
CaloCell_SuperCell_IDDetDescrCnv.h
CaloCell_SuperCell_ID helper converter class.
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
LArFCAL_SuperCell_ID
Helper class for LArFCAL offline identifiers for supercells.
Definition: LArFCAL_SuperCell_ID.h:48
CaloID.h
Tile_SuperCell_ID
Helper class for Tile offline identifiers for supercells.
Definition: Tile_SuperCell_ID.h:64
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
LArEM_SuperCell_ID
Helper class for LArEM offline identifiers for supercells.
Definition: LArEM_SuperCell_ID.h:122
CaloCell_SuperCell_ID
Helper class for offline supercell identifiers.
Definition: CaloCell_SuperCell_ID.h:48
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CaloCell_SuperCell_ID.h
Helper class for offline supercell identifiers.
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
make_CaloIDHelper
StatusCode make_CaloIDHelper(ISvcLocator *svcloc, const std::string &, CaloCell_SuperCell_ID *&idhelper)
Helper function to actually create a new helper.
Definition: CaloCell_SuperCell_IDDetDescrCnv.cxx:26
errorcheck.h
Helpers for checking error return status codes and reporting errors.
GET_HELPER
#define GET_HELPER(TYPE, HELPER)
LArMiniFCAL_ID
Helper class for LArMiniFCAL offline identifiers.
Definition: LArMiniFCAL_ID.h:57
LArHEC_SuperCell_ID
Helper class for LArHEC offline identifiers for supercells.
Definition: LArHEC_SuperCell_ID.h:59
StoreGateSvc.h