CMS 3D CMS Logo

TriggerResults.h
Go to the documentation of this file.
1 #ifndef DataFormats_Common_TriggerResults_h
2 #define DataFormats_Common_TriggerResults_h
3 
30 
31 #include <string>
32 #include <vector>
33 
34 namespace edm {
36  typedef std::vector<std::string> Strings;
37 
38  private:
41 
44 
45  public:
48 
51  : HLTGlobalStatus(hlt), psetid_(psetid), names_() {}
52 
55 
57  const ParameterSetID& parameterSetID() const { return psetid_; }
58 
61  this->HLTGlobalStatus::swap(other);
62  psetid_.swap(other.psetid_);
63  // next line not used any more
64  names_.swap(other.names_);
65  }
66 
69  TriggerResults temp(rhs);
70  this->swap(temp);
71  return *this;
72  }
73 
74  // The next three functions are OBSOLETE and should only be used for backward
75  // compatibility to older data. The names_ vector is always empty in new data.
76 
78  const std::vector<std::string>& getTriggerNames() const { return names_; }
79 
81  const std::string& name(unsigned int i) const { return names_.at(i); }
82 
84  unsigned int find(const std::string& name) const {
85  const unsigned int n(size());
86  for (unsigned int i = 0; i != n; ++i)
87  if (names_[i] == name)
88  return i;
89  return n;
90  }
91  };
92 
93  // Free swap function
94  inline void swap(TriggerResults& lhs, TriggerResults& rhs) { lhs.swap(rhs); }
95 } // namespace edm
96 
97 #endif
edm::TriggerResults::operator=
TriggerResults & operator=(TriggerResults const &rhs)
Copy assignment using swap.
Definition: TriggerResults.h:68
mps_fire.i
i
Definition: mps_fire.py:355
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
edm::Hash::swap
void swap(Hash< I > &other)
Definition: Hash.h:181
edm::TriggerResults::getTriggerNames
const std::vector< std::string > & getTriggerNames() const
Obsolete.
Definition: TriggerResults.h:78
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::swap
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:117
HLTGlobalStatus.h
edm::TriggerResults::parameterSetID
const ParameterSetID & parameterSetID() const
Get stored parameter set id.
Definition: TriggerResults.h:57
edm::HLTGlobalStatus
Definition: HLTGlobalStatus.h:25
edm::HLTGlobalStatus::swap
void swap(HLTGlobalStatus &other)
swap function
Definition: HLTGlobalStatus.h:74
edm::TriggerResults::TriggerResults
TriggerResults(const HLTGlobalStatus &hlt, const Strings &names)
Not used anymore.
Definition: TriggerResults.h:54
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
edm::TriggerResults::swap
void swap(TriggerResults &other)
swap function
Definition: TriggerResults.h:60
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:122
edm::HLTGlobalStatus::size
unsigned int size() const
Get number of paths stored.
Definition: HLTGlobalStatus.h:35
edm::TriggerResults::psetid_
edm::ParameterSetID psetid_
Parameter set id.
Definition: TriggerResults.h:40
edm::Hash< ParameterSetType >
trackingPlots.other
other
Definition: trackingPlots.py:1465
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::TriggerResults::TriggerResults
TriggerResults()
Trivial contructor.
Definition: TriggerResults.h:47
edm::TriggerResults::TriggerResults
TriggerResults(const HLTGlobalStatus &hlt, const edm::ParameterSetID &psetid)
Standard contructor.
Definition: TriggerResults.h:50
edm::DoNotRecordParents
Definition: traits.h:95
edm::TriggerResults::names_
Strings names_
Not used anymore.
Definition: TriggerResults.h:43
edm::TriggerResults::find
unsigned int find(const std::string &name) const
Obsolete.
Definition: TriggerResults.h:84
edm::TriggerResults::Strings
std::vector< std::string > Strings
Definition: TriggerResults.h:36
ParameterSetID.h
traits.h
edm::TriggerResults
Definition: TriggerResults.h:35
ValidationMatrix.hlt
hlt
Definition: ValidationMatrix.py:459
edm::TriggerResults::name
const std::string & name(unsigned int i) const
Obsolete.
Definition: TriggerResults.h:81