CMS 3D CMS Logo

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

#include <CSCTMBBlockedCFEB.h>

Public Member Functions

 CSCTMBBlockedCFEB ()
 
 CSCTMBBlockedCFEB (unsigned short *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 (unsigned short *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 12 of file CSCTMBBlockedCFEB.h.

Constructor & Destructor Documentation

CSCTMBBlockedCFEB::CSCTMBBlockedCFEB ( )
inline

Definition at line 16 of file CSCTMBBlockedCFEB.h.

References size_.

16 {size_ = 0;} //default constructor
unsigned size_
stores all mini scope data
CSCTMBBlockedCFEB::CSCTMBBlockedCFEB ( unsigned short *  buf,
int  Line6BCB,
int  Line6ECB 
)

Definition at line 11 of file CSCTMBBlockedCFEB.cc.

References size_, and UnpackBlockedCFEB().

11  {
12 
13  size_ = UnpackBlockedCFEB(buf,Line6BCB,Line6ECB);
14 
15 }
unsigned size_
stores all mini scope data
int UnpackBlockedCFEB(unsigned short *buf, int Line6BCB, int Line6ECB)
CSCTMBMiniScope.

Member Function Documentation

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

Definition at line 19 of file CSCTMBBlockedCFEB.h.

References BlockedCFEBdata.

Referenced by getSingleCFEBList(), and print().

19 {return BlockedCFEBdata;}
std::vector< int > BlockedCFEBdata
std::vector< std::vector< int > > CSCTMBBlockedCFEB::getSingleCFEBList ( int  CFEBn) const

UnpackBlockedCFEB.

Get 4 words for a particular CFEB (CFEBn)

Definition at line 33 of file CSCTMBBlockedCFEB.cc.

References getData(), i, j, and relval_steps::k.

Referenced by print().

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

Definition at line 18 of file CSCTMBBlockedCFEB.h.

References size_.

18 {return size_;}
unsigned size_
stores all mini scope data
void CSCTMBBlockedCFEB::print ( void  ) const

Definition at line 94 of file CSCTMBBlockedCFEB.cc.

References gather_cfg::cout, TauDecayModes::dec, getData(), getSingleCFEBList(), i, and z.

94  {
95 
96 std::cout << " Blocked CFEB DiStrips List Content " << std::endl;
97  for(int i=0; i<(int)getData().size(); ++i){
98  std::cout << " word " << i << " : " << std::hex << getData()[i] << std::dec << std::endl;
99  }
100 
101 std::vector< std::vector<int> > anyCFEB;
102 anyCFEB.clear();
103 std::vector <int> anyLayer;
104 anyLayer.clear();
105 std::cout << std::endl;
106 std::cout << " Blocked DiStrips by CFEB and Layers unpacked " << std::endl;
107 for(int z=0; z<5; ++z){
108 anyCFEB = getSingleCFEBList(z);
109 std::cout << " CFEB# " << z << std::endl;
110 int LayerCnt=0;
111 for(std::vector< std::vector<int> >::const_iterator layerIt=anyCFEB.begin(); layerIt !=anyCFEB.end(); layerIt++){
112  anyLayer=*layerIt;
113  std::cout << " Layer: " << LayerCnt;
114  if(anyLayer.size() !=0){
115  for(int i=0; i<(int)anyLayer.size(); i++){
116  std::cout << " " << anyLayer[i];
117  }
118  }
119  else
120  std::cout << " No Blocked DiStrips on the Layer ";
121  std::cout << std::endl;
122  LayerCnt++;
123  anyLayer.clear();
124 }
125 anyCFEB.clear();
126 }
127 
128 }
int i
Definition: DBlmapReader.cc:9
std::vector< int > getData() const
std::vector< std::vector< int > > getSingleCFEBList(int CFEBn) const
UnpackBlockedCFEB.
tuple cout
Definition: gather_cfg.py:121
int CSCTMBBlockedCFEB::UnpackBlockedCFEB ( unsigned short *  buf,
int  Line6BCB,
int  Line6ECB 
)
private

CSCTMBMiniScope.

Definition at line 18 of file CSCTMBBlockedCFEB.cc.

References BlockedCFEBdata, and i.

Referenced by CSCTMBBlockedCFEB().

18  {
19 
20  if((Line6ECB-Line6BCB) != 0) {
21 
22  for(int i=0; i<(Line6ECB-Line6BCB-1); i++){
23  BlockedCFEBdata.push_back(buf[Line6BCB+1+i]);
24  }
25 
26  }
27 
28  //print();
29  return (Line6ECB-Line6BCB + 1);
30 
31 }
int i
Definition: DBlmapReader.cc:9
std::vector< int > BlockedCFEBdata

Member Data Documentation

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

Definition at line 28 of file CSCTMBBlockedCFEB.h.

Referenced by getData(), and UnpackBlockedCFEB().

unsigned CSCTMBBlockedCFEB::size_
private

stores all mini scope data

Definition at line 29 of file CSCTMBBlockedCFEB.h.

Referenced by CSCTMBBlockedCFEB(), and getSize().