10 DDsvalues_type::const_iterator sit = sv.begin();
11 DDsvalues_type::const_iterator sed = sv.end();
13 if (target.back()<sv.front()) {
14 target.insert(target.end(),sit,sed);
17 if (sv.back()<target.front()) {
18 target.insert(target.begin(),sit,sed);
22 DDsvalues_type::iterator it = std::lower_bound(target.begin(),target.end(),sv.front());
23 if (it == std::lower_bound(target.begin(),target.end(),sv.back())) {
24 target.insert(it,sit,sed);
29 target.reserve(target.size()+sv.size());
30 DDsvalues_type::const_iterator ted = target.end();
31 for (; sit != sed; ++sit) {
32 DDsvalues_type::const_iterator it =
find(target.begin(),ted, (*sit).first);
34 else target.push_back(*sit);
36 if (sortit) std::sort(target.begin(),target.end());
42 DDsvalues_type::const_iterator it = s.begin();
43 for(; it != s.end(); ++it) {
57 std::ostream & operator<<(std::ostream & os , const std::vector<const DDsvalues_type*> &
v)
59 for (
unsigned int i=0;
i<
v.size() ; ++
i) {
83 DDsvalues_type::const_iterator it =
find(*p, v);
92 unsigned int DDfetch(
const std::vector<const DDsvalues_type *> &
sp,
DDValue & toFetch, std::vector<DDValue> &
result)
94 unsigned int count = 0;
95 for(
const auto & it : sp ) {
97 result.push_back(toFetch);
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void merge(DDsvalues_type &target, DDsvalues_type const &sv, bool sortit)
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
std::ostream & operator<<(std::ostream &os, const DDsvalues_type &s)
bool DDfetch(const DDsvalues_type *p, DDValue &v)
helper for retrieving DDValues from DDsvalues_type *.
DDsvalues_type::value_type DDsvalues_Content_type