CMS 3D CMS Logo

Public Member Functions | Public Attributes

edm::GroupData Struct Reference

#include <Group.h>

List of all members.

Public Member Functions

boost::shared_ptr
< ConstBranchDescription >
const & 
branchDescription () const
void checkType (EDProduct const &prod) const
 GroupData (boost::shared_ptr< ConstBranchDescription > bd)
void resetBranchDescription (boost::shared_ptr< ConstBranchDescription > bd)
void resetGroupData ()
void swap (GroupData &other)
 ~GroupData ()

Public Attributes

boost::shared_ptr< EDProductproduct_
Provenance prov_

Detailed Description

Definition at line 27 of file Group.h.


Constructor & Destructor Documentation

edm::GroupData::GroupData ( boost::shared_ptr< ConstBranchDescription bd) [inline, explicit]

Definition at line 28 of file Group.h.

                                                                   :
       product_(),
       prov_(bd,ProductID()) {}
edm::GroupData::~GroupData ( ) [inline]

Definition at line 31 of file Group.h.

{}

Member Function Documentation

boost::shared_ptr<ConstBranchDescription> const& edm::GroupData::branchDescription ( ) const [inline]

Definition at line 36 of file Group.h.

References edm::Provenance::constBranchDescriptionPtr(), and prov_.

Referenced by edm::Group::branchDescription(), checkType(), and edm::ProducedGroup::putProduct_().

                                                                             {
      return prov_.constBranchDescriptionPtr();
    }
void edm::GroupData::checkType ( EDProduct const &  prod) const

Definition at line 131 of file Group.cc.

References branchDescription(), edm::EDProduct::dynamicTypeInfo(), edm::errors::EventCorruption, and Exception.

Referenced by edm::ProducedGroup::checkType_().

                                                  {
    // Check if the types match.
    TypeID typeID(prod.dynamicTypeInfo());
    if(typeID != branchDescription()->typeID()) {
      // Types do not match.
      throw Exception(errors::EventCorruption)
          << "Product on branch " << branchDescription()->branchName() << " is of wrong type.\n"
          << "It is supposed to be of type " << branchDescription()->className() << ".\n"
          << "It is actually of type " << typeID.className() << ".\n";
    }
  }
void edm::GroupData::resetBranchDescription ( boost::shared_ptr< ConstBranchDescription bd) [inline]

Definition at line 44 of file Group.h.

References prov_, and edm::Provenance::setBranchDescription().

Referenced by edm::Group::resetBranchDescription().

                                                                            {
      prov_.setBranchDescription(bd);
    }
void edm::GroupData::resetGroupData ( ) [inline]

Definition at line 47 of file Group.h.

References product_, prov_, and edm::Provenance::resetProductProvenance().

Referenced by edm::Group::resetGroupData().

                          {
      product_.reset();
      prov_.resetProductProvenance();
    }
void edm::GroupData::swap ( GroupData other) [inline]

Definition at line 40 of file Group.h.

References product_, prov_, and edm::Provenance::swap().

Referenced by edm::SubProcess::propagateProducts(), and edm::swap().

                                {
       product_.swap(other.product_);
       prov_.swap(other.prov_);
    }

Member Data Documentation

boost::shared_ptr<EDProduct> edm::GroupData::product_ [mutable]