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
edm::Group Class Referenceabstract

#include <Group.h>

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

Public Member Functions

ConstBranchDescription const & branchDescription () const
 
void checkType (EDProduct const &prod) const
 
 Group ()
 
virtual GroupData const & groupData () const =0
 
virtual GroupDatagroupData ()=0
 
void mergeProduct (std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)
 
void mergeProduct (std::auto_ptr< EDProduct > edp, std::auto_ptr< ProductProvenance > productProvenance)
 
void mergeProduct (std::auto_ptr< EDProduct > edp) const
 
void mergeTheProduct (std::auto_ptr< EDProduct > edp) const
 
std::string const & moduleLabel () const
 
bool onDemand () const
 
std::string const & processName () const
 
boost::shared_ptr< EDProductproduct () const
 
ProductID const & productID () const
 
std::string const & productInstanceName () const
 
boost::shared_ptr
< ProductProvenance
productProvenancePtr () const
 
Reflex::Type productType () const
 
bool productUnavailable () const
 
Provenanceprovenance () const
 
bool provenanceAvailable () const
 
bool putOrMergeProduct () const
 
void putProduct (std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)
 
void putProduct (std::auto_ptr< EDProduct > edp, std::auto_ptr< ProductProvenance > productProvenance)
 
void putProduct (std::auto_ptr< EDProduct > edp) const
 
void resetBranchDescription (boost::shared_ptr< ConstBranchDescription > bd)
 
void resetGroupData ()
 
void setProductProvenance (boost::shared_ptr< ProductProvenance > prov) const
 
void setProvenance (boost::shared_ptr< BranchMapper > mapper, ProductID const &pid)
 
void setProvenance (boost::shared_ptr< BranchMapper > mapper)
 
void swap (Group &rhs)
 
void write (std::ostream &os) const
 
virtual ~Group ()
 

Private Member Functions

virtual void checkType_ (EDProduct const &prod) const =0
 
virtual void mergeProduct_ (std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)=0
 
virtual void mergeProduct_ (std::auto_ptr< EDProduct > edp) const =0
 
virtual bool onDemand_ () const =0
 
virtual bool productUnavailable_ () const =0
 
virtual bool putOrMergeProduct_ () const =0
 
virtual void putProduct_ (std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)=0
 
virtual void putProduct_ (std::auto_ptr< EDProduct > edp) const =0
 
virtual void resetStatus ()=0
 
virtual void swap_ (Group &rhs)=0
 

Detailed Description

Definition at line 62 of file Group.h.

Constructor & Destructor Documentation

Group< TOutput >::Group ( )

Definition at line 15 of file Group.cc.

Referenced by ProducePlots.ProducePlots::makePlots().

15 {}
Group< TOutput >::~Group ( )
virtual

Definition at line 17 of file Group.cc.

17 {}

Member Function Documentation

ConstBranchDescription const& edm::Group::branchDescription ( ) const
inline
void edm::Group::checkType ( EDProduct const &  prod) const
inline

Definition at line 157 of file Group.h.

References checkType_().

Referenced by edm::Principal::checkUniquenessAndType(), and edm::Principal::putOrMerge().

157  {
158  checkType_(prod);
159  }
virtual void checkType_(EDProduct const &prod) const =0
virtual void edm::Group::checkType_ ( EDProduct const &  prod) const
privatepure virtual

Implemented in edm::ProducedGroup, and edm::InputGroup.

Referenced by checkType().

virtual GroupData const& edm::Group::groupData ( ) const
pure virtual
virtual GroupData& edm::Group::groupData ( )
pure virtual
void edm::Group::mergeProduct ( std::auto_ptr< EDProduct edp,
boost::shared_ptr< ProductProvenance productProvenance 
)
inline

Definition at line 143 of file Group.h.

References mergeProduct_().

Referenced by edm::Principal::putOrMerge().

143  {
144  mergeProduct_(edp, productProvenance);
145  }
virtual void mergeProduct_(std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)=0
void edm::Group::mergeProduct ( std::auto_ptr< EDProduct edp,
std::auto_ptr< ProductProvenance productProvenance 
)
inline

