CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
CSCTMBBlockedCFEB Class Reference

#include <CSCTMBBlockedCFEB.h>

Public Member Functions

 CSCTMBBlockedCFEB ()
 
 CSCTMBBlockedCFEB (const uint16_t *buf, int Line6BCB, int Line6ECB)
 
std::vector< int > getData () const
 
std::vector< std::vector< int > > getSingleCFEBList (int CFEBn) const
 UnpackBlockedCFEB. More...
 
int getSize () const
 
void print () const
 

Private Member Functions

int UnpackBlockedCFEB (const uint16_t *buf, int Line6BCB, int Line6ECB)
 CSCTMBMiniScope. More...
 

Private Attributes

std::vector< int > BlockedCFEBdata
 
unsigned size_
 stores all mini scope data More...
 

Detailed Description

Definition at line 13 of file CSCTMBBlockedCFEB.h.

Constructor & Destructor Documentation

◆ CSCTMBBlockedCFEB() [1/2]

CSCTMBBlockedCFEB::CSCTMBBlockedCFEB ( )
inline

Definition at line 15 of file CSCTMBBlockedCFEB.h.

15 { size_ = 0; } //default constructor

References size_.

◆ CSCTMBBlockedCFEB() [2/2]

CSCTMBBlockedCFEB::CSCTMBBlockedCFEB ( const uint16_t *  buf,
int  Line6BCB,
int  Line6ECB 
)

Definition at line 11 of file CSCTMBBlockedCFEB.cc.

11  {
12  size_ = UnpackBlockedCFEB(buf, Line6BCB, Line6ECB);
13 
14 }

References visDQMUpload::buf, size_, and UnpackBlockedCFEB().

Member Function Documentation

◆ getData()

std::vector<int> CSCTMBBlockedCFEB::getData ( void  ) const
inline

Definition at line 18 of file CSCTMBBlockedCFEB.h.

18 { return BlockedCFEBdata; }

References BlockedCFEBdata.

Referenced by getSingleCFEBList(), and print().

◆ getSingleCFEBList()

std::vector< std::vector< int > > CSCTMBBlockedCFEB::getSingleCFEBList ( int  CFEBn) const

UnpackBlockedCFEB.

Get 4 words for a particular CFEB (CFEBn)

Definition at line 28 of file CSCTMBBlockedCFEB.cc.

28  {
29  std::vector<std::vector<int> > CFEBnByLayers;
30  CFEBnByLayers.clear();
31  std::vector<int> CFEBnData;
32  CFEBnData.clear();
33  int idCFEB = -1;
34 
36  for (int i = 0; i < (int)getData().size(); ++i) {
37  idCFEB = (getData()[i] >> 12) & 0x7;
38  if (idCFEB == CFEBn) {
39  CFEBnData.push_back(getData()[i] & 0xFFF);
40  }
41  // idCFEB = -1; /* =VB= Commented out to please static analyzer */
42  }
43 
44  std::vector<int> Layer0, Layer1, Layer2, Layer3, Layer4, Layer5;
45  Layer0.clear();
46  Layer1.clear();
47  Layer2.clear();
48  Layer3.clear();
49  Layer4.clear();
50  Layer5.clear();
51 
52  for (int k = 0; k < (int)CFEBnData.size(); ++k) {
53  for (int j = 0; j < 12; j++) {
54  int DiStr = 0;
55  DiStr = (CFEBnData[k] >> j) & 0x1;
56  if ((DiStr != 0) && (j < 8) && (k == 0)) {
57  Layer0.push_back(j);
58  }
59  if ((DiStr != 0) && (j > 7) && (j < 12) && (k == 0)) {
60  Layer1.push_back(j);
61  }
62  if ((DiStr != 0) && (j < 4) && (k == 1)) {
63  Layer1.push_back(j);
64  }
65  if ((DiStr != 0) && (j > 3) && (j < 12) && (k == 1)) {
66  Layer2.push_back(j);
67  }
68  if ((DiStr != 0) && (j < 8) && (k == 2)) {
69  Layer3.push_back(j);
70  }
71  if ((DiStr != 0) && (j > 7) && (j < 12) && (k == 2)) {
72  Layer4.push_back(j);
73  }
74  if ((DiStr != 0) && (j < 4) && (k == 3)) {
75  Layer4.push_back(j);
76  }
77  if ((DiStr != 0) && (j > 3) && (j < 12) && (k == 3)) {
78  Layer5.push_back(j);
79  }
80  }
81  }
82 
83  CFEBnByLayers.push_back(Layer0);
84  CFEBnByLayers.push_back(Layer1);
85  CFEBnByLayers.push_back(Layer2);
86  CFEBnByLayers.push_back(Layer3);
87  CFEBnByLayers.push_back(Layer4);
88  CFEBnByLayers.push_back(Layer5);
89 
90  return CFEBnByLayers;
91 }

