diff --git a/StRoot/StPicoEvent/StPicoEvent.cxx b/StRoot/StPicoEvent/StPicoEvent.cxx index f39454a0013..2913c2572ed 100644 --- a/StRoot/StPicoEvent/StPicoEvent.cxx +++ b/StRoot/StPicoEvent/StPicoEvent.cxx @@ -360,8 +360,6 @@ void StPicoEvent::setETofGoodEventFlag( std::vector flagVec ) { if( flagVec.size() != 108 ){ LOG_INFO << "StPicoEvent::setETofGoodEventFlag() - eTof flag vector wrong size " << flagVec.size() <<" / 108"<< endm; }else{ - for( auto iterCounter : flagVec ){ - mETofGoodEventFlag[iterCounter] = flagVec[iterCounter]; - } + std::copy(flagVec.begin(), flagVec.end(), mETofGoodEventFlag); } }