Definition at line 146 of file Group.h.

References mergeProduct_().

146  {
147  mergeProduct_(edp, boost::shared_ptr<ProductProvenance>(productProvenance.release()));
148  }
virtual void mergeProduct_(std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)=0
void edm::Group::mergeProduct ( std::auto_ptr< EDProduct edp) const
inline

Definition at line 150 of file Group.h.

References mergeProduct_().

150  {
151  mergeProduct_(edp);
152  }
virtual void mergeProduct_(std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)=0
virtual void edm::Group::mergeProduct_ ( std::auto_ptr< EDProduct edp,
boost::shared_ptr< ProductProvenance productProvenance 
)
privatepure virtual

Implemented in edm::ProducedGroup, and edm::InputGroup.

Referenced by mergeProduct().

virtual void edm::Group::mergeProduct_ ( std::auto_ptr< EDProduct edp) const
privatepure virtual

Implemented in edm::ProducedGroup, and edm::InputGroup.

void Group< TOutput >::mergeTheProduct ( std::auto_ptr< EDProduct edp) const

Definition at line 104 of file Group.cc.

References branchDescription(), edm::ConstBranchDescription::className(), moduleLabel(), processName(), product(), and productInstanceName().

Referenced by edm::InputGroup::mergeProduct_(), and edm::ProducedGroup::mergeProduct_().

104  {
105  if(product()->isMergeable()) {
106  product()->mergeProduct(edp.get());
107  } else if(product()->hasIsProductEqual()) {
108  if(!product()->isProductEqual(edp.get())) {
109  LogError("RunLumiMerging")
110  << "Group::mergeGroup\n"
111  << "Two run/lumi products for the same run/lumi which should be equal are not\n"
112  << "Using the first, ignoring the second\n"
113  << "className = " << branchDescription().className() << "\n"
114  << "moduleLabel = " << moduleLabel() << "\n"
115  << "instance = " << productInstanceName() << "\n"
116  << "process = " << processName() << "\n";
117  }
118  } else {
119  LogWarning("RunLumiMerging")
120  << "Group::mergeGroup\n"
121  << "Run/lumi product has neither a mergeProduct nor isProductEqual function\n"
122  << "Using the first, ignoring the second in merge\n"
123  << "className = " << branchDescription().className() << "\n"
124  << "moduleLabel = " << moduleLabel() << "\n"
125  << "instance = " << productInstanceName() << "\n"
126  << "process = " << processName() << "\n";
127  }
128  }
std::string const & processName() const
Definition: Group.h:102
std::string const & moduleLabel() const
Definition: Group.h:96
std::string const & className() const
boost::shared_ptr< EDProduct > product() const
Definition: Group.h:81
std::string const & productInstanceName() const
Definition: Group.h:99
ConstBranchDescription const & branchDescription() const
Definition: Group.h:90
std::string const& edm::Group::moduleLabel ( ) const
inline

Definition at line 96 of file Group.h.

References branchDescription(), and edm::ConstBranchDescription::moduleLabel().

Referenced by mergeTheProduct().

96 {return branchDescription().moduleLabel();}
ConstBranchDescription const & branchDescription() const
Definition: Group.h:90
std::string const & moduleLabel() const
bool edm::Group::onDemand ( ) const
inline

Definition at line 78 of file Group.h.

References onDemand_().

Referenced by edm::ProducedGroup::productUnavailable_(), edm::EventPrincipal::resolveProduct_(), and edm::Principal::size().

78 {return onDemand_();}
virtual bool onDemand_() const =0
virtual bool edm::Group::onDemand_ ( ) const
privatepure virtual
std::string const& edm::Group::processName ( ) const
inline

Definition at line 102 of file Group.h.

References branchDescription(), and edm::ConstBranchDescription::processName().

Referenced by mergeTheProduct().

102 {return branchDescription().processName();}
std::string const & processName() const
ConstBranchDescription const & branchDescription() const
Definition: Group.h:90
boost::shared_ptr<EDProduct> edm::Group::product ( ) const
inline
ProductID const& edm::Group::productID ( ) const
inline

