Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:13

0001 /*----------------------------------------------------------------------
0002 ----------------------------------------------------------------------*/
0003 #include "FWCore/Framework/interface/ProductResolverBase.h"
0004 #include "FWCore/Framework/interface/Principal.h"
0005 #include "FWCore/Framework/src/ProductDeletedException.h"
0006 
0007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0008 #include "FWCore/Utilities/interface/TypeID.h"
0009 
0010 #include <cassert>
0011 
0012 namespace edm {
0013 
0014   ProductResolverBase::ProductResolverBase() {}
0015 
0016   ProductResolverBase::~ProductResolverBase() {}
0017 
0018   bool ProductResolverBase::provenanceAvailable() const {
0019     // If this product is from a the current process,
0020     // the provenance is available if and only if a product has been put.
0021     if (branchDescription().produced()) {
0022       return productResolved();
0023     }
0024     // If this product is from a prior process, the provenance is available,
0025     // although the per event part may have been dropped.
0026     return true;
0027   }
0028 
0029   TypeID ProductResolverBase::productType() const { return TypeID(branchDescription().wrappedTypeID()); }
0030 
0031   Provenance const* ProductResolverBase::provenance() const { return provenance_(); }
0032 
0033   void ProductResolverBase::retrieveAndMerge_(Principal const&, MergeableRunProductMetadata const*) const {}
0034 
0035   void ProductResolverBase::setMergeableRunProductMetadata_(MergeableRunProductMetadata const*) {}
0036 
0037   void ProductResolverBase::write(std::ostream& os) const {
0038     // This is grossly inadequate. It is also not critical for the
0039     // first pass.
0040     os << std::string("ProductResolver for product with ID: ") << productID();
0041   }
0042 
0043   void ProductResolverBase::setupUnscheduled(UnscheduledConfigurator const&) {}
0044 
0045 }  // namespace edm