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 13 of file CSCTMBMiniScope.h.

Constructor & Destructor Documentation

CSCTMBMiniScope::CSCTMBMiniScope ( )
inline

Definition at line 15 of file CSCTMBMiniScope.h.

References size_.

15 { size_ = 0; } //default constructor
CSCTMBMiniScope::CSCTMBMiniScope ( const uint16_t *  buf,
int  Line6b07,
int  Line6E07 
)

Definition at line 12 of file CSCTMBMiniScope.cc.

References 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

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

Definition at line 20 of file CSCTMBMiniScope.h.

References miniScopeAdress.

Referenced by print().

20 { return miniScopeAdress; }
std::vector< int > miniScopeAdress
std::vector< int > CSCTMBMiniScope::getChannelsInTbin ( int  data) const

UnpackScope.

Definition at line 41 of file CSCTMBMiniScope.cc.

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

Referenced by getData(), and 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:79
std::vector<int> CSCTMBMiniScope::getData ( void  ) const
inline

Definition at line 21 of file CSCTMBMiniScope.h.

References data, getChannelsInTbin(), miniScopeData, print(), and UnpackMiniScope().

Referenced by print().

21 { return miniScopeData; }
std::vector< int > miniScopeData
stores all mini scope adresses
int CSCTMBMiniScope::getSize ( ) const
inline

Definition at line 17 of file CSCTMBMiniScope.h.

References size_.

17 { return size_; }
int CSCTMBMiniScope::getTbinCount ( ) const
inline

Definition at line 18 of file CSCTMBMiniScope.h.

References miniScopeTbinCount.

18 { return miniScopeTbinCount; }
int miniScopeTbinCount
stores all mini scope data
int CSCTMBMiniScope::getTbinPreTrigger ( ) const
inline

Definition at line 19 of file CSCTMBMiniScope.h.

References miniScopeTbinPreTrigger.

19 { return miniScopeTbinPreTrigger; }
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 dqmdumpme::k.

Referenced by getData().

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 > getData() const
std::vector< int > getAdr() const
std::vector< int > getChannelsInTbin(int data) const
UnpackScope.
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 mps_fire::i, LogTrace, miniScopeAdress, miniScopeData, miniScopeTbinCount, and miniScopeTbinPreTrigger.

Referenced by CSCTMBMiniScope(), and getData().

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
int miniScopeTbinCount
stores all mini scope data
#define LogTrace(id)

Member Data Documentation

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

Definition at line 29 of file CSCTMBMiniScope.h.

Referenced by getAdr(), and UnpackMiniScope().

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

stores all mini scope adresses

Definition at line 30 of file CSCTMBMiniScope.h.

Referenced by getData(), and UnpackMiniScope().

int CSCTMBMiniScope::miniScopeTbinCount
private

stores all mini scope data

Definition at line 31 of file CSCTMBMiniScope.h.

Referenced by getTbinCount(), and UnpackMiniScope().

int CSCTMBMiniScope::miniScopeTbinPreTrigger
private

Definition at line 32 of file CSCTMBMiniScope.h.

Referenced by getTbinPreTrigger(), and UnpackMiniScope().

unsigned CSCTMBMiniScope::size_
private

Definition at line 33 of file CSCTMBMiniScope.h.

Referenced by CSCTMBMiniScope(), and getSize().