From 2c4452bd2790cfa6fdc54748a50c5f90e3bf02fd Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Mon, 23 Sep 2013 12:42:00 -0500 Subject: [PATCH] change args from pass by value to pass by const reference --- .../GlobalCaloTrigger/interface/L1GctJetFinalStage.h | 8 ++++---- L1Trigger/GlobalCaloTrigger/interface/L1GctWheelJetFpga.h | 4 ++-- L1Trigger/GlobalCaloTrigger/src/L1GctJetFinalStage.cc | 8 ++++---- L1Trigger/GlobalCaloTrigger/src/L1GctWheelJetFpga.cc | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctJetFinalStage.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctJetFinalStage.h index 0743a671fd071..4b732e1e1c3d0 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctJetFinalStage.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctJetFinalStage.h @@ -42,9 +42,9 @@ class L1GctJetFinalStage : public L1GctProcessor /// process the data, fill output buffers virtual void process(); - void setInputCentralJet(int i, L1GctJetCand jet); ///< set the central jets input data - void setInputForwardJet(int i, L1GctJetCand jet); ///< set the forward jets input data - void setInputTauJet(int i, L1GctJetCand jet); ///< set the tau jets input data + void setInputCentralJet(int i, const L1GctJetCand& jet); ///< set the central jets input data + void setInputForwardJet(int i, const L1GctJetCand& jet); ///< set the forward jets input data + void setInputTauJet(int i, const L1GctJetCand& jet); ///< set the tau jets input data JetVector getInputCentralJets() const { return m_inputCentralJets; } ///< get the central jets input data JetVector getInputForwardJets() const { return m_inputForwardJets; } ///< get the forward jets input data @@ -91,7 +91,7 @@ class L1GctJetFinalStage : public L1GctProcessor //PRIVATE MEMBER FUNCTIONS ///Enters jets into the specified storageVector, according to which wheel card we are taking them from. - void storeJets(JetVector& storageVector, JetVector jets, unsigned short iWheel); + void storeJets(JetVector& storageVector, const JetVector& jets, unsigned short iWheel); }; diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctWheelJetFpga.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctWheelJetFpga.h index 0a1e28cf31c50..2616252559744 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctWheelJetFpga.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctWheelJetFpga.h @@ -59,7 +59,7 @@ class L1GctWheelJetFpga : public L1GctProcessor virtual void process(); /// set input data - void setInputJet(int i, L1GctJetCand jet); + void setInputJet(int i, const L1GctJetCand& jet); /// get the input jets. Jets 0-5 from leaf card 0, jetfinderA. Jets 6-11 from leaf card 0, jetfinder B... etc. JetVector getInputJets() const { return m_inputJets; } @@ -149,7 +149,7 @@ class L1GctWheelJetFpga : public L1GctProcessor /// Check the setup, independently of how we have been constructed bool checkSetup() const; /// Puts the output from a jetfinder into the correct index range of the m_inputJets array. - void storeJets(JetVector jets, unsigned short iLeaf, unsigned short offset); + void storeJets(const JetVector& jets, unsigned short iLeaf, unsigned short offset); /// Classifies jets into central, forward or tau. void classifyJets(); /// Initialises all the jet vectors with jets of the correct type. diff --git a/L1Trigger/GlobalCaloTrigger/src/L1GctJetFinalStage.cc b/L1Trigger/GlobalCaloTrigger/src/L1GctJetFinalStage.cc index 43f2ba7277b8c..1f4ff0b34f621 100644 --- a/L1Trigger/GlobalCaloTrigger/src/L1GctJetFinalStage.cc +++ b/L1Trigger/GlobalCaloTrigger/src/L1GctJetFinalStage.cc @@ -149,7 +149,7 @@ void L1GctJetFinalStage::process() } } -void L1GctJetFinalStage::setInputCentralJet(int i, L1GctJetCand jet) +void L1GctJetFinalStage::setInputCentralJet(int i, const L1GctJetCand& jet) { if( ((jet.isCentral() && jet.bx() == bxAbs()) || jet.empty()) && (i >= 0 && i < MAX_JETS_IN)) @@ -158,7 +158,7 @@ void L1GctJetFinalStage::setInputCentralJet(int i, L1GctJetCand jet) } } -void L1GctJetFinalStage::setInputForwardJet(int i, L1GctJetCand jet) +void L1GctJetFinalStage::setInputForwardJet(int i, const L1GctJetCand& jet) { if( ((jet.isForward() && jet.bx() == bxAbs()) || jet.empty()) && (i >= 0 && i < MAX_JETS_IN)) @@ -167,7 +167,7 @@ void L1GctJetFinalStage::setInputForwardJet(int i, L1GctJetCand jet) } } -void L1GctJetFinalStage::setInputTauJet(int i, L1GctJetCand jet) +void L1GctJetFinalStage::setInputTauJet(int i, const L1GctJetCand& jet) { if( ((jet.isTau() && jet.bx() == bxAbs()) || jet.empty()) && (i >= 0 && i < MAX_JETS_IN)) @@ -176,7 +176,7 @@ void L1GctJetFinalStage::setInputTauJet(int i, L1GctJetCand jet) } } -void L1GctJetFinalStage::storeJets(JetVector& storageVector, JetVector jets, unsigned short iWheel) +void L1GctJetFinalStage::storeJets(JetVector& storageVector, const JetVector& jets, unsigned short iWheel) { for(unsigned short iJet = 0; iJet < L1GctWheelJetFpga::MAX_JETS_OUT; ++iJet) { diff --git a/L1Trigger/GlobalCaloTrigger/src/L1GctWheelJetFpga.cc b/L1Trigger/GlobalCaloTrigger/src/L1GctWheelJetFpga.cc index ecce64db833ff..d88153058a312 100644 --- a/L1Trigger/GlobalCaloTrigger/src/L1GctWheelJetFpga.cc +++ b/L1Trigger/GlobalCaloTrigger/src/L1GctWheelJetFpga.cc @@ -221,7 +221,7 @@ void L1GctWheelJetFpga::process() } -void L1GctWheelJetFpga::setInputJet(int i, L1GctJetCand jet) +void L1GctWheelJetFpga::setInputJet(int i, const L1GctJetCand& jet) { if(i >=0 && i < MAX_JETS_IN) { @@ -253,7 +253,7 @@ std::vector< L1GctInternHtMiss > L1GctWheelJetFpga::getInternalHtMiss() const return result; } -void L1GctWheelJetFpga::storeJets(JetVector jets, unsigned short iLeaf, unsigned short offset) +void L1GctWheelJetFpga::storeJets(const JetVector& jets, unsigned short iLeaf, unsigned short offset) { for(unsigned short iJet = 0; iJet < L1GctJetFinderBase::MAX_JETS_OUT; ++iJet) {