Definition at line 122 of file Group.h.

References groupData(), edm::Provenance::productID(), and edm::GroupData::prov_.

Referenced by write().

122 {return groupData().prov_.productID();};
Provenance prov_
Definition: Group.h:54
virtual GroupData const & groupData() const =0
ProductID const & productID() const
Definition: Provenance.h:88
std::string const& edm::Group::productInstanceName ( ) const
inline

Definition at line 99 of file Group.h.

References branchDescription(), and edm::ConstBranchDescription::productInstanceName().

Referenced by mergeTheProduct().

std::string const & productInstanceName() const
ConstBranchDescription const & branchDescription() const
Definition: Group.h:90
boost::shared_ptr<ProductProvenance> edm::Group::productProvenancePtr ( ) const
inline

Definition at line 84 of file Group.h.

References edm::Provenance::productProvenancePtr(), and provenance().

Referenced by edm::ProducedGroup::mergeProduct_().

84 {return provenance()->productProvenancePtr();}
boost::shared_ptr< ProductProvenance > productProvenancePtr() const
Definition: Provenance.h:54
Provenance * provenance() const
Definition: Group.cc:220
Type Group< TOutput >::productType ( ) const

Definition at line 203 of file Group.cc.

References product().

203  {
204  return Type::ByTypeInfo(typeid(*product()));
205  }
boost::shared_ptr< EDProduct > product() const
Definition: Group.h:81
bool edm::Group::productUnavailable ( ) const
inline
virtual bool edm::Group::productUnavailable_ ( ) const
privatepure virtual

Implemented in edm::ProducedGroup, and edm::InputGroup.

Referenced by productUnavailable().

Provenance * Group< TOutput >::provenance ( ) const

Definition at line 220 of file Group.cc.

References groupData(), and edm::GroupData::prov_.

Referenced by edm::ProducedGroup::mergeProduct_(), productProvenancePtr(), edm::InputGroup::putProduct_(), and edm::ProducedGroup::putProduct_().

220  {
221  return &(groupData().prov_);
222  }
Provenance prov_
Definition: Group.h:54
virtual GroupData const & groupData() const =0
bool Group< TOutput >::provenanceAvailable ( ) const

Definition at line 191 of file Group.cc.

References branchDescription(), edm::es::produced, and product().

191  {
192  // If this product is from a the current process,
193  // the provenance is available if and only if a product has been put.
194  if(branchDescription().produced()) {
195  return product() && product()->isPresent();
196  }
197  // If this product is from a prior process, the provenance is available,
198  // although the per event part may have been dropped.
199  return true;
200  }
eventsetup::produce::Produce produced
Definition: ESProducts.cc:21
boost::shared_ptr< EDProduct > product() const
Definition: Group.h:81
ConstBranchDescription const & branchDescription() const
Definition: Group.h:90
bool edm::Group::putOrMergeProduct ( ) const
inline

Definition at line 138 of file Group.h.

References putOrMergeProduct_().

Referenced by edm::Principal::putOrMerge().

138  {
139  return putOrMergeProduct_();
140  }
virtual bool putOrMergeProduct_() const =0
virtual bool edm::Group::putOrMergeProduct_ ( ) const
privatepure virtual

Implemented in edm::ProducedGroup, and edm::InputGroup.

Referenced by putOrMergeProduct().

void edm::Group::putProduct ( std::auto_ptr< EDProduct edp,
boost::shared_ptr< ProductProvenance productProvenance 
)
inline

Definition at line 125 of file Group.h.

References putProduct_().

Referenced by edm::EventPrincipal::put(), edm::EventPrincipal::putOnRead(), edm::Principal::putOrMerge(), and edm::EventPrincipal::resolveProduct_().

125  {
126  putProduct_(edp, productProvenance);
127  }
virtual void putProduct_(std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)=0
void edm::Group::putProduct ( std::auto_ptr< EDProduct edp,
std::auto_ptr< ProductProvenance productProvenance 
)
inline

Definition at line 128 of file Group.h.

References putProduct_().

