CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::InputGroup Class Reference

#include <Group.h>

Inheritance diagram for edm::InputGroup:
edm::Group

Public Member Functions

 InputGroup (boost::shared_ptr< ConstBranchDescription > bd)
 
bool productIsUnavailable () const
 
void setProduct (WrapperOwningHolder const &prod) const
 
void setProductUnavailable () const
 
virtual ~InputGroup ()
 
- 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
 
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 ()
 

Private Member Functions

virtual void checkType_ (WrapperOwningHolder const &) const
 
virtual void mergeProduct_ (WrapperOwningHolder const &edp, ProductProvenance &productProvenance)
 
virtual void mergeProduct_ (WrapperOwningHolder const &edp) const
 
virtual bool onDemand_ () const
 
virtual ProductData const & productData () const
 
virtual ProductDataproductData ()
 
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 resetStatus ()
 
virtual void setProductDeleted ()
 
virtual void swap_ (Group &rhs)
 

Private Attributes

ProductData productData_
 
bool productHasBeenDeleted_
 
bool productIsUnavailable_
 

Detailed Description

Definition at line 167 of file Group.h.

Constructor & Destructor Documentation

edm::InputGroup::InputGroup ( boost::shared_ptr< ConstBranchDescription bd)
inlineexplicit

Definition at line 169 of file Group.h.

169  :
171  productHasBeenDeleted_(false) {}
bool productHasBeenDeleted_
Definition: Group.h:204
ProductData productData_
Definition: Group.h:202
Group()
Definition: Group.cc:11
bool productIsUnavailable_
Definition: Group.h:203
edm::InputGroup::~InputGroup ( )
virtual

Definition at line 14 of file Group.cc.

14 {}

Member Function Documentation

virtual void edm::InputGroup::checkType_ ( WrapperOwningHolder const &  ) const
inlineprivatevirtual

Implements edm::Group.

Definition at line 192 of file Group.h.

192 {}
void edm::InputGroup::mergeProduct_ ( WrapperOwningHolder const &  edp,
ProductProvenance productProvenance 
)
privatevirtual

Implements edm::Group.

Definition at line 92 of file Group.cc.

94  {
95  assert(0);
96  }
void edm::InputGroup::mergeProduct_ ( WrapperOwningHolder const &  edp) const
privatevirtual

Implements edm::Group.

Definition at line 99 of file Group.cc.

References edm::Group::mergeTheProduct().

99  {
100  mergeTheProduct(edp);
101  }
void mergeTheProduct(WrapperOwningHolder const &edp) const
Definition: Group.cc:115
virtual bool edm::InputGroup::onDemand_ ( ) const
inlineprivatevirtual

Implements edm::Group.

Definition at line 195 of file Group.h.

195 {return false;}
virtual ProductData const& edm::InputGroup::productData ( ) const
inlineprivatevirtual

Implements edm::Group.

Definition at line 198 of file Group.h.

References productData_.

Referenced by setProduct().

198 {return productData_;}
ProductData productData_
Definition: Group.h:202
virtual ProductData& edm::InputGroup::productData ( )
inlineprivatevirtual

Implements edm::Group.

Definition at line 199 of file Group.h.

References productData_.

199 {return productData_;}
ProductData productData_
Definition: Group.h:202
bool edm::InputGroup::productIsUnavailable ( ) const
inline

Definition at line 178 of file Group.h.

References productIsUnavailable_.

Referenced by productUnavailable_().

178 {return productIsUnavailable_;}
bool productIsUnavailable_
Definition: Group.h:203
bool edm::InputGroup::productUnavailable_ ( ) const
privatevirtual

Implements edm::Group.

Definition at line 160 of file Group.cc.

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

160  {
161  if(productIsUnavailable()) {
162  return true;
163  }
164  // If there is a product, we know if it is real or a dummy.
165  if(product()) {
166  bool unavailable = !(wrapper().isPresent());
167  if(unavailable) {
169  }
170  return unavailable;
171  }
172  return false;
173  }
void setProductUnavailable() const
Definition: Group.h:179
WrapperHolder wrapper() const
Definition: Group.h:58
boost::shared_ptr< void const > product() const
Definition: Group.h:55
bool productIsUnavailable() const
Definition: Group.h:178
bool isPresent() const
Definition: WrapperHolder.h:64
virtual bool edm::InputGroup::productWasDeleted_ ( ) const
inlineprivatevirtual

Implements edm::Group.

Definition at line 197 of file Group.h.

References productHasBeenDeleted_.

197 {return productHasBeenDeleted_;}
bool productHasBeenDeleted_
Definition: Group.h:204
bool edm::InputGroup::putOrMergeProduct_ ( ) const
privatevirtual

