#include <Run.h>
Public Types | |
typedef PrincipalGetAdapter | Base |
Public Member Functions | |
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 > | |
void | getManyByType (std::vector< Handle< PROD > > &results) const |
Provenance | getProvenance (BranchID const &theID) const |
ProcessHistory const & | processHistory () const |
ProcessHistoryID const & | processHistoryID () const |
template<typename PROD > | |
void | put (std::auto_ptr< PROD > product) |
Put a new product. | |
template<typename PROD > | |
void | put (std::auto_ptr< PROD > product, std::string const &productInstanceName) |
Put a new product with a 'product instance name'. | |
Run (RunPrincipal &rp, ModuleDescription const &md) | |
RunAuxiliary const & | runAuxiliary () const |
~Run () | |
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 |
ProductPtrVec const & | putProducts () const |
ProductPtrVec & | putProducts () |
RunPrincipal const & | runPrincipal () const |
RunPrincipal & | runPrincipal () |
Private Attributes | |
RunAuxiliary const & | aux_ |
BranchIDSet | gotBranchIDs_ |
PrincipalGetAdapter | provRecorder_ |
ProductPtrVec | putProducts_ |
Friends | |
class | DaqSource |
class | EDFilter |
class | EDProducer |
class | InputSource |
class | RawInputSource |
typedef PrincipalGetAdapter edm::Run::Base |
typedef std::set<BranchID> edm::Run::BranchIDSet [private] |
typedef std::vector<std::pair<WrapperOwningHolder, ConstBranchDescription const*> > edm::Run::ProductPtrVec [private] |
Run::Run | ( | RunPrincipal & | rp, |
ModuleDescription const & | md | ||
) |
Definition at line 8 of file Run.cc.
: provRecorder_(rp, md), aux_(rp.aux()) { }
Run::~Run | ( | ) |
Definition at line 13 of file Run.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 Run::addToGotBranchIDs | ( | Provenance const & | prov | ) | const [private] |
Definition at line 104 of file Run.cc.
References edm::Provenance::branchID(), and gotBranchIDs_.
Referenced by getByLabelImpl().
{ gotBranchIDs_.insert(prov.branchID()); }
void Run::commit_ | ( | ) | [private] |
Definition at line 77 of file Run.cc.
References begin, end, edm::RunPrincipal::put(), putProducts(), and runPrincipal().
Referenced by edm::InputSource::doBeginRun(), edm::EDProducer::doBeginRun(), edm::EDFilter::doBeginRun(), edm::EDProducer::doEndRun(), edm::EDFilter::doEndRun(), and edm::InputSource::doEndRun().
{ RunPrincipal& rp = runPrincipal(); ProductPtrVec::iterator pit(putProducts().begin()); ProductPtrVec::iterator pie(putProducts().end()); while(pit != pie) { rp.put(*pit->second, pit->first); // Ownership has passed, so clear the pointer. pit->first.reset(); ++pit; } // the cleanup is all or none putProducts().clear(); }
void Run::getAllProvenance | ( | std::vector< Provenance const * > & | provenances | ) | const |
Definition at line 35 of file Run.cc.
References edm::Principal::getAllProvenance(), and runPrincipal().
Referenced by GlobalHitsProdHistStripper::beginRun(), and L1GtUtils::getL1GtTriggerMenuLiteInputTag().
{ runPrincipal().getAllProvenance(provenances); }
bool Run::getByLabel | ( | InputTag const & | tag, |
Handle< PROD > & | result | ||
) | const |
same as above, but using the InputTag class
Reimplemented from edm::RunBase.
Definition at line 173 of file Run.h.
References edm::PrincipalGetAdapter::getByLabel(), and provRecorder_.
{ return provRecorder_.getByLabel(tag, result); }
bool Run::getByLabel | ( | std::string const & | label, |
Handle< PROD > & | result | ||
) | const |
Definition at line 158 of file Run.h.
References edm::PrincipalGetAdapter::getByLabel(), and provRecorder_.
Referenced by L1GtAnalyzer::analyzeConditionsInRunBlock(), L1GtAnalyzer::analyzeL1GtTriggerMenuLite(), pat::PATTriggerEventProducer::beginRun(), pat::PATTriggerProducer::beginRun(), FWFFLooper::beginRun(), RunHistogramManager::beginRun(), LHEWriter::beginRun(), LHEProducer::beginRun(), LHE2HepMCConverter::beginRun(), HLTPrescaleRecorder::beginRun(), LHECOMWeightProducer::beginRun(), AlignmentProducer::endRun(), ExternalLHEAsciiDumper::endRun(), TkLasBeamFitter::endRun(), edm::GetterOfProducts< l1extra::L1EtMissParticleCollection >::fillHandles(), L1GtBeamModeFilter::filter(), PrescaleWeightProvider::initRun(), EveService::postBeginRun(), FWFFService::postBeginRun(), and L1GtUtils::retrieveL1GtTriggerMenuLite().
{ return provRecorder_.getByLabel(label, result); }
bool Run::getByLabel | ( | std::string const & | label, |
std::string const & | productInstanceName, | ||
Handle< PROD > & | result | ||
) | const |
Definition at line 164 of file Run.h.
References edm::PrincipalGetAdapter::getByLabel(), and provRecorder_.
{ return provRecorder_.getByLabel(label, productInstanceName, result); }
BasicHandle Run::getByLabelImpl | ( | std::type_info const & | iWrapperType, |
std::type_info const & | iProductType, | ||
InputTag const & | iTag | ||
) | const [private, virtual] |
Implements edm::RunBase.
Definition at line 109 of file Run.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; }
void Run::getManyByType | ( | std::vector< Handle< PROD > > & | results | ) | const |
Definition at line 179 of file Run.h.
References edm::PrincipalGetAdapter::getManyByType(), provRecorder_, and python::entryComment::results.
Referenced by edm::HadronizerFilter< HAD, DEC >::beginRun(), and GlobalHitsProdHistStripper::endRun().
{ return provRecorder_.getManyByType(results); }
Provenance Run::getProvenance | ( | BranchID const & | theID | ) | const |
Definition at line 30 of file Run.cc.
References edm::Principal::getProvenance(), and runPrincipal().
{ return runPrincipal().getProvenance(bid); }
ProcessHistory const & Run::processHistory | ( | ) | const |
Definition at line 99 of file Run.cc.
References edm::PrincipalGetAdapter::processHistory(), and provRecorder_.
Referenced by pat::PATTriggerEventProducer::beginRun(), pat::PATTriggerProducer::beginRun(), MEtoMEComparitor::beginRun(), and HLTConfigProvider::init().
{ return provRecorder_.processHistory(); }
ProcessHistoryID const & Run::processHistoryID | ( | ) | const |
Definition at line 94 of file Run.cc.
References edm::Principal::processHistoryID(), and runPrincipal().
{ return runPrincipal().processHistoryID(); }
void edm::Run::put | ( | std::auto_ptr< PROD > | product | ) | [inline] |
Put a new product.
Definition at line 69 of file Run.h.
References AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by AlpgenSource::beginRun(), ExternalLHEProducer::beginRun(), L1GtTriggerMenuLiteProducer::beginRun(), MCatNLOSource::beginRun(), LHESource::beginRun(), LaserAlignment::endRun(), HLTPrescaleRecorder::endRun(), LumiProducer::endRun(), edm::CosMuoGenProducer::endRun(), edm::PomwigProducer::endRun(), edm::BeamHaloProducer::endRun(), edm::FlatBaseThetaGunProducer::endRun(), edm::HadronizerFilter< HAD, DEC >::endRun(), LHESource::endRun(), GlobalHitsProdHist::endRun(), ConditionDumperInEdm::endRun(), edm::GeneratorFilter< HAD, DEC >::endRun(), TkLasBeamFitter::endRun(), edm::BaseFlatGunProducer::endRun(), edm::ExhumeProducer::endRun(), ExternalLHEProducer::endRun(), and LHEProducer::endRun().
{put<PROD>(product, std::string());}
void Run::put | ( | std::auto_ptr< PROD > | product, |
std::string const & | productInstanceName | ||
) |
Put a new product with a 'product instance name'.
Definition at line 133 of file Run.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("Run", 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. }
ProductPtrVec const& edm::Run::putProducts | ( | ) | const [inline, private] |
ProductPtrVec& edm::Run::putProducts | ( | ) | [inline, private] |
Definition at line 108 of file Run.h.
References putProducts_.
Referenced by commit_(), and put().
{return putProducts_;}
RunAuxiliary const& edm::Run::runAuxiliary | ( | ) | const [inline, virtual] |
Implements edm::RunBase.
Definition at line 40 of file Run.h.
References aux_.
Referenced by L1GtUtils::getL1GtRunCache(), L1GtUtils::getL1GtTriggerMenuLiteInputTag(), and L1GtUtils::retrieveL1GtTriggerMenuLite().
{return aux_;}
RunPrincipal const & Run::runPrincipal | ( | ) | const [private] |
Definition at line 25 of file Run.cc.
References compareJSON::const, edm::PrincipalGetAdapter::principal(), and provRecorder_.
Referenced by commit_(), getAllProvenance(), getProvenance(), and processHistoryID().
{ return dynamic_cast<RunPrincipal const&>(provRecorder_.principal()); }
RunPrincipal & Run::runPrincipal | ( | ) | [private] |
Definition at line 20 of file Run.cc.
References edm::PrincipalGetAdapter::principal(), and provRecorder_.
{ return dynamic_cast<RunPrincipal&>(provRecorder_.principal()); }
friend class EDProducer [friend] |
friend class InputSource [friend] |
friend class RawInputSource [friend] |
RunAuxiliary const& edm::Run::aux_ [private] |
Definition at line 126 of file Run.h.
Referenced by runAuxiliary().
BranchIDSet edm::Run::gotBranchIDs_ [mutable, private] |
Definition at line 128 of file Run.h.
Referenced by addToGotBranchIDs().
PrincipalGetAdapter edm::Run::provRecorder_ [private] |
Definition at line 124 of file Run.h.
Referenced by getByLabel(), getByLabelImpl(), getManyByType(), processHistory(), put(), and runPrincipal().
ProductPtrVec edm::Run::putProducts_ [private] |
Definition at line 125 of file Run.h.
Referenced by putProducts(), and ~Run().