CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalLaserEventFilter2012.h
Go to the documentation of this file.
1 #ifndef HcalLaserEventFilter2012_h
2 #define HcalLaserEventFilter2012_h
3 
4 // -*- C++ -*-
5 //
6 // Package: HcalLaserEventFilter2012
7 // Class: HcalLaserEventFilter2012
8 //
16 //
17 // Original Author: Jeff Temple, University of Maryland (jtemple@fnal.gov)
18 // Created: Fri Oct 19 13:15:44 EDT 2012
19 //
20 //
21 
22 
23 // system include files
24 #include <iostream>
25 #include <sstream>
26 #include <fstream>
27 
28 
29 // user include files
33 
35 
36 //
37 // class declaration
38 //
40 
42 public:
45 
46  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
47 
49 
50 private:
51  virtual bool filter(edm::Event&, const edm::EventSetup&) override;
52  virtual void endJob() override;
53 
54  void readEventListFile(const std::string & eventFileName);
55  void addEventString(const std::string & eventString);
56 
57  // ----------member data ---------------------------
58  typedef std::vector< std::string > strVec;
59  typedef std::vector< std::string >::iterator strVecI;
60 
61  std::vector< std::string > EventList_; // vector of strings representing bad events, with each string in "run:LS:event" format
62  bool verbose_; // if set to true, then the run:LS:event for any event failing the cut will be printed out
63  std::string prefix_; // prefix will be printed before any event if verbose mode is true, in order to make searching for events easier
64 
65  // Set run range of events in the BAD LASER LIST.
66  // The purpose of these values is to shorten the length of the EventList_ vector when running on only a subset of data
67  int minrun_;
68  int maxrun_; // if specified (i.e., values > -1), then only events in the given range will be filtered
70 
73  std::ofstream outfile_;
74 };
75 #endif
std::vector< std::string > EventList_
HcalLaserEventFilter2012(const edm::ParameterSet &)
std::vector< std::string > strVec
void addEventString(const std::string &eventString)
virtual void endJob() override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual bool filter(edm::Event &, const edm::EventSetup &) override
void readEventListFile(const std::string &eventFileName)
std::vector< std::string >::iterator strVecI