Skip to content

Commit

Permalink
Merge pull request #903 from gartung/argsize-L1Trigger-GlobalCaloTrigger
Browse files Browse the repository at this point in the history
Misc cleanups -- Change args from pass by value to pass by const reference in L1Trigger/GlobalCaloTrigger
  • Loading branch information
ktf committed Sep 25, 2013
2 parents 00a2388 + 2c4452b commit f92593c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions L1Trigger/GlobalCaloTrigger/interface/L1GctJetFinalStage.h
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
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
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
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

0 comments on commit f92593c

Please sign in to comment.