CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StreamedProducts.cc
Go to the documentation of this file.
4 
5 namespace edm {
7  BranchDescription const& desc,
8  bool present,
9  std::vector<BranchID> const* parents) :
10  desc_(&desc), present_(present), parents_(parents), prod_(const_cast<void*>(prod)), classRef_() {
11  if(present_ && prod == 0) {
12  desc.init();
13  throw edm::Exception(edm::errors::LogicError, "StreamedProduct::StreamedProduct\n")
14  << "A product with a status of 'present' is not actually present.\n"
15  << "The branch name is " << desc.branchName() << "\n"
16  << "Contact a framework developer.\n";
17  }
18  }
19 
20  void
23  prod_ = classRef_->New();
24  }
25 
26  void
28  classRef_.SetName(wrappedClassName(desc_->fullClassName()).c_str());
29  }
30 
31  void
33  if(prod_ != 0) {
34  classRef_->Destructor(prod_);
35  prod_ = 0;
36  }
37  }
38 }
39 
TPRegexp parents
Definition: eve_filter.cc:24
std::string & branchName() const
BranchDescription const * desc_
std::string const & fullClassName() const
std::string wrappedClassName(std::string const &iFullName)