CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Types | Private Member Functions
edm::ProducedGroup Class Referenceabstract

#include <Group.h>

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

Public Member Functions

 ProducedGroup ()
 
void producerCompleted ()
 
void producerStarted ()
 
GroupStatusstatus () const
 
virtual ~ProducedGroup ()
 
- Public Member Functions inherited from edm::Group
ConstBranchDescription const & branchDescription () const
 
void checkType (WrapperOwningHolder const &prod) const
 
void deleteProduct ()
 
 Group ()
 
void mergeProduct (WrapperOwningHolder const &edp, ProductProvenance &productProvenance)
 
void mergeProduct (WrapperOwningHolder const &edp) const
 
void mergeTheProduct (WrapperOwningHolder const &edp) const
 
std::string const & moduleLabel () const
 
bool onDemand () const
 
std::string const & processName () const
 
boost::shared_ptr< void const > product () const
 
virtual ProductData const & productData () const =0
 
virtual ProductDataproductData ()=0
 
ProductID const & productID () const
 
std::string const & productInstanceName () const
 
ProductProvenanceproductProvenancePtr () const
 
TypeID productType () const
 
bool productUnavailable () const
 
bool productWasDeleted () const
 
Provenanceprovenance () const
 
bool provenanceAvailable () const
 
bool putOrMergeProduct () const
 
void putProduct (WrapperOwningHolder const &edp, ProductProvenance const &productProvenance)
 
void putProduct (WrapperOwningHolder const &edp) const
 
void reallyCheckType (WrapperOwningHolder const &prod) const
 
void resetBranchDescription (boost::shared_ptr< ConstBranchDescription > bd)
 
void resetProductData ()
 
void setProcessHistoryID (ProcessHistoryID const &phid)
 
void setProductProvenance (ProductProvenance const &prov) const
 
void setProvenance (boost::shared_ptr< BranchMapper > mapper, ProcessHistoryID const &phid, ProductID const &pid)
 
void setProvenance (boost::shared_ptr< BranchMapper > mapper, ProcessHistoryID const &phid)
 
void swap (Group &rhs)
 
WrapperHolder wrapper () const
 
void write (std::ostream &os) const
 
virtual ~Group ()
 

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, ProductProvenance &productProvenance)
 
virtual void mergeProduct_ (WrapperOwningHolder const &edp) const
 
virtual bool productUnavailable_ () const
 
virtual bool productWasDeleted_ () const
 
virtual bool putOrMergeProduct_ () const
 
virtual void putProduct_ (WrapperOwningHolder const &edp, ProductProvenance const &productProvenance)
 
virtual void putProduct_ (WrapperOwningHolder const &edp) const
 
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.

224 : Group() {}
Group()
Definition: Group.cc:11
edm::ProducedGroup::~ProducedGroup ( )
virtual

Definition at line 15 of file Group.cc.

15 {}

Member Function Documentation

virtual void edm::ProducedGroup::checkType_ ( WrapperOwningHolder const &  prod) const
inlineprivatevirtual

Implements edm::Group.

Definition at line 235 of file Group.h.

References edm::Group::reallyCheckType().

235  {
237  }
void reallyCheckType(WrapperOwningHolder const &prod) const
Definition: Group.cc:217
void edm::ProducedGroup::mergeProduct_ ( WrapperOwningHolder const &  edp,
ProductProvenance productProvenance 
)
privatevirtual

Implements edm::Group.

Definition at line 43 of file Group.cc.

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

45  {
46  assert(provenance()->productProvenanceValid());
47  assert(status() == Present);
48  setProductProvenance(productProvenance);
49  mergeTheProduct(edp);
50  }
void setProductProvenance(ProductProvenance const &prov) const
Definition: Group.cc:152
void mergeTheProduct(WrapperOwningHolder const &edp) const
Definition: Group.cc:115
GroupStatus & status() const
Definition: Group.h:228
Provenance * provenance() const
Definition: Group.cc:249
void edm::ProducedGroup::mergeProduct_ ( WrapperOwningHolder const &  edp) const
privatevirtual

Implements edm::Group.

Definition at line 58 of file Group.cc.

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

58  {
59  assert(status() == Present);
60  mergeTheProduct(edp);
61  }
void mergeTheProduct(WrapperOwningHolder const &edp) const
Definition: Group.cc:115
GroupStatus & status() const
Definition: Group.h:228
void edm::ProducedGroup::producerCompleted ( )
void edm::ProducedGroup::producerStarted ( )
bool edm::ProducedGroup::productUnavailable_ ( ) const
privatevirtual

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().

