CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TriggerResultsByName.h
Go to the documentation of this file.
1 #ifndef FWCore_Common_TriggerResultsByName_h
2 #define FWCore_Common_TriggerResultsByName_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Common
6 // Class : TriggerResultsByName
7 //
31 //
32 // Original Author: W. David Dagenhart
33 // Created: 11 December 2009
34 //
35 
38 
39 #include <string>
40 #include <vector>
41 
42 namespace edm {
43 
44  class TriggerResults;
45  class TriggerNames;
46  class HLTPathStatus;
47 
49 
50  public:
51 
53  TriggerNames const* triggerNames);
54 
55  bool isValid() const;
56 
57  ParameterSetID const& parameterSetID() const;
58 
59  // Was at least one path run?
60  bool wasrun() const;
61 
62  // Has at least one path accepted the event?
63  bool accept() const;
64 
65  // Has any path encountered an error (exception)
66  bool error() const;
67 
68  HLTPathStatus const& at(std::string const& pathName) const;
69  HLTPathStatus const& at(unsigned i) const;
70 
71  HLTPathStatus const& operator[](std::string const& pathName) const;
72  HLTPathStatus const& operator[](unsigned i) const;
73 
74  // Was ith path run?
75  bool wasrun(std::string const& pathName) const;
76  bool wasrun(unsigned i) const;
77 
78  // Has ith path accepted the event
79  bool accept(std::string const& pathName) const;
80  bool accept(unsigned i) const;
81 
82  // Has ith path encountered an error (exception)?
83  bool error(std::string const& pathName) const;
84  bool error(unsigned i) const;
85 
86  // Get status of ith path
87  hlt::HLTState state(std::string const& pathName) const;
88  hlt::HLTState state(unsigned i) const;
89 
90  // Get index (slot position) of module giving the decision of the ith path
91  unsigned index(std::string const& pathName) const;
92  unsigned index(unsigned i) const;
93 
94  std::vector<std::string> const& triggerNames() const;
95 
96  // Throws if the number is out of range.
97  std::string const& triggerName(unsigned i) const;
98 
99  // If the input name is not known, this returns a value
100  // equal to the size.
101  unsigned triggerIndex(std::string const& pathName) const;
102 
103  // The number of trigger names.
105 
106  private:
107 
108  unsigned getAndCheckIndex(std::string const& pathName) const;
109 
110  void throwTriggerResultsMissing() const;
111  void throwTriggerNamesMissing() const;
112 
115  };
116 }
117 #endif
int i
Definition: DBlmapReader.cc:9
ParameterSetID const & parameterSetID() const
TriggerNames const * triggerNames_
std::vector< std::string >::size_type size() const
unsigned getAndCheckIndex(std::string const &pathName) const
HLTState
status of a trigger path
Definition: HLTenums.h:21
HLTPathStatus const & at(std::string const &pathName) const
unsigned triggerIndex(std::string const &pathName) const
std::string const & triggerName(unsigned i) const
uint16_t size_type
std::vector< std::string > const & triggerNames() const
unsigned index(std::string const &pathName) const
hlt::HLTState state(std::string const &pathName) const
TriggerResultsByName(TriggerResults const *triggerResults, TriggerNames const *triggerNames)
HLTPathStatus const & operator[](std::string const &pathName) const
TriggerResults const * triggerResults_