DQMOffline
Lumi
interface
TriggerTools.h
Go to the documentation of this file.
1
#ifndef DQMOFFLINE_LUMI_TRIGGERTOOLS_H
2
#define DQMOFFLINE_LUMI_TRIGGERTOOLS_H
3
4
#include "
FWCore/Framework/interface/Event.h
"
5
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
6
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
7
#include "
FWCore/Common/interface/TriggerNames.h
"
8
#include "
DataFormats/Common/interface/TriggerResults.h
"
9
#include "
DataFormats/HLTReco/interface/TriggerEvent.h
"
10
#include "
HLTrigger/HLTcore/interface/HLTConfigProvider.h
"
11
12
#include <bitset>
13
14
const
unsigned
int
kNTrigBit
= 128;
15
typedef
std::bitset<kNTrigBit>
TriggerBits
;
16
const
unsigned
int
kNTrigObjectBit
= 256;
17
typedef
std::bitset<kNTrigObjectBit>
TriggerObjectBits
;
18
19
class
TriggerTools
{
20
public
:
21
TriggerTools
(){};
22
~TriggerTools
(){};
23
24
void
readEvent
(
const
edm::Event
&
iEvent
);
25
26
void
setTriggerResultsToken
(
edm::EDGetTokenT<edm::TriggerResults>
token
) {
fHLTTag_token
=
token
; }
27
void
setTriggerEventToken
(
edm::EDGetTokenT<trigger::TriggerEvent>
token
) {
fHLTObjTag_token
=
token
; }
28
void
setDRMAX
(
const
double
_drMax) {
DRMAX
= _drMax; }
29
30
void
addTriggerRecord
(
const
std::string
&
name
) {
31
Record
rec;
32
rec.
hltPattern
=
name
;
33
records
.push_back(rec);
34
}
35
void
addTriggerRecord
(
const
std::string
&
name
,
const
std::string
&
objName
) {
36
Record
rec;
37
rec.
hltPattern
=
name
;
38
rec.
hltObjName
=
objName
;
39
records
.push_back(rec);
40
}
41
42
void
initHLTObjects
(
const
HLTConfigProvider
&hltConfigProvider_);
43
44
bool
pass
()
const
;
45
bool
passObj
(
const
double
eta
,
const
double
phi
)
const
;
46
47
private
:
48
struct
Record
{
49
std::string
hltPattern
;
// HLT path name/pattern (wildcards allowed: *,?)
50
std::string
hltPathName
=
""
;
// HLT path name in trigger menu
51
unsigned
int
hltPathIndex
= (
unsigned
int
)-1;
// HLT path index in trigger menu
52
std::string
hltObjName
=
""
;
// trigger object name in trigger menu
53
};
54
std::vector<Record>
records
;
55
56
edm::EDGetTokenT<edm::TriggerResults>
fHLTTag_token
;
57
edm::EDGetTokenT<trigger::TriggerEvent>
fHLTObjTag_token
;
58
59
edm::Handle<edm::TriggerResults>
hTrgRes
;
60
edm::Handle<trigger::TriggerEvent>
hTrgEvt
;
61
62
edm::ParameterSetID
fTriggerNamesID
;
63
64
// initialization from HLT menu; needs to be called on every change in HLT menu
65
void
initPathNames
(
const
std::vector<std::string> &
triggerNames
);
66
67
TriggerBits
triggerBits
;
68
69
// Matching parameter
70
double
DRMAX
= 0.1;
71
};
72
73
#endif
mkLumiAveragedPlots.objName
string objName
Definition:
mkLumiAveragedPlots.py:608
TriggerNames.h
TriggerTools::setDRMAX
void setDRMAX(const double _drMax)
Definition:
TriggerTools.h:28
TriggerEvent.h
L1TEGammaOffline_cfi.triggerNames
triggerNames
Definition:
L1TEGammaOffline_cfi.py:40
TriggerTools::Record::hltPathIndex
unsigned int hltPathIndex
Definition:
TriggerTools.h:51
MessageLogger.h
kNTrigBit
const unsigned int kNTrigBit
Definition:
TriggerTools.h:14
edm::Hash< ParameterSetType >
TriggerTools::initHLTObjects
void initHLTObjects(const HLTConfigProvider &hltConfigProvider_)
Definition:
TriggerTools.cc:35
Event.h
TriggerResults.h
TriggerTools
Definition:
TriggerTools.h:19
edm::Handle< edm::TriggerResults >
TriggerObjectBits
std::bitset< kNTrigObjectBit > TriggerObjectBits
Definition:
TriggerTools.h:17
TriggerTools::DRMAX
double DRMAX
Definition:
TriggerTools.h:70
PVValHelper::eta
Definition:
PVValidationHelpers.h:70
TriggerTools::setTriggerEventToken
void setTriggerEventToken(edm::EDGetTokenT< trigger::TriggerEvent > token)
Definition:
TriggerTools.h:27
TriggerTools::fTriggerNamesID
edm::ParameterSetID fTriggerNamesID
Definition:
TriggerTools.h:62
TriggerTools::Record
Definition:
TriggerTools.h:48
edm::EDGetTokenT< edm::TriggerResults >
DDAxes::phi
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
TriggerTools::hTrgRes
edm::Handle< edm::TriggerResults > hTrgRes
Definition:
TriggerTools.h:59
ParameterSet.h
iEvent
int iEvent
Definition:
GenABIO.cc:224
createfilelist.int
int
Definition:
createfilelist.py:10
TriggerTools::fHLTTag_token
edm::EDGetTokenT< edm::TriggerResults > fHLTTag_token
Definition:
TriggerTools.h:56
TriggerTools::fHLTObjTag_token
edm::EDGetTokenT< trigger::TriggerEvent > fHLTObjTag_token
Definition:
TriggerTools.h:57
TriggerTools::records
std::vector< Record > records
Definition:
TriggerTools.h:54
TriggerTools::hTrgEvt
edm::Handle< trigger::TriggerEvent > hTrgEvt
Definition:
TriggerTools.h:60
TriggerTools::addTriggerRecord
void addTriggerRecord(const std::string &name, const std::string &objName)
Definition:
TriggerTools.h:35
TriggerTools::setTriggerResultsToken
void setTriggerResultsToken(edm::EDGetTokenT< edm::TriggerResults > token)
Definition:
TriggerTools.h:26
TriggerTools::pass
bool pass() const
Definition:
TriggerTools.cc:121
TriggerTools::~TriggerTools
~TriggerTools()
Definition:
TriggerTools.h:22
TriggerTools::passObj
bool passObj(const double eta, const double phi) const
Definition:
TriggerTools.cc:130
TriggerTools::Record::hltObjName
std::string hltObjName
Definition:
TriggerTools.h:52
TriggerTools::addTriggerRecord
void addTriggerRecord(const std::string &name)
Definition:
TriggerTools.h:30
HLTConfigProvider.h
TriggerTools::triggerBits
TriggerBits triggerBits
Definition:
TriggerTools.h:67
TriggerBits
std::bitset< kNTrigBit > TriggerBits
Definition:
TriggerTools.h:15
TriggerTools::initPathNames
void initPathNames(const std::vector< std::string > &triggerNames)
Definition:
TriggerTools.cc:10
TriggerTools::readEvent
void readEvent(const edm::Event &iEvent)
Definition:
TriggerTools.cc:90
TriggerTools::TriggerTools
TriggerTools()
Definition:
TriggerTools.h:21
TriggerTools::Record::hltPathName
std::string hltPathName
Definition:
TriggerTools.h:50
HLTConfigProvider
Definition:
HLTConfigProvider.h:30
edm::Event
Definition:
Event.h:73
TriggerTools::Record::hltPattern
std::string hltPattern
Definition:
TriggerTools.h:49
unpackBuffers-CaloStage2.token
token
Definition:
unpackBuffers-CaloStage2.py:316
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
kNTrigObjectBit
const unsigned int kNTrigObjectBit
Definition:
TriggerTools.h:16
Generated for CMSSW Reference Manual by
1.8.14