File indexing completed on 2025-01-31 02:19:11
0001 #include "DataFormats/Streamer/interface/StreamedProducts.h"
0002 #include "FWCore/Utilities/interface/EDMException.h"
0003 #include "DataFormats/Common/interface/WrapperBase.h"
0004
0005 namespace edm {
0006 StreamedProduct::StreamedProduct(WrapperBase const* prod,
0007 ProductDescription const& desc,
0008 bool present,
0009 std::vector<BranchID> const* parents)
0010 : prod_(prod), desc_(&desc), present_(present), parents_(parents) {
0011 if (present_ && prod == nullptr) {
0012 std::string branchName = desc.branchName();
0013 if (branchName.empty()) {
0014 ProductDescription localCopy(desc);
0015 localCopy.initBranchName();
0016 branchName = localCopy.branchName();
0017 }
0018 throw edm::Exception(edm::errors::LogicError, "StreamedProduct::StreamedProduct\n")
0019 << "A product with a status of 'present' is not actually present.\n"
0020 << "The branch name is " << branchName << "\n"
0021 << "Contact a framework developer.\n";
0022 }
0023 }
0024
0025 void SendJobHeader::initializeTransients() {
0026 for (ProductDescription& desc : descs_) {
0027 desc.init();
0028 desc.setIsProvenanceSetOnRead();
0029 }
0030 }
0031 }