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
end
#define end
Definition: vmac.h:39
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:226
DDfetch
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:79
DDValue.h
cuda_std::lower_bound
__host__ constexpr __device__ RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
Definition: cudastdAlgorithm.h:27
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:303
dummy
Definition: DummySelector.h:38
DDsvalues_type
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
begin
#define begin
Definition: vmac.h:32