#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 |
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 < EDProduct *, ConstBranchDescription const * > > | ProductPtrVec |
Private Member Functions | |
void | addToGotBranchIDs (Provenance const &prov) const |
void | commit_ () |
virtual BasicHandle | getByLabelImpl (const std::type_info &iWrapperType, const std::type_info &iProductType, const InputTag &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 34 of file LuminosityBlock.h.
typedef std::set<BranchID> edm::LuminosityBlock::BranchIDSet [private] |
Definition at line 129 of file LuminosityBlock.h.
typedef std::vector<std::pair<EDProduct*, ConstBranchDescription const*> > edm::LuminosityBlock::ProductPtrVec [private] |
Definition at line 107 of file LuminosityBlock.h.
LuminosityBlock::LuminosityBlock | ( | LuminosityBlockPrincipal & | lbp, |
ModuleDescription const & | md | ||
) |
Definition at line 8 of file LuminosityBlock.cc.
: provRecorder_(lbp, md), aux_(lbp.aux()), run_(new Run(lbp.runPrincipal(), md)) { }
LuminosityBlock::~LuminosityBlock | ( | ) |
Definition at line 14 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 72 of file LuminosityBlock.cc.
References edm::Provenance::branchID(), and gotBranchIDs_.
Referenced by getByLabelImpl().
{ gotBranchIDs_.insert(prov.branchID()); }
void LuminosityBlock::commit_ | ( | ) | [private] |
Definition at line 44 of file LuminosityBlock.cc.
References begin, end, luminosityBlockPrincipal(), edm::productstatus::present(), 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().
{ // fill in guts of provenance here LuminosityBlockPrincipal & lbp = luminosityBlockPrincipal(); ProductPtrVec::iterator pit(putProducts().begin()); ProductPtrVec::iterator pie(putProducts().end()); while(pit!=pie) { // set provenance std::auto_ptr<ProductProvenance> lumiEntryInfoPtr( new ProductProvenance(pit->second->branchID(), productstatus::present())); std::auto_ptr<EDProduct> pr(pit->first); // Ownership has passed, so clear the pointer. pit->first = 0; lbp.put(*pit->second, pr, lumiEntryInfoPtr); ++pit; } // the cleanup is all or none putProducts().clear(); }
bool LuminosityBlock::get | ( | SelectorBase const & | sel, |
Handle< PROD > & | result | ||
) | const |
Definition at line 161 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 182 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 173 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 167 of file LuminosityBlock.h.
References edm::PrincipalGetAdapter::getByLabel(), and provRecorder_.
Referenced by L1GtAnalyzer::analyzeConditionsInLumiBlock(), pat::PATTriggerEventProducer::beginLuminosityBlock(), pat::PATTriggerProducer::beginLuminosityBlock(), HLTPrescaleRecorder::beginLuminosityBlock(), LumiCalculator::endLuminosityBlock(), BPhysicsOniaDQM::endLuminosityBlock(), edm::service::RandomNumberGeneratorService::readFromLuminosityBlock(), and AlcaBeamSpotManager::readLumi().
{ return provRecorder_.getByLabel(label,result); }
BasicHandle LuminosityBlock::getByLabelImpl | ( | const std::type_info & | iWrapperType, |
const std::type_info & | iProductType, | ||
const InputTag & | iTag | ||
) | const [private, virtual] |
Implements edm::LuminosityBlockBase.
Definition at line 77 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 194 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 188 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 200 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 31 of file LuminosityBlock.cc.
References edm::Principal::getProvenance(), and luminosityBlockPrincipal().
{ return luminosityBlockPrincipal().getProvenance(bid); }
Run const& edm::LuminosityBlock::getRun | ( | ) | const [inline] |
Definition at line 74 of file LuminosityBlock.h.
References run_.
Referenced by edm::Event::getRun().
{ return *run_; }
LuminosityBlockAuxiliary const& edm::LuminosityBlock::luminosityBlockAuxiliary | ( | ) | const [inline, virtual] |
Implements edm::LuminosityBlockBase.
Definition at line 40 of file LuminosityBlock.h.
References aux_.
{return aux_;}
LuminosityBlockPrincipal const & LuminosityBlock::luminosityBlockPrincipal | ( | ) | const [private] |
Definition at line 26 of file LuminosityBlock.cc.
References compareJSON::const, edm::PrincipalGetAdapter::principal(), and provRecorder_.
Referenced by commit_(), getAllProvenance(), and getProvenance().
{ return dynamic_cast<LuminosityBlockPrincipal const&>(provRecorder_.principal()); }
LuminosityBlockPrincipal & LuminosityBlock::luminosityBlockPrincipal | ( | ) | [private] |
Definition at line 21 of file LuminosityBlock.cc.
References edm::PrincipalGetAdapter::principal(), and provRecorder_.
{ return dynamic_cast<LuminosityBlockPrincipal &>(provRecorder_.principal()); }
ProcessHistory const & LuminosityBlock::processHistory | ( | ) | const |
Definition at line 67 of file LuminosityBlock.cc.
References edm::PrincipalGetAdapter::processHistory(), and provRecorder_.
{ return provRecorder_.processHistory(); }
void edm::LuminosityBlock::put | ( | std::auto_ptr< PROD > | product | ) | [inline] |
Put a new product.
Definition at line 81 of file LuminosityBlock.h.
Referenced by RandomEngineStateProducer::beginLuminosityBlock(), ConditionDumperInEdm::endLuminosityBlock(), LumiProducer::endLuminosityBlock(), EventCountProducer::endLuminosityBlock(), AlcaBeamSpotProducer::endLuminosityBlock(), HLTPrescaleRecorder::endLuminosityBlock(), AlcaBeamSpotFromDB::endLuminosityBlock(), GenFilterEfficiencyProducer::endLuminosityBlock(), and LumiProducer::writeProductsForEntry().
{put<PROD>(product, std::string());}
void LuminosityBlock::put | ( | std::auto_ptr< PROD > | product, |
std::string const & | productInstanceName | ||
) |
Put a new product with a 'product instance name'.
Definition at line 135 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); Wrapper<PROD> *wp(new Wrapper<PROD>(product)); putProducts().push_back(std::make_pair(wp, &desc)); // product.release(); // The object has been copied into the Wrapper. // The old copy must be deleted, so we cannot release ownership. }
ProductPtrVec& edm::LuminosityBlock::putProducts | ( | ) | [inline, private] |
Definition at line 108 of file LuminosityBlock.h.
References putProducts_.
Referenced by commit_(), and put().
{return putProducts_;}
ProductPtrVec const& edm::LuminosityBlock::putProducts | ( | ) | const [inline, private] |
friend class ConfigurableInputSource [friend] |
Definition at line 115 of file LuminosityBlock.h.
friend class DaqSource [friend] |
Definition at line 117 of file LuminosityBlock.h.
friend class EDFilter [friend] |
Definition at line 119 of file LuminosityBlock.h.
friend class EDProducer [friend] |
Definition at line 120 of file LuminosityBlock.h.
friend class InputSource [friend] |
Definition at line 116 of file LuminosityBlock.h.
friend class RawInputSource [friend] |
Definition at line 118 of file LuminosityBlock.h.
LuminosityBlockAuxiliary const& edm::LuminosityBlock::aux_ [private] |
Definition at line 127 of file LuminosityBlock.h.
Referenced by luminosityBlockAuxiliary().
BranchIDSet edm::LuminosityBlock::gotBranchIDs_ [mutable, private] |
Definition at line 130 of file LuminosityBlock.h.
Referenced by addToGotBranchIDs().
Definition at line 125 of file LuminosityBlock.h.
Referenced by get(), getByLabel(), getByLabelImpl(), getByType(), getMany(), getManyByType(), luminosityBlockPrincipal(), processHistory(), and put().
Definition at line 126 of file LuminosityBlock.h.
Referenced by putProducts(), and ~LuminosityBlock().
boost::shared_ptr<Run const> const edm::LuminosityBlock::run_ [private] |
Definition at line 128 of file LuminosityBlock.h.
Referenced by getRun().