diff --git a/LArCalorimeter/LArRawEvent/LArRawEvent/LArRawSC.h b/LArCalorimeter/LArRawEvent/LArRawEvent/LArRawSC.h index 94f115f85c62e536778485415add7f84b4f72372..149b38a1f27841e93ffe19294579e8a44f858a03 100755 --- a/LArCalorimeter/LArRawEvent/LArRawEvent/LArRawSC.h +++ b/LArCalorimeter/LArRawEvent/LArRawEvent/LArRawSC.h @@ -43,7 +43,7 @@ class LArRawSC { @param[in] gain_value Gain @param[in] sample_value Reference of vector with ADC samples */ - LArRawSC(const HWIdentifier & channel_value, const short chan, const unsigned int sourceId, const std::vector < int > & energies, const std::vector<unsigned short> bcids, std::vector<bool> satur): + LArRawSC(const HWIdentifier & channel_value, const short chan, const unsigned int sourceId, const std::vector < int > & energies, const std::vector<unsigned short>& bcids, std::vector<bool>& satur): m_hardwareID(channel_value), m_chan(chan),m_sourceId(sourceId), m_energies(energies), m_BCId(bcids), m_satur(satur) {} LArRawSC(const HWIdentifier & channel_value, @@ -87,12 +87,12 @@ class LArRawSC { /** @brief Set energies . @param[in] samples vector of energies */ - void setEnergies( std::vector < int > energies); + void setEnergies( const std::vector < int >& energies); /** @brief Set bcids. @param[in] samples vector of bcids */ - void setBCIds( std::vector < unsigned short > bcids); + void setBCIds( const std::vector < unsigned short >& bcids); /** @brief Destructor */ virtual ~LArRawSC() { } diff --git a/LArCalorimeter/LArRawEvent/src/LArRawSC.cxx b/LArCalorimeter/LArRawEvent/src/LArRawSC.cxx index f09c03c9ce75829f65a09ee5d8cd42bbbd2b43f9..2f38bcff07a470a9112fe21d7e927a93bebb0476 100755 --- a/LArCalorimeter/LArRawEvent/src/LArRawSC.cxx +++ b/LArCalorimeter/LArRawEvent/src/LArRawSC.cxx @@ -35,14 +35,12 @@ LArRawSC::operator std::string() const{ } // set method -void LArRawSC::setEnergies(std::vector<int> energies) +void LArRawSC::setEnergies(const std::vector<int>& energies) { - m_energies.clear(); m_energies = energies; } -void LArRawSC::setBCIds(std::vector<unsigned short> bcids) +void LArRawSC::setBCIds(const std::vector<unsigned short>& bcids) { - m_BCId.clear(); m_BCId = bcids; } diff --git a/LArCalorimeter/LArRawEvent/src/LArRawSCContainer.cxx b/LArCalorimeter/LArRawEvent/src/LArRawSCContainer.cxx index 1117287a7662d62350d5c1ba27f5b237ac425e6f..144286241c5ac4d7c14701a8f26459e20aabc005 100755 --- a/LArCalorimeter/LArRawEvent/src/LArRawSCContainer.cxx +++ b/LArCalorimeter/LArRawEvent/src/LArRawSCContainer.cxx @@ -24,12 +24,8 @@ LArRawSCContainer::operator std::string () const { LArRawSCContainer::const_iterator it ; int counter = 0 ; - const LArRawSC * digit ; - - for(it = this->begin() ; it != this->end() ; it++ ){ // Loop over Hits - - digit = *it ; - + + for (const LArRawSC * digit : *this) { // Loop over Hits sprintf( stCounter , "%d" , counter ) ; digitContainerString += "LArRawSC[" ;