Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:03

0001 // -*- C++ -*-
0002 //
0003 // Package:    IOMC/RandomEngine
0004 // Class:      RandomFilter
0005 //
0006 /**\class edm::RandomFilter
0007 
0008  Description: The output of this module is used for test purposes.
0009 It is a filter module that makes a filter decision based on a
0010 randomly generated number.  The fraction of events that pass the
0011 filter (in the limit of infinite statistics) is a parameter
0012 that must be set in the configuration file.  The parameter
0013 type and name is "untracked double acceptRate".
0014 
0015 */
0016 //
0017 // Original Author:  W. David Dagenhart
0018 //         Created:  26 March 2007
0019 //
0020 
0021 #include "FWCore/Framework/interface/FrameworkfwdMostUsed.h"
0022 #include "FWCore/Framework/interface/global/EDFilter.h"
0023 
0024 namespace edm {
0025 
0026   class RandomFilter : public edm::global::EDFilter<> {
0027   public:
0028     explicit RandomFilter(edm::ParameterSet const&);
0029     bool filter(edm::StreamID, edm::Event&, edm::EventSetup const&) const override;
0030 
0031   private:
0032     // value between 0 and 1
0033     double acceptRate_;
0034   };
0035 }  // namespace edm