Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -19,9 +19,8 @@ inline T* find_named(const std::vector<T*>& a_vec,const std::string& a_name) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
template <class T>
|
||||
inline const T* find_named_(const std::vector<T>& a_vec,const std::string& a_name) {
|
||||
inline const T* find_obj_named(const std::vector<T>& a_vec,const std::string& a_name) { //used in hep/pdgs.
|
||||
typedef typename std::vector<T>::const_iterator it_t;
|
||||
it_t it;
|
||||
for(it=a_vec.begin();it!=a_vec.end();++it) {
|
||||
@@ -29,7 +28,15 @@ inline const T* find_named_(const std::vector<T>& a_vec,const std::string& a_nam
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
template <class T>
|
||||
inline T* find_obj_named(std::vector<T>& a_vec,const std::string& a_name) { //used in hep/pdgs.
|
||||
typedef typename std::vector<T>::iterator it_t;
|
||||
it_t it;
|
||||
for(it=a_vec.begin();it!=a_vec.end();++it) {
|
||||
if((*it).name()==a_name) return &(*it);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user