CMS 3D CMS Logo

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

#include <CSCSPCounters.h>

Public Member Functions

bool check (void) const throw ()
 
 CSCSPCounters (void)
 
int orbit_counter (void) const throw ()
 
int track_counter (void) const throw ()
 
bool unpack (const unsigned short *&buf) throw ()
 

Private Attributes

unsigned orbit_counter_high: 15
 
unsigned orbit_counter_low: 15
 
unsigned track_counter_high: 15
 
unsigned track_counter_low: 15
 
unsigned zero_1: 1
 
unsigned zero_2: 1
 
unsigned zero_3: 1
 
unsigned zero_4: 1
 

Friends

class CSCTFPacker
 

Detailed Description

Definition at line 6 of file CSCSPCounters.h.

Constructor & Destructor Documentation

◆ CSCSPCounters()

CSCSPCounters::CSCSPCounters ( void  )
inline

Definition at line 36 of file CSCSPCounters.h.

36 {}

Member Function Documentation

◆ check()

bool CSCSPCounters::check ( void  ) const
throw (
)
inline

Definition at line 25 of file CSCSPCounters.h.

25 { return zero_1 != 0 || zero_2 != 0 || zero_3 != 0 || zero_4 != 0; }

References zero_1, zero_2, zero_3, and zero_4.

Referenced by unpack().

◆ orbit_counter()

int CSCSPCounters::orbit_counter ( void  ) const
throw (
)
inline

Definition at line 34 of file CSCSPCounters.h.

34 { return (orbit_counter_high << 15) | orbit_counter_low; }

References orbit_counter_high, and orbit_counter_low.

Referenced by CSCTFUnpacker::produce().

◆ track_counter()

int CSCSPCounters::track_counter ( void  ) const
throw (
)
inline

Definition at line 33 of file CSCSPCounters.h.

33 { return (track_counter_high << 15) | track_counter_low; }

References track_counter_high, and track_counter_low.

Referenced by CSCTFUnpacker::produce().

◆ unpack()

bool CSCSPCounters::unpack ( const unsigned short *&  buf)
throw (
)
inline

Definition at line 27 of file CSCSPCounters.h.

27  {
28  std::memcpy((void *)this, buf, 4 * sizeof(short));
29  buf += 4;
30  return check();
31  }

References visDQMUpload::buf, and check().

Friends And Related Function Documentation

◆ CSCTFPacker

friend class CSCTFPacker
friend

Definition at line 22 of file CSCSPCounters.h.

Member Data Documentation

◆ orbit_counter_high

unsigned CSCSPCounters::orbit_counter_high
private

Definition at line 19 of file CSCSPCounters.h.

Referenced by orbit_counter().

◆ orbit_counter_low

unsigned CSCSPCounters::orbit_counter_low
private

Definition at line 16 of file CSCSPCounters.h.

Referenced by orbit_counter().

◆ track_counter_high

unsigned CSCSPCounters::track_counter_high
private

Definition at line 13 of file CSCSPCounters.h.

Referenced by track_counter().

◆ track_counter_low

unsigned CSCSPCounters::track_counter_low
private

Definition at line 10 of file CSCSPCounters.h.

Referenced by track_counter().

◆ zero_1

unsigned CSCSPCounters::zero_1
private

Definition at line 11 of file CSCSPCounters.h.

Referenced by check().

◆ zero_2

unsigned CSCSPCounters::zero_2
private

Definition at line 14 of file CSCSPCounters.h.

Referenced by check().

◆ zero_3

unsigned CSCSPCounters::zero_3
private

Definition at line 17 of file CSCSPCounters.h.

Referenced by check().

◆ zero_4

unsigned CSCSPCounters::zero_4
private

Definition at line 20 of file CSCSPCounters.h.

Referenced by check().

CSCSPCounters::track_counter_high
unsigned track_counter_high
Definition: CSCSPCounters.h:13
CSCSPCounters::zero_4
unsigned zero_4
Definition: CSCSPCounters.h:20
CSCSPCounters::orbit_counter_high
unsigned orbit_counter_high
Definition: CSCSPCounters.h:19
CSCSPCounters::zero_1
unsigned zero_1
Definition: CSCSPCounters.h:11
CSCSPCounters::track_counter_low
unsigned track_counter_low
Definition: CSCSPCounters.h:10
CSCSPCounters::zero_3
unsigned zero_3
Definition: CSCSPCounters.h:17
visDQMUpload.buf
buf
Definition: visDQMUpload.py:160
CSCSPCounters::zero_2
unsigned zero_2
Definition: CSCSPCounters.h:14
CSCSPCounters::check
bool check(void) const
Definition: CSCSPCounters.h:25
CSCSPCounters::orbit_counter_low
unsigned orbit_counter_low
Definition: CSCSPCounters.h:16