#include <FWCore/Framework/interface/Run.h>
Public Types | |
typedef DataViewImpl | Base |
Public Member Functions | |
Timestamp const & | beginTime () const |
Timestamp const & | endTime () const |
void | getAllProvenance (std::vector< Provenance const * > &provenances) const |
bool | getProcessParameterSet (std::string const &processName, std::vector< ParameterSet > &ps) const |
Provenance | getProvenance (BranchID const &theID) const |
RunID const & | id () 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. | |
RunNumber_t | run () const |
Run (RunPrincipal &rp, const ModuleDescription &md) | |
~Run () | |
Private Member Functions | |
void | commit_ () |
RunPrincipal & | runPrincipal () |
RunPrincipal const & | runPrincipal () const |
Private Attributes | |
RunAuxiliary const & | aux_ |
Friends | |
class | ConfigurableInputSource |
class | DaqSource |
class | EDFilter |
class | EDProducer |
class | InputSource |
class | RawInputSource |
Definition at line 30 of file Run.h.
typedef DataViewImpl edm::Run::Base |
Run::Run | ( | RunPrincipal & | rp, | |
const ModuleDescription & | md | |||
) |
Definition at line 12 of file Run.cc.
00012 : 00013 DataViewImpl(rp, md, InRun), 00014 aux_(rp.aux()) { 00015 }
Timestamp const& edm::Run::beginTime | ( | ) | const [inline] |
Definition at line 40 of file Run.h.
References aux_, and edm::RunAuxiliary::beginTime().
Referenced by DQMEventInfo::beginRun(), and XmasToDQMEventInfo::beginRun().
00040 {return aux_.beginTime();}
void Run::commit_ | ( | ) | [private] |
Definition at line 77 of file Run.cc.
References begin, end, edm::productstatus::present(), and edm::RunPrincipal::put().
Referenced by edm::EDProducer::doBeginRun(), edm::EDFilter::doBeginRun(), edm::EDProducer::doEndRun(), edm::EDFilter::doEndRun(), edm::InputSource::doEndRun(), and edm::ConfigurableInputSource::readRun_().
00077 { 00078 // fill in guts of provenance here 00079 RunPrincipal & rp = runPrincipal(); 00080 ProductPtrVec::iterator pit(putProducts().begin()); 00081 ProductPtrVec::iterator pie(putProducts().end()); 00082 00083 while(pit!=pie) { 00084 std::auto_ptr<EDProduct> pr(pit->first); 00085 // note: ownership has been passed - so clear the pointer! 00086 pit->first = 0; 00087 00088 // set provenance 00089 std::auto_ptr<EventEntryInfo> runEntryInfoPtr( 00090 new EventEntryInfo(pit->second->branchID(), 00091 productstatus::present(), 00092 pit->second->moduleDescriptionID())); 00093 rp.put(pr, *pit->second, runEntryInfoPtr); 00094 ++pit; 00095 } 00096 00097 // the cleanup is all or none 00098 putProducts().clear(); 00099 }
Timestamp const& edm::Run::endTime | ( | ) | const [inline] |
Definition at line 41 of file Run.h.
References aux_, and edm::RunAuxiliary::endTime().
00041 {return aux_.endTime();}
void Run::getAllProvenance | ( | std::vector< Provenance const * > & | provenances | ) | const |
Definition at line 34 of file Run.cc.
Referenced by GlobalHitsProdHistStripper::beginRun().
00035 { 00036 runPrincipal().getAllProvenance(provenances); 00037 }
bool Run::getProcessParameterSet | ( | std::string const & | processName, | |
std::vector< ParameterSet > & | ps | |||
) | const |
Definition at line 40 of file Run.cc.
References e, edm::detail::ThreadSafeRegistry< KEY, T, E >::getMapped(), i, and pyDBSRunClass::temp.
00042 { 00043 // Get the relevant ProcessHistoryIDs 00044 ProcessHistoryRegistry* phreg = ProcessHistoryRegistry::instance(); 00045 std::vector<ProcessHistoryID> historyIDs; 00046 00047 00048 // Get the relevant ParameterSetIDs. 00049 std::vector<ParameterSetID> psetIdsUsed; 00050 for (std::vector<ProcessHistoryID>::const_iterator 00051 i = historyIDs.begin(), 00052 e = historyIDs.end(); 00053 i != e; 00054 ++i) 00055 { 00056 ProcessHistory temp; 00057 phreg->getMapped(*i, temp); 00058 } 00059 00060 // Look up the ParameterSets for these IDs. 00061 pset::Registry* psreg = pset::Registry::instance(); 00062 for (std::vector<ParameterSetID>::const_iterator 00063 i = psetIdsUsed.begin(), 00064 e = psetIdsUsed.end(); 00065 i != e; 00066 ++i) 00067 { 00068 ParameterSet temp; 00069 psreg->getMapped(*i, temp); 00070 psets.push_back(temp); 00071 } 00072 00073 return false; 00074 }
Provenance Run::getProvenance | ( | BranchID const & | theID | ) | const |
Definition at line 28 of file Run.cc.
00029 { 00030 return runPrincipal().getProvenance(bid); 00031 }
Definition at line 38 of file Run.h.
References aux_, and edm::RunAuxiliary::id().
Referenced by HLTJetMETDQMSource::beginRun(), EgHLTOfflineClient::beginRun(), cms::SiStripHistoricPlot::beginRun(), FourVectorHLTOffline::beginRun(), HcalMonitorClient::beginRun(), EcalBarrelMonitorClient::beginRun(), DQMFileSaver::beginRun(), HLTScalers::beginRun(), FourVectorHLTOnline::beginRun(), EcalEndcapMonitorClient::beginRun(), FourVectorHLT::beginRun(), FourVectorHLTOnline::endRun(), HcalMonitorClient::endRun(), FourVectorHLTOffline::endRun(), EgHLTOfflineClient::endRun(), FourVectorHLT::endRun(), EcalEndcapMonitorClient::endRun(), EcalBarrelMonitorClient::endRun(), HLTScalers::endRun(), and HLTJetMETDQMSource::endRun().
00038 {return aux_.id();}
void Run::put | ( | std::auto_ptr< PROD > | product, | |
std::string const & | productInstanceName | |||
) | [inline] |
Put a new product with a 'product instance name'.
Definition at line 102 of file Run.h.
References edm::errors::NullPointerError, PROD, and value.
00103 { 00104 if (product.get() == 0) { // null pointer is illegal 00105 TypeID typeID(typeid(PROD)); 00106 throw edm::Exception(edm::errors::NullPointerError) 00107 << "Run::put: A null auto_ptr was passed to 'put'.\n" 00108 << "The pointer is of type " << typeID << ".\n" 00109 << "The specified productInstanceName was '" << productInstanceName << "'.\n"; 00110 } 00111 00112 // The following will call post_insert if T has such a function, 00113 // and do nothing if T has no such function. 00114 typename boost::mpl::if_c<detail::has_postinsert<PROD>::value, 00115 DoPostInsert<PROD>, 00116 DoNotPostInsert<PROD> >::type maybe_inserter; 00117 maybe_inserter(product.get()); 00118 00119 ConstBranchDescription const& desc = 00120 getBranchDescription(TypeID(*product), productInstanceName); 00121 00122 Wrapper<PROD> *wp(new Wrapper<PROD>(product)); 00123 00124 putProducts().push_back(std::make_pair(wp, &desc)); 00125 00126 // product.release(); // The object has been copied into the Wrapper. 00127 // The old copy must be deleted, so we cannot release ownership. 00128 }
void edm::Run::put | ( | std::auto_ptr< PROD > | product | ) | [inline] |
Put a new product.
Definition at line 54 of file Run.h.
Referenced by edm::AlpgenProducer::beginRun(), edm::AlpgenSource::beginRun(), LHESource::beginRun(), ThePEGSource::endRun(), edm::MCatNLOProducer::endRun(), edm::PomwigProducer::endRun(), edm::Herwig6Source::endRun(), edm::MCatNLOSource::endRun(), edm::PythiaProducer::endRun(), GlobalHitsProdHist::endRun(), edm::Pythia8Source::endRun(), edm::Herwig6Producer::endRun(), edm::ExhumeSource::endRun(), MEtoEDMConverter::endRun(), edm::PythiaSource::endRun(), edm::PomwigSource::endRun(), ThePEGProducer::endRun(), and LHEProducer::endRun().
RunNumber_t edm::Run::run | ( | void | ) | const [inline] |
Definition at line 39 of file Run.h.
References aux_, and edm::RunAuxiliary::run().
Referenced by GlobalHitsProdHistStripper::beginRun(), HistoricOfflineClient::beginRun(), MEtoEDMConverter::beginRun(), SiPixelHistoricInfoEDAClient::beginRun(), EDMtoMEConverter::beginRun(), SiPixelHistoricInfoEDAClient::endRun(), MEtoEDMConverter::endRun(), HistoricOfflineClient::fillSummaryObjects(), FamosManager::setupGeometryAndField(), SiPixelHistoricInfoEDAClient::writetoDB(), HistoricOfflineClient::writeToDB(), and CopyPerformanceSummary::writeToDB().
00039 {return aux_.run();}
RunPrincipal & Run::runPrincipal | ( | ) | [private] |
Definition at line 18 of file Run.cc.
References cmsRelvalreport::principal().
00018 { 00019 return dynamic_cast<RunPrincipal &>(principal()); 00020 }
RunPrincipal const & Run::runPrincipal | ( | ) | const [private] |
Definition at line 23 of file Run.cc.
References cmsRelvalreport::principal().
00023 { 00024 return dynamic_cast<RunPrincipal const&>(principal()); 00025 }
friend class ConfigurableInputSource [friend] |
friend class EDProducer [friend] |
friend class InputSource [friend] |
friend class RawInputSource [friend] |
RunAuxiliary const& edm::Run::aux_ [private] |