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 ()
GroupStatus const & status () const
virtual ~ProducedGroup ()

Protected Types

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

Private Member Functions

virtual void checkType_ (EDProduct const &prod) const
virtual void mergeProduct_ (std::auto_ptr< EDProduct > edp) const
virtual void mergeProduct_ (std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)
virtual bool productUnavailable_ () const
virtual bool putOrMergeProduct_ () const
virtual void putProduct_ (std::auto_ptr< EDProduct > edp) const
virtual void putProduct_ (std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)
virtual GroupStatusstatus_ ()=0
virtual GroupStatus const & status_ () const =0

Detailed Description

Definition at line 233 of file Group.h.


Member Enumeration Documentation

Enumerator:
Present 
NotRun 
NotCompleted 
NotPut 
UnscheduledNotRun 
Uninitialized 

Definition at line 235 of file Group.h.

                     {
      Present = 0,
      NotRun = 3,
      NotCompleted = 4,
      NotPut = 5,
      UnscheduledNotRun = 6,
      Uninitialized = 0xff
    };

Constructor & Destructor Documentation

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

Definition at line 244 of file Group.h.

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

Definition at line 18 of file Group.cc.

{}

Member Function Documentation

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

Implements edm::Group.

Definition at line 256 of file Group.h.

References edm::GroupData::checkType(), and edm::Group::groupData().

                                                           {
        groupData().checkType(prod);
      }
void edm::ProducedGroup::mergeProduct_ ( std::auto_ptr< EDProduct edp,
boost::shared_ptr< ProductProvenance productProvenance 
) [private, virtual]

Implements edm::Group.

Definition at line 43 of file Group.cc.

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

                                                              {
    assert(provenance()->productProvenanceResolved());
    assert(status() == Present);
    assert (productProvenancePtr()->productStatus() == productProvenance->productStatus());
    productProvenancePtr() = productProvenance;
    mergeTheProduct(edp);
  }
void edm::ProducedGroup::mergeProduct_ ( std::auto_ptr< EDProduct edp) const [private, virtual]

Implements edm::Group.

Definition at line 59 of file Group.cc.

                                                               {
    assert(0);
  }
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::productstatus::notPresent(), edm::Group::onDemand(), edm::productstatus::presenceUnknown(), edm::Group::product(), and status().

                                           {
    // 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() && product()->isPresent());
    assert (!productstatus::presenceUnknown(status()));
    assert(unavailable == productstatus::notPresent(status()));
    return unavailable;
  }
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_ ( std::auto_ptr< EDProduct edp,
boost::shared_ptr< ProductProvenance productProvenance 
) [private, virtual]

Implements edm::Group.

Definition at line 24 of file Group.cc.

References edm::GroupData::branchDescription(), edm::Group::branchDescription(), Exception, edm::Group::groupData(), edm::errors::InsertFailure, Present, edm::es::produced, edm::Group::product(), edm::GroupData::product_, edm::Group::provenance(), edm::Group::setProductProvenance(), status(), status_(), and Uninitialized.

                                                              {
    if (product()) {
      throw edm::Exception(errors::InsertFailure)
          << "Attempt to insert more than one product on branch " << groupData().branchDescription()->branchName() << "\n";
    }
    assert(branchDescription().produced());
    assert(edp.get() != 0);
    assert(!provenance()->productProvenanceResolved());
    assert(status() != Present);
    assert(status() != Uninitialized);
    setProductProvenance(productProvenance);
    assert(provenance()->productProvenanceResolved());
    groupData().product_.reset(edp.release());  // Group takes ownership
    status_() = Present;
  }
void edm::ProducedGroup::putProduct_ ( std::auto_ptr< EDProduct edp) const [private, virtual]

Implements edm::Group.

Definition at line 64 of file Group.cc.

                                                             {
    assert(0);
  }
GroupStatus& edm::ProducedGroup::status ( void  ) [inline]

Definition at line 249 of file Group.h.

References status_().

{return status_();}
GroupStatus const& edm::ProducedGroup::status ( void  ) const [inline]

Definition at line 248 of file Group.h.

References status_().

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

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