16#include "GaudiKernel/Bootstrap.h"
17#include "GaudiKernel/ISvcLocator.h"
18#include "GaudiKernel/MsgStream.h"
19#include "GaudiKernel/Service.h"
20#include "GaudiKernel/StatusCode.h"
37 log << MSG::INFO <<
"SCT_ClusterContainerCnv::initialize()" <<
endmsg;
39 SmartIF<StoreGateSvc> detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
40 CHECK( detStore.isValid() );
46 return StatusCode::SUCCESS;
51 std::unique_ptr<InDet::SCT_ClusterContainer> trans(std::make_unique<InDet::SCT_ClusterContainer>(
m_sctId->wafer_hash_max()) );
56 if (not sctDetEleHandle.
isValid() or elements==
nullptr) {
58 return trans.release();
61 for (InDet::SCT_ClusterCollection* dcColl : *persObj) {
67 InDet::SCT_ClusterCollection::iterator itColl = dcColl->begin();
68 InDet::SCT_ClusterCollection::iterator lastColl = dcColl->end();
69 for (; itColl != lastColl; ++itColl) {
70 (*itColl)->m_detEl = de;
73 StatusCode
sc= trans ? trans->addCollection(dcColl, collHash): StatusCode::FAILURE;
77 log << MSG::ERROR <<
"Failed to add SCT_ClusterContainer to container" <<
endmsg;
81 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)