Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:18:43

0001 /** \class HLTTriggerTypeFilter
0002  *
0003  * See header file for documentation
0004  *
0005  *
0006  *  \author:  Giovanni FRANZONI
0007  *
0008  */
0009 
0010 // include files
0011 #include "HLTTriggerTypeFilter.h"
0012 
0013 //
0014 // constructors and destructor
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 // member functions
0029 //
0030 
0031 // ------------ method called on each new Event  ------------
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 // declare this class as a framework plugin
0041 #include "FWCore/Framework/interface/MakerMacros.h"
0042 DEFINE_FWK_MODULE(HLTTriggerTypeFilter);