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.

16 { size_ = 0; } //default constructor

References size_.

◆ CSCTMBMiniScope() [2/2]

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

Definition at line 12 of file CSCTMBMiniScope.cc.

12  {
13  size_ = UnpackMiniScope(buf, Line6b07, Line6E07);
14 
15 }

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

Member Function Documentation

◆ getAdr()

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

Definition at line 21 of file CSCTMBMiniScope.h.

21 { return miniScopeAdress; }

References miniScopeAdress.

Referenced by print().

◆ getChannelsInTbin()

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

UnpackScope.

Definition at line 41 of file CSCTMBMiniScope.cc.

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 }

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

Referenced by print().

◆ getData()

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

Definition at line 22 of file CSCTMBMiniScope.h.

22 { return miniScopeData; }

References miniScopeData.

Referenced by print().

◆ getSize()

int CSCTMBMiniScope::getSize ( ) const
inline

Definition at line 18 of file CSCTMBMiniScope.h.

18 { return size_; }

References size_.

◆ getTbinCount()

int CSCTMBMiniScope::getTbinCount ( ) const
inline

Definition at line 19 of file CSCTMBMiniScope.h.

19 { return miniScopeTbinCount; }

References miniScopeTbinCount.

◆ getTbinPreTrigger()

int CSCTMBMiniScope::getTbinPreTrigger ( ) const
inline

Definition at line 20 of file CSCTMBMiniScope.h.

20 { return miniScopeTbinPreTrigger; }

References miniScopeTbinPreTrigger.

◆ print()

void CSCTMBMiniScope::print ( void  ) const

Definition at line 53 of file CSCTMBMiniScope.cc.

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 }

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

◆ 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.

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 }

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

Referenced by CSCTMBMiniScope().

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().

mps_fire.i
i
Definition: mps_fire.py:428
CSCTMBMiniScope::miniScopeTbinPreTrigger
int miniScopeTbinPreTrigger
Definition: CSCTMBMiniScope.h:33
gather_cfg.cout
cout
Definition: gather_cfg.py:144
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
CSCTMBMiniScope::getChannelsInTbin
std::vector< int > getChannelsInTbin(int data) const
UnpackScope.
Definition: CSCTMBMiniScope.cc:41
dqmdumpme.k
k
Definition: dqmdumpme.py:60
CSCTMBMiniScope::miniScopeData
std::vector< int > miniScopeData
stores all mini scope adresses
Definition: CSCTMBMiniScope.h:31
CSCTMBMiniScope::getData
std::vector< int > getData() const
Definition: CSCTMBMiniScope.h:22
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCTMBMiniScope::UnpackMiniScope
int UnpackMiniScope(const uint16_t *buf, int Line6b07, int Line6E07)
Print the maped content of the miniscope.
Definition: CSCTMBMiniScope.cc:17
CSCTMBMiniScope::getAdr
std::vector< int > getAdr() const
Definition: CSCTMBMiniScope.h:21
CSCTMBMiniScope::size_
unsigned size_
Definition: CSCTMBMiniScope.h:34
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
CSCTMBMiniScope::miniScopeAdress
std::vector< int > miniScopeAdress
Definition: CSCTMBMiniScope.h:30
CSCTMBMiniScope::miniScopeTbinCount
int miniScopeTbinCount
stores all mini scope data
Definition: CSCTMBMiniScope.h:32
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143