13 #include "GaudiKernel/ISvcLocator.h"
14 #include "GaudiKernel/Bootstrap.h"
15 #include "GaudiKernel/StatusCode.h"
16 #include "GaudiKernel/Service.h"
17 #include "GaudiKernel/MsgStream.h"
29 if (this->
initialize(log) != StatusCode::SUCCESS) {
34 if (transObj->empty()) {
35 if (
log.level() <=
MSG::DEBUG)
log <<
MSG::DEBUG <<
"No ganged pixels in this event. PixelAmbiMap has size 0. This happens often on single particle files." <<
endmsg;
38 InDet::PixelGangedClusterAmbiguities::const_iterator itr = transObj->begin();
39 InDet::PixelGangedClusterAmbiguities::const_iterator itrE = transObj->end();
40 InDet::PixelGangedClusterAmbiguities::const_iterator previous_itr = transObj->begin();
45 log << MSG::WARNING <<
"No containers found!"<<
endmsg;
59 for ( ;
dh!=dhEnd; ++
dh ) {
60 const auto *coll =
dh->indexFindPtr(idHash);
73 log << MSG::ERROR<<
"Could not find matching PRD container for this PixelCluster! Dumping PRD: "<<*
pixelCluster<<
endmsg;
76 std::vector<unsigned int> uintvector;
79 for( ; itr != itrE ; ++itr ) {
82 keyPixelCluster = itr->first;
84 gangedPixelCluster = itr->second;
87 else if (keyPixelCluster != keyPreviousPixelCluster)
105 if (this->
initialize(log) != StatusCode::SUCCESS) {
106 log <<
MSG::FATAL <<
"Could not initialize PixelGangedClusterAmbiguitiesCnv_p1 " <<
endmsg;
112 if (
log.level() <=
MSG::DEBUG)
log <<
MSG::DEBUG <<
"Name of the pixel cluster container is empty. Most likely cause: input is a single particle file and there were no pixel ambiguities." <<
endmsg;
117 log <<
MSG::FATAL <<
"PixelGangedClusterAmbiguitiesCnv_p1: Cannot retrieve "
126 for (
uint32_t elt : mapElement.second)
130 for (InDet::PixelClusterContainer::const_iterator contItr = pCC->begin();
131 contItr != pCC->end(); ++contItr)
134 if (coll->identifyHash() == keyIdentContIndex.
collHash())
136 keyPixelCluster = coll->at(keyIdentContIndex.
objIndex());
137 gangedPixelCluster = coll->at(gangedIdentContIndex.
objIndex());
138 transObj->insert(std::pair<const InDet::PixelCluster*, const InDet::PixelCluster*>(keyPixelCluster,gangedPixelCluster));
155 ISvcLocator* svcLocator = Gaudi::svcLocator();
158 if (
sc.isFailure()) {
160 return StatusCode::FAILURE;
164 return StatusCode::SUCCESS;