CMS 3D CMS Logo

HLTEventAnalyzerRAW.h
Go to the documentation of this file.
1 #ifndef HLTrigger_HLTcore_HLTEventAnalyzerRAW_h
2 #define HLTrigger_HLTcore_HLTEventAnalyzerRAW_h
3 
21 
22 namespace edm {
24 }
25 
26 //
27 // class declaration
28 //
30 public:
31  explicit HLTEventAnalyzerRAW(const edm::ParameterSet&);
32  ~HLTEventAnalyzerRAW() override = default;
33  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
34 
35  void beginRun(edm::Run const&, edm::EventSetup const&) override;
36  void endRun(edm::Run const&, edm::EventSetup const&) override {}
37 
38  void analyze(const edm::Event&, const edm::EventSetup&) override;
39 
40  virtual void analyzeTrigger(const edm::Event&, const edm::EventSetup&, const std::string& triggerName);
41 
42 private:
44 
45  static constexpr const char* logMsgType_ = "HLTEventAnalyzerRAW";
46 
47  template <class TVID, class TVREF>
48  void showObjects(TVID const& vids, TVREF const& vrefs, std::string const& name) const;
49 
50  template <class TREF>
51  void showObject(LOG& log, TREF const& ref) const;
52 
60 
62  bool const verbose_;
63  bool const permissive_;
64 
67 
69 
87 
98 
111 
127 
134 };
135 
136 template <class TVID, class TVREF>
137 void HLTEventAnalyzerRAW::showObjects(TVID const& vids, TVREF const& vrefs, std::string const& name) const {
138  size_t const size = vids.size();
139  assert(size == vrefs.size());
140 
141  if (size == 0) {
142  return;
143  }
144 
145  LOG(logMsgType_) << " " << name << ": size=" << size;
146  for (size_t idx = 0; idx < size; ++idx) {
148  log << " [" << idx << "] id=" << vids[idx] << " ";
149  auto const& ref = vrefs[idx];
150  if (permissive_ and not ref.isAvailable()) {
151  log << "(Ref with id=" << ref.id() << " not available)";
152  } else {
153  showObject(log, ref);
154  }
155  }
156 }
157 
158 template <class TREF>
159 void HLTEventAnalyzerRAW::showObject(LOG& log, TREF const& ref) const {
160  log << "pt=" << ref->pt() << " eta=" << ref->eta() << " phi=" << ref->phi() << " mass=" << ref->mass();
161 }
162 
163 template <>
165 
166 #endif // HLTrigger_HLTcore_HLTEventAnalyzerRAW_h
size
Write out results.
Log< level::Info, true > LogVerbatim
trigger::VRl1ttkele l1ttkeleRefs_
trigger::Vids l1tmuonShowerIds_
trigger::Vids compositeIds_
trigger::Vids l1thpspftauIds_
trigger::Vids l1etmissIds_
edm::Handle< edm::TriggerResults > triggerResultsHandle_
bool const verbose_
additional class data members
trigger::VRl1muon l1muonRefs_
l1t::EGammaVectorRef VRl1tegamma
trigger::VRl1tmuonShower l1tmuonShowerRefs_
trigger::VRl1ttau l1ttauRefs_
~HLTEventAnalyzerRAW() override=default
trigger::Vids electronIds_
std::vector< reco::METRef > VRbasemet
const edm::InputTag triggerEventWithRefsTag_
void showObject(LOG &log, TREF const &ref) const
trigger::VRl1em l1emRefs_
trigger::VRpftau pftauRefs_
l1t::JetVectorRef VRl1tjet
#define LOG(A)
void showObjects(TVID const &vids, TVREF const &vrefs, std::string const &name) const
trigger::VRl1tpftrack l1tpftrackRefs_
void endRun(edm::Run const &, edm::EventSetup const &) override
trigger::VRl1tjet l1tjetRefs_
assert(be >=bs)
HLTEventAnalyzerRAW(const edm::ParameterSet &)
const edm::InputTag triggerResultsTag_
std::vector< l1extra::L1MuonParticleRef > VRl1muon
trigger::VRpfjet pfjetRefs_
trigger::Vids photonIds_
payload extracted from TriggerEventWithRefs
trigger::VRl1jet l1jetRefs_
void beginRun(edm::Run const &, edm::EventSetup const &) override
std::vector< l1extra::L1HFRingsRef > VRl1hfrings
std::vector< reco::IsolatedPixelTrackCandidateRef > VRpixtrack
trigger::VRcomposite compositeRefs_
std::vector< l1extra::L1EtMissParticleRef > VRl1etmiss
const std::string processName_
module config parameters
const edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerEventWithRefsToken_
trigger::VRphoton photonRefs_
l1t::PFTrackVectorRef VRl1tpftrack
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
l1t::PFTauVectorRef VRl1tpftau
HLTConfigProvider hltConfig_
l1t::TkEmVectorRef VRl1ttkem
trigger::VRpfmet pfmetRefs_
l1t::TrackerMuonRefVector VRl1ttkmuon
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< l1extra::L1EmParticleRef > VRl1em
trigger::VRelectron electronRefs_
trigger::VRl1tegamma l1tegammaRefs_
l1t::HPSPFTauVectorRef VRl1thpspftau
trigger::VRl1tpftau l1tpftauRefs_
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
trigger::Vids pixtrackIds_
trigger::Vids l1hfringsIds_
trigger::VRl1etmiss l1etmissRefs_
std::vector< reco::CaloJetRef > VRjet
trigger::VRl1tpfjet l1tpfjetRefs_
std::vector< reco::PFJetRef > VRpfjet
trigger::VRl1thpspftau l1thpspftauRefs_
edm::Handle< trigger::TriggerEventWithRefs > triggerEventWithRefsHandle_
trigger::Vids l1tpftrackIds_
std::vector< reco::CompositeCandidateRef > VRcomposite
l1t::MuonVectorRef VRl1tmuon
trigger::VRl1hfrings l1hfringsRefs_
edm::LogVerbatim LOG
std::vector< reco::RecoChargedCandidateRef > VRmuon
trigger::VRcalomet calometRefs_
virtual void analyzeTrigger(const edm::Event &, const edm::EventSetup &, const std::string &triggerName)
HLT enums.
trigger::VRl1ttkmuon l1ttkmuRefs_
const std::string triggerName_
trigger::VRmuon muonRefs_
trigger::VRl1tmuon l1tmuonRefs_
l1t::TauVectorRef VRl1ttau
std::vector< reco::ElectronRef > VRelectron
std::vector< reco::PFMETRef > VRpfmet
trigger::VRpixtrack pixtrackRefs_
std::vector< reco::CaloMETRef > VRcalomet
l1t::MuonShowerVectorRef VRl1tmuonShower
trigger::VRbasemet basemetRefs_
l1t::EtSumVectorRef VRl1tetsum
std::vector< reco::RecoEcalCandidateRef > VRphoton
l1t::PFJetVectorRef VRl1tpfjet
trigger::VRl1ttkem l1ttkemRefs_
std::vector< l1extra::L1JetParticleRef > VRl1jet
std::vector< int > Vids
std::vector< reco::PFTauRef > VRpftau
Definition: Run.h:45
trigger::VRl1tetsum l1tetsumRefs_
trigger::Vids l1ttkmuIds_
Phase 2.
static constexpr const char * logMsgType_
l1t::TkElectronVectorRef VRl1ttkele