11 DDsvalues_type::const_iterator sit = sv.begin();
12 DDsvalues_type::const_iterator sed = sv.end();
14 if (target.back()<sv.front()) {
15 target.insert(target.end(),sit,sed);
18 if (sv.back()<target.front()) {
19 target.insert(target.begin(),sit,sed);
23 DDsvalues_type::iterator it = std::lower_bound(target.begin(),target.end(),sv.front());
24 if (it == std::lower_bound(target.begin(),target.end(),sv.back())) {
25 target.insert(it,sit,sed);
30 target.reserve(target.size()+sv.size());
31 DDsvalues_type::const_iterator ted = target.end();
32 for (; sit != sed; ++sit) {
33 DDsvalues_type::const_iterator it =
find(target.begin(),ted, (*sit).first);
35 else target.emplace_back(*sit);
37 if (sortit) std::sort(target.begin(),target.end());
43 DDsvalues_type::const_iterator it = s.begin();
44 for(; it != s.end(); ++it) {
58 std::ostream & operator<<(std::ostream & os , const std::vector<const DDsvalues_type*> &
v)
60 for (
const auto &
i :
v) {
84 DDsvalues_type::const_iterator it =
find(*p, v);
93 unsigned int DDfetch(
const std::vector<const DDsvalues_type *> & sp,
DDValue & toFetch, std::vector<DDValue> &
result)
95 unsigned int count = 0;
96 for(
const auto & it : sp ) {
98 result.emplace_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