References getData(), mps_fire::i, createfilelist::int, dqmiolumiharvest::j, dqmdumpme::k, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by print().

◆ getSize()

int CSCTMBBlockedCFEB::getSize ( ) const
inline

Definition at line 17 of file CSCTMBBlockedCFEB.h.

17 { return size_; }

References size_.

◆ print()

void CSCTMBBlockedCFEB::print ( void  ) const

Definition at line 93 of file CSCTMBBlockedCFEB.cc.

93  {
94  std::cout << " Blocked CFEB DiStrips List Content " << std::endl;
95  for (int i = 0; i < (int)getData().size(); ++i) {
96  std::cout << " word " << i << " : " << std::hex << getData()[i] << std::dec << std::endl;
97  }
98 
99  std::vector<std::vector<int> > anyCFEB;
100  anyCFEB.clear();
101  std::vector<int> anyLayer;
102  anyLayer.clear();
103  std::cout << std::endl;
104  std::cout << " Blocked DiStrips by CFEB and Layers unpacked " << std::endl;
105  for (int z = 0; z < 5; ++z) {
106  anyCFEB = getSingleCFEBList(z);
107  std::cout << " CFEB# " << z << std::endl;
108  int LayerCnt = 0;
109  for (std::vector<std::vector<int> >::const_iterator layerIt = anyCFEB.begin(); layerIt != anyCFEB.end();
110  layerIt++) {
111  anyLayer = *layerIt;
112  std::cout << " Layer: " << LayerCnt;
113  if (!anyLayer.empty()) {
114  for (int i = 0; i < (int)anyLayer.size(); i++) {
115  std::cout << " " << anyLayer[i];
116  }
117  } else
118  std::cout << " No Blocked DiStrips on the Layer ";
119  std::cout << std::endl;
120  LayerCnt++;
121  anyLayer.clear();
122  }
123  anyCFEB.clear();
124  }
125 }

References gather_cfg::cout, TauDecayModes::dec, getData(), getSingleCFEBList(), mps_fire::i, createfilelist::int, trackerHitRTTI::vector, and z.

◆ UnpackBlockedCFEB()

int CSCTMBBlockedCFEB::UnpackBlockedCFEB ( const uint16_t *  buf,
int  Line6BCB,
int  Line6ECB 
)
private

CSCTMBMiniScope.

Definition at line 16 of file CSCTMBBlockedCFEB.cc.

16  {
17  if ((Line6ECB - Line6BCB) != 0) {
18  for (int i = 0; i < (Line6ECB - Line6BCB - 1); i++) {
19  BlockedCFEBdata.push_back(buf[Line6BCB + 1 + i]);
20  }
21  }
22 
23  //print();
24  return (Line6ECB - Line6BCB + 1);
25 
26 }

References BlockedCFEBdata, visDQMUpload::buf, and mps_fire::i.

Referenced by CSCTMBBlockedCFEB().

Member Data Documentation

◆ BlockedCFEBdata

std::vector<int> CSCTMBBlockedCFEB::BlockedCFEBdata
private

Definition at line 26 of file CSCTMBBlockedCFEB.h.

Referenced by getData(), and UnpackBlockedCFEB().

◆ size_

unsigned CSCTMBBlockedCFEB::size_
private

stores all mini scope data

Definition at line 27 of file CSCTMBBlockedCFEB.h.

Referenced by CSCTMBBlockedCFEB(), and getSize().

mps_fire.i
i
Definition: mps_fire.py:428
gather_cfg.cout
cout
Definition: gather_cfg.py:144
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
DDAxes::z
dqmdumpme.k
k
Definition: dqmdumpme.py:60
CSCTMBBlockedCFEB::size_
unsigned size_
stores all mini scope data
Definition: CSCTMBBlockedCFEB.h:27
createfilelist.int
int
Definition: createfilelist.py:10
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCTMBBlockedCFEB::BlockedCFEBdata
std::vector< int > BlockedCFEBdata
Definition: CSCTMBBlockedCFEB.h:26
CSCTMBBlockedCFEB::getSingleCFEBList
std::vector< std::vector< int > > getSingleCFEBList(int CFEBn) const
UnpackBlockedCFEB.
Definition: CSCTMBBlockedCFEB.cc:28
CSCTMBBlockedCFEB::getData
std::vector< int > getData() const
Definition: CSCTMBBlockedCFEB.h:18
CSCTMBBlockedCFEB::UnpackBlockedCFEB
int UnpackBlockedCFEB(const uint16_t *buf, int Line6BCB, int Line6ECB)
CSCTMBMiniScope.
Definition: CSCTMBBlockedCFEB.cc:16
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143