Implements edm::Group.

Definition at line 104 of file Group.cc.

References edm::Group::product().

104  {
105  return(!product());
106  }
boost::shared_ptr< void const > product() const
Definition: Group.h:55
void edm::InputGroup::putProduct_ ( WrapperOwningHolder const &  edp,
ProductProvenance const &  productProvenance 
)
privatevirtual

Implements edm::Group.

Definition at line 81 of file Group.cc.

References edm::Group::product(), edm::Group::provenance(), setProduct(), and edm::Group::setProductProvenance().

83  {
84  assert(!product());
85  assert(!provenance()->productProvenanceValid());
86  setProductProvenance(productProvenance);
87  assert(provenance()->productProvenanceValid());
88  setProduct(edp);
89  }
void setProductProvenance(ProductProvenance const &prov) const
Definition: Group.cc:152
void setProduct(WrapperOwningHolder const &prod) const
Definition: Group.cc:142
boost::shared_ptr< void const > product() const
Definition: Group.h:55
Provenance * provenance() const
Definition: Group.cc:249
void edm::InputGroup::putProduct_ ( WrapperOwningHolder const &  edp) const
privatevirtual

Implements edm::Group.

Definition at line 109 of file Group.cc.

References edm::Group::product(), and setProduct().

109  {
110  assert(!product());
111  setProduct(edp);
112  }
void setProduct(WrapperOwningHolder const &prod) const
Definition: Group.cc:142
boost::shared_ptr< void const > product() const
Definition: Group.h:55
virtual void edm::InputGroup::resetStatus ( )
inlineprivatevirtual

Implements edm::Group.

Definition at line 193 of file Group.h.

References productHasBeenDeleted_, and productIsUnavailable_.

193  {productIsUnavailable_ = false;
194  productHasBeenDeleted_=false;}
bool productHasBeenDeleted_
Definition: Group.h:204
bool productIsUnavailable_
Definition: Group.h:203
void edm::InputGroup::setProduct ( WrapperOwningHolder const &  prod) const

Definition at line 142 of file Group.cc.

References edm::WrapperHolder::interface(), edm::WrapperHolder::isPresent(), edm::WrapperHolder::isValid(), edm::WrapperOwningHolder::product(), edm::Group::product(), productData(), setProductUnavailable(), and edm::ProductData::wrapper_.

Referenced by putProduct_().

142  {
143  assert (!product());
144  if(!prod.isValid() || !prod.isPresent()) {
146  }
147  assert(productData().getInterface() == prod.interface() || !prod.isValid());
148  productData().wrapper_ = prod.product();
149  }
void setProductUnavailable() const
Definition: Group.h:179
virtual ProductData const & productData() const
Definition: Group.h:198
boost::shared_ptr< void const > wrapper_
Definition: ProductData.h:46
boost::shared_ptr< void const > product() const
Definition: Group.h:55
virtual void edm::InputGroup::setProductDeleted ( )
inlineprivatevirtual

Implements edm::Group.

Definition at line 200 of file Group.h.

References productHasBeenDeleted_.

bool productHasBeenDeleted_
Definition: Group.h:204
void edm::InputGroup::setProductUnavailable ( ) const
inline

Definition at line 179 of file Group.h.

References productIsUnavailable_.

Referenced by productUnavailable_(), and setProduct().

179 {productIsUnavailable_ = true;}
bool productIsUnavailable_
Definition: Group.h:203
virtual void edm::InputGroup::swap_ ( Group rhs)
inlineprivatevirtual

Implements edm::Group.

Definition at line 182 of file Group.h.

References productData_, productIsUnavailable_, edm::swap(), and std::swap().

182  {
183  InputGroup& other = dynamic_cast<InputGroup&>(rhs);
184  edm::swap(productData_, other.productData_);
185  std::swap(productIsUnavailable_, other.productIsUnavailable_);
186  }
ProductData productData_
Definition: Group.h:202
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:117
InputGroup(boost::shared_ptr< ConstBranchDescription > bd)
Definition: Group.h:169
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
bool productIsUnavailable_
Definition: Group.h:203

Member Data Documentation

ProductData edm::InputGroup::productData_
private

Definition at line 202 of file Group.h.

Referenced by productData(), and swap_().

bool edm::InputGroup::productHasBeenDeleted_
mutableprivate

Definition at line 204 of file Group.h.

Referenced by productWasDeleted_(), resetStatus(), and setProductDeleted().

bool edm::InputGroup::productIsUnavailable_
mutableprivate

Definition at line 203 of file Group.h.

Referenced by productIsUnavailable(), resetStatus(), setProductUnavailable(), and swap_().