#include <CSCCFEBStatusDigi.h>
Public Member Functions | |
CSCCFEBStatusDigi (int cfebnmb) | |
Construct from the CFEB number (1-5). | |
CSCCFEBStatusDigi (int cfebnmb, const std::vector< uint16_t > &crcWords, const std::vector< uint16_t > &contrWords, const std::vector< uint16_t > &bWords) | |
Constructor for all variables. | |
CSCCFEBStatusDigi () | |
Default construction. | |
int | getCFEBNmb () const |
Get the CFEB number. | |
std::vector< uint16_t > | getCRC () const |
Get CRC per each time sample. | |
std::vector< int > | getL1A_PHASE () const |
Get L1A_PHASE bit from SCA Controller data per each time slice. | |
std::vector< int > | getLCT_PHASE () const |
Get LCT_PHASE bit from SCA Controller data per each time slice. | |
std::vector< int > | getSCA_BLK () const |
Get SCA_BLK 4 bit word from SCA Controller data per each time slice. | |
std::vector< int > | getSCA_FULL () const |
Get SCA_FULL bit from SCA Controller data per each time slice. | |
std::vector< uint16_t > | getSCAFullCond () const |
Get SCA Full Condition. | |
std::vector< int > | getTRIG_TIME () const |
Get TRIG_TIME 8 bit word from SCA Controller data per each time slice. | |
std::vector< int > | getTS_FLAG () const |
Get TS_FLAG bit from SCA Controller data per each time slice. | |
void | print () const |
Print content of digi. | |
void | setCRC (const std::vector< uint16_t > &crc) |
Set CRC vector. | |
void | setSCAC (const std::vector< uint16_t > &scac) |
Set SCAC (SCA Controller) vector. | |
int | ShiftSel (int nmb, int nshift, int nsel) const |
Shift and select. | |
Private Attributes | |
std::vector< uint16_t > | bWords_ |
uint16_t | cfebnmb_ |
std::vector< uint16_t > | contrWords_ |
std::vector< uint16_t > | crcWords_ |
Digi for CSC CFEB status.
Definition at line 19 of file CSCCFEBStatusDigi.h.
CSCCFEBStatusDigi::CSCCFEBStatusDigi | ( | int | cfebnmb | ) | [inline] |
Construct from the CFEB number (1-5).
Definition at line 24 of file CSCCFEBStatusDigi.h.
References cfebnmb_.
{cfebnmb_ = cfebnmb;}
CSCCFEBStatusDigi::CSCCFEBStatusDigi | ( | int | cfebnmb, |
const std::vector< uint16_t > & | crcWords, | ||
const std::vector< uint16_t > & | contrWords, | ||
const std::vector< uint16_t > & | bWords | ||
) | [inline] |
Constructor for all variables.
Definition at line 28 of file CSCCFEBStatusDigi.h.
References bWords_, cfebnmb_, contrWords_, and crcWords_.
{ cfebnmb_ = cfebnmb; crcWords_ = crcWords; contrWords_ = contrWords; bWords_ = bWords; }
CSCCFEBStatusDigi::CSCCFEBStatusDigi | ( | ) | [inline] |
int CSCCFEBStatusDigi::getCFEBNmb | ( | ) | const [inline] |
Get the CFEB number.
Definition at line 47 of file CSCCFEBStatusDigi.h.
References cfebnmb_.
Referenced by operator<<(), and print().
{return cfebnmb_;}
std::vector<uint16_t> CSCCFEBStatusDigi::getCRC | ( | ) | const [inline] |
Get CRC per each time sample.
Definition at line 53 of file CSCCFEBStatusDigi.h.
References crcWords_.
Referenced by operator<<(), and print().
{return crcWords_;}
std::vector< int > CSCCFEBStatusDigi::getL1A_PHASE | ( | ) | const |
Get L1A_PHASE bit from SCA Controller data per each time slice.
Definition at line 66 of file CSCCFEBStatusDigi.cc.
References contrWords_, i, and ShiftSel().
Referenced by operator<<(), and print().
{ std::vector<int> vec(contrWords_.size(),0); int nmb; for(unsigned int i=0;i<vec.size();i++) { nmb=contrWords_[i]; vec[i]=ShiftSel(nmb,12,1); } return vec; }
std::vector< int > CSCCFEBStatusDigi::getLCT_PHASE | ( | ) | const |
Get LCT_PHASE bit from SCA Controller data per each time slice.
Definition at line 55 of file CSCCFEBStatusDigi.cc.
References contrWords_, i, and ShiftSel().
Referenced by operator<<(), and print().
{ std::vector<int> vec(contrWords_.size(),0); int nmb; for(unsigned int i=0;i<vec.size();i++) { nmb=contrWords_[i]; vec[i]=ShiftSel(nmb,13,1); } return vec; }
std::vector< int > CSCCFEBStatusDigi::getSCA_BLK | ( | ) | const |
Get SCA_BLK 4 bit word from SCA Controller data per each time slice.
Definition at line 77 of file CSCCFEBStatusDigi.cc.
References contrWords_, i, and ShiftSel().
Referenced by operator<<(), and print().
{ std::vector<int> vec(contrWords_.size(),0); int nmb; for(unsigned int i=0;i<vec.size();i++) { nmb=contrWords_[i]; vec[i]=ShiftSel(nmb,8,15); } return vec; }
std::vector< int > CSCCFEBStatusDigi::getSCA_FULL | ( | ) | const |
Get SCA_FULL bit from SCA Controller data per each time slice.
Definition at line 44 of file CSCCFEBStatusDigi.cc.
References contrWords_, i, and ShiftSel().
Referenced by operator<<(), and print().
{ std::vector<int> vec(contrWords_.size(),0); int nmb; for(unsigned int i=0;i<vec.size();i++) { nmb=contrWords_[i]; vec[i]=ShiftSel(nmb,14,1); } return vec; }
std::vector< uint16_t > CSCCFEBStatusDigi::getSCAFullCond | ( | ) | const |
Get SCA Full Condition.
Definition at line 20 of file CSCCFEBStatusDigi.cc.
References bWords_.
Referenced by operator<<(), and print().
{ /* std::vector<int> vec(4,0); vec[0]=ShiftSel(SCAFullCond_,0,15); // 4-bit FIFO1 word count vec[1]=ShiftSel(SCAFullCond_,4,15); // 4-bit Block Number if Error Code=1 // (CFEB: SCA Capacitors Full) // 4-bit FIFO3 word count if Error Code=2 // (CFEB: FPGA FIFO full) vec[2]=ShiftSel(SCAFullCond_,9,7); // Error Code vec[3]=ShiftSel(SCAFullCond_,12,15); // DDU Code, should be 0xB return vec;*/ return bWords_; }
std::vector< int > CSCCFEBStatusDigi::getTRIG_TIME | ( | ) | const |
Get TRIG_TIME 8 bit word from SCA Controller data per each time slice.
Definition at line 88 of file CSCCFEBStatusDigi.cc.
References contrWords_, i, and ShiftSel().
Referenced by operator<<(), and print().
{ std::vector<int> vec(contrWords_.size(),0); int nmb; for(unsigned int i=0;i<vec.size();i++) { nmb=contrWords_[i]; vec[i]=ShiftSel(nmb,0,255); } return vec; }
std::vector< int > CSCCFEBStatusDigi::getTS_FLAG | ( | ) | const |
Get TS_FLAG bit from SCA Controller data per each time slice.
Definition at line 33 of file CSCCFEBStatusDigi.cc.
References contrWords_, i, and ShiftSel().
Referenced by operator<<(), and print().
{ std::vector<int> vec(contrWords_.size(),0); int nmb; for(unsigned int i=0;i<vec.size();i++) { nmb=contrWords_[i]; vec[i]=ShiftSel(nmb,15,1); } return vec; }
void CSCCFEBStatusDigi::print | ( | void | ) | const |
Print content of digi.
Debug.
Definition at line 99 of file CSCCFEBStatusDigi.cc.
References gather_cfg::cout, getCFEBNmb(), getCRC(), getL1A_PHASE(), getLCT_PHASE(), getSCA_BLK(), getSCA_FULL(), getSCAFullCond(), getTRIG_TIME(), getTS_FLAG(), i, and findQualityFiles::size.
{ std::cout << "CSC CFEB # : " << getCFEBNmb() <<"\n"; std::cout << " SCAFullCond: "; if(getSCAFullCond().size()!=0){ for (size_t i = 0; i<4; ++i ){ std::cout <<" " <<(getSCAFullCond())[i]; } } else { std::cout << " " <<"BWORD is not valied"; } std::cout << "\n"; std::cout << " CRC: "; for (size_t i = 0; i<getCRC().size(); ++i ){ std::cout <<" " <<(getCRC())[i]; } std::cout<<"\n"; std::cout << " TS_FLAG: "; for (size_t i = 0; i<getTS_FLAG().size(); ++i ){ std::cout <<" " <<(getTS_FLAG())[i]; } std::cout<<"\n"; std::cout << " SCA_FULL: "; for (size_t i = 0; i<getSCA_FULL().size(); ++i ){ std::cout <<" " <<(getSCA_FULL())[i]; } std::cout<<"\n"; std::cout << " LCT_PHASE: "; for (size_t i = 0; i<getLCT_PHASE().size(); ++i ){ std::cout <<" " <<(getLCT_PHASE())[i]; } std::cout<<"\n"; std::cout << " L1A_PHASE: "; for (size_t i = 0; i<getL1A_PHASE().size(); ++i ){ std::cout <<" " <<(getL1A_PHASE())[i]; } std::cout<<"\n"; std::cout << " SCA_BLK: "; for (size_t i = 0; i<getSCA_BLK().size(); ++i ){ std::cout <<" " <<(getSCA_BLK())[i]; } std::cout<<"\n"; std::cout << " TRIG_TIME: "; for (size_t i = 0; i<getTRIG_TIME().size(); ++i ){ std::cout <<" " <<(getTRIG_TIME())[i]; } std::cout<<"\n"; }
void CSCCFEBStatusDigi::setCRC | ( | const std::vector< uint16_t > & | crc | ) | [inline] |
Set CRC vector.
Definition at line 41 of file CSCCFEBStatusDigi.h.
References crcWords_.
{crcWords_ = crc;}
void CSCCFEBStatusDigi::setSCAC | ( | const std::vector< uint16_t > & | scac | ) | [inline] |
Set SCAC (SCA Controller) vector.
Definition at line 44 of file CSCCFEBStatusDigi.h.
References contrWords_.
{contrWords_ = scac;}
int CSCCFEBStatusDigi::ShiftSel | ( | int | nmb, |
int | nshift, | ||
int | nsel | ||
) | const |
Shift and select.
Definition at line 14 of file CSCCFEBStatusDigi.cc.
References tmp.
Referenced by getL1A_PHASE(), getLCT_PHASE(), getSCA_BLK(), getSCA_FULL(), getTRIG_TIME(), and getTS_FLAG().
{ int tmp=nmb; tmp=tmp>>nshift; return tmp= tmp & nsel; }
std::vector<uint16_t> CSCCFEBStatusDigi::bWords_ [private] |
Definition at line 84 of file CSCCFEBStatusDigi.h.
Referenced by CSCCFEBStatusDigi(), and getSCAFullCond().
uint16_t CSCCFEBStatusDigi::cfebnmb_ [private] |
Definition at line 81 of file CSCCFEBStatusDigi.h.
Referenced by CSCCFEBStatusDigi(), and getCFEBNmb().
std::vector<uint16_t> CSCCFEBStatusDigi::contrWords_ [private] |
Definition at line 83 of file CSCCFEBStatusDigi.h.
Referenced by CSCCFEBStatusDigi(), getL1A_PHASE(), getLCT_PHASE(), getSCA_BLK(), getSCA_FULL(), getTRIG_TIME(), getTS_FLAG(), and setSCAC().
std::vector<uint16_t> CSCCFEBStatusDigi::crcWords_ [private] |
Definition at line 82 of file CSCCFEBStatusDigi.h.
Referenced by CSCCFEBStatusDigi(), getCRC(), and setCRC().