CMS 3D CMS Logo

RPCRawDataCountsHistoMaker.cc
Go to the documentation of this file.
5 
6 #include "TH1F.h"
7 #include "TH2F.h"
8 
9 #include <vector>
10 #include <sstream>
11 
13  std::ostringstream str;
14  str << "readoutErrors_" << fedId;
15  TH1F* result = new TH1F(str.str().c_str(), str.str().c_str(), 9, 0.5, 9.5);
16  for (unsigned int i = 1; i <= 9; ++i) {
17  rpcrawtodigi::ReadoutError::ReadoutErrorType code = static_cast<rpcrawtodigi::ReadoutError::ReadoutErrorType>(i);
18  result->GetXaxis()->SetBinLabel(i, rpcrawtodigi::ReadoutError::name(code).c_str());
19  }
20  return result;
21 }
22 
24  std::ostringstream str;
25  str << "recordType_" << fedId;
26  TH1F* result = new TH1F(str.str().c_str(), str.str().c_str(), 9, 0.5, 9.5);
27  result->SetTitleOffset(1.4, "x");
28  for (unsigned int i = 1; i <= 9; ++i) {
29  rpcrawtodigi::DataRecord::DataRecordType code = static_cast<rpcrawtodigi::DataRecord::DataRecordType>(i);
30  result->GetXaxis()->SetBinLabel(i, rpcrawtodigi::DataRecord::name(code).c_str());
31  }
32  return result;
33 }
34 
36  std::ostringstream str;
37  rpcrawtodigi::ReadoutError::ReadoutErrorType code = static_cast<rpcrawtodigi::ReadoutError::ReadoutErrorType>(type);
38  str << "errors_" << rpcrawtodigi::ReadoutError::name(code) << "_" << fedId;
39  TH2F* result = new TH2F(str.str().c_str(), str.str().c_str(), 36, -0.5, 35.5, 18, -0.5, 17.5);
40  result->GetXaxis()->SetNdivisions(512);
41  result->GetYaxis()->SetNdivisions(505);
42  result->SetXTitle("rmb");
43  result->SetYTitle("link");
44  result->SetStats(false);
45  return result;
46 }
rpcrawtodigi::ReadoutError::ReadoutErrorType
ReadoutErrorType
Definition: ReadoutError.h:10
mps_fire.i
i
Definition: mps_fire.py:355
RPCRawDataCountsHistoMaker::emptyRecordTypeHisto
static TH1F * emptyRecordTypeHisto(int fedId)
Definition: RPCRawDataCountsHistoMaker.cc:23
RPCRawDataCountsHistoMaker::emptyReadoutErrorHisto
static TH1F * emptyReadoutErrorHisto(int fedId)
Definition: RPCRawDataCountsHistoMaker.cc:12
DataRecord.h
rpcrawtodigi::DataRecord::name
static std::string name(const DataRecordType &code)
Definition: DataRecord.cc:58
RPCRawDataCountsHistoMaker.h
str
#define str(s)
Definition: TestProcessor.cc:48
ReadoutError.h
rpcrawtodigi::ReadoutError::name
std::string name() const
Definition: ReadoutError.h:32
RPCRawDataCounts.h
RPCRawDataCountsHistoMaker::emptyReadoutErrorMapHisto
static TH2F * emptyReadoutErrorMapHisto(int fedId, int type)
Definition: RPCRawDataCountsHistoMaker.cc:35
l1tstage2_dqm_sourceclient-live_cfg.fedId
fedId
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:82
rpcrawtodigi::DataRecord::DataRecordType
DataRecordType
Definition: DataRecord.h:13
type
type
Definition: HCALResponse.h:21
mps_fire.result
result
Definition: mps_fire.py:303