#include <LuminosityBlock.h>
Public Member Functions | |
template<typename PROD > | |
bool | get (SelectorBase const &, Handle< PROD > &result) const |
void | getAllProvenance (std::vector< Provenance const * > &provenances) const |
template<typename PROD > | |
bool | getByLabel (std::string const &label, Handle< PROD > &result) const |
template<typename PROD > | |
bool | getByLabel (std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const |
template<typename PROD > | |
bool | getByLabel (InputTag const &tag, Handle< PROD > &result) const |
same as above, but using the InputTag class | |
template<typename PROD > | |
bool | getByType (Handle< PROD > &result) const |
template<typename PROD > | |
void | getMany (SelectorBase const &, std::vector< Handle< PROD > > &results) const |
template<typename PROD > | |
void | getManyByType (std::vector< Handle< PROD > > &results) const |
Provenance | getProvenance (BranchID const &theID) const |
Run const & | getRun () const |
LuminosityBlock (LuminosityBlockPrincipal &lbp, ModuleDescription const &md) | |
LuminosityBlockAuxiliary const & | luminosityBlockAuxiliary () const |
ProcessHistory const & | processHistory () const |
ProcessHistoryID const & | processHistoryID () const |
template<typename PROD > | |
void | put (std::auto_ptr< PROD > product, std::string const &productInstanceName) |
Put a new product with a 'product instance name'. | |
template<typename PROD > | |
void | put (std::auto_ptr< PROD > product) |
Put a new product. | |
~LuminosityBlock () | |
Private Types | |
typedef std::set< BranchID > | BranchIDSet |
typedef std::vector< std::pair < WrapperOwningHolder, ConstBranchDescription const * > > | ProductPtrVec |
Private Member Functions | |
void | addToGotBranchIDs (Provenance const &prov) const |
void | commit_ () |
virtual BasicHandle | getByLabelImpl (std::type_info const &iWrapperType, std::type_info const &iProductType, InputTag const &iTag) const |
LuminosityBlockPrincipal & | luminosityBlockPrincipal () |
LuminosityBlockPrincipal const & | luminosityBlockPrincipal () const |
ProductPtrVec & | putProducts () |
ProductPtrVec const & | putProducts () const |
Private Attributes | |
LuminosityBlockAuxiliary const & | aux_ |
BranchIDSet | gotBranchIDs_ |
PrincipalGetAdapter | provRecorder_ |
ProductPtrVec | putProducts_ |
boost::shared_ptr< Run const > const | run_ |
Friends | |
class | ConfigurableInputSource |
class | DaqSource |
class | EDFilter |
class | EDProducer |
class | InputSource |
class | RawInputSource |
Definition at line 37 of file LuminosityBlock.h.
typedef std::set<BranchID> edm::LuminosityBlock::BranchIDSet [private] |
Definition at line 134 of file LuminosityBlock.h.
typedef std::vector<std::pair<WrapperOwningHolder, ConstBranchDescription const*> > edm::LuminosityBlock::ProductPtrVec [private] |
Definition at line 112 of file LuminosityBlock.h.
LuminosityBlock::LuminosityBlock | ( | LuminosityBlockPrincipal & | lbp, |
ModuleDescription const & | md | ||
) |
Definition at line 9 of file LuminosityBlock.cc.
: provRecorder_(lbp, md), aux_(lbp.aux()), run_(new Run(lbp.runPrincipal(), md)) { }
LuminosityBlock::~LuminosityBlock | ( | ) |
Definition at line 15 of file LuminosityBlock.cc.
References edm::for_all(), and putProducts_.
{ // anything left here must be the result of a failure // let's record them as failed attempts in the event principal for_all(putProducts_, principal_get_adapter_detail::deleter()); }
void LuminosityBlock::addToGotBranchIDs | ( | Provenance const & | prov | ) | const [private] |
Definition at line 69 of file LuminosityBlock.cc.
References edm::Provenance::branchID(), and gotBranchIDs_.
Referenced by getByLabelImpl().
{ gotBranchIDs_.insert(prov.branchID()); }
void LuminosityBlock::commit_ | ( | ) | [private] |
Definition at line 42 of file LuminosityBlock.cc.
References begin, end, luminosityBlockPrincipal(), edm::LuminosityBlockPrincipal::put(), and putProducts().
Referenced by edm::InputSource::doBeginLumi(), edm::EDFilter::doBeginLuminosityBlock(), edm::EDProducer::doBeginLuminosityBlock(), edm::InputSource::doEndLumi(), edm::EDFilter::doEndLuminosityBlock(), and edm::EDProducer::doEndLuminosityBlock().
{ LuminosityBlockPrincipal& lbp = luminosityBlockPrincipal(); ProductPtrVec::iterator pit(putProducts().begin()); ProductPtrVec::iterator pie(putProducts().end()); while(pit != pie) { lbp.put(*pit->second, pit->first); // Ownership has passed, so clear the pointer. pit->first.reset(); ++pit; } // the cleanup is all or none putProducts().clear(); }
bool LuminosityBlock::get | ( | SelectorBase const & | sel, |
Handle< PROD > & | result | ||
) | const |
Definition at line 165 of file LuminosityBlock.h.
References edm::PrincipalGetAdapter::get(), and provRecorder_.
{ return provRecorder_.get(sel,result); }
void LuminosityBlock::getAllProvenance | ( | std::vector< Provenance const * > & | provenances | ) | const |
Definition at line 37 of file LuminosityBlock.cc.
References edm::Principal::getAllProvenance(), and luminosityBlockPrincipal().
{ luminosityBlockPrincipal().getAllProvenance(provenances); }
bool LuminosityBlock::getByLabel | ( | InputTag const & | tag, |
Handle< PROD > & | result | ||
) | const |
same as above, but using the InputTag class
Reimplemented from edm::LuminosityBlockBase.
Definition at line 186 of file LuminosityBlock.h.
References edm::PrincipalGetAdapter::getByLabel(), and provRecorder_.
{ return provRecorder_.getByLabel(tag,result); }
bool LuminosityBlock::getByLabel | ( | std::string const & | label, |
std::string const & | productInstanceName, | ||
Handle< PROD > & | result | ||
) | const |
Definition at line 177 of file LuminosityBlock.h.
References edm::PrincipalGetAdapter::getByLabel(), and provRecorder_.
{ return provRecorder_.getByLabel(label,productInstanceName,result); }
bool LuminosityBlock::getByLabel | ( | std::string const & | label, |
Handle< PROD > & | result | ||
) | const |
Definition at line 171 of file LuminosityBlock.h.
References edm::PrincipalGetAdapter::getByLabel(), and provRecorder_.
Referenced by EventHeader::analyze(), L1GtAnalyzer::analyzeConditionsInLumiBlock(), pat::PATTriggerEventProducer::beginLuminosityBlock(), pat::PATTriggerProducer::beginLuminosityBlock(), LogErrorEventFilter::beginLuminosityBlock(), HLTPrescaleRecorder::beginLuminosityBlock(), LumiCalculator::endLuminosityBlock(), BPhysicsOniaDQM::endLuminosityBlock(), edm::service::RandomNumberGeneratorService::readFromLuminosityBlock(), and AlcaBeamSpotManager::readLumi().
{ return provRecorder_.getByLabel(label,result); }
BasicHandle LuminosityBlock::getByLabelImpl | ( | std::type_info const & | iWrapperType, |
std::type_info const & | iProductType, | ||
InputTag const & | iTag | ||
) | const [private, virtual] |
Implements edm::LuminosityBlockBase.
Definition at line 74 of file LuminosityBlock.cc.
References addToGotBranchIDs(), edm::PrincipalGetAdapter::getByLabel_(), h, edm::BasicHandle::isValid(), edm::BasicHandle::provenance(), and provRecorder_.
{ BasicHandle h = provRecorder_.getByLabel_(TypeID(iProductType), iTag); if (h.isValid()) { addToGotBranchIDs(*(h.provenance())); } return h; }
bool LuminosityBlock::getByType | ( | Handle< PROD > & | result | ) | const |
Definition at line 198 of file LuminosityBlock.h.
References edm::PrincipalGetAdapter::getByType(), and provRecorder_.
Referenced by GenFilterEfficiencyAnalyzer::endLuminosityBlock().
{ return provRecorder_.getByType(result); }
void LuminosityBlock::getMany | ( | SelectorBase const & | sel, |
std::vector< Handle< PROD > > & | results | ||
) | const |
Definition at line 192 of file LuminosityBlock.h.
References edm::PrincipalGetAdapter::getMany(), provRecorder_, and python::entryComment::results.
{ return provRecorder_.getMany(sel,results); }
void LuminosityBlock::getManyByType | ( | std::vector< Handle< PROD > > & | results | ) | const |
Definition at line 204 of file LuminosityBlock.h.
References edm::PrincipalGetAdapter::getManyByType(), provRecorder_, and python::entryComment::results.
{ return provRecorder_.getManyByType(results); }
Provenance LuminosityBlock::getProvenance | ( | BranchID const & | theID | ) | const |
Definition at line 32 of file LuminosityBlock.cc.
References edm::Principal::getProvenance(), and luminosityBlockPrincipal().
{ return luminosityBlockPrincipal().getProvenance(bid); }
Run const& edm::LuminosityBlock::getRun | ( | ) | const [inline] |
Definition at line 77 of file LuminosityBlock.h.
References run_.
Referenced by LumiCalculator::endLuminosityBlock(), and edm::Event::getRun().
{ return *run_; }
LuminosityBlockAuxiliary const& edm::LuminosityBlock::luminosityBlockAuxiliary | ( | ) | const [inline, virtual] |
Implements edm::LuminosityBlockBase.
Definition at line 43 of file LuminosityBlock.h.
References aux_.
{return aux_;}
LuminosityBlockPrincipal const & LuminosityBlock::luminosityBlockPrincipal | ( | ) | const [private] |
Definition at line 27 of file LuminosityBlock.cc.
References compareJSON::const, edm::PrincipalGetAdapter::principal(), and provRecorder_.
Referenced by commit_(), getAllProvenance(), getProvenance(), and processHistoryID().
{ return dynamic_cast<LuminosityBlockPrincipal const&>(provRecorder_.principal()); }
LuminosityBlockPrincipal & LuminosityBlock::luminosityBlockPrincipal | ( | ) | [private] |
Definition at line 22 of file LuminosityBlock.cc.
References edm::PrincipalGetAdapter::principal(), and provRecorder_.
{ return dynamic_cast<LuminosityBlockPrincipal&>(provRecorder_.principal()); }
ProcessHistory const & LuminosityBlock::processHistory | ( | ) | const |
Definition at line 64 of file LuminosityBlock.cc.
References edm::PrincipalGetAdapter::processHistory(), and provRecorder_.
{ return provRecorder_.processHistory(); }
ProcessHistoryID const & LuminosityBlock::processHistoryID | ( | ) | const |
Definition at line 59 of file LuminosityBlock.cc.
References luminosityBlockPrincipal(), and edm::Principal::processHistoryID().
{ return luminosityBlockPrincipal().processHistoryID(); }
void LuminosityBlock::put | ( | std::auto_ptr< PROD > | product, |
std::string const & | productInstanceName | ||
) |
Put a new product with a 'product instance name'.
Definition at line 140 of file LuminosityBlock.h.
References edm::PrincipalGetAdapter::getBranchDescription(), PROD, provRecorder_, putProducts(), edm::principal_get_adapter_detail::throwOnPutOfNullProduct(), and relativeConstraints::value.
{ if(product.get() == 0) { // null pointer is illegal TypeID typeID(typeid(PROD)); principal_get_adapter_detail::throwOnPutOfNullProduct("LuminosityBlock", typeID, productInstanceName); } // The following will call post_insert if T has such a function, // and do nothing if T has no such function. typename boost::mpl::if_c<detail::has_postinsert<PROD>::value, DoPostInsert<PROD>, DoNotPostInsert<PROD> >::type maybe_inserter; maybe_inserter(product.get()); ConstBranchDescription const& desc = provRecorder_.getBranchDescription(TypeID(*product), productInstanceName); WrapperOwningHolder edp(new Wrapper<PROD>(product), Wrapper<PROD>::getInterface()); putProducts().push_back(std::make_pair(edp, &desc)); // product.release(); // The object has been copied into the Wrapper. // The old copy must be deleted, so we cannot release ownership. }
void edm::LuminosityBlock::put | ( | std::auto_ptr< PROD > | product | ) | [inline] |
Put a new product.
Definition at line 84 of file LuminosityBlock.h.
Referenced by LumiProducer::beginLuminosityBlock(), RandomEngineStateProducer::beginLuminosityBlock(), ConditionDumperInEdm::endLuminosityBlock(), EventCountProducer::endLuminosityBlock(), HLTPrescaleRecorder::endLuminosityBlock(), AlcaBeamSpotProducer::endLuminosityBlock(), LogErrorEventFilter::endLuminosityBlock(), AlcaBeamSpotFromDB::endLuminosityBlock(), GenFilterEfficiencyProducer::endLuminosityBlock(), ExpressLumiProducer::writeEmptyProductForEntry(), ExpressLumiProducer::writeProductsForEntry(), and LumiProducer::writeProductsForEntry().
{put<PROD>(product, std::string());}
ProductPtrVec const& edm::LuminosityBlock::putProducts | ( | ) | const [inline, private] |
ProductPtrVec& edm::LuminosityBlock::putProducts | ( | ) | [inline, private] |
Definition at line 113 of file LuminosityBlock.h.
References putProducts_.
Referenced by commit_(), and put().
{return putProducts_;}
friend class ConfigurableInputSource [friend] |
Definition at line 120 of file LuminosityBlock.h.
friend class DaqSource [friend] |
Definition at line 122 of file LuminosityBlock.h.
friend class EDFilter [friend] |
Definition at line 124 of file LuminosityBlock.h.
friend class EDProducer [friend] |
Definition at line 125 of file LuminosityBlock.h.
friend class InputSource [friend] |
Definition at line 121 of file LuminosityBlock.h.
friend class RawInputSource [friend] |
Definition at line 123 of file LuminosityBlock.h.
LuminosityBlockAuxiliary const& edm::LuminosityBlock::aux_ [private] |
Definition at line 132 of file LuminosityBlock.h.
Referenced by luminosityBlockAuxiliary().
BranchIDSet edm::LuminosityBlock::gotBranchIDs_ [mutable, private] |
Definition at line 135 of file LuminosityBlock.h.
Referenced by addToGotBranchIDs().
Definition at line 130 of file LuminosityBlock.h.
Referenced by get(), getByLabel(), getByLabelImpl(), getByType(), getMany(), getManyByType(), luminosityBlockPrincipal(), processHistory(), and put().
Definition at line 131 of file LuminosityBlock.h.
Referenced by putProducts(), and ~LuminosityBlock().
boost::shared_ptr<Run const> const edm::LuminosityBlock::run_ [private] |
Definition at line 133 of file LuminosityBlock.h.
Referenced by getRun().