CMS 3D CMS Logo

Public Member Functions | Private Member Functions

edm::Group Class Reference

#include <Group.h>

Inheritance diagram for edm::Group:
edm::InputGroup edm::ProducedGroup edm::ScheduledGroup edm::SourceGroup edm::UnscheduledGroup

List of all members.

Public Member Functions

ConstBranchDescription const & branchDescription () const
void checkType (EDProduct const &prod) const
 Group ()
virtual GroupDatagroupData ()=0
virtual GroupData const & groupData () const =0
void mergeProduct (std::auto_ptr< EDProduct > edp, std::auto_ptr< ProductProvenance > productProvenance)
void mergeProduct (std::auto_ptr< EDProduct > edp) const
void mergeProduct (std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)
void mergeTheProduct (std::auto_ptr< EDProduct > edp) const
std::string const & moduleLabel () const
bool onDemand () const
std::string const & processName () const
boost::shared_ptr< EDProductproduct () const
ProductID const & productID () const
std::string const & productInstanceName () const
boost::shared_ptr
< ProductProvenance
productProvenancePtr () const
Reflex::Type productType () const
bool productUnavailable () const
Provenanceprovenance () const
bool provenanceAvailable () const
bool putOrMergeProduct () const
void putProduct (std::auto_ptr< EDProduct > edp, std::auto_ptr< ProductProvenance > productProvenance)
void putProduct (std::auto_ptr< EDProduct > edp) const
void putProduct (std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)
void resetBranchDescription (boost::shared_ptr< ConstBranchDescription > bd)
void resetGroupData ()
void setProductProvenance (boost::shared_ptr< ProductProvenance > prov) const
void setProvenance (boost::shared_ptr< BranchMapper > mapper)
void setProvenance (boost::shared_ptr< BranchMapper > mapper, ProductID const &pid)
void swap (Group &rhs)
void write (std::ostream &os) const
virtual ~Group ()

Private Member Functions

virtual void checkType_ (EDProduct const &prod) const =0
virtual void mergeProduct_ (std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)=0
virtual void mergeProduct_ (std::auto_ptr< EDProduct > edp) const =0
virtual bool onDemand_ () const =0
virtual bool productUnavailable_ () const =0
virtual bool putOrMergeProduct_ () const =0
virtual void putProduct_ (std::auto_ptr< EDProduct > edp) const =0
virtual void putProduct_ (std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)=0
virtual void resetStatus ()=0
virtual void swap_ (Group &rhs)=0

Detailed Description

Definition at line 62 of file Group.h.


Constructor & Destructor Documentation

Group< TOutput >::Group ( )

Definition at line 15 of file Group.cc.

{}
Group< TOutput >::~Group ( ) [virtual]

Definition at line 17 of file Group.cc.

{}

Member Function Documentation

ConstBranchDescription const& edm::Group::branchDescription ( ) const [inline]
void edm::Group::checkType ( EDProduct const &  prod) const [inline]

Definition at line 157 of file Group.h.

References checkType_().

Referenced by edm::Principal::checkUniquenessAndType(), and edm::Principal::putOrMerge().

virtual void edm::Group::checkType_ ( EDProduct const &  prod) const [private, pure virtual]

Implemented in edm::InputGroup, and edm::ProducedGroup.

Referenced by checkType().

virtual GroupData const& edm::Group::groupData ( ) const [pure virtual]
virtual GroupData& edm::Group::groupData ( ) [pure virtual]
void edm::Group::mergeProduct ( std::auto_ptr< EDProduct edp,
boost::shared_ptr< ProductProvenance productProvenance 
) [inline]

Definition at line 143 of file Group.h.

References mergeProduct_().

Referenced by edm::Principal::putOrMerge().

                                                                                                        {
      mergeProduct_(edp, productProvenance);
    }
void edm::Group::mergeProduct ( std::auto_ptr< EDProduct edp,
std::auto_ptr< ProductProvenance productProvenance 
) [inline]

Definition at line 146 of file Group.h.

References mergeProduct_().

                                                                                                    {
      mergeProduct_(edp, boost::shared_ptr<ProductProvenance>(productProvenance.release()));
    }