179  {
180  // If unscheduled production, the product is potentially available.
181  if(onDemand()) return false;
182  // The product is available if and only if a product has been put.
183  bool unavailable = !(product() && wrapper().isPresent());
184  return unavailable;
185  }
WrapperHolder wrapper() const
Definition: Group.h:58
bool onDemand() const
Definition: Group.h:49
boost::shared_ptr< void const > product() const
Definition: Group.h:55
bool isPresent() const
Definition: WrapperHolder.h:64
bool edm::ProducedGroup::productWasDeleted_ ( ) const
privatevirtual

Implements edm::Group.

Definition at line 189 of file Group.cc.

References ProductDeleted, and status().

189  {
190  return status() == ProductDeleted;
191  }
GroupStatus & status() const
Definition: Group.h:228
bool edm::ProducedGroup::putOrMergeProduct_ ( ) const
privatevirtual

Implements edm::Group.

Definition at line 53 of file Group.cc.

References edm::Group::productUnavailable().

53  {
54  return productUnavailable();
55  }
bool productUnavailable() const
Definition: Group.h:43
void edm::ProducedGroup::putProduct_ ( WrapperOwningHolder const &  edp,
ProductProvenance const &  productProvenance 
)
privatevirtual

Implements edm::Group.

Definition at line 21 of file Group.cc.

References edm::ProductData::branchDescription(), edm::Group::branchDescription(), edm::hlt::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_.

23  {
24  if(product()) {
26  << "Attempt to insert more than one product on branch " << productData().branchDescription()->branchName() << "\n";
27  }
28  assert(branchDescription().produced());
29  assert(edp.isValid());
30  assert(!provenance()->productProvenanceValid());
31  assert(status() != Present);
32  assert(status() != Uninitialized);
33  setProductProvenance(productProvenance);
34  assert(provenance()->productProvenanceValid());
35  if(productData().getInterface() != 0) {
36  assert(productData().getInterface() == edp.interface());
37  }
38  productData().wrapper_ = edp.product();
39  status_() = Present;
40  }
void setProductProvenance(ProductProvenance const &prov) const
Definition: Group.cc:152
virtual ProductData const & productData() const =0
virtual GroupStatus & status_() const =0
boost::shared_ptr< void const > wrapper_
Definition: ProductData.h:46
eventsetup::produce::Produce produced
Definition: ESProducts.cc:21
boost::shared_ptr< void const > product() const
Definition: Group.h:55
GroupStatus & status() const
Definition: Group.h:228
boost::shared_ptr< ConstBranchDescription > const & branchDescription() const
Definition: ProductData.h:29
Provenance * provenance() const
Definition: Group.cc:249
ConstBranchDescription const & branchDescription() const
Definition: Group.h:69
void edm::ProducedGroup::putProduct_ ( WrapperOwningHolder const &  edp) const
privatevirtual

Implements edm::Group.

Definition at line 64 of file Group.cc.

References edm::ProductData::branchDescription(), edm::Group::branchDescription(), edm::hlt::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_.

64  {
65  if(product()) {
67  << "Attempt to insert more than one product on branch " << productData().branchDescription()->branchName() << "\n";
68  }
69  assert(branchDescription().produced());
70  assert(edp.isValid());
71  assert(status() != Present);
72  assert(status() != Uninitialized);
73  if(productData().getInterface() != 0) {
74  assert(productData().getInterface() == edp.interface());
75  }
76  productData().wrapper_ = edp.product();
77  status_() = Present;
78  }
virtual ProductData const & productData() const =0
virtual GroupStatus & status_() const =0
boost::shared_ptr< void const > wrapper_
Definition: ProductData.h:46
eventsetup::produce::Produce produced
Definition: ESProducts.cc:21
boost::shared_ptr< void const > product() const
Definition: Group.h:55
GroupStatus & status() const
Definition: Group.h:228
boost::shared_ptr< ConstBranchDescription > const & branchDescription() const
Definition: ProductData.h:29
ConstBranchDescription const & branchDescription() const
Definition: Group.h:69
void edm::ProducedGroup::setProductDeleted ( )
privatevirtual

Implements edm::Group.

Definition at line 194 of file Group.cc.

References ProductDeleted, and status().

194  {
196  }
GroupStatus & status() const
Definition: Group.h:228
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().

228 {return status_();}
virtual GroupStatus & status_() const =0
virtual GroupStatus& edm::ProducedGroup::status_ ( ) const
privatepure virtual