CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::StreamedProduct Class Reference

#include <StreamedProducts.h>

Public Member Functions

BranchID branchID () const
 
void clear ()
 
BranchDescription const * desc () const
 
std::vector< BranchID > const * parents () const
 
bool present () const
 
WrapperBase const * prod ()
 
 StreamedProduct ()
 
 StreamedProduct (BranchDescription const &desc)
 
 StreamedProduct (WrapperBase const *prod, BranchDescription const &desc, bool present, std::vector< BranchID > const *parents)
 

Private Attributes

BranchDescription const * desc_
 
std::vector< BranchID > const * parents_
 
bool present_
 
WrapperBase const * prod_
 

Detailed Description

Definition at line 32 of file StreamedProducts.h.

Constructor & Destructor Documentation

◆ StreamedProduct() [1/3]

edm::StreamedProduct::StreamedProduct ( )
inline

Definition at line 34 of file StreamedProducts.h.

34 : prod_(nullptr), desc_(nullptr), present_(false), parents_(nullptr) {}

◆ StreamedProduct() [2/3]

edm::StreamedProduct::StreamedProduct ( BranchDescription const &  desc)
inlineexplicit

Definition at line 35 of file StreamedProducts.h.

36  : prod_(nullptr), desc_(&desc), present_(false), parents_(nullptr) {}

◆ StreamedProduct() [3/3]

edm::StreamedProduct::StreamedProduct ( WrapperBase const *  prod,
BranchDescription const &  desc,
bool  present,
std::vector< BranchID > const *  parents 
)

Definition at line 6 of file StreamedProducts.cc.

11  if (present_ && prod == nullptr) {
13  if (branchName.empty()) {
14  BranchDescription localCopy(desc);
15  localCopy.initBranchName();
16  branchName = localCopy.branchName();
17  }
18  throw edm::Exception(edm::errors::LogicError, "StreamedProduct::StreamedProduct\n")
19  << "A product with a status of 'present' is not actually present.\n"
20  << "The branch name is " << branchName << "\n"
21  << "Contact a framework developer.\n";
22  }
23  }

References edm::BranchDescription::branchName(), electrons_cff::branchName, desc(), Exception, edm::BranchDescription::initBranchName(), edm::errors::LogicError, present_, prod(), and AlCaHLTBitMon_QueryRunRegistry::string.

Member Function Documentation

◆ branchID()

BranchID edm::StreamedProduct::branchID ( ) const
inline

Definition at line 44 of file StreamedProducts.h.

44 { return desc_->branchID(); }

References edm::BranchDescription::branchID(), and desc_.

◆ clear()

void edm::StreamedProduct::clear ( void  )
inline

Definition at line 49 of file StreamedProducts.h.

49  {
50  prod_ = nullptr;
51  delete desc_;
52  desc_ = nullptr;
53  present_ = false;
54  delete parents_;
55  parents_ = nullptr;
56  }

References desc_, parents_, present_, and prod_.

Referenced by BeautifulSoup.Tag::setString().

◆ desc()

BranchDescription const* edm::StreamedProduct::desc ( ) const
inline

Definition at line 43 of file StreamedProducts.h.

43 { return desc_; }

References desc_.

Referenced by StreamedProduct().

◆ parents()

std::vector<BranchID> const* edm::StreamedProduct::parents ( ) const
inline

Definition at line 46 of file StreamedProducts.h.

46 { return parents_; }

References parents_.

◆ present()

bool edm::StreamedProduct::present ( ) const
inline

Definition at line 45 of file StreamedProducts.h.

45 { return present_; }

References present_.

◆ prod()

WrapperBase const* edm::StreamedProduct::prod ( )
inline

Definition at line 47 of file StreamedProducts.h.

47 { return prod_; }

References prod_.

Referenced by StreamedProduct().

Member Data Documentation

◆ desc_

BranchDescription const* edm::StreamedProduct::desc_
private

Definition at line 60 of file StreamedProducts.h.

Referenced by branchID(), clear(), and desc().

◆ parents_

std::vector<BranchID> const* edm::StreamedProduct::parents_
private

Definition at line 62 of file StreamedProducts.h.

Referenced by clear(), and parents().

◆ present_

bool edm::StreamedProduct::present_
private

Definition at line 61 of file StreamedProducts.h.

Referenced by clear(), present(), and StreamedProduct().

◆ prod_

WrapperBase const* edm::StreamedProduct::prod_
private

Definition at line 59 of file StreamedProducts.h.

Referenced by clear(), and prod().

edm::errors::LogicError
Definition: EDMException.h:37
electrons_cff.branchName
branchName
Definition: electrons_cff.py:515
edm::StreamedProduct::parents_
std::vector< BranchID > const * parents_
Definition: StreamedProducts.h:62
edm::StreamedProduct::desc
BranchDescription const * desc() const
Definition: StreamedProducts.h:43
edm::StreamedProduct::present
bool present() const
Definition: StreamedProducts.h:45
edm::StreamedProduct::prod
WrapperBase const * prod()
Definition: StreamedProducts.h:47
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::BranchDescription::branchName
std::string const & branchName() const
Definition: BranchDescription.h:119
edm::StreamedProduct::prod_
WrapperBase const * prod_
Definition: StreamedProducts.h:59
edm::StreamedProduct::present_
bool present_
Definition: StreamedProducts.h:61
Exception
Definition: hltDiff.cc:246
edm::StreamedProduct::desc_
BranchDescription const * desc_
Definition: StreamedProducts.h:60
edm::BranchDescription::branchID
BranchID const & branchID() const
Definition: BranchDescription.h:74
edm::StreamedProduct::parents
std::vector< BranchID > const * parents() const
Definition: StreamedProducts.h:46