CMS 3D CMS Logo

BTVHLTOfflineSource.h
Go to the documentation of this file.
1 #ifndef BTVHLTOfflineSource_H
2 #define BTVHLTOfflineSource_H
3 /*
4  BTVHLTOffline DQM code
5 */
6 //
7 // Originally created by: Anne-Catherine Le Bihan
8 // June 2015
9 // Following the structure used in JetMetHLTOfflineSource
10 
11 
12 // system include files
13 #include <memory>
14 #include <unistd.h>
15 
16 // user include files
19 
21 
30 
35 
37 
40 
41 #include <iostream>
42 #include <fstream>
43 #include <vector>
44 #include <string>
45 #include <sstream>
46 
48  public:
49  explicit BTVHLTOfflineSource(const edm::ParameterSet&);
51 
52  private:
53  virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
54  virtual void bookHistograms(DQMStore::IBooker &, edm::Run const & run, edm::EventSetup const & c) override;
55  virtual void dqmBeginRun(edm::Run const& run, edm::EventSetup const& c) override;
56 
57  bool verbose_;
62 
63  std::vector<std::pair<std::string, std::string> > custompathnamepairs_;
64 
67 
70 
75 
80 
85 
90 
91  class PathInfo {
93  prescaleUsed_(-1),
94  pathName_("unset"),
95  filterName_("unset"),
96  processName_("unset"),
97  objectType_(-1),
98  triggerType_("unset")
99  {};
100 
101  public:
102  void setHistos(
103  MonitorElement* const CSV, MonitorElement* const Pt, MonitorElement* const Eta,
104  MonitorElement* const CSV_RECOvsHLT, MonitorElement* const PVz, MonitorElement* const fastPVz,
105  MonitorElement* const PVz_HLTMinusRECO, MonitorElement* const fastPVz_HLTMinusRECO
106  )
107  { CSV_ = CSV; Pt_ = Pt; Eta_ = Eta; CSV_RECOvsHLT_ = CSV_RECOvsHLT; PVz_ = PVz; fastPVz_ = fastPVz;
108  PVz_HLTMinusRECO_ = PVz_HLTMinusRECO; fastPVz_HLTMinusRECO_ = fastPVz_HLTMinusRECO;
109  };
110 
111 
112  ~PathInfo() {};
113  PathInfo(int prescaleUsed,
114  std::string pathName,
117  size_t type,
118  std::string triggerType):
119  prescaleUsed_(prescaleUsed),
120  pathName_(pathName),
121  filterName_(filterName),
122  processName_(processName),
123  objectType_(type),
124  triggerType_(triggerType){};
125 
134 
135  const std::string getLabel(void ) const {
136  return filterName_;
137  }
138  void setLabel(std::string labelName){
139  filterName_ = labelName;
140  return;
141  }
142  const std::string getPath(void ) const {
143  return pathName_;
144  }
145  const int getprescaleUsed(void) const {
146  return prescaleUsed_;
147  }
148  const std::string getProcess(void ) const {
149  return processName_;
150  }
151  const int getObjectType(void ) const {
152  return objectType_;
153  }
154  const std::string getTriggerType(void ) const {
155  return triggerType_;
156  }
157  const edm::InputTag getTag(void) const{
159  return tagName;
160  }
162  {
163  return v==pathName_;
164  }
165 
166  private:
167 
174 
183 
184  };
185 
186  class PathInfoCollection: public std::vector<PathInfo> {
187  public:
189  {};
190  std::vector<PathInfo>::iterator find(std::string pathName) {
191  return std::find(begin(), end(), pathName);
192  }
193  };
195 
196  };
197 #endif
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
BTVHLTOfflineSource(const edm::ParameterSet &)
type
Definition: HCALResponse.h:21
edm::EDGetTokenT< reco::JetTagCollection > offlineCSVTokenCalo_
edm::EDGetTokenT< reco::JetTagCollection > offlineCSVTokenPF_
const int getObjectType(void) const
edm::Handle< trigger::TriggerEvent > triggerObj_
MonitorElement * getMEhisto_PVz_HLTMinusRECO()
void setLabel(std::string labelName)
edm::EDGetTokenT< std::vector< reco::Vertex > > hltCaloPVToken_
edm::Handle< reco::JetTagCollection > csvPfTags
PathInfo(int prescaleUsed, std::string pathName, std::string filterName, std::string processName, size_t type, std::string triggerType)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
bool operator==(const std::string v)
const std::string getPath(void) const
edm::EDGetTokenT< std::vector< reco::Vertex > > offlinePVToken_
MonitorElement * getMEhisto_CSV_RECOvsHLT()
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryFUToken
edm::Handle< reco::JetTagCollection > csvCaloTags
edm::InputTag triggerResultsLabel_
edm::Handle< edm::TriggerResults > triggerResults_
const std::string getLabel(void) const
const std::string getTriggerType(void) const
edm::InputTag triggerSummaryLabel_
MonitorElement * getMEhisto_fastPVz_HLTMinusRECO()
PathInfoCollection hltPathsAll_
#define end
Definition: vmac.h:37
edm::EDGetTokenT< reco::JetTagCollection > csvCaloTagsToken_
const int getprescaleUsed(void) const
const edm::InputTag getTag(void) const
HLTConfigProvider hltConfig_
edm::EDGetTokenT< std::vector< reco::Vertex > > hltFastPVToken_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken
edm::EDGetTokenT< std::vector< reco::Vertex > > hltPFPVToken_
virtual void dqmBeginRun(edm::Run const &run, edm::EventSetup const &c) override
std::vector< PathInfo >::iterator find(std::string pathName)
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken
#define begin
Definition: vmac.h:30
void setHistos(MonitorElement *const CSV, MonitorElement *const Pt, MonitorElement *const Eta, MonitorElement *const CSV_RECOvsHLT, MonitorElement *const PVz, MonitorElement *const fastPVz, MonitorElement *const PVz_HLTMinusRECO, MonitorElement *const fastPVz_HLTMinusRECO)
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &run, edm::EventSetup const &c) override
edm::EDGetTokenT< reco::JetTagCollection > csvPfTagsToken_
edm::TriggerNames triggerNames_
const std::string getProcess(void) const
edm::EDGetTokenT< edm::TriggerResults > triggerResultsFUToken
Definition: Run.h:42