#include <Group.h>
Public Member Functions | |
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 & | productData ()=0 |
virtual ProductData const & | productData () const =0 |
ProductID const & | productID () const |
std::string const & | productInstanceName () const |
ProductProvenance * | productProvenancePtr () const |
TypeID | productType () const |
bool | productUnavailable () const |
bool | productWasDeleted () const |
Provenance * | provenance () 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 &prod) const =0 |
virtual void | mergeProduct_ (WrapperOwningHolder const &edp, ProductProvenance &productProvenance)=0 |
virtual void | mergeProduct_ (WrapperOwningHolder const &edp) const =0 |
virtual bool | onDemand_ () const =0 |
virtual bool | productUnavailable_ () const =0 |
virtual bool | productWasDeleted_ () const =0 |
virtual bool | putOrMergeProduct_ () const =0 |
virtual void | putProduct_ (WrapperOwningHolder const &edp, ProductProvenance const &productProvenance)=0 |
virtual void | putProduct_ (WrapperOwningHolder const &edp) const =0 |
virtual void | resetStatus ()=0 |
virtual void | setProductDeleted ()=0 |
virtual void | swap_ (Group &rhs)=0 |
ConstBranchDescription const& edm::Group::branchDescription | ( | ) | const [inline] |
Definition at line 69 of file Group.h.
References edm::ProductData::branchDescription(), and productData().
Referenced by edm::Principal::adjustToNewProductRegistry(), edm::Principal::checkUniquenessAndType(), edm::Principal::getExistingGroup(), mergeTheProduct(), moduleLabel(), processName(), productInstanceName(), provenanceAvailable(), edm::ProducedGroup::putProduct_(), edm::RunPrincipal::readImmediate(), edm::LuminosityBlockPrincipal::readImmediate(), reallyCheckType(), edm::EventPrincipal::resolveProduct_(), edm::RunPrincipal::resolveProductImmediate(), edm::LuminosityBlockPrincipal::resolveProductImmediate(), and edm::Principal::size().
{return *productData().branchDescription();}
void edm::Group::checkType | ( | WrapperOwningHolder const & | prod | ) | const [inline] |
Definition at line 135 of file Group.h.
References checkType_().
Referenced by edm::Principal::checkUniquenessAndType(), and edm::Principal::putOrMerge().
{ checkType_(prod); }
virtual void edm::Group::checkType_ | ( | WrapperOwningHolder const & | prod | ) | const [private, pure virtual] |
Implemented in edm::InputGroup, and edm::ProducedGroup.
Referenced by checkType().
void edm::Group::deleteProduct | ( | ) | [inline] |
Definition at line 37 of file Group.h.
References productData(), edm::ProductData::resetProductData(), and setProductDeleted().
Referenced by edm::Principal::deleteProduct().
{ productData().resetProductData(); setProductDeleted(); }
void edm::Group::mergeProduct | ( | WrapperOwningHolder const & | edp | ) | const [inline] |
void edm::Group::mergeProduct | ( | WrapperOwningHolder const & | edp, |
ProductProvenance & | productProvenance | ||
) | [inline] |
Definition at line 122 of file Group.h.
References mergeProduct_().
Referenced by edm::Principal::putOrMerge().
{ mergeProduct_(edp, productProvenance); }
virtual void edm::Group::mergeProduct_ | ( | WrapperOwningHolder const & | edp, |
ProductProvenance & | productProvenance | ||
) | [private, pure virtual] |
Implemented in edm::InputGroup, and edm::ProducedGroup.
Referenced by mergeProduct().
virtual void edm::Group::mergeProduct_ | ( | WrapperOwningHolder const & | edp | ) | const [private, pure virtual] |
Implemented in edm::InputGroup, and edm::ProducedGroup.
void Group< TOutput >::mergeTheProduct | ( | WrapperOwningHolder const & | edp | ) | const |
Definition at line 115 of file Group.cc.
References branchDescription(), edm::ConstBranchDescription::className(), edm::WrapperHolder::hasIsProductEqual(), edm::WrapperHolder::isProductEqual(), edm::WrapperHolder::mergeProduct(), moduleLabel(), processName(), productInstanceName(), wrapper(), and edm::WrapperHolder::wrapper().
Referenced by edm::InputGroup::mergeProduct_(), and edm::ProducedGroup::mergeProduct_().
{ if(wrapper().isMergeable()) { wrapper().mergeProduct(edp.wrapper()); } else if(wrapper().hasIsProductEqual()) { if(!wrapper().isProductEqual(edp.wrapper())) { LogError("RunLumiMerging") << "Group::mergeGroup\n" << "Two run/lumi products for the same run/lumi which should be equal are not\n" << "Using the first, ignoring the second\n" << "className = " << branchDescription().className() << "\n" << "moduleLabel = " << moduleLabel() << "\n" << "instance = " << productInstanceName() << "\n" << "process = " << processName() << "\n"; } } else { LogWarning("RunLumiMerging") << "Group::mergeGroup\n" << "Run/lumi product has neither a mergeProduct nor isProductEqual function\n" << "Using the first, ignoring the second in merge\n" << "className = " << branchDescription().className() << "\n" << "moduleLabel = " << moduleLabel() << "\n" << "instance = " << productInstanceName() << "\n" << "process = " << processName() << "\n"; } }
std::string const& edm::Group::moduleLabel | ( | ) | const [inline] |
Definition at line 75 of file Group.h.
References branchDescription(), and edm::ConstBranchDescription::moduleLabel().
Referenced by mergeTheProduct().
{return branchDescription().moduleLabel();}
bool edm::Group::onDemand | ( | ) | const [inline] |
Definition at line 49 of file Group.h.
References onDemand_().
Referenced by edm::ProducedGroup::productUnavailable_(), edm::EventPrincipal::resolveProduct_(), and edm::Principal::size().
{return onDemand_();}
virtual bool edm::Group::onDemand_ | ( | ) | const [private, pure virtual] |
Implemented in edm::InputGroup, edm::ScheduledGroup, edm::UnscheduledGroup, and edm::SourceGroup.
Referenced by onDemand().
std::string const& edm::Group::processName | ( | ) | const [inline] |
Definition at line 81 of file Group.h.
References branchDescription(), and edm::ConstBranchDescription::processName().
Referenced by mergeTheProduct().
{return branchDescription().processName();}
boost::shared_ptr<void const> edm::Group::product | ( | ) | const [inline] |
Definition at line 55 of file Group.h.
References productData(), and edm::ProductData::wrapper_.
Referenced by edm::Principal::deleteProduct(), edm::InputGroup::productUnavailable_(), edm::ProducedGroup::productUnavailable_(), provenanceAvailable(), edm::InputGroup::putOrMergeProduct_(), edm::InputGroup::putProduct_(), edm::ProducedGroup::putProduct_(), edm::EventPrincipal::resolveProduct_(), and edm::InputGroup::setProduct().
{ return productData().wrapper_; }
virtual ProductData const& edm::Group::productData | ( | ) | const [pure virtual] |
Implemented in edm::InputGroup, edm::ScheduledGroup, edm::UnscheduledGroup, and edm::SourceGroup.
Referenced by branchDescription(), deleteProduct(), product(), productID(), edm::SubProcess::propagateProducts(), provenance(), edm::EventPrincipal::putOnRead(), edm::ProducedGroup::putProduct_(), resetBranchDescription(), resetProductData(), edm::EventPrincipal::resolveProduct_(), edm::RunPrincipal::resolveProductImmediate(), edm::LuminosityBlockPrincipal::resolveProductImmediate(), setProcessHistoryID(), setProductProvenance(), setProvenance(), and wrapper().
virtual ProductData& edm::Group::productData | ( | ) | [pure virtual] |
Implemented in edm::InputGroup, edm::ScheduledGroup, edm::UnscheduledGroup, and edm::SourceGroup.
ProductID const& edm::Group::productID | ( | ) | const [inline] |
Definition at line 104 of file Group.h.
References productData(), edm::Provenance::productID(), and edm::ProductData::prov_.
Referenced by write().
{return productData().prov_.productID();}
std::string const& edm::Group::productInstanceName | ( | ) | const [inline] |
Definition at line 78 of file Group.h.
References branchDescription(), and edm::ConstBranchDescription::productInstanceName().
Referenced by mergeTheProduct().
{return branchDescription().productInstanceName();}
ProductProvenance* edm::Group::productProvenancePtr | ( | ) | const [inline] |
Definition at line 61 of file Group.h.
References edm::Provenance::productProvenance(), and provenance().
{ return provenance()->productProvenance(); }
bool edm::Group::productUnavailable | ( | ) | const [inline] |
Definition at line 43 of file Group.h.
References productUnavailable_().
Referenced by edm::SubProcess::propagateProducts(), edm::ProducedGroup::putOrMergeProduct_(), edm::RunPrincipal::readImmediate(), edm::LuminosityBlockPrincipal::readImmediate(), edm::EventPrincipal::resolveProduct_(), and edm::Principal::size().
{return productUnavailable_();}
virtual bool edm::Group::productUnavailable_ | ( | ) | const [private, pure virtual] |
Implemented in edm::InputGroup, and edm::ProducedGroup.
Referenced by productUnavailable().
bool edm::Group::productWasDeleted | ( | ) | const [inline] |
Definition at line 52 of file Group.h.
References productWasDeleted_().
{return productWasDeleted_();}
virtual bool edm::Group::productWasDeleted_ | ( | ) | const [private, pure virtual] |
Implemented in edm::InputGroup, and edm::ProducedGroup.
Referenced by productWasDeleted().
Provenance * Group< TOutput >::provenance | ( | ) | const |
Definition at line 249 of file Group.cc.
References productData(), and edm::ProductData::prov_.
Referenced by edm::ProducedGroup::mergeProduct_(), productProvenancePtr(), edm::InputGroup::putProduct_(), and edm::ProducedGroup::putProduct_().
{ return &(productData().prov_); }
bool Group< TOutput >::provenanceAvailable | ( | ) | const |
Definition at line 200 of file Group.cc.
References branchDescription(), edm::WrapperHolder::isPresent(), edm::es::produced, product(), and wrapper().
{ // If this product is from a the current process, // the provenance is available if and only if a product has been put. if(branchDescription().produced()) { return product() && wrapper().isPresent(); } // If this product is from a prior process, the provenance is available, // although the per event part may have been dropped. return true; }
bool edm::Group::putOrMergeProduct | ( | ) | const [inline] |
Definition at line 117 of file Group.h.
References putOrMergeProduct_().
Referenced by edm::Principal::putOrMerge().
{ return putOrMergeProduct_(); }
virtual bool edm::Group::putOrMergeProduct_ | ( | ) | const [private, pure virtual] |
Implemented in edm::InputGroup, and edm::ProducedGroup.
Referenced by putOrMergeProduct().
void edm::Group::putProduct | ( | WrapperOwningHolder const & | edp, |
ProductProvenance const & | productProvenance | ||
) | [inline] |
Definition at line 107 of file Group.h.
References putProduct_().
Referenced by edm::EventPrincipal::put(), edm::EventPrincipal::putOnRead(), edm::Principal::putOrMerge(), and edm::EventPrincipal::resolveProduct_().
{ putProduct_(edp, productProvenance); }
void edm::Group::putProduct | ( | WrapperOwningHolder const & | edp | ) | const [inline] |
virtual void edm::Group::putProduct_ | ( | WrapperOwningHolder const & | edp, |
ProductProvenance const & | productProvenance | ||
) | [private, pure virtual] |
Implemented in edm::InputGroup, and edm::ProducedGroup.
Referenced by putProduct().
virtual void edm::Group::putProduct_ | ( | WrapperOwningHolder const & | edp | ) | const [private, pure virtual] |
Implemented in edm::InputGroup, and edm::ProducedGroup.
void Group< TOutput >::reallyCheckType | ( | WrapperOwningHolder const & | prod | ) | const |
Definition at line 217 of file Group.cc.
References branchDescription(), edm::ConstBranchDescription::branchName(), edm::ConstBranchDescription::className(), edm::WrapperHolder::dynamicTypeInfo(), edm::errors::EventCorruption, Exception, and edm::ConstBranchDescription::typeID().
Referenced by edm::ProducedGroup::checkType_().
{ // Check if the types match. TypeID typeID(prod.dynamicTypeInfo()); if(typeID != branchDescription().typeID()) { // Types do not match. throw Exception(errors::EventCorruption) << "Product on branch " << branchDescription().branchName() << " is of wrong type.\n" << "It is supposed to be of type " << branchDescription().className() << ".\n" << "It is actually of type " << typeID.className() << ".\n"; } }
void edm::Group::resetBranchDescription | ( | boost::shared_ptr< ConstBranchDescription > | bd | ) | [inline] |
Definition at line 72 of file Group.h.
References productData(), and edm::ProductData::resetBranchDescription().
Referenced by edm::Principal::adjustToNewProductRegistry().
{productData().resetBranchDescription(bd);}
void edm::Group::resetProductData | ( | ) | [inline] |
Definition at line 32 of file Group.h.
References productData(), edm::ProductData::resetProductData(), and resetStatus().
{ productData().resetProductData(); resetStatus(); }
virtual void edm::Group::resetStatus | ( | ) | [private, pure virtual] |
Implemented in edm::InputGroup, edm::ScheduledGroup, edm::UnscheduledGroup, and edm::SourceGroup.
Referenced by resetProductData().
void Group< TOutput >::setProcessHistoryID | ( | ProcessHistoryID const & | phid | ) |
Definition at line 244 of file Group.cc.
References productData(), edm::ProductData::prov_, and edm::Provenance::setProcessHistoryID().
{ productData().prov_.setProcessHistoryID(phid); }
virtual void edm::Group::setProductDeleted | ( | ) | [private, pure virtual] |
Implemented in edm::InputGroup, and edm::ProducedGroup.
Referenced by deleteProduct().
void Group< TOutput >::setProductProvenance | ( | ProductProvenance const & | prov | ) | const |
Definition at line 152 of file Group.cc.
References productData(), edm::ProductData::prov_, and edm::Provenance::setProductProvenance().
Referenced by edm::ProducedGroup::mergeProduct_(), edm::InputGroup::putProduct_(), and edm::ProducedGroup::putProduct_().
{ productData().prov_.setProductProvenance(prov); }
void Group< TOutput >::setProvenance | ( | boost::shared_ptr< BranchMapper > | mapper, |
ProcessHistoryID const & | phid | ||
) |
Definition at line 238 of file Group.cc.
References productData(), edm::ProductData::prov_, edm::Provenance::setProcessHistoryID(), and edm::Provenance::setStore().
{ productData().prov_.setStore(mapper); productData().prov_.setProcessHistoryID(phid); }
void Group< TOutput >::setProvenance | ( | boost::shared_ptr< BranchMapper > | mapper, |
ProcessHistoryID const & | phid, | ||
ProductID const & | pid | ||
) |
Definition at line 230 of file Group.cc.
References productData(), edm::ProductData::prov_, edm::Provenance::setProcessHistoryID(), edm::Provenance::setProductID(), and edm::Provenance::setStore().
{ //assert(!productData().prov_); productData().prov_.setProductID(pid); productData().prov_.setStore(mapper); productData().prov_.setProcessHistoryID(phid); }
void edm::Group::swap | ( | Group & | rhs | ) | [inline] |
Definition at line 139 of file Group.h.
References swap_().
Referenced by edm::swap(), edm::SourceGroup::swap_(), edm::ScheduledGroup::swap_(), edm::InputGroup::swap_(), and edm::UnscheduledGroup::swap_().
{swap_(rhs);}
virtual void edm::Group::swap_ | ( | Group & | rhs | ) | [private, pure virtual] |
Implemented in edm::InputGroup, edm::ScheduledGroup, edm::UnscheduledGroup, and edm::SourceGroup.
Referenced by swap().
WrapperHolder edm::Group::wrapper | ( | ) | const [inline] |
Definition at line 58 of file Group.h.
References edm::ProductData::getInterface(), and productData().
Referenced by mergeTheProduct(), productType(), edm::InputGroup::productUnavailable_(), edm::ProducedGroup::productUnavailable_(), and provenanceAvailable().
{ return WrapperHolder(productData().wrapper_.get(), productData().getInterface()); }
void Group< TOutput >::write | ( | std::ostream & | os | ) | const |
Definition at line 254 of file Group.cc.
References productID().
Referenced by edm::operator<<().
{ // This is grossly inadequate. It is also not critical for the // first pass. os << std::string("Group for product with ID: ") << productID(); }