Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:33

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<BranchDescription const>(), ProductID()} {}
0014 
0015   StableProvenance::StableProvenance(std::shared_ptr<BranchDescription const> const& p, ProductID const& pid)
0016       : branchDescription_(p), productID_(pid) {}
0017 
0018   void StableProvenance::write(std::ostream& os) const {
0019     // This is grossly inadequate, but it is not critical for the first pass.
0020     branchDescription().write(os);
0021   }
0022 
0023   bool operator==(StableProvenance const& a, StableProvenance const& b) {
0024     return a.branchDescription() == b.branchDescription();
0025   }
0026 
0027   void StableProvenance::swap(StableProvenance& iOther) {
0028     branchDescription_.swap(iOther.branchDescription_);
0029     productID_.swap(iOther.productID_);
0030   }
0031 }  // namespace edm