File indexing completed on 2025-01-31 02:19:10
0001 #include "DataFormats/Provenance/interface/StableProvenance.h"
0002 #include "DataFormats/Provenance/interface/ProcessConfiguration.h"
0003
0004 #include <algorithm>
0005 #include <cassert>
0006
0007
0008
0009
0010
0011 namespace edm {
0012
0013 StableProvenance::StableProvenance() : StableProvenance{std::shared_ptr<ProductDescription const>(), ProductID()} {}
0014
0015 StableProvenance::StableProvenance(std::shared_ptr<ProductDescription const> const& p, ProductID const& pid)
0016 : productDescription_(p), productID_(pid) {}
0017
0018 void StableProvenance::write(std::ostream& os) const {
0019
0020 productDescription().write(os);
0021 }
0022
0023 bool operator==(StableProvenance const& a, StableProvenance const& b) {
0024 return a.productDescription() == b.productDescription();
0025 }
0026
0027 void StableProvenance::swap(StableProvenance& iOther) {
0028 productDescription_.swap(iOther.productDescription_);
0029 productID_.swap(iOther.productID_);
0030 }
0031 }