CMS 3D CMS Logo

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

#include <CSCTMBMiniScope.h>

Public Member Functions

 CSCTMBMiniScope ()
 
 CSCTMBMiniScope (const uint16_t *buf, int Line6b07, int Line6E07)
 
std::vector< int > getAdr () const
 
std::vector< int > getChannelsInTbin (int data) const
 UnpackScope. More...
 
std::vector< int > getData () const
 
int getSize () const
 
int getTbinCount () const
 
int getTbinPreTrigger () const
 
void print () const
 

Private Member Functions

int UnpackMiniScope (const uint16_t *buf, int Line6b07, int Line6E07)
 Print the maped content of the miniscope. More...
 

Private Attributes

std::vector< int > miniScopeAdress
 
std::vector< int > miniScopeData
 stores all mini scope adresses More...
 
int miniScopeTbinCount
 stores all mini scope data More...
 
int miniScopeTbinPreTrigger
 
unsigned size_
 

Detailed Description

Definition at line 14 of file CSCTMBMiniScope.h.

Constructor & Destructor Documentation

◆ CSCTMBMiniScope() [1/2]

CSCTMBMiniScope::CSCTMBMiniScope ( )
inline

Definition at line 16 of file CSCTMBMiniScope.h.

References size_.

16 { size_ = 0; } //default constructor

◆ CSCTMBMiniScope() [2/2]

CSCTMBMiniScope::CSCTMBMiniScope ( const uint16_t *  buf,
int  Line6b07,
int  Line6E07 
)

Definition at line 12 of file CSCTMBMiniScope.cc.

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

12  {
13  size_ = UnpackMiniScope(buf, Line6b07, Line6E07);
14 
15 }
int UnpackMiniScope(const uint16_t *buf, int Line6b07, int Line6E07)
Print the maped content of the miniscope.

Member Function Documentation

◆ getAdr()

std::vector<int> CSCTMBMiniScope::getAdr ( ) const
inline

Definition at line 21 of file CSCTMBMiniScope.h.

References miniScopeAdress.

Referenced by print().

21 { return miniScopeAdress; }
std::vector< int > miniScopeAdress

◆ getChannelsInTbin()

std::vector< int > CSCTMBMiniScope::getChannelsInTbin ( int  data) const

UnpackScope.

Definition at line 41 of file CSCTMBMiniScope.cc.

References data, isotrackApplyRegressor::k, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by print().

41  {
42  std::vector<int> channelInTbin;
43  channelInTbin.clear();
44  for (int k = 0; k < 14; k++) {
45  int chBit = 0;
46  chBit = (data >> k) & 0x1;
47  if (chBit != 0)
48  channelInTbin.push_back(k);
49  }
50  return channelInTbin;
51 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ getData()

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

Definition at line 22 of file CSCTMBMiniScope.h.

References miniScopeData.

Referenced by print().

22 { return miniScopeData; }
std::vector< int > miniScopeData
stores all mini scope adresses

◆ getSize()

int CSCTMBMiniScope::getSize ( ) const
inline

Definition at line 18 of file CSCTMBMiniScope.h.

References size_.

18 { return size_; }

◆ getTbinCount()

int CSCTMBMiniScope::getTbinCount ( ) const
inline

Definition at line 19 of file CSCTMBMiniScope.h.

References miniScopeTbinCount.

19 { return miniScopeTbinCount; }
int miniScopeTbinCount
stores all mini scope data

◆ getTbinPreTrigger()

int CSCTMBMiniScope::getTbinPreTrigger ( ) const
inline

Definition at line 20 of file CSCTMBMiniScope.h.

References miniScopeTbinPreTrigger.

20 { return miniScopeTbinPreTrigger; }

◆ print()

void CSCTMBMiniScope::print ( void  ) const

Definition at line 53 of file CSCTMBMiniScope.cc.

References gather_cfg::cout, TauDecayModes::dec, getAdr(), getChannelsInTbin(), getData(), dqmiolumiharvest::j, and isotrackApplyRegressor::k.

53  {
54  for (unsigned int k = 0; k < getAdr().size(); ++k) {
55  if (k == 0) {
56  std::cout << " Adr = " << getAdr()[k] << " | Data: " << std::hex << getData()[k] << std::dec << std::endl;
57  } else {
58  std::cout << " Adr = " << getAdr()[k] << " | Data: " << std::hex << getData()[k] << std::dec << " ==>| Ch# ";
59  for (unsigned int j = 0; j < getChannelsInTbin(getData()[k]).size(); j++) {
60  std::cout << " " << getChannelsInTbin(getData()[k])[j];
61  }
62  std::cout << std::endl;
63  }
64  }
65 }
std::vector< int > getAdr() const
std::vector< int > getData() const
std::vector< int > getChannelsInTbin(int data) const
UnpackScope.

◆ UnpackMiniScope()

int CSCTMBMiniScope::UnpackMiniScope ( const uint16_t *  buf,
int  Line6b07,
int  Line6E07 
)
private

Print the maped content of the miniscope.

CSCTMBMiniScope.

Get tbin and tbin before pre-trigger

end if((Line6E07-Line6b07)

Definition at line 17 of file CSCTMBMiniScope.cc.

References visDQMUpload::buf, mps_fire::i, LogTrace, miniScopeAdress, miniScopeData, miniScopeTbinCount, and miniScopeTbinPreTrigger.

Referenced by CSCTMBMiniScope().

17  {
18  if ((Line6E07 - Line6b07) != 0) {
20  miniScopeTbinCount = buf[Line6b07 + 1] & 0x00FF;
21  miniScopeTbinPreTrigger = (buf[Line6b07 + 1] >> 8) & 0x000F;
22 
23  LogTrace("CSCTMBMiniScope") << " MiniScope Found | Tbin: " << miniScopeTbinCount
24  << " | Tbin Pretrigger: " << miniScopeTbinPreTrigger << std::endl;
25 
26  miniScopeAdress.clear();
27  miniScopeData.clear();
28 
29  for (int i = 0; i < miniScopeTbinCount; i++) {
30  miniScopeAdress.push_back(284 + i);
31  miniScopeData.push_back(buf[Line6b07 + 1 + i]);
32  }
33 
34  //print();
35  }
36 
37  return (Line6E07 - Line6b07 + 1);
38 
39 }
std::vector< int > miniScopeAdress
std::vector< int > miniScopeData
stores all mini scope adresses
#define LogTrace(id)
int miniScopeTbinCount
stores all mini scope data

Member Data Documentation

◆ miniScopeAdress

std::vector<int> CSCTMBMiniScope::miniScopeAdress
private

Definition at line 30 of file CSCTMBMiniScope.h.

Referenced by getAdr(), and UnpackMiniScope().

◆ miniScopeData

std::vector<int> CSCTMBMiniScope::miniScopeData
private

stores all mini scope adresses

Definition at line 31 of file CSCTMBMiniScope.h.

Referenced by getData(), and UnpackMiniScope().

◆ miniScopeTbinCount

int CSCTMBMiniScope::miniScopeTbinCount
private

stores all mini scope data

Definition at line 32 of file CSCTMBMiniScope.h.

Referenced by getTbinCount(), and UnpackMiniScope().

◆ miniScopeTbinPreTrigger

int CSCTMBMiniScope::miniScopeTbinPreTrigger
private

Definition at line 33 of file CSCTMBMiniScope.h.

Referenced by getTbinPreTrigger(), and UnpackMiniScope().

◆ size_

unsigned CSCTMBMiniScope::size_
private

Definition at line 34 of file CSCTMBMiniScope.h.

Referenced by CSCTMBMiniScope(), and getSize().