File indexing completed on 2024-04-06 12:18:43
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "HLTTriggerTypeFilter.h"
0012
0013
0014
0015
0016 HLTTriggerTypeFilter::HLTTriggerTypeFilter(const edm::ParameterSet& iConfig)
0017 : selectedTriggerType_(iConfig.getParameter<int>("SelectedTriggerType")) {}
0018
0019 HLTTriggerTypeFilter::~HLTTriggerTypeFilter() = default;
0020
0021 void HLTTriggerTypeFilter::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0022 edm::ParameterSetDescription desc;
0023 desc.add<int>("SelectedTriggerType", 2);
0024 descriptions.add("hltTriggerTypeFilter", desc);
0025 }
0026
0027
0028
0029
0030
0031
0032 bool HLTTriggerTypeFilter::filter(edm::StreamID, edm::Event& event, edm::EventSetup const& setup) const {
0033 if (event.isRealData()) {
0034 return (event.experimentType() == selectedTriggerType_);
0035 } else {
0036 return true;
0037 }
0038 }
0039
0040
0041 #include "FWCore/Framework/interface/MakerMacros.h"
0042 DEFINE_FWK_MODULE(HLTTriggerTypeFilter);