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
43 
45  public:
46  explicit BTVHLTOfflineSource(const edm::ParameterSet&);
47  ~BTVHLTOfflineSource() override;
48 
49  private:
50  void analyze(const edm::Event&, const edm::EventSetup&) override;
51  void bookHistograms(DQMStore::IBooker &, edm::Run const & run, edm::EventSetup const & c) override;
52  void dqmBeginRun(edm::Run const& run, edm::EventSetup const& c) override;
53 
54  bool verbose_;
59 
60  std::vector<std::pair<std::string, std::string> > custompathnamepairs_;
61 
64 
68 
71 
76 
81 
84 
87 
88  // edm::EDGetTokenT<std::vector<reco::TemplatedSecondaryVertexTagInfo<reco::IPTagInfo<edm::RefVector<std::vector<reco::Track>,reco::Track,edm::refhelper::FindUsingAdvance<std::vector<reco::Track>,reco::Track> >,reco::JTATagInfo>,reco::Vertex> > >
89  // caloTagInfosToken_;
90  // edm::EDGetTokenT<std::vector<reco::TemplatedSecondaryVertexTagInfo<reco::IPTagInfo<edm::RefVector<std::vector<reco::Track>,reco::Track,edm::refhelper::FindUsingAdvance<std::vector<reco::Track>,reco::Track> >,reco::JTATagInfo>,reco::Vertex> > >
91  // pfTagInfosToken_;
92 
95  edm::Handle<std::vector<reco::TemplatedSecondaryVertexTagInfo<reco::IPTagInfo<edm::RefVector<std::vector<reco::Track>,reco::Track,edm::refhelper::FindUsingAdvance<std::vector<reco::Track>,reco::Track> >,reco::JTATagInfo>,reco::Vertex> > >
97 
102 
107 
108  class PathInfo : public TriggerDQMBase {
110  prescaleUsed_(-1),
111  pathName_("unset"),
112  filterName_("unset"),
113  processName_("unset"),
114  objectType_(-1),
115  triggerType_("unset")
116  {};
117 
118  public:
119  ~PathInfo() = default;;
120  PathInfo(int prescaleUsed,
121  std::string pathName,
124  size_t type,
125  std::string triggerType):
126  prescaleUsed_(prescaleUsed),
127  pathName_(std::move(pathName)),
128  filterName_(std::move(filterName)),
129  processName_(std::move(processName)),
130  objectType_(type),
131  triggerType_(std::move(triggerType)) {}
132 
133  const std::string getLabel( ) const {return filterName_;}
134  void setLabel(std::string labelName) {filterName_ = std::move(labelName);}
135  const std::string getPath( ) const {return pathName_;}
136  const int getprescaleUsed() const {return prescaleUsed_;}
137  const std::string getProcess( ) const {return processName_;}
138  const int getObjectType( ) const {return objectType_;}
139  const std::string getTriggerType( ) const {return triggerType_;}
141  const bool operator== (const std::string& v) const {return v==pathName_;}
142 
143  MonitorElement* Discr = nullptr;
144  MonitorElement* Pt = nullptr;
145  MonitorElement* Eta = nullptr;
151  MonitorElement* PVz = nullptr;
155  MonitorElement* n_vtx = nullptr;
162  // MonitorElement* n_pixel_hits_;
163  // MonitorElement* n_total_hits_;
164 
165  private:
172  };
173 
174  class PathInfoCollection: public std::vector<PathInfo> {
175  public:
177  {};
178  std::vector<PathInfo>::iterator find(const std::string& pathName) {
179  return std::find(begin(), end(), pathName);
180  }
181  };
183 
184  };
185 #endif
void analyze(const edm::Event &, const edm::EventSetup &) override
BTVHLTOfflineSource(const edm::ParameterSet &)
const std::string getPath() const
type
Definition: HCALResponse.h:21
const std::string getLabel() const
edm::EDGetTokenT< std::vector< reco::ShallowTagInfo > > shallowTagInfosTokenCalo_
edm::Handle< trigger::TriggerEvent > triggerObj_
edm::EDGetTokenT< reco::JetTagCollection > pfTagsToken_
const bool operator==(const std::string &v) const
edm::EDGetTokenT< reco::JetTagCollection > offlineDiscrTokenb_
void setLabel(std::string labelName)
edm::EDGetTokenT< std::vector< reco::Vertex > > hltCaloPVToken_
PathInfo(int prescaleUsed, std::string pathName, std::string filterName, std::string processName, size_t type, std::string triggerType)
edm::Handle< std::vector< reco::TemplatedSecondaryVertexTagInfo< reco::IPTagInfo< edm::RefVector< std::vector< reco::Track >, reco::Track, edm::refhelper::FindUsingAdvance< std::vector< reco::Track >, reco::Track > >, reco::JTATagInfo >, reco::Vertex > > > caloTagInfos
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
edm::Handle< std::vector< reco::ShallowTagInfo > > shallowTagInfosPf
edm::EDGetTokenT< std::vector< reco::Vertex > > offlinePVToken_
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryFUToken
std::vector< PathInfo >::iterator find(const std::string &pathName)
edm::InputTag triggerResultsLabel_
edm::Handle< edm::TriggerResults > triggerResults_
edm::Handle< reco::JetTagCollection > pfTags
edm::InputTag triggerSummaryLabel_
const std::string getProcess() const
PathInfoCollection hltPathsAll_
const edm::InputTag getTag() const
#define end
Definition: vmac.h:39
~BTVHLTOfflineSource() override
HLTConfigProvider hltConfig_
edm::EDGetTokenT< reco::JetTagCollection > offlineDiscrTokenbb_
edm::EDGetTokenT< std::vector< reco::Vertex > > hltFastPVToken_
edm::Handle< std::vector< reco::TemplatedSecondaryVertexTagInfo< reco::IPTagInfo< edm::RefVector< std::vector< reco::Track >, reco::Track, edm::refhelper::FindUsingAdvance< std::vector< reco::Track >, reco::Track > >, reco::JTATagInfo >, reco::Vertex > > > pfTagInfos
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:32
edm::EDGetTokenT< std::vector< reco::ShallowTagInfo > > shallowTagInfosTokenPf_
edm::Handle< reco::JetTagCollection > caloTags
void bookHistograms(DQMStore::IBooker &, edm::Run const &run, edm::EventSetup const &c) override
edm::EDGetTokenT< reco::JetTagCollection > caloTagsToken_
edm::TriggerNames triggerNames_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsFUToken
def move(src, dest)
Definition: eostools.py:511
edm::Handle< std::vector< reco::ShallowTagInfo > > shallowTagInfosCalo
Definition: Run.h:44