void edm::Group::mergeProduct ( std::auto_ptr< EDProduct edp) const [inline]

Definition at line 150 of file Group.h.

References mergeProduct_().

                                                        {
      mergeProduct_(edp);
    }
virtual void edm::Group::mergeProduct_ ( std::auto_ptr< EDProduct edp,
boost::shared_ptr< ProductProvenance productProvenance 
) [private, pure virtual]

Implemented in edm::InputGroup, and edm::ProducedGroup.

Referenced by mergeProduct().

virtual void edm::Group::mergeProduct_ ( std::auto_ptr< EDProduct edp) const [private, pure virtual]

Implemented in edm::InputGroup, and edm::ProducedGroup.

void Group< TOutput >::mergeTheProduct ( std::auto_ptr< EDProduct edp) const

Definition at line 104 of file Group.cc.

References branchDescription(), edm::ConstBranchDescription::className(), moduleLabel(), processName(), product(), and productInstanceName().

Referenced by edm::InputGroup::mergeProduct_(), and edm::ProducedGroup::mergeProduct_().

                                                         {
    if(product()->isMergeable()) {
      product()->mergeProduct(edp.get());
    } else if(product()->hasIsProductEqual()) {
      if(!product()->isProductEqual(edp.get())) {
        LogError("RunLumiMerging")
              << "Group::mergeGroup\n"
              << "Two run/lumi products for the same run/lumi which should be equal are not\n"
              << "Using the first, ignoring the second\n"
              << "className = " << branchDescription().className() << "\n"
              << "moduleLabel = " << moduleLabel() << "\n"
              << "instance = " << productInstanceName() << "\n"
              << "process = " << processName() << "\n";
      }
    } else {
      LogWarning("RunLumiMerging")
          << "Group::mergeGroup\n"
          << "Run/lumi product has neither a mergeProduct nor isProductEqual function\n"
          << "Using the first, ignoring the second in merge\n"
          << "className = " << branchDescription().className() << "\n"
          << "moduleLabel = " << moduleLabel() << "\n"
          << "instance = " << productInstanceName() << "\n"
          << "process = " << processName() << "\n";
    }
  }
std::string const& edm::Group::moduleLabel ( ) const [inline]

Definition at line 96 of file Group.h.

References branchDescription(), and edm::ConstBranchDescription::moduleLabel().

Referenced by mergeTheProduct().

{return branchDescription().moduleLabel();}
bool edm::Group::onDemand ( ) const [inline]
virtual bool edm::Group::onDemand_ ( ) const [private, pure virtual]
std::string const& edm::Group::processName ( ) const [inline]

Definition at line 102 of file Group.h.

References branchDescription(), and edm::ConstBranchDescription::processName().

Referenced by mergeTheProduct().

{return branchDescription().processName();}
boost::shared_ptr<EDProduct> edm::Group::product ( ) const [inline]
ProductID const& edm::Group::productID ( ) const [inline]

Definition at line 122 of file Group.h.

References groupData(), edm::Provenance::productID(), and edm::GroupData::prov_.

Referenced by write().

{return groupData().prov_.productID();};
std::string const& edm::Group::productInstanceName ( ) const [inline]

Definition at line 99 of file Group.h.

References branchDescription(), and edm::ConstBranchDescription::productInstanceName().

Referenced by mergeTheProduct().

{return branchDescription().productInstanceName();}
boost::shared_ptr<ProductProvenance> edm::Group::productProvenancePtr ( ) const [inline]

Definition at line 84 of file Group.h.

References edm::Provenance::productProvenancePtr(), and provenance().

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

{return provenance()->productProvenancePtr();}
Type Group< TOutput >::productType ( ) const

Definition at line 203 of file Group.cc.

References product().

                           {
    return Type::ByTypeInfo(typeid(*product()));
  }
bool edm::Group::productUnavailable ( ) const [inline]
virtual bool edm::Group::productUnavailable_ ( ) const [private, pure virtual]

Implemented in edm::InputGroup, and edm::ProducedGroup.

Referenced by productUnavailable().

Provenance * Group< TOutput >::provenance ( ) const
bool Group< TOutput >::provenanceAvailable ( ) const

Definition at line 191 of file Group.cc.

