CMS 3D CMS Logo

HLTInspect.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: BeamSplash
4 // Class: BeamSPlash
5 //
6 //
7 // Original Author: Luca Malgeri
8 
9 #include <memory>
10 #include <vector>
11 #include <map>
12 #include <set>
13 
14 // user include files
16 
29 
30 using namespace edm;
31 using namespace std;
32 
34  hlTriggerResults_ = iConfig.getParameter<edm::InputTag>("HLTriggerResults");
35  init_ = false;
36 }
37 
40  int ievt = iEvent.id().event();
41  int irun = iEvent.id().run();
42  int ils = iEvent.luminosityBlock();
43  int bx = iEvent.bunchCrossing();
44  //
45  // trigger type
46  //
47  int trigger_type = -1;
48  if (iEvent.isRealData())
49  trigger_type = iEvent.experimentType();
50 
51  //hlt info
53  iEvent.getByLabel(hlTriggerResults_, HLTR);
54 
55  if (HLTR.isValid() == false) {
56  std::cout << " HLTInspect Error - Could not access Results with name " << hlTriggerResults_ << std::endl;
57  }
58  if (HLTR.isValid()) {
59  if (!init_) {
60  init_ = true;
61  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*HLTR);
62  hlNames_ = triggerNames.triggerNames();
63  }
64  std::cout << "HLTInspect: Run " << irun << " Ev " << ievt << " LB " << ils << " BX " << bx << " Type "
65  << trigger_type << " Acc: ";
66  const unsigned int n(hlNames_.size());
67  for (unsigned int i = 0; i != n; ++i) {
68  if (HLTR->accept(i)) {
69  std::cout << hlNames_[i] << ",";
70  }
71  }
72  std::cout << std::endl;
73  }
74 }
75 //define this as a plug-in
mps_fire.i
i
Definition: mps_fire.py:355
MessageLogger.h
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
ESHandle.h
TriggerResults.h
edm
HLT enums.
Definition: AlignableModifier.h:19
gather_cfg.cout
cout
Definition: gather_cfg.py:144
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
EDFilter.h
HLTInspect.h
HLTInspect::~HLTInspect
~HLTInspect() override
Definition: HLTInspect.cc:38
edm::Handle
Definition: AssociativeIterator.h:50
HLTInspect::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: HLTInspect.cc:39
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
L1TEGammaOffline_cfi.triggerNames
triggerNames
Definition: L1TEGammaOffline_cfi.py:40
L1GtFdlWord.h
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
TriggerNames.h
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
InputTag.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
HLTInspect
Definition: HLTInspect.h:31
std
Definition: JetResolutionObject.h:76
Frameworkfwd.h
edm::TriggerNames
Definition: TriggerNames.h:55
HLTInspect::HLTInspect
HLTInspect(const edm::ParameterSet &)
Definition: HLTInspect.cc:33
edm::HLTGlobalStatus::accept
bool accept() const
Has at least one path accepted the event?
Definition: HLTGlobalStatus.h:49
ParameterSet.h
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
L1GlobalTriggerReadoutRecord.h