CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
edm::StreamedProduct Class Reference

#include <StreamedProducts.h>

Public Member Functions

void allocateForReading ()
 
BranchID branchID () const
 
TClassRef const & classRef () const
 
void clear ()
 
void clearClassType ()
 
BranchDescription const * desc () const
 
std::vector< BranchID > const * parents () const
 
bool present () const
 
void * prod ()
 
void setNewClassType ()
 
 StreamedProduct ()
 
 StreamedProduct (BranchDescription const &desc)
 
 StreamedProduct (void const *prod, BranchDescription const &desc, bool present, std::vector< BranchID > const *parents)
 

Private Attributes

TClassRef classRef_
 
BranchDescription const * desc_
 
std::vector< BranchID > const * parents_
 
bool present_
 
void * prod_
 

Detailed Description

Definition at line 32 of file StreamedProducts.h.

Constructor & Destructor Documentation

edm::StreamedProduct::StreamedProduct ( )
inline

Definition at line 34 of file StreamedProducts.h.

34 : desc_(0), present_(false), parents_(0), prod_(0), classRef_() {}
BranchDescription const * desc_
std::vector< BranchID > const * parents_
edm::StreamedProduct::StreamedProduct ( BranchDescription const &  desc)
inlineexplicit

Definition at line 35 of file StreamedProducts.h.

35  :
36  desc_(&desc), present_(false), parents_(0), prod_(0), classRef_() {}
BranchDescription const * desc_
BranchDescription const * desc() const
std::vector< BranchID > const * parents_
edm::StreamedProduct::StreamedProduct ( void const *  prod,
BranchDescription const &  desc,
bool  present,
std::vector< BranchID > const *  parents 
)

Definition at line 6 of file StreamedProducts.cc.

References edm::BranchDescription::branchName(), edm::hlt::Exception, edm::BranchDescription::init(), edm::errors::LogicError, and present_.

9  :
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  }
std::string & branchName() const
BranchDescription const * desc_
std::vector< BranchID > const * parents() const
BranchDescription const * desc() const
std::vector< BranchID > const * parents_

Member Function Documentation

void edm::StreamedProduct::allocateForReading ( )

Definition at line 21 of file StreamedProducts.cc.

References classRef_, prod_, and setNewClassType().

Referenced by edm::StreamedProductStreamer::operator()().

21  {
23  prod_ = classRef_->New();
24  }
BranchID edm::StreamedProduct::branchID ( ) const
inline

Definition at line 44 of file StreamedProducts.h.

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

44 {return desc_->branchID();}
BranchDescription const * desc_
BranchID const & branchID() const
TClassRef const& edm::StreamedProduct::classRef ( ) const
inline

Definition at line 48 of file StreamedProducts.h.

References classRef_.

Referenced by edm::StreamedProductStreamer::operator()().

48 {return classRef_;}
void edm::StreamedProduct::clear ( void  )
inline
void edm::StreamedProduct::clearClassType ( )

Definition at line 32 of file StreamedProducts.cc.

References classRef_, and prod_.

Referenced by edm::StreamedProductStreamer::operator()().

32  {
33  if(prod_ != 0) {
34  classRef_->Destructor(prod_);
35  prod_ = 0;
36  }
37  }
BranchDescription const* edm::StreamedProduct::desc ( ) const
inline

Definition at line 43 of file StreamedProducts.h.

References desc_.

43 {return desc_;}
BranchDescription const * desc_
std::vector<BranchID> const* edm::StreamedProduct::parents ( ) const
inline

Definition at line 46 of file StreamedProducts.h.

References parents_.

46 {return parents_;}
std::vector< BranchID > const * parents_
bool edm::StreamedProduct::present ( ) const
inline

Definition at line 45 of file StreamedProducts.h.

References present_.

Referenced by edm::StreamedProductStreamer::operator()().

45 {return present_;}
void* edm::StreamedProduct::prod ( )
inline

Definition at line 47 of file StreamedProducts.h.

References prod_.

Referenced by edm::StreamedProductStreamer::operator()().

47 {return prod_;}
void edm::StreamedProduct::setNewClassType ( )

Definition at line 27 of file StreamedProducts.cc.

References classRef_, desc_, edm::BranchDescription::fullClassName(), and edm::wrappedClassName().

Referenced by allocateForReading(), and edm::StreamedProductStreamer::operator()().

27  {
28  classRef_.SetName(wrappedClassName(desc_->fullClassName()).c_str());
29  }
BranchDescription const * desc_
std::string const & fullClassName() const
std::string wrappedClassName(std::string const &iFullName)

Member Data Documentation

TClassRef edm::StreamedProduct::classRef_
private

Definition at line 67 of file StreamedProducts.h.

Referenced by allocateForReading(), classRef(), clearClassType(), and setNewClassType().

BranchDescription const* edm::StreamedProduct::desc_
private

Definition at line 63 of file StreamedProducts.h.

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

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

Definition at line 65 of file StreamedProducts.h.

Referenced by clear(), and parents().

bool edm::StreamedProduct::present_
private

Definition at line 64 of file StreamedProducts.h.

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

void* edm::StreamedProduct::prod_
private

Definition at line 66 of file StreamedProducts.h.

Referenced by allocateForReading(), clear(), clearClassType(), and prod().