CMS 3D CMS Logo

TriggerSummaryProducerAOD.h
Go to the documentation of this file.
1 #ifndef HLTcore_TriggerSummaryProducerAOD_h
2 #define HLTcore_TriggerSummaryProducerAOD_h
3 
21 
25 
31 
48 
49 #include <map>
50 #include <set>
51 #include <string>
52 #include <vector>
53 
54 #include <functional>
55 #include "tbb/concurrent_unordered_set.h"
56 #include <regex>
57 
58 namespace edm {
59  class EventSetup;
60 }
61 
62 namespace edm {
64 }
65 
66 //
67 // class declaration
68 //
69 
71 struct InputTagHash {
72  std::size_t operator()(const edm::InputTag& inputTag) const {
73  std::hash<std::string> Hash;
74  // bit-wise xor
75  return Hash(inputTag.label()) ^ Hash(inputTag.instance()) ^ Hash(inputTag.process());
76  }
77 };
79 public:
81  ~TriggerSummaryProducerAOD() override;
82  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
83  void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
84  void endJob() override;
85 
86 private:
88  struct OrderInputTag {
90  OrderInputTag(bool ignoreProcess) : ignoreProcess_(ignoreProcess){};
91  inline bool operator()(const edm::InputTag& l, const edm::InputTag& r) const {
92  int c = l.label().compare(r.label());
93  if (0 == c) {
94  if (ignoreProcess_) {
95  return l.instance() < r.instance();
96  }
97  c = l.instance().compare(r.instance());
98  if (0 == c) {
99  return l.process() < r.process();
100  }
101  }
102  return c < 0;
103  };
104  };
105 
106  using ProductIDtoIndex = std::map<edm::ProductID, unsigned int>;
107  using InputTagSet = std::set<edm::InputTag, OrderInputTag>;
108  template <typename C>
111  std::vector<std::string>&,
112  trigger::Keys&,
113  const edm::Event&,
115  const InputTagSet&) const;
116 
117  template <typename T>
124 
125  template <typename C>
127  const edm::InputTag& tag,
128  const trigger::Vids&,
129  const std::vector<edm::Ref<C>>&,
130  const ProductIDtoIndex&,
132  trigger::Vids& oIds) const;
133 
134  template <typename C>
135  void fillFilterObjectMember(trigger::Keys& keys, trigger::Vids& ids, const int&, const int&, const edm::Ref<C>&) const;
137  trigger::Vids& ids,
138  const int&,
139  const int&,
142  trigger::Vids& ids,
143  const int&,
144  const int&,
147  trigger::Keys& keys, trigger::Vids& ids, const int&, const int&, const edm::Ref<reco::PFMETCollection>&) const;
149  trigger::Keys& keys, trigger::Vids& ids, const int&, const int&, const edm::Ref<reco::CaloMETCollection>&) const;
151  trigger::Keys& keys, trigger::Vids& ids, const int&, const int&, const edm::Ref<reco::METCollection>&) const;
152 
154  const bool throw_;
158  std::vector<std::regex> moduleLabelPatternsToMatch_;
159  std::vector<std::regex> moduleLabelPatternsToSkip_;
160 
162  mutable tbb::concurrent_unordered_set<edm::InputTag, InputTagHash> filterTagsGlobal_;
163 
165  mutable tbb::concurrent_unordered_set<edm::InputTag, InputTagHash> collectionTagsGlobal_;
166 
168  //trigger::TriggerObjectCollection toc_;
169  //std::vector<std::string> tags_;
171  //std::map<edm::ProductID, unsigned int> offset_;
172 
174  //trigger::Keys keys_;
176  //trigger::Vids ids_;
177 
179  //std::vector<bool> maskFilters_;
180 
203 };
204 #endif
edm::StreamID
Definition: StreamID.h:30
CaloJetCollection.h
PFTauFwd.h
L1HFRingsFwd.h
TriggerSummaryProducerAOD::InputTagSet
std::set< edm::InputTag, OrderInputTag > InputTagSet
Definition: TriggerSummaryProducerAOD.h:107
L1MuonParticleFwd.h
trigger::Vids
std::vector< int > Vids
Definition: TriggerTypeDefs.h:21
cond::Hash
std::string Hash
Definition: Types.h:43
TriggerSummaryProducerAOD::getElectronCollection_
edm::GetterOfProducts< reco::ElectronCollection > getElectronCollection_
Definition: TriggerSummaryProducerAOD.h:183
TriggerSummaryProducerAOD::getRecoChargedCandidateCollection_
edm::GetterOfProducts< reco::RecoChargedCandidateCollection > getRecoChargedCandidateCollection_
Definition: TriggerSummaryProducerAOD.h:184
TriggerSummaryProducerAOD::collectionTagsGlobal_
tbb::concurrent_unordered_set< edm::InputTag, InputTagHash > collectionTagsGlobal_
list of L3 collection tags
Definition: TriggerSummaryProducerAOD.h:165
TriggerSummaryProducerAOD::getCompositeCandidateCollection_
edm::GetterOfProducts< reco::CompositeCandidateCollection > getCompositeCandidateCollection_
Definition: TriggerSummaryProducerAOD.h:186
edm
HLT enums.
Definition: AlignableModifier.h:19
TriggerSummaryProducerAOD::fillFilterObjectMembers
void fillFilterObjectMembers(const edm::Event &, const edm::InputTag &tag, const trigger::Vids &, const std::vector< edm::Ref< C >> &, const ProductIDtoIndex &, trigger::Keys &keys, trigger::Vids &oIds) const
Definition: TriggerSummaryProducerAOD.cc:537
TriggerSummaryProducerAOD::pn_
std::string pn_
process name
Definition: TriggerSummaryProducerAOD.h:156
PFJetCollection.h
GetterOfProducts.h
TriggerSummaryProducerAOD::moduleLabelPatternsToMatch_
std::vector< std::regex > moduleLabelPatternsToMatch_
module labels which should be avoided
Definition: TriggerSummaryProducerAOD.h:158
TriggerTypeDefs.h
TriggerFilterObjectWithRefs.h
relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
PFMETCollection.h
CaloMETFwd.h
l1extra::L1EtMissParticle
Definition: L1EtMissParticle.h:27
TriggerSummaryProducerAOD::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition: TriggerSummaryProducerAOD.cc:214
edm::Ref
Definition: AssociativeIterator.h:58
CaloMETCollection.h
reco::CaloMET
Definition: CaloMET.h:21
TriggerSummaryProducerAOD::getL1TTauParticleCollection_
edm::GetterOfProducts< l1t::TauBxCollection > getL1TTauParticleCollection_
Definition: TriggerSummaryProducerAOD.h:201
reco::MET
Definition: MET.h:41
TriggerSummaryProducerAOD::getIsolatedPixelTrackCandidateCollection_
edm::GetterOfProducts< reco::IsolatedPixelTrackCandidateCollection > getIsolatedPixelTrackCandidateCollection_
Definition: TriggerSummaryProducerAOD.h:190
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
TriggerSummaryProducerAOD::getL1EtMissParticleCollection_
edm::GetterOfProducts< l1extra::L1EtMissParticleCollection > getL1EtMissParticleCollection_
Definition: TriggerSummaryProducerAOD.h:194
TriggerSummaryProducerAOD::OrderInputTag::ignoreProcess_
bool ignoreProcess_
Definition: TriggerSummaryProducerAOD.h:89
ProductID.h
InputTagHash
GlobalCache.
Definition: TriggerSummaryProducerAOD.h:71
TriggerSummaryProducerAOD::getCaloMETCollection_
edm::GetterOfProducts< reco::CaloMETCollection > getCaloMETCollection_
Definition: TriggerSummaryProducerAOD.h:188
TriggerSummaryProducerAOD::getL1EmParticleCollection_
edm::GetterOfProducts< l1extra::L1EmParticleCollection > getL1EmParticleCollection_
Definition: TriggerSummaryProducerAOD.h:191
TriggerSummaryProducerAOD::getL1TEtSumParticleCollection_
edm::GetterOfProducts< l1t::EtSumBxCollection > getL1TEtSumParticleCollection_
Definition: TriggerSummaryProducerAOD.h:202
l1extra::L1HFRings
Definition: L1HFRings.h:31
TriggerSummaryProducerAOD::ProductIDtoIndex
std::map< edm::ProductID, unsigned int > ProductIDtoIndex
Definition: TriggerSummaryProducerAOD.h:106
TriggerSummaryProducerAOD::throw_
const bool throw_
throw on error
Definition: TriggerSummaryProducerAOD.h:154
edm::global::EDProducer
Definition: EDProducer.h:32
TriggerSummaryProducerAOD::getL1TJetParticleCollection_
edm::GetterOfProducts< l1t::JetBxCollection > getL1TJetParticleCollection_
Definition: TriggerSummaryProducerAOD.h:200
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
L1EmParticleFwd.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TriggerSummaryProducerAOD::fillTriggerObjectCollections
void fillTriggerObjectCollections(trigger::TriggerObjectCollection &, ProductIDtoIndex &, std::vector< std::string > &, trigger::Keys &, const edm::Event &, const edm::GetterOfProducts< C > &, const InputTagSet &) const
Definition: TriggerSummaryProducerAOD.cc:407
TriggerSummaryProducerAOD::OrderInputTag::OrderInputTag
OrderInputTag(bool ignoreProcess)
Definition: TriggerSummaryProducerAOD.h:90
CompositeCandidateFwd.h
TriggerSummaryProducerAOD::getTriggerFilterObjectWithRefs_
edm::GetterOfProducts< trigger::TriggerFilterObjectWithRefs > getTriggerFilterObjectWithRefs_
trigger object collection
Definition: TriggerSummaryProducerAOD.h:181
reco::PFMET
Definition: PFMET.h:18
ElectronFwd.h
TriggerSummaryProducerAOD
Definition: TriggerSummaryProducerAOD.h:78
METCollection.h
L1JetParticleFwd.h
edm::ParameterSet
Definition: ParameterSet.h:36
L1EtMissParticleFwd.h
Event.h
TriggerSummaryProducerAOD::getRecoEcalCandidateCollection_
edm::GetterOfProducts< reco::RecoEcalCandidateCollection > getRecoEcalCandidateCollection_
Definition: TriggerSummaryProducerAOD.h:182
InputTagHash::operator()
std::size_t operator()(const edm::InputTag &inputTag) const
Definition: TriggerSummaryProducerAOD.h:72
TriggerSummaryProducerAOD::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: TriggerSummaryProducerAOD.cc:200
TriggerSummaryProducerAOD::TriggerSummaryProducerAOD
TriggerSummaryProducerAOD(const edm::ParameterSet &)
Definition: TriggerSummaryProducerAOD.cc:76
TriggerSummaryProducerAOD::getCaloJetCollection_
edm::GetterOfProducts< reco::CaloJetCollection > getCaloJetCollection_
Definition: TriggerSummaryProducerAOD.h:185
TriggerSummaryProducerAOD::OrderInputTag
InputTag ordering class.
Definition: TriggerSummaryProducerAOD.h:88
trigger::TriggerObjectCollection
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
TriggerSummaryProducerAOD::getL1MuonParticleCollection_
edm::GetterOfProducts< l1extra::L1MuonParticleCollection > getL1MuonParticleCollection_
Definition: TriggerSummaryProducerAOD.h:192
edm::GetterOfProducts
Definition: GetterOfProducts.h:121
trigger::Keys
std::vector< size_type > Keys
Definition: TriggerTypeDefs.h:19
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
TriggerSummaryProducerAOD::fillTriggerObject
void fillTriggerObject(trigger::TriggerObjectCollection &, const T &) const
Definition: TriggerSummaryProducerAOD.cc:454
TriggerSummaryProducerAOD::getL1TEGammaParticleCollection_
edm::GetterOfProducts< l1t::EGammaBxCollection > getL1TEGammaParticleCollection_
Definition: TriggerSummaryProducerAOD.h:199
TriggerObject.h
InputTag.h
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
alignCSCRings.r
r
Definition: alignCSCRings.py:93
TriggerSummaryProducerAOD::getL1JetParticleCollection_
edm::GetterOfProducts< l1extra::L1JetParticleCollection > getL1JetParticleCollection_
Definition: TriggerSummaryProducerAOD.h:193
TriggerSummaryProducerAOD::moduleLabelPatternsToSkip_
std::vector< std::regex > moduleLabelPatternsToSkip_
Definition: TriggerSummaryProducerAOD.h:159
PFMETFwd.h
TriggerSummaryProducerAOD::filterTagsGlobal_
tbb::concurrent_unordered_set< edm::InputTag, InputTagHash > filterTagsGlobal_
list of L3 filter tags
Definition: TriggerSummaryProducerAOD.h:162
TriggerSummaryProducerAOD::getPFMETCollection_
edm::GetterOfProducts< reco::PFMETCollection > getPFMETCollection_
Definition: TriggerSummaryProducerAOD.h:189
Ref.h
ConfigurationDescriptions
T
long double T
Definition: Basic3DVectorLD.h:48
TriggerSummaryProducerAOD::getPFTauCollection_
edm::GetterOfProducts< reco::PFTauCollection > getPFTauCollection_
Definition: TriggerSummaryProducerAOD.h:197
METFwd.h
TriggerSummaryProducerAOD::OrderInputTag::operator()
bool operator()(const edm::InputTag &l, const edm::InputTag &r) const
Definition: TriggerSummaryProducerAOD.h:91
TriggerSummaryProducerAOD::endJob
void endJob() override
Definition: TriggerSummaryProducerAOD.cc:701
TriggerSummaryProducerAOD::getMETCollection_
edm::GetterOfProducts< reco::METCollection > getMETCollection_
Definition: TriggerSummaryProducerAOD.h:187
RecoEcalCandidateFwd.h
TriggerSummaryProducerAOD::getPFJetCollection_
edm::GetterOfProducts< reco::PFJetCollection > getPFJetCollection_
Definition: TriggerSummaryProducerAOD.h:196
TriggerSummaryProducerAOD::~TriggerSummaryProducerAOD
~TriggerSummaryProducerAOD() override
EventSetup
ParameterSet.h
TriggerSummaryProducerAOD::fillFilterObjectMember
void fillFilterObjectMember(trigger::Keys &keys, trigger::Vids &ids, const int &, const int &, const edm::Ref< C > &) const
Definition: TriggerSummaryProducerAOD.cc:596
EDProducer.h
TriggerSummaryProducerAOD::getL1TMuonParticleCollection_
edm::GetterOfProducts< l1t::MuonBxCollection > getL1TMuonParticleCollection_
Definition: TriggerSummaryProducerAOD.h:198
SimL1EmulatorRepack_Full_cff.inputTag
inputTag
Definition: SimL1EmulatorRepack_Full_cff.py:56
edm::Event
Definition: Event.h:73
RecoChargedCandidateFwd.h
IsolatedPixelTrackCandidateFwd.h
edm::InputTag
Definition: InputTag.h:15
TriggerSummaryProducerAOD::getL1HFRingsCollection_
edm::GetterOfProducts< l1extra::L1HFRingsCollection > getL1HFRingsCollection_
Definition: TriggerSummaryProducerAOD.h:195