CMS 3D CMS Logo

DDsvalues.h
Go to the documentation of this file.
1 #ifndef DETECTOR_DESCRIPTION_CORE_DDSVALUES_H
2 #define DETECTOR_DESCRIPTION_CORE_DDSVALUES_H
3 
4 #include <algorithm>
5 #include <map>
6 #include <ostream>
7 #include <utility>
8 #include <vector>
9 
11 
12 using DDsvalues_type = std::vector<std::pair<unsigned int, DDValue> >;
14 
16  return lh.first < rh.first;
17 }
18 
19 inline DDsvalues_type::const_iterator find(DDsvalues_type::const_iterator begin,
20  DDsvalues_type::const_iterator end,
21  unsigned int id) {
22  static const DDValue dummy;
24  DDsvalues_type::const_iterator it = std::lower_bound(begin, end, v);
25  if (it != end && (*it).first == id)
26  return it;
27  return end;
28 }
29 
30 inline DDsvalues_type::const_iterator find(DDsvalues_type const &sv, unsigned int id) {
31  return find(sv.begin(), sv.end(), id);
32 }
33 
34 void merge(DDsvalues_type &target, DDsvalues_type const &sv, bool sortit = true);
35 
37 bool DDfetch(const DDsvalues_type *, DDValue &);
38 
40 unsigned int DDfetch(const std::vector<const DDsvalues_type *> &sp, DDValue &toFetch, std::vector<DDValue> &result);
41 
42 std::ostream &operator<<(std::ostream &, const DDsvalues_type &);
43 std::ostream &operator<<(std::ostream &, const std::vector<const DDsvalues_type *> &);
44 
45 #endif
operator<<
std::ostream & operator<<(std::ostream &, const DDsvalues_type &)
Definition: DDsvalues.cc:42
mathSSE::lh
bool int lh
Definition: SIMDVec.h:20
findQualityFiles.v
v
Definition: findQualityFiles.py:179
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:352
mps_fire.end
end
Definition: mps_fire.py:242
DDfetch
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:79
DDValue.h
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:15
DDsvalues_Content_type
DDsvalues_type::value_type DDsvalues_Content_type
Definition: DDsvalues.h:13
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
DDValue
Definition: DDValue.h:21
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
operator<
bool operator<(const DDsvalues_Content_type &lh, const DDsvalues_Content_type &rh)
Definition: DDsvalues.h:15
merge
void merge(DDsvalues_type &target, DDsvalues_type const &sv, bool sortit=true)
Definition: DDsvalues.cc:5
find
DDsvalues_type::const_iterator find(DDsvalues_type::const_iterator begin, DDsvalues_type::const_iterator end, unsigned int id)
Definition: DDsvalues.h:19
filterCSVwithJSON.target
target
Definition: filterCSVwithJSON.py:32
mps_fire.result
result
Definition: mps_fire.py:311
dummy
Definition: DummySelector.h:38
DDsvalues_type
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12