#include <ProcessConfiguration.h>
Classes | |
struct | Transients |
Public Member Functions | |
ProcessConfigurationID | id () const |
void | initializeTransients () const |
bool | isParameterSetValid () const |
ParameterSetID const & | parameterSetID () const |
PassID const & | passID () const |
ProcessConfiguration () | |
ProcessConfiguration (std::string const &procName, ReleaseVersion const &relVersion, PassID const &pass) | |
ProcessConfiguration (std::string const &procName, ParameterSetID const &pSetID, ReleaseVersion const &relVersion, PassID const &pass) | |
std::string const & | processName () const |
void | reduce () |
ReleaseVersion const & | releaseVersion () const |
void | setParameterSetID (ParameterSetID const &pSetID) |
Private Member Functions | |
bool & | isCurrentProcess () const |
ProcessConfigurationID & | pcid () const |
Private Attributes | |
ParameterSetID | parameterSetID_ |
PassID | passID_ |
std::string | processName_ |
ReleaseVersion | releaseVersion_ |
Transients | transient_ |
Definition at line 13 of file ProcessConfiguration.h.
edm::ProcessConfiguration::ProcessConfiguration | ( | ) |
Definition at line 17 of file ProcessConfiguration.cc.
: processName_(), parameterSetID_(), releaseVersion_(), passID_() {}
edm::ProcessConfiguration::ProcessConfiguration | ( | std::string const & | procName, |
ReleaseVersion const & | relVersion, | ||
PassID const & | pass | ||
) |
Definition at line 29 of file ProcessConfiguration.cc.
References isCurrentProcess().
: processName_(procName), parameterSetID_(), releaseVersion_(relVersion), passID_(pass) { isCurrentProcess() = true; }
edm::ProcessConfiguration::ProcessConfiguration | ( | std::string const & | procName, |
ParameterSetID const & | pSetID, | ||
ReleaseVersion const & | relVersion, | ||
PassID const & | pass | ||
) |
Definition at line 19 of file ProcessConfiguration.cc.
: processName_(procName), parameterSetID_(pSetID), releaseVersion_(relVersion), passID_(pass) { }
ProcessConfigurationID edm::ProcessConfiguration::id | ( | void | ) | const |
Definition at line 54 of file ProcessConfiguration.cc.
References cms::Digest::digest(), pcid(), edm::Hash< I >::swap(), and tmp.
Referenced by edm::fillProductRegistryTransients(), edm::Provenance::processConfigurationID(), and edm::ModuleDescription::processConfigurationID().
{ if(pcid().isValid()) { return pcid(); } // This implementation is ripe for optimization. std::ostringstream oss; oss << *this; std::string stringrep = oss.str(); cms::Digest md5alg(stringrep); ProcessConfigurationID tmp(md5alg.digest().toString()); pcid().swap(tmp); return pcid(); }
void edm::ProcessConfiguration::initializeTransients | ( | ) | const [inline] |
Definition at line 36 of file ProcessConfiguration.h.
References edm::ProcessConfiguration::Transients::reset(), and transient_.
{transient_.reset();}
bool& edm::ProcessConfiguration::isCurrentProcess | ( | ) | const [inline, private] |
Definition at line 51 of file ProcessConfiguration.h.
References edm::ProcessConfiguration::Transients::isCurrentProcess_, and transient_.
Referenced by parameterSetID(), and ProcessConfiguration().
{return transient_.isCurrentProcess_;}
bool edm::ProcessConfiguration::isParameterSetValid | ( | ) | const [inline] |
Definition at line 27 of file ProcessConfiguration.h.
References edm::Hash< I >::isValid(), and parameterSetID_.
{return parameterSetID_.isValid();}
ParameterSetID const & edm::ProcessConfiguration::parameterSetID | ( | ) | const |
Definition at line 39 of file ProcessConfiguration.cc.
References Exception, isCurrentProcess(), edm::errors::LogicError, and parameterSetID_.
Referenced by edm::fillProductRegistryTransients(), edm::Event::getProcessParameterSet(), edm::ModuleDescription::mainParameterSetID(), edm::operator<(), edm::operator<<(), and edm::operator==().
{ if (parameterSetID_ == ParameterSetID() && isCurrentProcess()) { throw edm::Exception(errors::LogicError) << "Illegal attempt to access the process top level parameter set ID\n" << "from the ProcessConfiguration before that parameter\n" << "set has been frozen and registered. The parameter set\n" << "can be changed during module validation, which occurs\n" << "concurrently with module construction. The ID of the\n" << "ProcessConfiguration itself also depends on that parameter\n" << "set ID. It is illegal to access either before they are frozen.\n"; } return parameterSetID_; }
PassID const& edm::ProcessConfiguration::passID | ( | ) | const [inline] |
Definition at line 29 of file ProcessConfiguration.h.
References passID_.
Referenced by edm::operator<(), edm::operator<<(), edm::operator==(), and edm::ModuleDescription::passID().
{return passID_;}
ProcessConfigurationID& edm::ProcessConfiguration::pcid | ( | ) | const [inline, private] |
Definition at line 50 of file ProcessConfiguration.h.
References edm::ProcessConfiguration::Transients::pcid_, and transient_.
Referenced by id(), and reduce().
{return transient_.pcid_;}
std::string const& edm::ProcessConfiguration::processName | ( | ) | const [inline] |
Definition at line 25 of file ProcessConfiguration.h.
References processName_.
Referenced by edm::HistoryAppender::checkProcessHistory(), edm::Principal::fillPrincipal(), edm::fillProductRegistryTransients(), FWFileEntry::openFile(), edm::operator<(), edm::operator<<(), edm::operator==(), edm::ModuleDescription::processName(), edm::LumiReWeighting::weight(), and edm::LumiReWeighting::weightOOT().
{return processName_;}
void edm::ProcessConfiguration::reduce | ( | ) |
Definition at line 75 of file ProcessConfiguration.cc.
References pcid(), and releaseVersion_.
{ // Skip to the part of the release version just after // the first two numbers and erase the rest of it. std::string::iterator iter = releaseVersion_.begin(); std::string::iterator iEnd = releaseVersion_.end(); while(iter != iEnd && isdigit(*iter) == 0) ++iter; while(iter != iEnd && isdigit(*iter) != 0) ++iter; while(iter != iEnd && isdigit(*iter) == 0) ++iter; while(iter != iEnd && isdigit(*iter) != 0) ++iter; if (iter == iEnd) return; pcid() = ProcessConfigurationID(); releaseVersion_.erase(iter,iEnd); }
ReleaseVersion const& edm::ProcessConfiguration::releaseVersion | ( | ) | const [inline] |
Definition at line 28 of file ProcessConfiguration.h.
References releaseVersion_.
Referenced by FWFileEntry::openFile(), edm::operator<(), edm::operator<<(), edm::operator==(), edm::Provenance::releaseVersion(), edm::ModuleDescription::releaseVersion(), edm::LumiReWeighting::weight(), and edm::LumiReWeighting::weightOOT().
{return releaseVersion_;}
void edm::ProcessConfiguration::setParameterSetID | ( | ParameterSetID const & | pSetID | ) |
Definition at line 69 of file ProcessConfiguration.cc.
References parameterSetID_.
{ assert(parameterSetID_ == ParameterSetID()); parameterSetID_ = pSetID; }
Definition at line 54 of file ProcessConfiguration.h.
Referenced by isParameterSetValid(), parameterSetID(), and setParameterSetID().
PassID edm::ProcessConfiguration::passID_ [private] |
Definition at line 56 of file ProcessConfiguration.h.
Referenced by passID().
std::string edm::ProcessConfiguration::processName_ [private] |
Definition at line 53 of file ProcessConfiguration.h.
Referenced by processName().
Definition at line 55 of file ProcessConfiguration.h.
Referenced by reduce(), and releaseVersion().
Transients edm::ProcessConfiguration::transient_ [mutable, private] |
Definition at line 57 of file ProcessConfiguration.h.
Referenced by initializeTransients(), isCurrentProcess(), and pcid().