CMS 3D CMS Logo

ProcessConfiguration.h
Go to the documentation of this file.
1 #ifndef DataFormats_Provenance_ProcessConfiguration_h
2 #define DataFormats_Provenance_ProcessConfiguration_h
3 
8 
9 #include <iosfwd>
10 #include <string>
11 #include <vector>
12 
13 namespace edm {
15  public:
17  ProcessConfiguration(std::string const& procName, ReleaseVersion const& relVersion, PassID const& pass);
18 
19  ProcessConfiguration(std::string const& procName,
20  ParameterSetID const& pSetID,
21  ReleaseVersion const& relVersion,
22  PassID const& pass);
23 
24  std::string const& processName() const { return processName_; }
25  ParameterSetID const& parameterSetID() const;
26  bool isParameterSetValid() const { return parameterSetID_.isValid(); }
27  ReleaseVersion const& releaseVersion() const { return releaseVersion_; }
28  PassID const& passID() const { return passID_; }
29  ProcessConfigurationID id() const;
30 
31  void setParameterSetID(ParameterSetID const& pSetID);
32 
34 
35  void reduce();
36 
38 
39  struct Transients {
41  explicit Transients(bool current) : pcid_(), isCurrentProcess_(current) {}
42  void reset() {
43  pcid_.reset();
44  isCurrentProcess_ = false;
45  }
48  };
49 
50  private:
51  void setPCID(ProcessConfigurationID const& pcid) { transient_.pcid_ = pcid; }
54 
60  };
61 
62  typedef std::vector<ProcessConfiguration> ProcessConfigurationVector;
63 
65 
66  inline bool operator==(ProcessConfiguration const& a, ProcessConfiguration const& b) {
67  return a.processName() == b.processName() && a.parameterSetID() == b.parameterSetID() &&
68  a.releaseVersion() == b.releaseVersion() && a.passID() == b.passID();
69  }
70 
71  inline bool operator!=(ProcessConfiguration const& a, ProcessConfiguration const& b) { return !(a == b); }
72 
73  std::ostream& operator<<(std::ostream& os, ProcessConfiguration const& pc);
74 } // namespace edm
75 
76 #endif
bool operator<(DetSet< T > const &x, DetSet< T > const &y)
Definition: DetSet.h:89
constexpr bool operator==(ELseverityLevel const &e1, ELseverityLevel const &e2) noexcept
std::vector< ProcessConfiguration > ProcessConfigurationVector
ProcessConfigurationID setProcessConfigurationID()
ReleaseVersion const & releaseVersion() const
ProcessConfigurationID id() const
ParameterSetID const & parameterSetID() const
void setPCID(ProcessConfigurationID const &pcid)
void setParameterSetID(ParameterSetID const &pSetID)
bool isValid() const
Definition: Hash.h:141
PassID const & passID() const
constexpr bool operator!=(ELseverityLevel const &e1, ELseverityLevel const &e2) noexcept
double b
Definition: hdecay.h:120
std::string ReleaseVersion
Definition: ReleaseVersion.h:6
std::string const & processName() const
HLT enums.
double a
Definition: hdecay.h:121
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger table.
void reset()
Definition: Hash.h:136
std::string PassID
Definition: PassID.h:7