CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
L1TDTTPGClient Class Reference

#include <L1TDTTPGClient.h>

Inheritance diagram for L1TDTTPGClient:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1TDTTPGClient (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~L1TDTTPGClient ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Fake Analyze. More...
 
void beginJob (void)
 BeginJob. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void endJob ()
 Endjob. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 DQM Client Diagnostic. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun. More...
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

TH1F * get1DHisto (std::string meName, DQMStore *dbi)
 
TProfile * get1DProfile (std::string meName, DQMStore *dbi)
 
TH2F * get2DHisto (std::string meName, DQMStore *dbi)
 
TProfile2D * get2DProfile (std::string meName, DQMStore *dbi)
 
void initialize ()
 
void makeRatioHisto (MonitorElement *ratioME, std::string &nName, std::string &dName)
 
void setMapPhLabel (MonitorElement *me)
 
void setMapThLabel (MonitorElement *me)
 

Private Attributes

int counterEvt_
 counter More...
 
int counterLS_
 
DQMStoredbe_
 
MonitorElementdttpgphmap2ndf
 
MonitorElementdttpgphmapbxf [3]
 
MonitorElementdttpgphmapcorrf
 prescale on number of events More...
 
MonitorElementdttpgthmapbxf [3]
 
MonitorElementdttpgthmaphf
 
std::string input_dir_
 
std::string monitorName_
 
std::string output_dir_
 
edm::ParameterSet parameters_
 
int prescaleEvt_
 units of lumi sections More...
 
int prescaleLS_
 counter More...
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 21 of file L1TDTTPGClient.h.

Constructor & Destructor Documentation

L1TDTTPGClient::L1TDTTPGClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 23 of file L1TDTTPGClient.cc.

References initialize().

24 {
25  parameters_=ps;
26  initialize();
27 }
edm::ParameterSet parameters_
L1TDTTPGClient::~L1TDTTPGClient ( )
virtual

Destructor.

Definition at line 29 of file L1TDTTPGClient.cc.

29  {
30  LogInfo("TriggerDQM")<<"[TriggerDQM]: ending... ";
31 }

Member Function Documentation

void L1TDTTPGClient::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 120 of file L1TDTTPGClient.cc.

120  {
121 // cout << "L1TDTTPGClient::analyze" << endl;
122  counterEvt_++;
123  if (prescaleEvt_<1) return;
124  if (prescaleEvt_>0 && counterEvt_%prescaleEvt_ != 0) return;
125 
126  string nName = "DT_TPG_phi_best_map_corr";
127  string dName = "DT_TPG_phi_best_map";
128  makeRatioHisto(dttpgphmapcorrf,nName,dName);
129  dName = "DT_TPG_phi_map";
130  nName = "DT_TPG_phi_map_2nd";
131  makeRatioHisto(dttpgphmap2ndf,nName,dName);
132  nName = "DT_TPG_phi_map_bx-1";
133  makeRatioHisto(dttpgphmapbxf[0],nName,dName);
134  nName = "DT_TPG_phi_map_bx0";
135  makeRatioHisto(dttpgphmapbxf[1],nName,dName);
136  nName = "DT_TPG_phi_map_bx+1";
137  makeRatioHisto(dttpgphmapbxf[2],nName,dName);
138 
139  nName = "DT_TPG_theta_best_map_h";
140  dName = "DT_TPG_theta_best_map";
141  makeRatioHisto(dttpgthmaphf,nName,dName);
142  dName = "DT_TPG_theta_map";
143  nName = "DT_TPG_theta_map_bx-1";
144  makeRatioHisto(dttpgthmapbxf[0],nName,dName);
145  nName = "DT_TPG_theta_map_bx0";
146  makeRatioHisto(dttpgthmapbxf[1],nName,dName);
147  nName = "DT_TPG_theta_map_bx+1";
148  makeRatioHisto(dttpgthmapbxf[2],nName,dName);
149 
150 
151 }
int prescaleEvt_
units of lumi sections
void makeRatioHisto(MonitorElement *ratioME, std::string &nName, std::string &dName)
MonitorElement * dttpgphmapcorrf
prescale on number of events
MonitorElement * dttpgphmapbxf[3]
MonitorElement * dttpgthmapbxf[3]
MonitorElement * dttpgthmaphf
MonitorElement * dttpgphmap2ndf
int counterEvt_
counter
void L1TDTTPGClient::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 60 of file L1TDTTPGClient.cc.

References DQMStore::book2D(), dbe_, cppFunctionSkipper::operator, and DQMStore::setCurrentFolder().

60  {
61 
62  LogInfo("TriggerDQM")<<"[TriggerDQM]: Begin Job";
63 
64  // get backendinterface
66 
68 
69  // booking
70 
71  dttpgphmapcorrf = dbe_->book2D("DT_TPG_phi_map_corr_frac",
72  "Fraction of correlated best triggers per station",20,1,21,12,0,12);
73  dttpgphmap2ndf = dbe_->book2D("DT_TPG_phi_map_2nd_frac",
74  "Fraction of second tracks per station",20,1,21,12,0,12);
75  dttpgphmapbxf[0] = dbe_->book2D("DT_TPG_phi_map_bx-1_frac",
76  "Fraction of triggers per station (BX=-1)",20,1,21,12,0,12);
77  dttpgphmapbxf[1] = dbe_->book2D("DT_TPG_phi_map_bx0_frac",
78  "Fraction of triggers per station (BX=0)",20,1,21,12,0,12);
79  dttpgphmapbxf[2] = dbe_->book2D("DT_TPG_phi_map_bx+1_frac",
80  "Fraction of triggers per station (BX=1)",20,1,21,12,0,12);
86 
87  dttpgthmaphf = dbe_->book2D("DT_TPG_theta_map_corr_frac",
88  "Fraction of H quality best triggers per station",15,1,16,12,0,12);
89  dttpgthmapbxf[0] = dbe_->book2D("DT_TPG_theta_map_bx-1_frac",
90  "Fraction of triggers per station (BX=-1)",15,1,16,12,0,12);
91  dttpgthmapbxf[1] = dbe_->book2D("DT_TPG_theta_map_bx0_frac",
92  "Fraction of triggers per station (BX=0)",15,1,16,12,0,12);
93  dttpgthmapbxf[2] = dbe_->book2D("DT_TPG_theta_map_bx+1_frac",
94  "Fraction of triggers per station (BX=1)",15,1,16,12,0,12);
99 
100 
101 
102 }
void setMapThLabel(MonitorElement *me)
MonitorElement * dttpgphmapcorrf
prescale on number of events
MonitorElement * dttpgphmapbxf[3]
MonitorElement * dttpgthmapbxf[3]
std::string output_dir_
MonitorElement * dttpgthmaphf
void setMapPhLabel(MonitorElement *me)
MonitorElement * dttpgphmap2ndf
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1070
DQMStore * dbe_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:655
void L1TDTTPGClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 109 of file L1TDTTPGClient.cc.

109  {
110  // optionally reset histograms here
111  // clientHisto->Reset();
112 }
void L1TDTTPGClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 105 of file L1TDTTPGClient.cc.

105  {
106 }
void L1TDTTPGClient::endJob ( void  )
protectedvirtual

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 158 of file L1TDTTPGClient.cc.

158  {
159 }
void L1TDTTPGClient::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protectedvirtual

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 115 of file L1TDTTPGClient.cc.

116  {
117 
118 }
void L1TDTTPGClient::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 154 of file L1TDTTPGClient.cc.

154  {
155 }
TH1F * L1TDTTPGClient::get1DHisto ( std::string  meName,
DQMStore dbi 
)
private

Definition at line 189 of file L1TDTTPGClient.cc.

References DQMStore::get(), MonitorElement::getTH1F(), and NULL.

190 {
191 
192  MonitorElement * me_ = dbi->get(meName);
193 
194  if (!me_) {
195  LogInfo("TriggerDQM") << "ME NOT FOUND.";
196  return NULL;
197  }
198 
199  return me_->getTH1F();
200 }
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1696
TH1F * getTH1F(void) const
TProfile * L1TDTTPGClient::get1DProfile ( std::string  meName,
DQMStore dbi 
)
private

Definition at line 233 of file L1TDTTPGClient.cc.

References DQMStore::get(), MonitorElement::getTProfile(), and NULL.

234 {
235 
236 
237  MonitorElement * me_ = dbi->get(meName);
238 
239  if (!me_) {
240  LogInfo("TriggerDQM") << "ME NOT FOUND.";
241  return NULL;
242  }
243 
244  return me_->getTProfile();
245 }
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1696
TProfile * getTProfile(void) const
TH2F * L1TDTTPGClient::get2DHisto ( std::string  meName,
DQMStore dbi 
)
private

Definition at line 202 of file L1TDTTPGClient.cc.

References DQMStore::get(), MonitorElement::getTH2F(), and NULL.

203 {
204 
205 
206  MonitorElement * me_ = dbi->get(meName);
207 
208  if (!me_) {
209  LogInfo("TriggerDQM") << "ME NOT FOUND.";
210  return NULL;
211  }
212 
213  return me_->getTH2F();
214 }
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1696
TH2F * getTH2F(void) const
TProfile2D * L1TDTTPGClient::get2DProfile ( std::string  meName,
DQMStore dbi 
)
private

Definition at line 218 of file L1TDTTPGClient.cc.

References DQMStore::get(), MonitorElement::getTProfile2D(), and NULL.

219 {
220 
221 
222  MonitorElement * me_ = dbi->get(meName);
223 
224  if (!me_) {
225  LogInfo("TriggerDQM") << "ME NOT FOUND.";
226  return NULL;
227  }
228 
229  return me_->getTProfile2D();
230 }
TProfile2D * getTProfile2D(void) const
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1696
void L1TDTTPGClient::initialize ( )
private

Definition at line 34 of file L1TDTTPGClient.cc.

References dbe_, and cppFunctionSkipper::operator.

34  {
35 
36  counterLS_=0;
37  counterEvt_=0;
38 
39  // get back-end interface
41 
42  // base folder for the contents of this job
43  monitorName_ = parameters_.getUntrackedParameter<string>("monitorName","");
44 // cout << "Monitor name = " << monitorName_ << endl;
45  prescaleLS_ = parameters_.getUntrackedParameter<int>("prescaleLS", -1);
46 // cout << "DQM lumi section prescale = " << prescaleLS_ << " lumi section(s)"<< endl;
47  prescaleEvt_ = parameters_.getUntrackedParameter<int>("prescaleEvt", -1);
48 // cout << "DQM event prescale = " << prescaleEvt_ << " events(s)"<< endl;
49  output_dir_ = parameters_.getUntrackedParameter<string>("output_dir","");
50 // cout << "DQM output dir = " << output_dir_ << endl;
51  input_dir_ = parameters_.getUntrackedParameter<string>("input_dir","");
52 // cout << "DQM input dir = " << input_dir_ << endl;
53 
54  LogInfo( "TriggerDQM");
55 
56 
57 }
std::string input_dir_
T getUntrackedParameter(std::string const &, T const &) const
int prescaleEvt_
units of lumi sections
edm::ParameterSet parameters_
int prescaleLS_
counter
std::string output_dir_
std::string monitorName_
DQMStore * dbe_
int counterEvt_
counter
void L1TDTTPGClient::makeRatioHisto ( MonitorElement ratioME,
std::string &  nName,
std::string &  dName 
)
private

Definition at line 161 of file L1TDTTPGClient.cc.

References dbe_, cuy::denominator, MonitorElement::getName(), MonitorElement::getTH2F(), and cuy::numerator.

162 {
163 
164  TH2F *numerator;
165  TH2F *denominator;
166 
167  denominator = this->get2DHisto(input_dir_+"/"+dName,dbe_);
168  numerator = this->get2DHisto(input_dir_+"/"+nName,dbe_);
169 
170  if (numerator && denominator) {
171 
172  TH2F * ratio = ratioME->getTH2F();
173  if (ratio) {
174  ratio->Divide(numerator,denominator);
175  }
176  else {
177  LogInfo("TriggerDQM") << "[TriggerDQM]: ratio histo named \"" << ratioME->getName() << "\" not found!" << endl;
178  }
179  }
180  else {
181  if (!numerator)
182  LogInfo("TriggerDQM") << "[TriggerDQM]: numerator histo \"" << nName << "\" not found!" << endl;
183  if (!denominator)
184  LogInfo("TriggerDQM") << "[TriggerDQM]: denominator histo \"" << dName << "\" not found!" << endl;
185  }
186 
187 }
std::string input_dir_
const std::string & getName(void) const
get name of ME
list numerator
Definition: cuy.py:483
TH2F * get2DHisto(std::string meName, DQMStore *dbi)
list denominator
Definition: cuy.py:484
TH2F * getTH2F(void) const
DQMStore * dbe_
void L1TDTTPGClient::setMapPhLabel ( MonitorElement me)
private

Definition at line 248 of file L1TDTTPGClient.cc.

References i, MonitorElement::setAxisTitle(), and MonitorElement::setBinLabel().

249 {
250 
251  me->setAxisTitle("DTTF Sector",2);
252  for(int i=0;i<5;i++){
253  ostringstream wheel;
254  wheel << i-2;
255  me->setBinLabel(1+i*4,"Wheel "+ wheel.str(),1);
256  }
257 
258 }
int i
Definition: DBlmapReader.cc:9
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void L1TDTTPGClient::setMapThLabel ( MonitorElement me)
private

Definition at line 261 of file L1TDTTPGClient.cc.

References i, MonitorElement::setAxisTitle(), and MonitorElement::setBinLabel().

262 {
263 
264  me->setAxisTitle("DTTF Sector",2);
265  for(int i=0;i<5;i++){
266  ostringstream wheel;
267  wheel << i-2;
268  me->setBinLabel(1+i*3,"Wheel "+ wheel.str(),1);
269  }
270 
271 }
int i
Definition: DBlmapReader.cc:9
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

Member Data Documentation

int L1TDTTPGClient::counterEvt_
private

counter

Definition at line 72 of file L1TDTTPGClient.h.

int L1TDTTPGClient::counterLS_
private

Definition at line 71 of file L1TDTTPGClient.h.

DQMStore* L1TDTTPGClient::dbe_
private

Definition at line 67 of file L1TDTTPGClient.h.

MonitorElement* L1TDTTPGClient::dttpgphmap2ndf
private

Definition at line 79 of file L1TDTTPGClient.h.

MonitorElement* L1TDTTPGClient::dttpgphmapbxf[3]
private

Definition at line 80 of file L1TDTTPGClient.h.

MonitorElement* L1TDTTPGClient::dttpgphmapcorrf
private

prescale on number of events

Definition at line 78 of file L1TDTTPGClient.h.

MonitorElement* L1TDTTPGClient::dttpgthmapbxf[3]
private

Definition at line 82 of file L1TDTTPGClient.h.

MonitorElement* L1TDTTPGClient::dttpgthmaphf
private

Definition at line 81 of file L1TDTTPGClient.h.

std::string L1TDTTPGClient::input_dir_
private

Definition at line 69 of file L1TDTTPGClient.h.

std::string L1TDTTPGClient::monitorName_
private

Definition at line 68 of file L1TDTTPGClient.h.

std::string L1TDTTPGClient::output_dir_
private

Definition at line 70 of file L1TDTTPGClient.h.

edm::ParameterSet L1TDTTPGClient::parameters_
private
int L1TDTTPGClient::prescaleEvt_
private

units of lumi sections

Definition at line 74 of file L1TDTTPGClient.h.

int L1TDTTPGClient::prescaleLS_
private

counter

Definition at line 73 of file L1TDTTPGClient.h.