#include <Group.h>
Public Member Functions | |
ProducedGroup () | |
void | producerCompleted () |
void | producerStarted () |
GroupStatus & | status () |
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 GroupStatus & | status_ ()=0 |
virtual GroupStatus const & | status_ () const =0 |
enum edm::ProducedGroup::GroupStatus [protected] |
Definition at line 228 of file Group.h.
{ Present = 0, NotRun = 3, NotCompleted = 4, NotPut = 5, UnscheduledNotRun = 6, Uninitialized = 0xff };
virtual void edm::ProducedGroup::checkType_ | ( | EDProduct const & | prod | ) | const [inline, private, virtual] |
Implements edm::Group.
Definition at line 249 of file Group.h.
References edm::GroupData::checkType(), and edm::Group::groupData().
void edm::ProducedGroup::mergeProduct_ | ( | std::auto_ptr< EDProduct > | edp, |
boost::shared_ptr< ProductProvenance > | productProvenance | ||
) | [private, virtual] |
Implements edm::Group.
Definition at line 44 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] |
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::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 55 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 25 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 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] |
GroupStatus& edm::ProducedGroup::status | ( | void | ) | [inline] |
GroupStatus const& edm::ProducedGroup::status | ( | void | ) | const [inline] |
Definition at line 241 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] |
Implemented in edm::ScheduledGroup, edm::UnscheduledGroup, and edm::SourceGroup.
Referenced by putProduct_(), and status().
virtual GroupStatus& edm::ProducedGroup::status_ | ( | ) | [private, pure virtual] |
Implemented in edm::ScheduledGroup, edm::UnscheduledGroup, and edm::SourceGroup.