Main Page
Namespaces
Classes
Package Documentation
DataFormats
Provenance
src
Parentage.cc
Go to the documentation of this file.
1
#include "
DataFormats/Provenance/interface/Parentage.h
"
2
#include "
FWCore/Utilities/interface/Digest.h
"
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
) :
19
parents_
(
std
::
move
(
parents
)) {
20
}
21
22
ParentageID
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
}
edm::Parentage
Definition:
Parentage.h:25
edm::Parentage::write
void write(std::ostream &os) const
Definition:
Parentage.cc:36
edm::Hash< ParentageType >
edm::Parentage::parents_
std::vector< BranchID > parents_
Definition:
Parentage.h:56
edm::Parentage::id
ParentageID id() const
Definition:
Parentage.cc:23
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
std
Definition:
JetResolutionObject.h:80
cms::Digest::digest
MD5Result digest() const
Definition:
Digest.cc:171
edm::Parentage::parents
std::vector< BranchID > const & parents() const
Definition:
Parentage.h:44
edm::operator==
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
Definition:
debugging_allocator.h:72
Digest.h
cms::MD5Result::toString
std::string toString() const
Definition:
Digest.cc:95
cms::Digest
Definition:
Digest.h:46
b
double b
Definition:
hdecay.h:120
edm::Parentage::Parentage
Parentage()
Definition:
Parentage.cc:11
edm
HLT enums.
Definition:
AlignableModifier.h:17
a
double a
Definition:
hdecay.h:121
class-composition.parent
parent
Definition:
class-composition.py:88
Parentage.h
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Generated for CMSSW Reference Manual by
1.8.11