CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GenericTriggerEventFlag.h
Go to the documentation of this file.
1 #ifndef GenericTriggerEventFlag_H
2 #define GenericTriggerEventFlag_H
3 
4 
5 // -*- C++ -*-
6 //
7 // Package: CommonTools/TriggerUtils
8 // Class: GenericTriggerEventFlag
9 //
10 // $Id: GenericTriggerEventFlag.h,v 1.2 2010/06/23 22:55:51 vadler Exp $
11 //
32 
33 #include <string>
34 
35 
37 
38  // Utility classes
42  bool hltConfigInit_;
43  // Configuration parameters
44  bool andOr_;
45  std::string dbLabel_;
46  unsigned verbose_;
47  bool andOrDcs_;
49  std::vector< int > dcsPartitions_;
50  bool errorReplyDcs_;
51  bool andOrGt_;
54  std::string gtDBKey_;
55  std::vector< std::string > gtLogicalExpressions_;
56  bool errorReplyGt_;
57  bool andOrL1_;
59  std::string l1DBKey_;
60  std::vector< std::string > l1LogicalExpressions_;
61  bool errorReplyL1_;
62  bool andOrHlt_;
64  std::string hltDBKey_;
65  std::vector< std::string > hltLogicalExpressions_;
66  bool errorReplyHlt_;
67  // Switches
68  bool on_;
69  bool onDcs_;
70  bool onGt_;
71  bool onL1_;
72  bool onHlt_;
73  // Member constants
74  const std::string configError_;
75 
76  public:
77 
78  // Constructors and destructor
79  GenericTriggerEventFlag( const edm::ParameterSet & config ); // To be called from the ED module's c'tor
81 
82  // Public methods
83  bool on() { return on_ ; }
84  bool off() { return ( ! on_ ); }
85  void initRun( const edm::Run & run, const edm::EventSetup & setup ); // To be called from beginRun() methods
86  bool accept( const edm::Event & event, const edm::EventSetup & setup ); // To be called from analyze/filter() methods
87 
88  private:
89 
90  // Private methods
91 
92  // DCS
93  bool acceptDcs( const edm::Event & event );
94  bool acceptDcsPartition( const edm::Handle< DcsStatusCollection > & dcsStatus, int dcsPartition ) const;
95 
96  // GT status bits
97  bool acceptGt( const edm::Event & event );
98  bool acceptGtLogicalExpression( const edm::Event & event, std::string gtLogicalExpression );
99 
100  // L1
101  bool acceptL1( const edm::Event & event, const edm::EventSetup & setup );
102  bool acceptL1LogicalExpression( const edm::Event & event, std::string l1LogicalExpression );
103 
104  // HLT
105  bool acceptHlt( const edm::Event & event );
106  bool acceptHltLogicalExpression( const edm::Handle< edm::TriggerResults > & hltTriggerResults, std::string hltLogicalExpression ) const;
107 
108  // Algos
109  std::vector< std::string > expressionsFromDB( const std::string & key, const edm::EventSetup & setup );
110  bool negate( std::string & word ) const;
111 
112 };
113 
114 
115 #endif
bool negate(std::string &word) const
Checks for negated words.
std::vector< int > dcsPartitions_
std::vector< std::string > gtLogicalExpressions_
std::vector< std::string > hltLogicalExpressions_
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
bool acceptHlt(const edm::Event &event)
Was this event accepted by the configured HLT logical expression combination?
bool acceptGtLogicalExpression(const edm::Handle< L1GlobalTriggerReadoutRecord > &gtReadoutRecord, std::string gtLogicalExpression)
Does this event fulfill this particular GT status bits&#39; logical expression?
bool acceptDcsPartition(const edm::Handle< DcsStatusCollection > &dcsStatus, int dcsPartition) const
std::vector< std::string > expressionsFromDB(const std::string &key, const edm::EventSetup &setup)
Reads and returns logical expressions from DB.
bool accept(const edm::Event &event, const edm::EventSetup &setup)
To be called from analyze/filter() methods.
bool acceptL1LogicalExpression(const edm::Event &event, std::string l1LogicalExpression)
Was this event accepted by this particular L1 algorithms&#39; logical expression?
GenericTriggerEventFlag(const edm::ParameterSet &config)
To be called from the ED module&#39;s c&#39;tor.
~GenericTriggerEventFlag()
To be called from d&#39;tors by &#39;delete&#39;.
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 but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
edm::ESWatcher< AlCaRecoTriggerBitsRcd > * watchDB_
bool acceptDcs(const edm::Event &event)
std::vector< std::string > l1LogicalExpressions_
list key
Definition: combine.py:13
tuple config
Definition: cmsDriver.py:17
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginedm::Run() methods.
Definition: Run.h:31
bool acceptHltLogicalExpression(const edm::Handle< edm::TriggerResults > &hltTriggerResults, std::string hltLogicalExpression) const
Was this event accepted by this particular HLT paths&#39; logical expression?
bool acceptL1(const edm::Event &event, const edm::EventSetup &setup)
Was this event accepted by the configured L1 logical expression combination?
bool acceptGt(const edm::Event &event)
Does this event fulfill the configured GT status logical expression combination?