16#include "GaudiKernel/Bootstrap.h"
17#include "GaudiKernel/ISvcLocator.h"
18#include "GaudiKernel/Service.h"
33 log << MSG::INFO <<
"SCT_ClusterContainerCnv::initialize()" <<
endmsg;
35 SmartIF<StoreGateSvc> detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
36 CHECK( detStore.isValid() );
42 return StatusCode::SUCCESS;
47 auto trans = std::make_unique<InDet::SCT_ClusterContainer>(
m_sctId->wafer_hash_max());
52 if (not sctDetEleHandle.
isValid() or elements==
nullptr) {
54 return trans.release();
57 for (InDet::SCT_ClusterCollection* dcColl : *persObj) {
62 InDet::SCT_ClusterCollection::iterator itColl = dcColl->begin();
63 InDet::SCT_ClusterCollection::iterator lastColl = dcColl->end();
64 for (; itColl != lastColl; ++itColl) {
65 (*itColl)->m_detEl = de;
68 StatusCode
sc= trans->addCollection(dcColl, collHash);
71 log << MSG::ERROR <<
"Failed to add SCT_ClusterContainer to container" <<
endmsg;
75 return trans.release();
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
#define MSG_DEBUG(log, x)
DataVector< Trk::PrepRawDataCollection< InDet::SCT_Cluster > > SCT_ClusterContainer_p0
This is an Identifier helper class for the SCT subdetector.
This is a "hash" representation of an Identifier.
Class to hold the SiDetectorElement objects to be put in the detector store.
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Class to hold geometrical description of a silicon detector element.
SCT_ClusterContainerCnv_p0()
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
virtual InDet::SCT_ClusterContainer * createTransient(const SCT_ClusterContainer_p0 *, MsgStream &) override
StatusCode initialize(MsgStream &log)