Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change args from pass by value to pass by const reference #903

Merged
merged 1 commit into from
Sep 25, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions L1Trigger/GlobalCaloTrigger/interface/L1GctJetFinalStage.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

};

Expand Down
4 changes: 2 additions & 2 deletions L1Trigger/GlobalCaloTrigger/interface/L1GctWheelJetFpga.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions L1Trigger/GlobalCaloTrigger/src/L1GctJetFinalStage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))
Expand All @@ -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))
Expand All @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions L1Trigger/GlobalCaloTrigger/src/L1GctWheelJetFpga.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down