16#include "GaudiKernel/Bootstrap.h"
17#include "GaudiKernel/ISvcLocator.h"
18#include "GaudiKernel/Service.h"
32 log << MSG::INFO <<
"PixelClusterContainerCnv::initialize()" <<
endmsg;
34 SmartIF<StoreGateSvc> detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
35 CHECK( detStore.isValid() );
41 return StatusCode::SUCCESS;
49 auto trans = std::make_unique<InDet::PixelClusterContainer>(
m_pixId->wafer_hash_max()) ;
54 if (not pixelDetEleHandle.
isValid() or elements==
nullptr) {
56 return trans.release();
59 for (InDet::PixelClusterCollection* dcColl : *persObj) {
63 MSG_DEBUG(log,
"Set PixelCluster detector element to "<< de);
65 InDet::PixelClusterCollection::iterator itColl = dcColl->begin();
66 InDet::PixelClusterCollection::iterator lastColl = dcColl->end();
67 for (
int num = 0; itColl != lastColl; ++itColl, ++num) {
69 (*itColl)->m_detEl = de;
72 StatusCode
sc= trans->addCollection(dcColl, collHash);
74 MSG_VERBOSE(log,
"PixelClusterContainer successfully added to Container !");
76 log << MSG::ERROR <<
"Failed to add PixelClusterContainer to container" <<
endmsg;
80 return trans.release();
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
#define MSG_VERBOSE(log, x)
#define MSG_DEBUG(log, x)
DataVector< Trk::PrepRawDataCollection< InDet::PixelCluster > > PixelClusterContainer_p0
This is an Identifier helper class for the Pixel subdetector.
size_type size() const noexcept
Returns the number of elements in the collection.
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.
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
virtual InDet::PixelClusterContainer * createTransient(const PixelClusterContainer_p0 *, MsgStream &) override
PixelClusterContainerCnv_p0()
StatusCode initialize(MsgStream &log)