CMS 3D CMS Logo

Classes | Public Member Functions | Private Member Functions | Private Attributes

edm::ProcessConfiguration Class Reference

#include <ProcessConfiguration.h>

List of all members.

Classes

struct  Transients

Public Member Functions

ProcessConfigurationID id () 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
ReleaseVersion const & releaseVersion () const
void setParameterSetID (ParameterSetID const &pSetID)

Private Member Functions

bool & isCurrentProcess () const
ProcessConfigurationIDpcid () const

Private Attributes

ParameterSetID parameterSetID_
PassID passID_
std::string processName_
ReleaseVersion releaseVersion_
Transient< Transientstransients_

Detailed Description

Definition at line 14 of file ProcessConfiguration.h.


Constructor & Destructor Documentation

edm::ProcessConfiguration::ProcessConfiguration ( )

Definition at line 16 of file ProcessConfiguration.cc.

edm::ProcessConfiguration::ProcessConfiguration ( std::string const &  procName,
ReleaseVersion const &  relVersion,
PassID const &  pass 
)

Definition at line 28 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 18 of file ProcessConfiguration.cc.

                                            :
      processName_(procName),
      parameterSetID_(pSetID),
      releaseVersion_(relVersion),
      passID_(pass) { }

Member Function Documentation

ProcessConfigurationID edm::ProcessConfiguration::id ( void  ) const

Definition at line 53 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();
  }
bool& edm::ProcessConfiguration::isCurrentProcess ( ) const [inline, private]

Definition at line 43 of file ProcessConfiguration.h.

References edm::Transient< T >::get(), and transients_.

Referenced by parameterSetID(), and ProcessConfiguration().

{return transients_.get().isCurrentProcess_;}
bool edm::ProcessConfiguration::isParameterSetValid ( ) const [inline]

Definition at line 28 of file ProcessConfiguration.h.

References edm::Hash< I >::isValid(), and parameterSetID_.

{return parameterSetID_.isValid();}
ParameterSetID const & edm::ProcessConfiguration::parameterSetID ( ) const

Definition at line 38 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 30 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 42 of file ProcessConfiguration.h.

References edm::Transient< T >::get(), and transients_.

Referenced by id().

{return transients_.get().pcid_;}
std::string const& edm::ProcessConfiguration::processName ( ) const [inline]
ReleaseVersion const& edm::ProcessConfiguration::releaseVersion ( ) const [inline]
void edm::ProcessConfiguration::setParameterSetID ( ParameterSetID const &  pSetID)

Definition at line 68 of file ProcessConfiguration.cc.

References parameterSetID_.

                                                                      {
    assert(parameterSetID_ == ParameterSetID());
    parameterSetID_ = pSetID;
  }

Member Data Documentation

Definition at line 46 of file ProcessConfiguration.h.

Referenced by isParameterSetValid(), parameterSetID(), and setParameterSetID().

Definition at line 48 of file ProcessConfiguration.h.

Referenced by passID().

Definition at line 45 of file ProcessConfiguration.h.

Referenced by processName().

Definition at line 47 of file ProcessConfiguration.h.

Referenced by releaseVersion().

Definition at line 49 of file ProcessConfiguration.h.

Referenced by isCurrentProcess(), and pcid().