CMS 3D CMS Logo

Parentage.cc
Go to the documentation of this file.
3 #include <ostream>
4 #include <sstream>
5 
6 /*----------------------------------------------------------------------
7 
8 ----------------------------------------------------------------------*/
9 
10 namespace edm {
11  Parentage::Parentage() : parents_() {
12  }
13 
14  Parentage::Parentage(std::vector<BranchID> const& parents) :
15  parents_(parents) {
16  }
17 
18  Parentage::Parentage(std::vector<BranchID>&& parents) :
20  }
21 
23  Parentage::id() const {
24  std::ostringstream oss;
25  for (auto const& parent : parents_) {
26  oss << parent << ' ';
27  }
28 
29  std::string stringrep = oss.str();
30  cms::Digest md5alg(stringrep);
31  ParentageID id(md5alg.digest().toString());
32  return id;
33  }
34 
35  void
36  Parentage::write(std::ostream&) const {
37  // This is grossly inadequate, but it is not critical for the
38  // first pass.
39  }
40 
41  bool
42  operator==(Parentage const& a, Parentage const& b) {
43  return a.parents() == b.parents();
44  }
45 }
void write(std::ostream &os) const
Definition: Parentage.cc:36
std::vector< BranchID > parents_
Definition: Parentage.h:56
ParentageID id() const
Definition: Parentage.cc:23
MD5Result digest() const
Definition: Digest.cc:171
std::vector< BranchID > const & parents() const
Definition: Parentage.h:44
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
std::string toString() const
Definition: Digest.cc:95
double b
Definition: hdecay.h:120
HLT enums.
double a
Definition: hdecay.h:121
def move(src, dest)
Definition: eostools.py:511