CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions

edm::ProducedGroup Class Reference

#include <Group.h>

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

List of all members.

Public Types

enum  GroupStatus {
  Present = 0, NotRun = 3, NotCompleted = 4, NotPut = 5,
  UnscheduledNotRun = 6, ProductDeleted = 7, Uninitialized = 0xff
}

Public Member Functions

 ProducedGroup ()
void producerCompleted ()
void producerStarted ()
GroupStatusstatus () const
virtual ~ProducedGroup ()

Private Member Functions

virtual ConstBranchDescription
const & 
branchDescription_ () const
virtual void checkType_ (WrapperOwningHolder const &prod) const
virtual void mergeProduct_ (WrapperOwningHolder const &edp) const
virtual void mergeProduct_ (WrapperOwningHolder const &edp, ProductProvenance &productProvenance)
virtual bool productUnavailable_ () const
virtual bool productWasDeleted_ () const
virtual bool putOrMergeProduct_ () const
virtual void putProduct_ (WrapperOwningHolder const &edp) const
virtual void putProduct_ (WrapperOwningHolder const &edp, ProductProvenance const &productProvenance)
virtual void resetBranchDescription_ (boost::shared_ptr< ConstBranchDescription > bd)
virtual void setProductDeleted_ ()
virtual GroupStatusstatus_ () const =0

Detailed Description

Definition at line 231 of file Group.h.


Member Enumeration Documentation

Enumerator:
Present 
NotRun 
NotCompleted 
NotPut 
UnscheduledNotRun 
ProductDeleted 
Uninitialized 

Definition at line 233 of file Group.h.


Constructor & Destructor Documentation

edm::ProducedGroup::ProducedGroup ( ) [inline]

Definition at line 242 of file Group.h.

: Group() {}
edm::ProducedGroup::~ProducedGroup ( ) [virtual]

Definition at line 15 of file Group.cc.

{}

Member Function Documentation

virtual ConstBranchDescription const& edm::ProducedGroup::branchDescription_ ( ) const [inline, private, virtual]

Implements edm::Group.

Definition at line 260 of file Group.h.

References edm::ProductData::branchDescription(), and edm::Group::productData().

{return *productData().branchDescription();}
virtual void edm::ProducedGroup::checkType_ ( WrapperOwningHolder const &  prod) const [inline, private, virtual]

Implements edm::Group.

Definition at line 253 of file Group.h.

References edm::Group::reallyCheckType().

void edm::ProducedGroup::mergeProduct_ ( WrapperOwningHolder const &  edp,
ProductProvenance productProvenance 
) [private, virtual]

Implements edm::Group.

Definition at line 44 of file Group.cc.

References edm::Group::mergeTheProduct(), Present, edm::Group::provenance(), edm::Group::setProductProvenance(), and status().

                                              {
    assert(provenance()->productProvenanceValid());
    assert(status() == Present);
    setProductProvenance(productProvenance);
    mergeTheProduct(edp);
  }
void edm::ProducedGroup::mergeProduct_ ( WrapperOwningHolder const &  edp) const [private, virtual]

Implements edm::Group.

Definition at line 59 of file Group.cc.

References edm::Group::mergeTheProduct(), Present, and status().

                                                                   {
    assert(status() == Present);
    mergeTheProduct(edp);
  }
void edm::ProducedGroup::producerCompleted ( )
void edm::ProducedGroup::producerStarted ( )
bool edm::ProducedGroup::productUnavailable_ ( ) const [private, virtual]

Implements edm::Group.

Definition at line 180 of file Group.cc.

References edm::WrapperHolder::isPresent(), edm::Group::onDemand(), edm::Group::product(), and edm::Group::wrapper().

                                           {
    // If unscheduled production, the product is potentially available.
    if(onDemand()) return false;
    // The product is available if and only if a product has been put.
    bool unavailable = !(product() && wrapper().isPresent());
    return unavailable;
  }
bool edm::ProducedGroup::productWasDeleted_ ( ) const [private, virtual]

Implements edm::Group.

Definition at line 190 of file Group.cc.

References ProductDeleted, and status().

                                          {
    return status() == ProductDeleted;
  }
bool edm::ProducedGroup::putOrMergeProduct_ ( ) const [private, virtual]

Implements edm::Group.

Definition at line 54 of file Group.cc.

References edm::Group::productUnavailable().

                                          {
    return productUnavailable();
  }
void edm::ProducedGroup::putProduct_ ( WrapperOwningHolder const &  edp,
ProductProvenance const &  productProvenance 
) [private, virtual]

Implements edm::Group.

Definition at line 22 of file Group.cc.

References edm::Group::branchDescription(), edm::ConstBranchDescription::branchName(), Exception, edm::errors::InsertFailure, edm::WrapperHolder::interface(), edm::WrapperHolder::isValid(), Present, edm::es::produced, edm::WrapperOwningHolder::product(), edm::Group::product(), edm::Group::productData(), edm::Group::provenance(), edm::Group::setProductProvenance(), status(), status_(), Uninitialized, and edm::ProductData::wrapper_.

                                                    {
    if(product()) {
      throw Exception(errors::InsertFailure)
          << "Attempt to insert more than one product on branch " << branchDescription().branchName() << "\n";
    }
    assert(branchDescription().produced());
    assert(edp.isValid());
    assert(!provenance()->productProvenanceValid());
    assert(status() != Present);
    assert(status() != Uninitialized);
    setProductProvenance(productProvenance);
    assert(provenance()->productProvenanceValid());
    if(productData().getInterface() != 0) {
      assert(productData().getInterface()->sameType(*edp.interface()));
    }
    productData().wrapper_ = edp.product();
    status_() = Present;
  }
void edm::ProducedGroup::putProduct_ ( WrapperOwningHolder const &  edp) const [private, virtual]

Implements edm::Group.

Definition at line 65 of file Group.cc.

References edm::Group::branchDescription(), edm::ConstBranchDescription::branchName(), Exception, edm::errors::InsertFailure, edm::WrapperHolder::interface(), edm::WrapperHolder::isValid(), Present, edm::es::produced, edm::WrapperOwningHolder::product(), edm::Group::product(), edm::Group::productData(), status(), status_(), Uninitialized, and edm::ProductData::wrapper_.

                                                                 {
    if(product()) {
      throw Exception(errors::InsertFailure)
          << "Attempt to insert more than one product on branch " << branchDescription().branchName() << "\n";
    }
    assert(branchDescription().produced());
    assert(edp.isValid());
    assert(status() != Present);
    assert(status() != Uninitialized);
    if(productData().getInterface() != 0) {
      assert(productData().getInterface()->sameType(*edp.interface()));
    }
    productData().wrapper_ = edp.product();
    status_() = Present;
  }
virtual void edm::ProducedGroup::resetBranchDescription_ ( boost::shared_ptr< ConstBranchDescription bd) [inline, private, virtual]

Implements edm::Group.

Definition at line 261 of file Group.h.

References edm::Group::productData(), and edm::ProductData::resetBranchDescription().

{productData().resetBranchDescription(bd);}
void edm::ProducedGroup::setProductDeleted_ ( ) [private, virtual]

Implements edm::Group.

Definition at line 195 of file Group.cc.

References ProductDeleted, and status().

GroupStatus& edm::ProducedGroup::status ( void  ) const [inline]
virtual GroupStatus& edm::ProducedGroup::status_ ( ) const [private, pure virtual]