References branchDescription(), edm::es::produced, and product().

                                   {
    // If this product is from a the current process,
    // the provenance is available if and only if a product has been put.
    if(branchDescription().produced()) {
      return product() && product()->isPresent();
    }
    // If this product is from a prior process, the provenance is available,
    // although the per event part may have been dropped.
    return true;
  }
bool edm::Group::putOrMergeProduct ( ) const [inline]

Definition at line 138 of file Group.h.

References putOrMergeProduct_().

Referenced by edm::Principal::putOrMerge().

                                   {
      return putOrMergeProduct_();
    }
virtual bool edm::Group::putOrMergeProduct_ ( ) const [private, pure virtual]

Implemented in edm::InputGroup, and edm::ProducedGroup.

Referenced by putOrMergeProduct().

void edm::Group::putProduct ( std::auto_ptr< EDProduct edp) const [inline]

Definition at line 133 of file Group.h.

References putProduct_().

                                                      {
      putProduct_(edp);
    }
void edm::Group::putProduct ( std::auto_ptr< EDProduct edp,
std::auto_ptr< ProductProvenance productProvenance 
) [inline]

Definition at line 128 of file Group.h.

References putProduct_().

                                                                                                  {
      putProduct_(edp, boost::shared_ptr<ProductProvenance>(productProvenance.release()));
    }
void edm::Group::putProduct ( std::auto_ptr< EDProduct edp,
boost::shared_ptr< ProductProvenance productProvenance 
) [inline]
virtual void edm::Group::putProduct_ ( std::auto_ptr< EDProduct edp,
boost::shared_ptr< ProductProvenance productProvenance 
) [private, pure virtual]

Implemented in edm::InputGroup, and edm::ProducedGroup.

Referenced by putProduct().

virtual void edm::Group::putProduct_ ( std::auto_ptr< EDProduct edp) const [private, pure virtual]

Implemented in edm::InputGroup, and edm::ProducedGroup.

void edm::Group::resetBranchDescription ( boost::shared_ptr< ConstBranchDescription bd) [inline]

Definition at line 93 of file Group.h.

References groupData(), and edm::GroupData::resetBranchDescription().

Referenced by edm::Principal::adjustToNewProductRegistry().

{groupData().resetBranchDescription(bd);}
void edm::Group::resetGroupData ( ) [inline]

Definition at line 66 of file Group.h.

References groupData(), edm::GroupData::resetGroupData(), and resetStatus().

                          {
      groupData().resetGroupData();
      resetStatus();
    }
virtual void edm::Group::resetStatus ( ) [private, pure virtual]
void Group< TOutput >::setProductProvenance ( boost::shared_ptr< ProductProvenance prov) const

Definition at line 153 of file Group.cc.

References groupData(), edm::GroupData::prov_, and edm::Provenance::setProductProvenance().

Referenced by edm::InputGroup::putProduct_(), and edm::ProducedGroup::putProduct_().

                                                                           {
    groupData().prov_.setProductProvenance(prov);
  }
void Group< TOutput >::setProvenance ( boost::shared_ptr< BranchMapper mapper,
ProductID const &  pid 
)

Definition at line 208 of file Group.cc.

References groupData(), edm::GroupData::prov_, edm::Provenance::setProductID(), and edm::Provenance::setStore().

                                                                                 {
    //assert(!groupData().prov_);
    groupData().prov_.setProductID(pid);
    groupData().prov_.setStore(mapper);
  }
void Group< TOutput >::setProvenance ( boost::shared_ptr< BranchMapper mapper)

Definition at line 215 of file Group.cc.

References groupData(), edm::GroupData::prov_, and edm::Provenance::setStore().

                                                           {
    groupData().prov_.setStore(mapper);
  }
void edm::Group::swap ( Group rhs) [inline]
virtual void edm::Group::swap_ ( Group rhs) [private, pure virtual]
void Group< TOutput >::write ( std::ostream &  os) const

Definition at line 225 of file Group.cc.

References productID().

Referenced by edm::operator<<().

                                   {
    // This is grossly inadequate. It is also not critical for the
    // first pass.
    os << std::string("Group for product with ID: ")
       << productID();
  }