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/RecoUtils
8 // Class: GenericTriggerEventFlag
9 //
10 // $Id: GenericTriggerEventFlag.h,v 1.2 2010/05/12 12:57:36 vadler Exp $
11 //
33 
34 
36 
37  // Utility classes
42  // Configuration parameters
43  bool andOr_;
44  unsigned verbose_;
45  bool andOrDcs_;
47  std::vector< int > dcsPartitions_;
49  bool andOrGt_;
51  std::string gtDBKey_;
52  std::vector< std::string > gtLogicalExpressions_;
54  bool andOrL1_;
55  std::string l1DBKey_;
56  std::vector< std::string > l1LogicalExpressions_;
58  bool andOrHlt_;
60  std::string hltDBKey_;
61  std::vector< std::string > hltLogicalExpressions_;
63  // Switches
64  bool on_;
65  bool onDcs_;
66  bool onGt_;
67  bool onL1_;
68  bool onHlt_;
69  // Member constants
70  const std::string configError_;
71 
72  public:
73 
74  // Constructors and destructor
75  GenericTriggerEventFlag( const edm::ParameterSet & config ); // To be called from the ED module's c'tor
77 
78  // Public methods
79  bool on() { return on_ ; }
80  bool off() { return ( ! on_ ); }
81  void initRun( const edm::Run & run, const edm::EventSetup & setup ); // To be called from beginRun() methods
82  bool accept( const edm::Event & event, const edm::EventSetup & setup ); // To be called from analyze/filter() methods
83 
84  private:
85 
86  // Private methods
87 
88  // DCS
89  bool acceptDcs( const edm::Event & event );
90  bool acceptDcsPartition( const edm::Handle< DcsStatusCollection > & dcsStatus, int dcsPartition ) const;
91 
92  // GT status bits
93  bool acceptGt( const edm::Event & event );
94  bool acceptGtLogicalExpression( const edm::Handle< L1GlobalTriggerReadoutRecord > & gtReadoutRecord, std::string gtLogicalExpression );
95 
96  // L1
97  bool acceptL1( const edm::Event & event, const edm::EventSetup & setup );
98  bool acceptL1LogicalExpression( const edm::Event & event, std::string l1LogicalExpression );
99 
100  // HLT
101  bool acceptHlt( const edm::Event & event );
102  bool acceptHltLogicalExpression( const edm::Handle< edm::TriggerResults > & hltTriggerResults, std::string hltLogicalExpression ) const;
103 
104  // Algos
105  std::vector< std::string > expressionsFromDB( const std::string & key, const edm::EventSetup & setup );
106  bool negate( std::string & word ) const;
107 
108 };
109 
110 
111 #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?