128  {
129  putProduct_(edp, boost::shared_ptr<ProductProvenance>(productProvenance.release()));
130  }
virtual void putProduct_(std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)=0
void edm::Group::putProduct ( std::auto_ptr< EDProduct edp) const
inline

Definition at line 133 of file Group.h.

References putProduct_().

133  {
134  putProduct_(edp);
135  }
virtual void putProduct_(std::auto_ptr< EDProduct > edp, boost::shared_ptr< ProductProvenance > productProvenance)=0
virtual void edm::Group::putProduct_ ( std::auto_ptr< EDProduct edp,
boost::shared_ptr< ProductProvenance productProvenance 
)
privatepure virtual

Implemented in edm::ProducedGroup, and edm::InputGroup.

Referenced by putProduct().

virtual void edm::Group::putProduct_ ( std::auto_ptr< EDProduct edp) const
privatepure virtual

Implemented in edm::ProducedGroup, and edm::InputGroup.

void edm::Group::resetBranchDescription ( boost::shared_ptr< ConstBranchDescription bd)
inline

Definition at line 93 of file Group.h.

References groupData(), and edm::GroupData::resetBranchDescription().

Referenced by edm::Principal::adjustToNewProductRegistry().

virtual GroupData const & groupData() const =0
void resetBranchDescription(boost::shared_ptr< ConstBranchDescription > bd)
Definition: Group.h:44
void edm::Group::resetGroupData ( )
inline

Definition at line 66 of file Group.h.

References groupData(), edm::GroupData::resetGroupData(), and resetStatus().

66  {
68  resetStatus();
69  }
virtual void resetStatus()=0
virtual GroupData const & groupData() const =0
void resetGroupData()
Definition: Group.h:47
virtual void edm::Group::resetStatus ( )
privatepure virtual
void Group< TOutput >::setProductProvenance ( boost::shared_ptr< ProductProvenance prov) const

Definition at line 153 of file Group.cc.

References groupData(), edm::GroupData::prov_, and edm::Provenance::setProductProvenance().

Referenced by edm::InputGroup::putProduct_(), and edm::ProducedGroup::putProduct_().

153  {
155  }
Provenance prov_
Definition: Group.h:54
virtual GroupData const & groupData() const =0
void setProductProvenance(boost::shared_ptr< ProductProvenance > prov) const
Definition: Provenance.h:90
void Group< TOutput >::setProvenance ( boost::shared_ptr< BranchMapper mapper,
ProductID const &  pid 
)

Definition at line 208 of file Group.cc.

References groupData(), edm::GroupData::prov_, edm::Provenance::setProductID(), and edm::Provenance::setStore().

208  {
209  //assert(!groupData().prov_);
211  groupData().prov_.setStore(mapper);
212  }
Provenance prov_
Definition: Group.h:54
void setStore(boost::shared_ptr< BranchMapper > store) const
Definition: Provenance.h:86
virtual GroupData const & groupData() const =0
void setProductID(ProductID const &pid)
Definition: Provenance.h:94
void Group< TOutput >::setProvenance ( boost::shared_ptr< BranchMapper mapper)

Definition at line 215 of file Group.cc.

References groupData(), edm::GroupData::prov_, and edm::Provenance::setStore().

215  {
216  groupData().prov_.setStore(mapper);
217  }
Provenance prov_
Definition: Group.h:54
void setStore(boost::shared_ptr< BranchMapper > store) const
Definition: Provenance.h:86
virtual GroupData const & groupData() const =0
void edm::Group::swap ( Group rhs)
inline

Definition at line 161 of file Group.h.

References swap_().

Referenced by edm::swap().

161 {swap_(rhs);}
virtual void swap_(Group &rhs)=0
virtual void edm::Group::swap_ ( Group rhs)
privatepure virtual
void Group< TOutput >::write ( std::ostream &  os) const

Definition at line 225 of file Group.cc.

References productID().

Referenced by edm::operator<<().

225  {
226  // This is grossly inadequate. It is also not critical for the
227  // first pass.
228  os << std::string("Group for product with ID: ")
229  << productID();
230  }
ProductID const & productID() const
Definition: Group.h:122