CMS 3D CMS Logo

IterWithDict.h
Go to the documentation of this file.
1 #ifndef FWCore_Reflection_IterWithDict_h
2 #define FWCore_Reflection_IterWithDict_h
3 
4 /*----------------------------------------------------------------------
5 
6 IterWithDict: An iterator for a TList so a range for loop can be used
7 
8 ----------------------------------------------------------------------*/
9 
10 #include "TList.h"
11 
12 namespace edm {
13 
15  private:
16  TIter iter_;
17  bool atEnd_;
18 
19  protected:
20  void advance();
21  TIter const& iter() const;
22 
23  public:
25  explicit IterWithDictBase(TList*);
26  bool operator!=(IterWithDictBase const&) const;
27  };
28 
29  template <typename T>
30  class IterWithDict : public IterWithDictBase {
31  public:
33  explicit IterWithDict(TList* list) : IterWithDictBase(list) {}
35  advance();
36  return *this;
37  }
38  T* operator*() const { return static_cast<T*>(*iter()); }
39  };
40 
41 } // namespace edm
42 
43 #endif // FWCore_Reflection_IterWithDict_h
edm::IterWithDict::operator*
T * operator*() const
Definition: IterWithDict.h:38
edm::IterWithDictBase::iter
TIter const & iter() const
Definition: IterWithDict.cc:16
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::IterWithDict::IterWithDict
IterWithDict(TList *list)
Definition: IterWithDict.h:33
edm::IterWithDictBase::atEnd_
bool atEnd_
Definition: IterWithDict.h:17
edm::IterWithDict::operator++
IterWithDict< T > & operator++()
Definition: IterWithDict.h:34
edm::IterWithDict
Definition: IterWithDict.h:30
edm::IterWithDictBase
Definition: IterWithDict.h:14
edm::IterWithDictBase::operator!=
bool operator!=(IterWithDictBase const &) const
Definition: IterWithDict.cc:33
edm::IterWithDictBase::advance
void advance()
Definition: IterWithDict.cc:6
edm::IterWithDict::IterWithDict
IterWithDict()
Definition: IterWithDict.h:32
T
long double T
Definition: Basic3DVectorLD.h:48
list
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*", "!HLTx*" if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL. It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of "!*" before the partial wildcard feature was incorporated). Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
edm::IterWithDictBase::iter_
TIter iter_
Definition: IterWithDict.h:16
edm::IterWithDictBase::IterWithDictBase
IterWithDictBase()
Definition: IterWithDict.cc:18