CMS 3D CMS Logo

Public Member Functions | Protected Types | 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 Member Functions

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

Protected Types

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

Private Member Functions

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 setProductDeleted ()
virtual GroupStatusstatus_ () const =0

Detailed Description

Definition at line 212 of file Group.h.


Member Enumeration Documentation

Enumerator:
Present 
NotRun 
NotCompleted 
NotPut 
UnscheduledNotRun 
ProductDeleted 
Uninitialized 

Definition at line 214 of file Group.h.


Constructor & Destructor Documentation

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

Definition at line 224 of file Group.h.

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

Definition at line 15 of file Group.cc.

{}

Member Function Documentation

virtual void edm::ProducedGroup::checkType_ ( WrapperOwningHolder const &  prod) const [inline, private, virtual]

Implements edm::Group.

Definition at line 235 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 43 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 58 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 179 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 189 of file Group.cc.

References ProductDeleted, and status().

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

Implements edm::Group.

Definition at line 53 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 21 of file Group.cc.

References edm::ProductData::branchDescription(), edm::Group::branchDescription(), 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 " << productData().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() == edp.interface());
    }
    productData().wrapper_ = edp.product();
    status_() = Present;
  }
void edm::ProducedGroup::putProduct_ ( WrapperOwningHolder const &  edp) const [private, virtual]

Implements edm::Group.

Definition at line 64 of file Group.cc.

References edm::ProductData::branchDescription(), edm::Group::branchDescription(), 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 " << productData().branchDescription()->branchName() << "\n";
    }
    assert(branchDescription().produced());
    assert(edp.isValid());
    assert(status() != Present);
    assert(status() != Uninitialized);
    if(productData().getInterface() != 0) {
      assert(productData().getInterface() == edp.interface());
    }
    productData().wrapper_ = edp.product();
    status_() = Present;
  }
void edm::ProducedGroup::setProductDeleted ( ) [private, virtual]

Implements edm::Group.

Definition at line 194 of file Group.cc.

References ProductDeleted, and status().

GroupStatus& edm::ProducedGroup::status ( void  ) const [inline]

Definition at line 228 of file Group.h.

References status_().

Referenced by mergeProduct_(), edm::UnscheduledGroup::onDemand_(), productWasDeleted_(), putProduct_(), and setProductDeleted().

{return status_();}
virtual GroupStatus& edm::ProducedGroup::status_ ( ) const [private, pure virtual]