From cc9d046878872e503dab591e4ac66067fc9d76f9 Mon Sep 17 00:00:00 2001 From: inugent Date: Thu, 29 Aug 2013 14:44:51 +0200 Subject: [PATCH 1/5] patch for std namspace bug --- .../ExternalDecays/interface/read_particles_from_HepMC.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/GeneratorInterface/ExternalDecays/interface/read_particles_from_HepMC.h b/GeneratorInterface/ExternalDecays/interface/read_particles_from_HepMC.h index 2db8393a8dd21..15f81ae393ee7 100644 --- a/GeneratorInterface/ExternalDecays/interface/read_particles_from_HepMC.h +++ b/GeneratorInterface/ExternalDecays/interface/read_particles_from_HepMC.h @@ -8,7 +8,6 @@ #include "TauSpinner/SimpleParticle.h" #include -using namespace std; using namespace TauSpinner; /** Read HepMC::GenEvent. @@ -29,12 +28,12 @@ using namespace TauSpinner; 0 - event processed correctly 1 - empty event or no decay found in the event */ -int readParticlesFromHepMC(const HepMC::GenEvent *event, SimpleParticle &X, SimpleParticle &tau, SimpleParticle &tau2, vector &tau_daughters, vector &tau2_daughters); +int readParticlesFromHepMC(const HepMC::GenEvent *event, SimpleParticle &X, SimpleParticle &tau, SimpleParticle &tau2, std::vector &tau_daughters, std::vector &tau2_daughters); /** Get daughters of HepMC::GenParticle Recursively searches for final-state daughters of 'x' */ -vector *getDaughters(HepMC::GenParticle *x); +std::vector *getDaughters(HepMC::GenParticle *x); /** Find last self From efea10825d40688e06fbc70010901ca89b63abe9 Mon Sep 17 00:00:00 2001 From: inugent Date: Thu, 29 Aug 2013 14:45:00 +0200 Subject: [PATCH 2/5] patch for std namspace bug --- .../src/read_particles_from_HepMC.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/GeneratorInterface/ExternalDecays/src/read_particles_from_HepMC.cc b/GeneratorInterface/ExternalDecays/src/read_particles_from_HepMC.cc index 5d68ec2b6724f..e075b8b9ccbd4 100644 --- a/GeneratorInterface/ExternalDecays/src/read_particles_from_HepMC.cc +++ b/GeneratorInterface/ExternalDecays/src/read_particles_from_HepMC.cc @@ -5,9 +5,9 @@ Recursively searches for final-state daughters of 'x' *******************************************************************************/ -inline vector *getDaughters(HepMC::GenParticle *x) +inline std::vector *getDaughters(HepMC::GenParticle *x) { - vector *daughters = new vector(); + std::vector *daughters = new std::vector(); if(!x->end_vertex()) return daughters; // Check decay products of 'x' @@ -20,7 +20,7 @@ inline vector *getDaughters(HepMC::GenParticle *x) // all of its daughters. if( pp->end_vertex() && pp->pdg_id()!=111) { - vector *sub_daughters = getDaughters(pp); + std::vector *sub_daughters = getDaughters(pp); daughters->insert(daughters->end(),sub_daughters->begin(),sub_daughters->end()); delete sub_daughters; @@ -84,7 +84,7 @@ inline bool isFirst(HepMC::GenParticle *x){ Event will continue to be processed with next function call. *******************************************************************************/ -int readParticlesFromHepMC(const HepMC::GenEvent *event, SimpleParticle &X, SimpleParticle &tau, SimpleParticle &tau2, vector &tau_daughters, vector &tau2_daughters) +int readParticlesFromHepMC(const HepMC::GenEvent *event, SimpleParticle &X, SimpleParticle &tau, SimpleParticle &tau2, std::vector &tau_daughters, std::vector &tau2_daughters) { if(event==NULL) return 1; @@ -118,7 +118,7 @@ int readParticlesFromHepMC(const HepMC::GenEvent *event, SimpleParticle &X, Simp else if(!hTau2) hTau2 = *it2; else { - cout<<"TauSpiner: three taus in one decay"<pdg_id()); // Create list of tau daughters - vector *buf = getDaughters(hTau); + std::vector *buf = getDaughters(hTau); tau_daughters.clear(); tau_daughters.insert(tau_daughters.end(),buf->begin(),buf->end()); From 702ac377b57f4eb5c02ebd0377750da4e5aa5f3f Mon Sep 17 00:00:00 2001 From: inugent Date: Thu, 29 Aug 2013 14:45:13 +0200 Subject: [PATCH 3/5] patch for std namspace bug --- GeneratorInterface/ExternalDecays/interface/TauSpinnerCMS.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/GeneratorInterface/ExternalDecays/interface/TauSpinnerCMS.h b/GeneratorInterface/ExternalDecays/interface/TauSpinnerCMS.h index e65d8b8cc53cf..11ddf00f18bbd 100755 --- a/GeneratorInterface/ExternalDecays/interface/TauSpinnerCMS.h +++ b/GeneratorInterface/ExternalDecays/interface/TauSpinnerCMS.h @@ -33,7 +33,6 @@ #include "TauSpinner/SimpleParticle.h" using namespace edm; -using namespace std; using namespace TauSpinner; class TauSpinnerCMS : public edm::EDProducer @@ -55,7 +54,7 @@ class TauSpinnerCMS : public edm::EDProducer bool isReco_; bool isTauolaConfigured_; bool isLHPDFConfigured_; - string LHAPDFname_; + std::string LHAPDFname_; double CMSEnergy_; edm::InputTag gensrc_; int MotherPDGID_,Ipol_,nonSM2_,nonSMN_; From 9fb5251548685ee04a5a62589d98578affb3a213 Mon Sep 17 00:00:00 2001 From: inugent Date: Thu, 29 Aug 2013 14:45:21 +0200 Subject: [PATCH 4/5] patch for std namspace bug --- GeneratorInterface/ExternalDecays/plugins/TauSpinnerCMS.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GeneratorInterface/ExternalDecays/plugins/TauSpinnerCMS.cc b/GeneratorInterface/ExternalDecays/plugins/TauSpinnerCMS.cc index 41d8f44d544e9..3f70723f7f87b 100755 --- a/GeneratorInterface/ExternalDecays/plugins/TauSpinnerCMS.cc +++ b/GeneratorInterface/ExternalDecays/plugins/TauSpinnerCMS.cc @@ -53,7 +53,7 @@ void TauSpinnerCMS::produce( edm::Event& e, const edm::EventSetup& iSetup){ double WTFlip=1.0; double polSM=-999; //range [-1,1] SimpleParticle X, tau, tau2; - vector tau_daughters, tau_daughters2; + std::vector tau_daughters, tau_daughters2; int stat(0); if(isReco_){ stat=readParticlesfromReco(e,X,tau,tau2,tau_daughters,tau_daughters2); From 1240218dec75bac5d9ee594aa26e708613f1528b Mon Sep 17 00:00:00 2001 From: inugent Date: Thu, 29 Aug 2013 15:25:36 +0200 Subject: [PATCH 5/5] patch for std namspace bug --- .../ExternalDecays/src/read_particles_from_HepMC.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/GeneratorInterface/ExternalDecays/src/read_particles_from_HepMC.cc b/GeneratorInterface/ExternalDecays/src/read_particles_from_HepMC.cc index e075b8b9ccbd4..fc89fef23be5b 100644 --- a/GeneratorInterface/ExternalDecays/src/read_particles_from_HepMC.cc +++ b/GeneratorInterface/ExternalDecays/src/read_particles_from_HepMC.cc @@ -1,4 +1,5 @@ #include "GeneratorInterface/ExternalDecays/interface/read_particles_from_HepMC.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" /******************************************************************************* Get daughters of HepMC::GenParticle @@ -118,7 +119,8 @@ int readParticlesFromHepMC(const HepMC::GenEvent *event, SimpleParticle &X, Simp else if(!hTau2) hTau2 = *it2; else { - std::cout<<"TauSpiner: three taus in one decay"<