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 <fstream>
14 #include <iostream>
15 #include <memory>
16 #include <sstream>
17 #include <string>
18 #include <utility>
19 #include <vector>
20 #include <unistd.h>
21 
22 // user include files
41 
43  public:
44  explicit BTVHLTOfflineSource(const edm::ParameterSet&);
45  ~BTVHLTOfflineSource() override;
46 
47  private:
48  void analyze(const edm::Event&, const edm::EventSetup&) override;
49  void bookHistograms(DQMStore::IBooker &, edm::Run const & run, edm::EventSetup const & c) override;
50  void dqmBeginRun(edm::Run const& run, edm::EventSetup const& c) override;
51 
52  bool verbose_;
57 
58  std::vector<std::pair<std::string, std::string> > custompathnamepairs_;
59 
62 
65 
70 
75 
80 
85 
86  class PathInfo {
88  prescaleUsed_(-1),
89  pathName_("unset"),
90  filterName_("unset"),
91  processName_("unset"),
92  objectType_(-1),
93  triggerType_("unset")
94  {};
95 
96  public:
97  void setHistos(
98  MonitorElement* const CSV, MonitorElement* const Pt, MonitorElement* const Eta,
99  MonitorElement* const CSV_RECOvsHLT, MonitorElement* const PVz, MonitorElement* const fastPVz,
100  MonitorElement* const PVz_HLTMinusRECO, MonitorElement* const fastPVz_HLTMinusRECO
101  )
102  { CSV_ = CSV; Pt_ = Pt; Eta_ = Eta; CSV_RECOvsHLT_ = CSV_RECOvsHLT; PVz_ = PVz; fastPVz_ = fastPVz;
103  PVz_HLTMinusRECO_ = PVz_HLTMinusRECO; fastPVz_HLTMinusRECO_ = fastPVz_HLTMinusRECO;
104  };
105 
106 
107  ~PathInfo() = default;;
108  PathInfo(int prescaleUsed,
109  std::string pathName,
112  size_t type,
113  std::string triggerType):
114  prescaleUsed_(prescaleUsed),
115  pathName_(std::move(pathName)),
116  filterName_(std::move(filterName)),
117  processName_(std::move(processName)),
118  objectType_(type),
119  triggerType_(std::move(triggerType))
120  {
121  }
122 
131 
132  const std::string getLabel( ) const {
133  return filterName_;
134  }
135  void setLabel(std::string labelName){
136  filterName_ = std::move(labelName);
137  return;
138  }
139  const std::string getPath( ) const {
140  return pathName_;
141  }
142  const int getprescaleUsed() const {
143  return prescaleUsed_;
144  }
145  const std::string getProcess( ) const {
146  return processName_;
147  }
148  const int getObjectType( ) const {
149  return objectType_;
150  }
151  const std::string getTriggerType( ) const {
152  return triggerType_;
153  }
154  const edm::InputTag getTag() const{
156  return tagName;
157  }
158  bool operator==(const std::string& v)
159  {
160  return v==pathName_;
161  }
162 
163  private:
164 
171 
180 
181  };
182 
183  class PathInfoCollection: public std::vector<PathInfo> {
184  public:
186  {};
187  std::vector<PathInfo>::iterator find(const std::string& pathName) {
188  return std::find(begin(), end(), pathName);
189  }
190  };
192 
193  };
194 #endif
void analyze(const edm::Event &, const edm::EventSetup &) override
BTVHLTOfflineSource(const edm::ParameterSet &)
const std::string getPath() const
type
Definition: HCALResponse.h:21
edm::EDGetTokenT< reco::JetTagCollection > offlineCSVTokenCalo_
edm::EDGetTokenT< reco::JetTagCollection > offlineCSVTokenPF_
const std::string getLabel() 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
edm::EDGetTokenT< std::vector< reco::Vertex > > offlinePVToken_
MonitorElement * getMEhisto_CSV_RECOvsHLT()
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryFUToken
edm::Handle< reco::JetTagCollection > csvCaloTags
std::vector< PathInfo >::iterator find(const std::string &pathName)
edm::InputTag triggerResultsLabel_
edm::Handle< edm::TriggerResults > triggerResults_
edm::InputTag triggerSummaryLabel_
MonitorElement * getMEhisto_fastPVz_HLTMinusRECO()
const std::string getProcess() const
PathInfoCollection hltPathsAll_
const edm::InputTag getTag() const
#define end
Definition: vmac.h:37
edm::EDGetTokenT< reco::JetTagCollection > csvCaloTagsToken_
~BTVHLTOfflineSource() override
HLTConfigProvider hltConfig_
edm::EDGetTokenT< std::vector< reco::Vertex > > hltFastPVToken_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken
const std::string getTriggerType() const
edm::EDGetTokenT< std::vector< reco::Vertex > > hltPFPVToken_
void dqmBeginRun(edm::Run const &run, edm::EventSetup const &c) override
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)
void bookHistograms(DQMStore::IBooker &, edm::Run const &run, edm::EventSetup const &c) override
edm::EDGetTokenT< reco::JetTagCollection > csvPfTagsToken_
bool operator==(const std::string &v)
edm::TriggerNames triggerNames_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsFUToken
def move(src, dest)
Definition: eostools.py:510
Definition: Run.h:42