Commit 18b4acab authored by Christos Anastopoulos's avatar Christos Anastopoulos Committed by Vakhtang Tsulaia
Browse files

PrepRawData hold directly a dynamic Eigen Matrix rather than ptr to it

parent 132a3cd1
......@@ -41,7 +41,7 @@
#include "StoreGate/ReadCondHandleKey.h"
#include <tuple>
typedef std::tuple< Amg::Vector2D, InDet::SiWidth, Amg::MatrixX * > ClusterInfo;
typedef std::tuple< Amg::Vector2D, InDet::SiWidth, Amg::MatrixX> ClusterInfo;
class PixelID;
class SCT_ID;
......
......@@ -918,11 +918,14 @@ StatusCode SCT_FastDigitizationTool::digitize(const EventContext& ctx)
mat(Trk::locY,Trk::locX) = (Sn*sqrt(Cs2)*(V0-V1));
mat(Trk::locY,Trk::locY) = (Sn2*V0+Cs2*V1);
}
// covariance matrix && error description
const Amg::MatrixX *potentialClusterErr = new Amg::MatrixX(mat);
// create a custom cluster
potentialCluster = new InDet::SCT_Cluster(potentialClusterId,lcorrectedPosition,potentialClusterRDOList,siWidth,hitSiDetElement,potentialClusterErr);
potentialCluster = new InDet::SCT_Cluster(potentialClusterId,
lcorrectedPosition,
potentialClusterRDOList,
siWidth,
hitSiDetElement,
Amg::MatrixX(mat));
}
(void) SCT_DetElClusterMap.insert(SCT_detElement_RIO_map::value_type(waferID, potentialCluster));
......
......@@ -592,7 +592,7 @@ ClusterInfo SiSmearedDigitizationTool::calculateNewCluster(CLUSTER * clusterA, C
covariance.setIdentity();
covariance(Trk::locX,Trk::locX) = sigmaX*sigmaX;
covariance(Trk::locY,Trk::locY) = sigmaY*sigmaY;
Amg::MatrixX* clusterErr = new Amg::MatrixX(covariance);
Amg::MatrixX clusterErr = covariance;
return ClusterInfo( intersection, siWidth, clusterErr );
......@@ -630,7 +630,7 @@ StatusCode SiSmearedDigitizationTool::mergeClusters(Pixel_detElement_RIO_map * c
Amg::Vector2D intersection;
InDet::SiWidth siWidth;
Amg::MatrixX *clusterErr;
Amg::MatrixX clusterErr;
std::tie( intersection, siWidth, clusterErr ) = calculateNewCluster( iter->second, inner_iter->second );
const InDetDD::SiDetectorElement* hitSiDetElement = (((*inner_iter).second)->detectorElement());
......@@ -641,7 +641,6 @@ StatusCode SiSmearedDigitizationTool::mergeClusters(Pixel_detElement_RIO_map * c
InDetDD::SiCellId currentCellId = hitSiDetElement->cellIdFromIdentifier(intersectionId);
if ( !currentCellId.isValid() ) {
delete clusterErr;
continue;
}
......@@ -650,7 +649,7 @@ StatusCode SiSmearedDigitizationTool::mergeClusters(Pixel_detElement_RIO_map * c
rdoList,
siWidth,
hitSiDetElement,
clusterErr);
std::move(clusterErr));
((*inner_iter).second) = pixelCluster;
cluster_map->erase(iter);
......@@ -698,7 +697,7 @@ StatusCode SiSmearedDigitizationTool::mergeClusters(SCT_detElement_RIO_map * clu
Amg::Vector2D intersection;
InDet::SiWidth siWidth;
Amg::MatrixX *clusterErr;
Amg::MatrixX clusterErr;
std::tie( intersection, siWidth, clusterErr ) = calculateNewCluster( iter->second, inner_iter->second );
const InDetDD::SiDetectorElement* hitSiDetElement = (((*inner_iter).second)->detectorElement());
......@@ -709,7 +708,6 @@ StatusCode SiSmearedDigitizationTool::mergeClusters(SCT_detElement_RIO_map * clu
InDetDD::SiCellId currentCellId = hitSiDetElement->cellIdFromIdentifier(intersectionId);
if ( !currentCellId.isValid() ) {
delete clusterErr;
continue;
}
......@@ -718,7 +716,7 @@ StatusCode SiSmearedDigitizationTool::mergeClusters(SCT_detElement_RIO_map * clu
rdoList,
siWidth,
hitSiDetElement,
clusterErr);
std::move(clusterErr));
((*inner_iter).second) = sctCluster;
cluster_map->erase(iter);
......@@ -995,7 +993,6 @@ StatusCode SiSmearedDigitizationTool::digitize(const EventContext& ctx)
covariance.setIdentity();
covariance(Trk::locX,Trk::locX) = sigmaX*sigmaX;
covariance(Trk::locY,Trk::locY) = sigmaY*sigmaY;
Amg::MatrixX* clusterErr = new Amg::MatrixX(covariance);
// create the cluster
pixelCluster = new InDet::PixelCluster(intersectionId,
......@@ -1003,7 +1000,7 @@ StatusCode SiSmearedDigitizationTool::digitize(const EventContext& ctx)
rdoList,
siWidth,
hitSiDetElement,
clusterErr);
Amg::MatrixX(covariance));
m_pixelClusterMap->insert(std::pair<IdentifierHash, InDet::PixelCluster* >(waferID, pixelCluster));
if (FillTruthMap(m_pixelPrdTruth, pixelCluster, hit).isFailure()) {
......@@ -1096,14 +1093,13 @@ StatusCode SiSmearedDigitizationTool::digitize(const EventContext& ctx)
mat(Trk::locY, Trk::locY) = (sn2*v0+cs2*v1);
} // End of rotation endcap SCT
Amg::MatrixX* clusterErr = new Amg::MatrixX(mat);
sctCluster = new InDet::SCT_Cluster(intersectionId,
intersection,
rdoList,
siWidth,
hitSiDetElement,
clusterErr);
Amg::MatrixX(mat));
m_sctClusterMap->insert(std::pair<IdentifierHash, InDet::SCT_Cluster* >(waferID, sctCluster));
......
......@@ -377,8 +377,9 @@ StatusCode TRTFastDigitizationTool::produceDriftCircles(const EventContext& ctx)
Amg::Vector2D hitLocalPosition( smearedRadius, 0. );
std::vector< Identifier > rdoList = { straw_id };
Amg::MatrixX *hitErrorMatrix = new Amg::MatrixX( 1, 1 );
( *hitErrorMatrix )( Trk::driftRadius, Trk::driftRadius ) = sigmaTrt * sigmaTrt * m_cFit[ idx ][ 1 ] * m_cFit[ idx ][ 1 ];
auto hitErrorMatrix = Amg::MatrixX(1, 1);
(hitErrorMatrix)(Trk::driftRadius, Trk::driftRadius) =
sigmaTrt * sigmaTrt * m_cFit[idx][1] * m_cFit[idx][1];
// the TRT word simulate only TR information for the moment
// consult TRTElectronicsProcessing::EncodeDigit() in TRT_Digitization/src/TRTElectronicsProcessing.cxx
......@@ -421,8 +422,15 @@ StatusCode TRTFastDigitizationTool::produceDriftCircles(const EventContext& ctx)
}
InDet::TRT_DriftCircle *trtDriftCircle = new InDet::TRT_DriftCircle( straw_id, hitLocalPosition, rdoList, hitErrorMatrix, trtBaseElement, word );
if ( !trtDriftCircle ) continue;
InDet::TRT_DriftCircle* trtDriftCircle =
new InDet::TRT_DriftCircle(straw_id,
hitLocalPosition,
rdoList,
std::move(hitErrorMatrix),
trtBaseElement,
word);
if (!trtDriftCircle)
continue;
m_driftCircleMap.insert( std::multimap< Identifier, InDet::TRT_DriftCircle * >::value_type( straw_id, trtDriftCircle ) );
......@@ -518,7 +526,7 @@ StatusCode TRTFastDigitizationTool::mergeEvent(const EventContext& ctx) {
CHECK( this->createOutputContainers() );
// Process the Hits straw by straw: get the iterator pairs for given straw
if ( m_thpctrt != 0 ) {
if ( m_thpctrt != nullptr ) {
CHECK( this->produceDriftCircles(ctx) );
}
......@@ -574,15 +582,20 @@ StatusCode TRTFastDigitizationTool::createAndStoreRIOs()
unsigned int newword = 0;
if(highTRMergeProb*(numberOfHitsInOneStraw-1) > CLHEP::RandFlat::shoot( m_randomEngine )) newword += 1 << (26-9);
const unsigned int newword2 = newword;
const Amg::Vector2D locpos = trtDriftCircle->localPosition();
const Amg::Vector2D locpos = trtDriftCircle->localPosition();
std::vector<Identifier> rdolist = trtDriftCircle->rdoList();
Amg::MatrixX* errRadius = new Amg::MatrixX(trtDriftCircle->localCovariance());
const InDetDD::TRT_BaseElement* detEl = trtDriftCircle->detectorElement();
InDet::TRT_DriftCircle *trtDriftCircle2 = new InDet::TRT_DriftCircle( trtid, locpos,
rdolist, errRadius,
detEl, newword2 );
idHashMap.insert( std::multimap<IdentifierHash, InDet::TRT_DriftCircle * >::value_type( hash, trtDriftCircle2 ) );
delete trtDriftCircle;
InDet::TRT_DriftCircle* trtDriftCircle2 = new InDet::TRT_DriftCircle(
trtid,
locpos,
rdolist,
Amg::MatrixX(trtDriftCircle->localCovariance()),
detEl,
newword2);
idHashMap.insert(
std::multimap<IdentifierHash, InDet::TRT_DriftCircle*>::value_type(
hash, trtDriftCircle2));
delete trtDriftCircle;
}
else{
idHashMap.insert( std::multimap<IdentifierHash, InDet::TRT_DriftCircle * >::value_type( hash, trtDriftCircle ) );
......
......@@ -22,7 +22,7 @@ CompetingPixelClustersOnTrackCnv_p1::persToTrans( const InDet::CompetingPixelClu
auto containedChildRots = new std::vector< const InDet::PixelClusterOnTrack * >;
for (const TPObjRef& ref : persObj->m_containedChildRots) {
ITPConverterFor<Trk::MeasurementBase> *rotCnv = 0;
ITPConverterFor<Trk::MeasurementBase> *rotCnv = nullptr;
const InDet::PixelClusterOnTrack* mcot = dynamic_cast<const InDet::PixelClusterOnTrack*>(createTransFromPStore(&rotCnv, ref, log));
containedChildRots->push_back( mcot );
}
......@@ -40,7 +40,7 @@ CompetingPixelClustersOnTrackCnv_p1::transToPers( const InDet::CompetingPixelClu
persObj->m_competingROT = baseToPersistent( &m_cRotCnv, transObj, log );
for (const InDet::PixelClusterOnTrack* cl : transObj->containedROTs()) {
ITPConverterFor<Trk::MeasurementBase> *rotCnv = 0;
ITPConverterFor<Trk::MeasurementBase> *rotCnv = nullptr;
persObj->m_containedChildRots.push_back( toPersistent(&rotCnv, cl, log) );
}
}
......
......@@ -16,7 +16,7 @@ CompetingSCT_ClustersOnTrackCnv_p1::persToTrans( const InDet::CompetingSCT_Clust
std::vector< const InDet::SCT_ClusterOnTrack * > containedChildRots;
for (const TPObjRef& ref : persObj->m_containedChildRots) {
ITPConverterFor<Trk::MeasurementBase> *rotCnv = 0;
ITPConverterFor<Trk::MeasurementBase> *rotCnv = nullptr;
const InDet::SCT_ClusterOnTrack* mcot = dynamic_cast<const InDet::SCT_ClusterOnTrack*>(createTransFromPStore(&rotCnv, ref, log));
containedChildRots.push_back( mcot );
}
......@@ -34,7 +34,7 @@ CompetingSCT_ClustersOnTrackCnv_p1::transToPers( const InDet::CompetingSCT_Clust
persObj->m_competingROT = baseToPersistent( &m_cRotCnv, transObj, log );
for (const InDet::SCT_ClusterOnTrack* cl : transObj->containedROTs()) {
ITPConverterFor<Trk::MeasurementBase> *rotCnv = 0;
ITPConverterFor<Trk::MeasurementBase> *rotCnv = nullptr;
persObj->m_containedChildRots.push_back( toPersistent(&rotCnv, cl, log) );
}
}
......
......@@ -24,12 +24,12 @@ CompetingTRT_DriftCirclesOnTrackCnv_p1::persToTrans( const InDet::CompetingTRT_D
auto containedChildRots = new std::vector< const InDet::TRT_DriftCircleOnTrack * >;
for (const TPObjRef& ref : persObj->m_containedChildRots) {
ITPConverterFor<Trk::MeasurementBase> *rotCnv = 0;
ITPConverterFor<Trk::MeasurementBase> *rotCnv = nullptr;
const InDet::TRT_DriftCircleOnTrack* mcot = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>(createTransFromPStore(&rotCnv, ref, log));
containedChildRots->push_back( mcot );
}
ITPConverterFor<Trk::Surface> *surfaceCnv = 0;
ITPConverterFor<Trk::Surface> *surfaceCnv = nullptr;
Trk::Surface* associatedSurface = createTransFromPStore(&surfaceCnv, persObj->m_associatedSurface, log);
*transObj = InDet::CompetingTRT_DriftCirclesOnTrack (associatedSurface,
......@@ -50,11 +50,11 @@ CompetingTRT_DriftCirclesOnTrackCnv_p1::transToPers( const InDet::CompetingTRT_D
persObj->m_competingROT = baseToPersistent( &m_cRotCnv, transObj, log );
for (const InDet::TRT_DriftCircleOnTrack* cl : transObj->containedROTs()) {
ITPConverterFor<Trk::MeasurementBase> *rotCnv = 0;
ITPConverterFor<Trk::MeasurementBase> *rotCnv = nullptr;
persObj->m_containedChildRots.push_back( toPersistent(&rotCnv, cl, log) );
}
ITPConverterFor<Trk::Surface> *surfaceCnv = 0;
ITPConverterFor<Trk::Surface> *surfaceCnv = nullptr;
persObj->m_associatedSurface = toPersistent(&surfaceCnv, &transObj->associatedSurface(), log);
}
......
......@@ -26,7 +26,7 @@ persToTrans( const InDet::PixelCluster_p1 *persObj, InDet::PixelCluster *transOb
0, // totalCharge
InDet::SiWidth(),
nullptr, //detEl
nullptr, // cmat
{}, // cmat
persObj->m_omegax,
persObj->m_omegay,
0 //splitInfo
......
......@@ -39,11 +39,11 @@ PixelClusterCnv_p2::createPixelCluster (const InDet::PixelCluster_p2* persObj,
m_swCnv.persToTrans(&persObj->m_width, &width, log);
// Error matrix
auto cmat = std::make_unique<Amg::MatrixX>(2,2);
(*cmat)(0,0) = static_cast<double>(persObj->m_mat00);
(*cmat)(1,0) = static_cast<double>(persObj->m_mat01);
(*cmat)(0,1) = static_cast<double>(persObj->m_mat01);
(*cmat)(1,1) = static_cast<double>(persObj->m_mat11);
auto cmat = Amg::MatrixX(2,2);
(cmat)(0,0) = static_cast<double>(persObj->m_mat00);
(cmat)(1,0) = static_cast<double>(persObj->m_mat01);
(cmat)(0,1) = static_cast<double>(persObj->m_mat01);
(cmat)(1,1) = static_cast<double>(persObj->m_mat11);
InDet::PixelCluster clus (id,
localPos,
......
......@@ -78,11 +78,11 @@ PixelClusterCnv_p3::createPixelCluster (const InDet::PixelCluster_p3* persObj,
m_swCnv.persToTrans(&persObj->m_width, &width, log);
// Error matrix
auto cmat = std::make_unique<Amg::MatrixX>(2,2);
(*cmat)(0,0) = static_cast<double>(persObj->m_mat00);
(*cmat)(1,0) = static_cast<double>(persObj->m_mat01);
(*cmat)(0,1) = static_cast<double>(persObj->m_mat01);
(*cmat)(1,1) = static_cast<double>(persObj->m_mat11);
auto cmat = Amg::MatrixX(2,2);
(cmat)(0,0) = static_cast<double>(persObj->m_mat00);
(cmat)(1,0) = static_cast<double>(persObj->m_mat01);
(cmat)(0,1) = static_cast<double>(persObj->m_mat01);
(cmat)(1,1) = static_cast<double>(persObj->m_mat11);
// Check if charge or ToT has been stored
......
......@@ -64,7 +64,7 @@ void InDet::PixelClusterContainerCnv_p1::transToPers(const InDet::PixelClusterCo
persCont->m_PRD.resize(chanEnd);
for (unsigned int i = 0; i < collection.size(); ++i) {
const InDet::PixelCluster* chan = collection[i];
persCont->m_PRD[i + chanBegin] = toPersistent((CONV**)0, chan, log );
persCont->m_PRD[i + chanBegin] = toPersistent((CONV**)nullptr, chan, log );
}
}
}
......@@ -96,7 +96,7 @@ void InDet::PixelClusterContainerCnv_p1::persToTrans(const InDet::InDetPRD_Cont
}
}
InDet::PixelClusterCollection* coll = 0;
InDet::PixelClusterCollection* coll = nullptr;
PixelClusterCnv_p1 chanCnv;
typedef ITPConverterFor<Trk::PrepRawData> CONV;
......@@ -115,7 +115,7 @@ void InDet::PixelClusterContainerCnv_p1::persToTrans(const InDet::InDetPRD_Cont
// Fill with channels
for (unsigned int ichan = 0; ichan < nchans; ++ ichan) {
const TPObjRef pchan = persCont->m_PRD[ichan + pcoll.m_begin];
InDet::PixelCluster* chan = dynamic_cast<InDet::PixelCluster*>(createTransFromPStore((CONV**)0, pchan, log ) );
InDet::PixelCluster* chan = dynamic_cast<InDet::PixelCluster*>(createTransFromPStore((CONV**)nullptr, pchan, log ) );
if (chan){
chan->m_detEl = de;
(*coll)[ichan] = chan;
......
......@@ -74,8 +74,8 @@ void PixelGangedClusterAmbiguitiesCnv_p1::transToPers
}
std::vector<unsigned int> uintvector;
const InDet::SiCluster* keyPixelCluster(0);
const InDet::SiCluster* gangedPixelCluster(0);
const InDet::SiCluster* keyPixelCluster(nullptr);
const InDet::SiCluster* gangedPixelCluster(nullptr);
unsigned int count(1);
for( ; itr != itrE ; ++itr ) {
......@@ -118,14 +118,14 @@ void PixelGangedClusterAmbiguitiesCnv_p1::persToTrans(const InDet::PixelGangedC
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;
} else
{
const InDet::PixelClusterContainer* pCC(0);
const InDet::PixelClusterContainer* pCC(nullptr);
if (m_storeGate->retrieve(pCC, persObj->m_pixelClusterContainerName).isFailure()) {
log << MSG::FATAL << "PixelGangedClusterAmbiguitiesCnv_p1: Cannot retrieve "
<< persObj->m_pixelClusterContainerName << endmsg;
}
const InDet::PixelCluster* keyPixelCluster(0);
const InDet::PixelCluster* gangedPixelCluster(0);
const InDet::PixelCluster* keyPixelCluster(nullptr);
const InDet::PixelCluster* gangedPixelCluster(nullptr);
for (const std::pair<uint32_t, std::vector<uint32_t> >& mapElement : persObj->m_ambiguityMap)
{
......
......@@ -47,11 +47,11 @@ SCT_ClusterCnv_p2::createSCT_Cluster (const InDet::SCT_Cluster_p2* persObj,
m_swCnv.persToTrans(&persObj->m_width, &sw, log);
// Error matrix
auto cmat = std::make_unique<Amg::MatrixX>(2,2);
(*cmat)(0,0) = static_cast<double>(persObj->m_mat00);
(*cmat)(1,0) = static_cast<double>(persObj->m_mat01);
(*cmat)(0,1) = static_cast<double>(persObj->m_mat01);
(*cmat)(1,1) = static_cast<double>(persObj->m_mat11);
auto cmat = Amg::MatrixX(2,2);
(cmat)(0,0) = static_cast<double>(persObj->m_mat00);
(cmat)(1,0) = static_cast<double>(persObj->m_mat01);
(cmat)(0,1) = static_cast<double>(persObj->m_mat01);
(cmat)(1,1) = static_cast<double>(persObj->m_mat11);
InDet::SCT_Cluster clus (clusId,
localPos,
......
......@@ -48,11 +48,11 @@ SCT_ClusterCnv_p3::createSCT_Cluster (const InDet::SCT_Cluster_p3* persObj,
m_swCnv.persToTrans(&persObj->m_width, &sw, log);
// Error matrix
auto cmat = std::make_unique<Amg::MatrixX>(2,2);
(*cmat)(0,0) = static_cast<double>(persObj->m_mat00);
(*cmat)(1,0) = static_cast<double>(persObj->m_mat01);
(*cmat)(0,1) = static_cast<double>(persObj->m_mat01);
(*cmat)(1,1) = static_cast<double>(persObj->m_mat11);
auto cmat = Amg::MatrixX(2,2);
(cmat)(0,0) = static_cast<double>(persObj->m_mat00);
(cmat)(1,0) = static_cast<double>(persObj->m_mat01);
(cmat)(0,1) = static_cast<double>(persObj->m_mat01);
(cmat)(1,1) = static_cast<double>(persObj->m_mat11);
InDet::SCT_Cluster clus (clusId,
localPos,
......
......@@ -67,7 +67,7 @@ void InDet::SCT_ClusterContainerCnv_p1::transToPers(const InDet::SCT_ClusterCont
persCont->m_PRD.resize(chanEnd);
for (unsigned int i = 0; i < collection.size(); ++i) {
const InDet::SCT_Cluster* chan = collection[i];
persCont->m_PRD[i + chanBegin] = toPersistent((CONV**)0, chan, log );
persCont->m_PRD[i + chanBegin] = toPersistent((CONV**)nullptr, chan, log );
}
}
// if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " *** Writing SCT_ClusterContainer ***" << endmsg;
......@@ -100,7 +100,7 @@ void InDet::SCT_ClusterContainerCnv_p1::persToTrans(const InDet::InDetPRD_Conta
}
}
InDet::SCT_ClusterCollection* coll = 0;
InDet::SCT_ClusterCollection* coll = nullptr;
SCT_ClusterCnv_p1 chanCnv;
typedef ITPConverterFor<Trk::PrepRawData> CONV;
......@@ -121,7 +121,7 @@ void InDet::SCT_ClusterContainerCnv_p1::persToTrans(const InDet::InDetPRD_Conta
// Fill with channels
for (unsigned int ichan = 0; ichan < nchans; ++ ichan) {
const TPObjRef pchan = persCont->m_PRD[ichan + pcoll.m_begin];
InDet::SCT_Cluster* chan = dynamic_cast<InDet::SCT_Cluster*>(createTransFromPStore((CONV**)0, pchan, log ) );
InDet::SCT_Cluster* chan = dynamic_cast<InDet::SCT_Cluster*>(createTransFromPStore((CONV**)nullptr, pchan, log ) );
if (chan) {
chan->m_detEl = de;
(*coll)[ichan] = chan;
......
......@@ -26,7 +26,7 @@ void TRT_DriftCircleCnv_p1::persToTrans( const InDet::TRT_DriftCircle_p1 *persOb
*transObj = InDet::TRT_DriftCircle (Identifier(),
localPos,
std::vector<Identifier>(), // rdoList
std::unique_ptr<const Amg::MatrixX>(), // cmat
{}, // cmat
nullptr, // detEl
trtdata
);
......
......@@ -26,8 +26,8 @@ TRT_DriftCircleCnv_p2::createTRT_DriftCircle( const InDet::TRT_DriftCircle_p2 *p
localPos[Trk::locX] = persObj->m_locPos;
localPos[Trk::locY] = 0;
auto cmat = std::make_unique<Amg::MatrixX>(1,1);
(*cmat)(0,0) = static_cast<double>(persObj->m_errMat);
auto cmat = Amg::MatrixX(1,1);
(cmat)(0,0) = static_cast<double>(persObj->m_errMat);
InDet::TRT_DriftCircle dc (clusId,
localPos,
......
......@@ -70,7 +70,7 @@ void InDet::TRT_DriftCircleContainerCnv_p1::transToPers(const InDet::TRT_DriftCi
persCont->m_PRD.resize(chanEnd);
for (unsigned int i = 0; i < collection.size(); ++i) {
const InDet::TRT_DriftCircle* chan = collection[i];
persCont->m_PRD[i + chanBegin] = toPersistent((CONV**)0, chan, log );
persCont->m_PRD[i + chanBegin] = toPersistent((CONV**)nullptr, chan, log );
}
}
// if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " *** Writing TRT_DriftCircleContainer ***" << endmsg;
......@@ -94,7 +94,7 @@ void InDet::TRT_DriftCircleContainerCnv_p1::persToTrans(const InDet::InDetPRD_C
// from the vector.
InDet::TRT_DriftCircleCollection* coll = 0;
InDet::TRT_DriftCircleCollection* coll = nullptr;
TRT_DriftCircleCnv_p1 chanCnv;
typedef ITPConverterFor<Trk::PrepRawData> CONV;
......@@ -115,7 +115,7 @@ void InDet::TRT_DriftCircleContainerCnv_p1::persToTrans(const InDet::InDetPRD_C
// Fill with channels
for (unsigned int ichan = 0; ichan < nchans; ++ ichan) {
const TPObjRef pchan = persCont->m_PRD[ichan + pcoll.m_begin];
InDet::TRT_DriftCircle* chan = dynamic_cast<InDet::TRT_DriftCircle*>(createTransFromPStore((CONV**)0, pchan, log ) );
InDet::TRT_DriftCircle* chan = dynamic_cast<InDet::TRT_DriftCircle*>(createTransFromPStore((CONV**)nullptr, pchan, log ) );
if (chan) {
chan->m_detEl = de;
(*coll)[ichan] = chan;
......
......@@ -43,7 +43,7 @@ void PixelClusterOnTrackCnv_p2::persToTrans( const InDet::PixelClusterOnTrack_p2
// Attempt to call supertool to fill in detElements
m_eventCnvTool->recreateRIO_OnTrack(transObj);
if (transObj->detectorElement()==0)
if (transObj->detectorElement()==nullptr)
log << MSG::WARNING<<"Unable to reset DetEl for this RIO_OnTrack, "
<< "probably because of a problem with the Identifier/IdentifierHash : ("
<< transObj->identify()<<"/"<<transObj->idDE()<<endmsg;
......
......@@ -46,7 +46,7 @@ void SCT_ClusterOnTrackCnv_p2::persToTrans( const InDet::SCT_ClusterOnTrack_p2 *
// Attempt to call supertool to fill in detElements
m_eventCnvTool->recreateRIO_OnTrack(transObj);
if (transObj->detectorElement()==0) {
if (transObj->detectorElement()==nullptr) {
log << MSG::WARNING<<"Unable to reset DetEl for this RIO_OnTrack, "
<< "probably because of a problem with the Identifier/IdentifierHash : ("
<< transObj->identify()<<"/"<<transObj->idDE()<<endmsg;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment