diff --git a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p1_test.cxx b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p1_test.cxx index 255dd8b50915a87094d5915bc3f963c0a3b65fce..b261ac28c549910dffe8d306890a3cc79aecd446 100644 --- a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p1_test.cxx +++ b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p1_test.cxx @@ -69,16 +69,16 @@ void testit (const LUCID_SimHit& trans1) } -void test1(std::vector<HepMC::GenParticle*>& genPartVector) +void test1(std::vector<HepMC::GenParticlePtr>& genPartVector) { std::cout << "test1\n"; - const HepMC::GenParticle *particle = genPartVector.at(0); + auto particle = genPartVector.at(0); // Create HepMcParticleLink outside of leak check. HepMcParticleLink dummyHMPL(HepMC::barcode(particle),particle->parent_event()->event_number()); assert(dummyHMPL.cptr()==particle); Athena_test::Leakcheck check; - const HepMC::GenParticle *pGenParticle = genPartVector.at(0); + auto pGenParticle = genPartVector.at(0); HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); LUCID_SimHit trans1 (1, pGenParticle->pdg_id(), trkLink, 4, 5.5, 6.5, 7.5, @@ -92,7 +92,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) int main() { ISvcLocator* pSvcLoc = nullptr; - std::vector<HepMC::GenParticle*> genPartVector; + std::vector<HepMC::GenParticlePtr> genPartVector; if (!Athena_test::initMcEventCollection(pSvcLoc,genPartVector)) { std::cerr << "This test can not be run" << std::endl; return 0; diff --git a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p2_test.cxx b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p2_test.cxx index c08d89c4296ba4c66254fb6526396d35c5ab3e90..c50beacf6b7e6b90adac32fea915553cb4c75202 100644 --- a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p2_test.cxx +++ b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p2_test.cxx @@ -68,10 +68,10 @@ void testit (const LUCID_SimHit& trans1) } -void test1(std::vector<HepMC::GenParticle*>& genPartVector) +void test1(std::vector<HepMC::GenParticlePtr>& genPartVector) { std::cout << "test1\n"; - const HepMC::GenParticle *particle = genPartVector.at(0); + auto particle = genPartVector.at(0); // Create HepMcParticleLink outside of leak check. HepMcParticleLink dummyHMPL(HepMC::barcode(particle),particle->parent_event()->event_number()); assert(dummyHMPL.cptr()==particle); @@ -90,7 +90,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) int main() { ISvcLocator* pSvcLoc = nullptr; - std::vector<HepMC::GenParticle*> genPartVector; + std::vector<HepMC::GenParticlePtr> genPartVector; if (!Athena_test::initMcEventCollection(pSvcLoc,genPartVector)) { std::cerr << "This test can not be run" << std::endl; return 0; diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/test/InDetSimDataCollectionCnv_common_test.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/test/InDetSimDataCollectionCnv_common_test.h index d98f0df7e71136ded18d3b0efb1a32858c9d367d..a517380278106309318e4eeef56806a9b754d04e 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/test/InDetSimDataCollectionCnv_common_test.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/test/InDetSimDataCollectionCnv_common_test.h @@ -89,10 +89,10 @@ void testit(const InDetSimDataCollection& trans1) // TCnv: InDetSimDataCollectionCnv_pX // T: InDetSimDataCollection_pX template<typename TCnv, typename T> -void test1(std::vector<HepMC::GenParticle*>& genPartVector) +void test1(std::vector<HepMC::GenParticlePtr>& genPartVector) { std::cout << "test1\n"; - const HepMC::GenParticle *particle = genPartVector.at(0); + auto particle = genPartVector.at(0); // Create HepMcParticleLink outside of leak check. HepMcParticleLink dummyHMPL(HepMC::barcode(particle), particle->parent_event()->event_number()); assert(dummyHMPL.cptr()==particle); @@ -145,7 +145,7 @@ int commonMain() // Make PixelID for InDetSimDataCollectionCnv_pX (TCnv) makePixelID(pSvcLoc); - std::vector<HepMC::GenParticle*> genPartVector; + std::vector<HepMC::GenParticlePtr> genPartVector; // Fill genPartVector // false is to skip Athena_test::initGaudi in Athena_test::initMcEventCollection. if (!Athena_test::initMcEventCollection(pSvcLoc, genPartVector, false)) { diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx index 92828b29600844c84df9ccd3710704ffca1c20f4..f7cce7f0dd1103fdd9d785f7b1e666dbea6ef2bf 100644 --- a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx @@ -623,11 +623,11 @@ namespace OverlayTesting { ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),sigElementHash).isSuccess()); bkgCollection.release(); // Now owned by inputBkgDataHandle - std::vector<HepMC::GenParticle*> genPartList; + std::vector<HepMC::GenParticlePtr> genPartList; initMcEventCollection(genPartList); SG::WriteHandle<InDetSimDataCollection> inputSigSDODataHandle{"StoreGateSvc+TRT_SDO_Map_SIG"}; inputSigSDODataHandle = std::make_unique<InDetSimDataCollection>(); - const HepMC::GenParticle* pGenParticle = genPartList.at(0); + auto pGenParticle = genPartList.at(0); HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); InDetSimData::Deposit deposit( trkLink, 0.0 ); std::vector<InDetSimData::Deposit> depositVector(1); @@ -709,11 +709,11 @@ namespace OverlayTesting { const double outputTOT = TRT_LoLumRawData::timeOverThreshold(outWord); const unsigned int outputDriftTimeBin = TRT_LoLumRawData::driftTimeBin(outWord); - std::vector<HepMC::GenParticle*> genPartList; + std::vector<HepMC::GenParticlePtr> genPartList; initMcEventCollection(genPartList); SG::WriteHandle<InDetSimDataCollection> inputSigSDODataHandle{"StoreGateSvc+TRT_SDO_Map_SIG"}; inputSigSDODataHandle = std::make_unique<InDetSimDataCollection>(); - const HepMC::GenParticle* pGenParticle = genPartList.at(0); + auto pGenParticle = genPartList.at(0); HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); InDetSimData::Deposit deposit( trkLink, 0.0 ); std::vector<InDetSimData::Deposit> depositVector(1); @@ -804,11 +804,11 @@ namespace OverlayTesting { const double outputTOT = TRT_LoLumRawData::timeOverThreshold(outWord); const unsigned int outputDriftTimeBin = TRT_LoLumRawData::driftTimeBin(outWord); - std::vector<HepMC::GenParticle*> genPartList; + std::vector<HepMC::GenParticlePtr> genPartList; initMcEventCollection(genPartList); SG::WriteHandle<InDetSimDataCollection> inputSigSDODataHandle{"StoreGateSvc+TRT_SDO_Map_SIG"}; inputSigSDODataHandle = std::make_unique<InDetSimDataCollection>(); - const HepMC::GenParticle* pGenParticle = genPartList.at(0); + auto pGenParticle = genPartList.at(0); HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); ASSERT_EQ(trkLink.cptr()->pdg_id(), -11); // Sanity check to confirm that we are linking to a positron as expected InDetSimData::Deposit deposit( trkLink, 0.0 ); @@ -896,11 +896,11 @@ namespace OverlayTesting { ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),sigElementHash).isSuccess()); bkgCollection.release(); // Now owned by inputBkgDataHandle - std::vector<HepMC::GenParticle*> genPartList; + std::vector<HepMC::GenParticlePtr> genPartList; initMcEventCollection(genPartList); SG::WriteHandle<InDetSimDataCollection> inputSigSDODataHandle{"StoreGateSvc+TRT_SDO_Map_SIG"}; inputSigSDODataHandle = std::make_unique<InDetSimDataCollection>(); - const HepMC::GenParticle* pGenParticle = genPartList.at(0); + auto pGenParticle = genPartList.at(0); HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); ASSERT_EQ(trkLink.cptr()->pdg_id(), -11); // Sanity check to confirm that we are linking to a positron as expected InDetSimData::Deposit deposit( trkLink, 0.0 ); diff --git a/Reconstruction/MissingETPerformance/src/FakeMissingETTool.cxx b/Reconstruction/MissingETPerformance/src/FakeMissingETTool.cxx index 2a6002fee7cb2d5137d45db7ced2ba2b9f7410c7..48ea69c163fa5aa47e3b331e60a4594a01a97bb5 100755 --- a/Reconstruction/MissingETPerformance/src/FakeMissingETTool.cxx +++ b/Reconstruction/MissingETPerformance/src/FakeMissingETTool.cxx @@ -745,7 +745,7 @@ StatusCode FakeMissingETTool::fakeMissingET(MissingETData *data, MissingETMuonDa bool fakeevent = false; //Loop over truth muons - for (std::vector<const HepMC::GenParticle*>::const_iterator it = truth_muons.begin(); it != truth_muons.end(); ++it ) { + for (auto it = truth_muons.begin(); it != truth_muons.end(); ++it ) { if ((*it)->momentum().perp() > 10.0*GeV) { //try to find a matching reco muon diff --git a/Reconstruction/MissingETPerformance/src/SplitElectronContainer.cxx b/Reconstruction/MissingETPerformance/src/SplitElectronContainer.cxx index b6e54c8b0a6b812a1c70621ae1a7ecbc7424a1f8..cf76352883e8b7c2c950af460a2debc65920a8a1 100644 --- a/Reconstruction/MissingETPerformance/src/SplitElectronContainer.cxx +++ b/Reconstruction/MissingETPerformance/src/SplitElectronContainer.cxx @@ -328,7 +328,7 @@ bool SplitElectronContainer::MatchTruthElectron(const Analysis::Electron* recoEl // look for mother if( (*pItr)->nParents() >=1 ){ - const HepMC::GenParticle* mother = (*pItr)->genMother(0); + auto mother = (*pItr)->genMother(0); if( mother->pdg_id() == 23){ diff --git a/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p1_test.cxx b/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p1_test.cxx index 9e3a2eb284234366e163fe3cb810e1e953cff35e..2f348f9b821a8f06d277dbbf72da22644862f8d8 100644 --- a/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p1_test.cxx +++ b/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p1_test.cxx @@ -64,10 +64,10 @@ void testit (const TrackParticleTruthCollection& trans1) } -void test1(std::vector<HepMC::GenParticle*> genPartVector) +void test1(std::vector<HepMC::GenParticlePtr> genPartVector) { std::cout << "test1\n"; - const HepMC::GenParticle *particle = genPartVector.at(0); + auto particle = genPartVector.at(0); // Create HepMcParticleLink outside of leak check. HepMcParticleLink dummyHMPL(HepMC::barcode(particle)); assert(dummyHMPL.cptr()==particle); @@ -77,7 +77,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) TrackParticleTruthCollection trans1 (DataLink<Rec::TrackParticleContainer>("tpc")); for (int i=0; i<10; i++) { - const HepMC::GenParticle* pGenParticle = genPartVector.at(i); + auto pGenParticle = genPartVector.at(i); HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); Rec::TrackParticleTruthKey key (ElementLink<Rec::TrackParticleContainer> ("tpc", i)); TrackParticleTruth val (trkLink, (float)i/10); @@ -91,7 +91,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) int main() { ISvcLocator* pSvcLoc = nullptr; - std::vector<HepMC::GenParticle*> genPartVector; + std::vector<HepMC::GenParticlePtr> genPartVector; if (!Athena_test::initMcEventCollection(pSvcLoc,genPartVector)) { std::cerr << "This test can not be run" << std::endl; return 0; diff --git a/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p2_test.cxx b/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p2_test.cxx index 491b0d01d1d4888a3b5a5e412d9726c89fe168cb..362d914fe850ca30c1034a162340b17d4335ce66 100644 --- a/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p2_test.cxx +++ b/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p2_test.cxx @@ -63,13 +63,13 @@ void testit (const TrackParticleTruthCollection& trans1) } -void test1(std::vector<HepMC::GenParticle*> genPartVector) +void test1(std::vector<HepMC::GenParticlePtr> genPartVector) { std::cout << "test1\n"; TrackParticleTruthCollection trans1 (DataLink<Rec::TrackParticleContainer>("tpc")); for (int i=0; i<10; i++) { - const HepMC::GenParticle* pGenParticle = genPartVector.at(i); + auto pGenParticle = genPartVector.at(i); HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); Rec::TrackParticleTruthKey key (ElementLink<Rec::TrackParticleContainer> ("tpc", i)); TrackParticleTruth val (trkLink, (float)i/10); @@ -83,7 +83,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) int main() { ISvcLocator* pSvcLoc = nullptr; - std::vector<HepMC::GenParticle*> genPartVector; + std::vector<HepMC::GenParticlePtr> genPartVector; if (!Athena_test::initMcEventCollection(pSvcLoc,genPartVector)) { std::cerr << "This test can not be run" << std::endl; return 0; diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p2_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p2_test.cxx index 473529490dbbc194f78857d1e8af9a4309ecdcfb..5dae2cff6e05966217459316efbd0e31c6d3979e 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p2_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p2_test.cxx @@ -62,13 +62,13 @@ void testit (const PRD_MultiTruthCollection& trans1) } -void test1(std::vector<HepMC::GenParticle*> genPartVector) +void test1(std::vector<HepMC::GenParticlePtr> genPartVector) { std::cout << "test1\n"; PRD_MultiTruthCollection trans1; for (int i=0; i<10; i++) { - const HepMC::GenParticle* pGenParticle = genPartVector.at(i); + auto pGenParticle = genPartVector.at(i); HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); const Identifier chanId(i+100); trans1.insert(trans1.end(), std::make_pair(chanId, trkLink) ); @@ -81,7 +81,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) int main() { ISvcLocator* pSvcLoc = nullptr; - std::vector<HepMC::GenParticle*> genPartVector; + std::vector<HepMC::GenParticlePtr> genPartVector; if (!Athena_test::initMcEventCollection(pSvcLoc,genPartVector)) { std::cerr << "This test can not be run" << std::endl; return 0; diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p3_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p3_test.cxx index cb045cd1532017018b70c4f0743cbfeaaa22b992..60dc1379d51041b14e7c97537d4ad1f13921c0b4 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p3_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p3_test.cxx @@ -62,13 +62,13 @@ void testit (const PRD_MultiTruthCollection& trans1) } -void test1(std::vector<HepMC::GenParticle*> genPartVector) +void test1(std::vector<HepMC::GenParticlePtr> genPartVector) { std::cout << "test1\n"; PRD_MultiTruthCollection trans1; for (int i=0; i<10; i++) { - const HepMC::GenParticle* pGenParticle = genPartVector.at(i); + auto pGenParticle = genPartVector.at(i); HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); const Identifier chanId(i+100); trans1.insert(trans1.end(), std::make_pair(chanId, trkLink) ); @@ -81,7 +81,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) int main() { ISvcLocator* pSvcLoc = nullptr; - std::vector<HepMC::GenParticle*> genPartVector; + std::vector<HepMC::GenParticlePtr> genPartVector; if (!Athena_test::initMcEventCollection(pSvcLoc,genPartVector)) { std::cerr << "This test can not be run" << std::endl; return 0; diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p1_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p1_test.cxx index 897c86486e267ea06cead8df2de2c328cf7521b9..4c479bc8f8b7b31067904970c6b3b73a659045ef 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p1_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p1_test.cxx @@ -63,13 +63,13 @@ void testit (const TrackTruthCollection& trans1) } -void test1(std::vector<HepMC::GenParticle*> genPartVector) +void test1(std::vector<HepMC::GenParticlePtr> genPartVector) { std::cout << "test1\n"; TrackTruthCollection trans1 (DataLink<TrackCollection>("tpc")); for (int i=0; i<10; i++) { - const HepMC::GenParticle* pGenParticle = genPartVector.at(i); + auto pGenParticle = genPartVector.at(i); HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); Trk::TrackTruthKey key (ElementLink<TrackCollection> ("tpc", i)); TrackTruth val (trkLink, (float)i/10); @@ -83,7 +83,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) int main() { ISvcLocator* pSvcLoc = nullptr; - std::vector<HepMC::GenParticle*> genPartVector; + std::vector<HepMC::GenParticlePtr> genPartVector; if (!Athena_test::initMcEventCollection(pSvcLoc,genPartVector)) { std::cerr << "This test can not be run" << std::endl; return 0; diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p2_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p2_test.cxx index 2f72443016544ca5b980224130336ec5721a5f38..bcd51354a68285dad758c29540e55262907fc9ab 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p2_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p2_test.cxx @@ -63,13 +63,13 @@ void testit (const TrackTruthCollection& trans1) } -void test1(std::vector<HepMC::GenParticle*> genPartVector) +void test1(std::vector<HepMC::GenParticlePtr> genPartVector) { std::cout << "test1\n"; TrackTruthCollection trans1 (DataLink<TrackCollection>("tpc")); for (int i=0; i<10; i++) { - const HepMC::GenParticle* pGenParticle = genPartVector.at(i); + auto pGenParticle = genPartVector.at(i); HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); Trk::TrackTruthKey key (ElementLink<TrackCollection> ("tpc", i)); TrackTruth val (trkLink, (float)i/10); @@ -83,7 +83,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) int main() { ISvcLocator* pSvcLoc = nullptr; - std::vector<HepMC::GenParticle*> genPartVector; + std::vector<HepMC::GenParticlePtr> genPartVector; if (!Athena_test::initMcEventCollection(pSvcLoc,genPartVector)) { std::cerr << "This test can not be run" << std::endl; return 0; diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p1_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p1_test.cxx index 853cf92d669dac95fc7f8f540a74857e8e748c42..97795b47be104a1f95e096afc5f0e3abb5fdc31a 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p1_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p1_test.cxx @@ -60,13 +60,13 @@ void testit (const TruthTrajectory& trans1) } -void test1(std::vector<HepMC::GenParticle*> genPartVector) +void test1(std::vector<HepMC::GenParticlePtr> genPartVector) { std::cout << "test1\n"; TruthTrajectory trans1; for (int i=0; i<10; i++) { - const HepMC::GenParticle* pGenParticle = genPartVector.at(i); + auto pGenParticle = genPartVector.at(i); HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); trans1.push_back(trkLink); } @@ -78,7 +78,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) int main() { ISvcLocator* pSvcLoc = nullptr; - std::vector<HepMC::GenParticle*> genPartVector; + std::vector<HepMC::GenParticlePtr> genPartVector; if (!Athena_test::initMcEventCollection(pSvcLoc,genPartVector)) { std::cerr << "This test can not be run" << std::endl; return 0; diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p2_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p2_test.cxx index 48dd594c325e58b5d95245cd31f0ff8c9a84e7a4..1a1afae093b2e9ed460ea5f1121fbc48946323e1 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p2_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p2_test.cxx @@ -60,13 +60,13 @@ void testit (const TruthTrajectory& trans1) } -void test1(std::vector<HepMC::GenParticle*> genPartVector) +void test1(std::vector<HepMC::GenParticlePtr> genPartVector) { std::cout << "test1\n"; TruthTrajectory trans1; for (int i=0; i<10; i++) { - const HepMC::GenParticle* pGenParticle = genPartVector.at(i); + auto pGenParticle = genPartVector.at(i); HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); trans1.push_back(trkLink); } @@ -78,7 +78,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) int main() { ISvcLocator* pSvcLoc = nullptr; - std::vector<HepMC::GenParticle*> genPartVector; + std::vector<HepMC::GenParticlePtr> genPartVector; if (!Athena_test::initMcEventCollection(pSvcLoc,genPartVector)) { std::cerr << "This test can not be run" << std::endl; return 0; diff --git a/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthCnv_p1_test.cxx b/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthCnv_p1_test.cxx index dde73ed0f0298b50b27b42b106bc9902839005c8..9775277e6baa053339b7cab695e591148689bf54 100644 --- a/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthCnv_p1_test.cxx +++ b/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthCnv_p1_test.cxx @@ -49,7 +49,7 @@ public: } - static void set (TrigInDetTrackTruth& p, std::vector<HepMC::GenParticle*>& genPartVector) + static void set (TrigInDetTrackTruth& p, std::vector<HepMC::GenParticlePtr>& genPartVector) { int nstat = 4; p.m_nr_common_hits.resize (nstat); @@ -88,10 +88,10 @@ void testit (const TrigInDetTrackTruth& trans1) } -void test1(std::vector<HepMC::GenParticle*>& genPartVector) +void test1(std::vector<HepMC::GenParticlePtr>& genPartVector) { std::cout << "test1\n"; - const HepMC::GenParticle *particle = genPartVector.at(0); + auto particle = genPartVector.at(0); // Create HepMcParticleLink outside of leak check. HepMcParticleLink dummyHMPL(HepMC::barcode(particle),particle->parent_event()->event_number()); assert(dummyHMPL.cptr()==particle); @@ -107,7 +107,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) int main() { ISvcLocator* pSvcLoc = nullptr; - std::vector<HepMC::GenParticle*> genPartVector; + std::vector<HepMC::GenParticlePtr> genPartVector; if (!Athena_test::initMcEventCollection(pSvcLoc, genPartVector)) { std::cerr << "This test can not be run" << std::endl; return 0; diff --git a/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthMapCnv_p1_test.cxx b/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthMapCnv_p1_test.cxx index c671675ed0d1f26b116b54f8bde5a23714611a31..e8a93cfa45d9748e448d47310ca14fa87b784806 100644 --- a/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthMapCnv_p1_test.cxx +++ b/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthMapCnv_p1_test.cxx @@ -51,7 +51,7 @@ public: } - static void set (TrigInDetTrackTruth& p, std::vector<HepMC::GenParticle*>& genPartVector, int ndx) + static void set (TrigInDetTrackTruth& p, std::vector<HepMC::GenParticlePtr>& genPartVector, int ndx) { int nstat = 1; p.m_nr_common_hits.resize (nstat); @@ -101,10 +101,10 @@ void testit (const TrigInDetTrackTruthMap& trans1) } -void test1(std::vector<HepMC::GenParticle*>& genPartVector) +void test1(std::vector<HepMC::GenParticlePtr>& genPartVector) { std::cout << "test1\n"; - const HepMC::GenParticle *particle = genPartVector.at(0); + auto particle = genPartVector.at(0); // Create HepMcParticleLink outside of leak check. HepMcParticleLink dummyHMPL(HepMC::barcode(particle),particle->parent_event()->event_number()); assert(dummyHMPL.cptr()==particle); @@ -145,7 +145,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) int main() { ISvcLocator* pSvcLoc = nullptr; - std::vector<HepMC::GenParticle*> genPartVector; + std::vector<HepMC::GenParticlePtr> genPartVector; if (!Athena_test::initMcEventCollection(pSvcLoc, genPartVector)) { std::cerr << "This test can not be run" << std::endl; return 0;