CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
TCCinput Struct Reference

#include <TCCinput.h>

Public Member Functions

int get_energy () const
 
int get_fg () const
 
bool is_current (int n) const
 
bool operator< (const TCCinput &) const
 
std::ostream & operator<< (std::ostream &)
 
 TCCinput (int tt=0, int bx=0, unsigned val=0x0)
 

Public Attributes

int bunchCrossing
 
unsigned input
 
int tower
 

Detailed Description

Definition at line 12 of file TCCinput.h.

Constructor & Destructor Documentation

TCCinput::TCCinput ( int  tt = 0,
int  bx = 0,
unsigned  val = 0x0 
)
inline

Definition at line 17 of file TCCinput.h.

References gather_cfg::cout, and TauDecayModes::dec.

17  : tower(tt), bunchCrossing(bx), input(val) {
18  if (input > 0x7ff) {
19  std::cout << "[TCCinput] saturated value 0x" << std::hex << input << std::dec << std::endl;
20  input &= 0x7ff;
21  }
22  };
int bunchCrossing
Definition: TCCinput.h:14
int tower
Definition: TCCinput.h:13
unsigned input
Definition: TCCinput.h:15

Member Function Documentation

int TCCinput::get_energy ( ) const
inline

Definition at line 24 of file TCCinput.h.

Referenced by EcalFEtoDigi::create_TPSample(), EcalFEtoDigi::create_TPSampleTcp(), EcalFEtoDigi::create_TTDetId(), and operator<<().

24  {
25  return input & 0x3ff; // get bits 9:0
26  }
unsigned input
Definition: TCCinput.h:15
int TCCinput::get_fg ( ) const
inline

Definition at line 28 of file TCCinput.h.

Referenced by EcalFEtoDigi::create_TPSample(), EcalFEtoDigi::create_TPSampleTcp(), and operator<<().

28  {
29  return input & 0x400; // get bit number 10
30  }
unsigned input
Definition: TCCinput.h:15
bool TCCinput::is_current ( int  n) const
inline

Definition at line 32 of file TCCinput.h.

References operator<(), and operator<<().

32 { return (n == bunchCrossing); }
int bunchCrossing
Definition: TCCinput.h:14
bool TCCinput::operator< ( const TCCinput k) const
inline

Definition at line 46 of file TCCinput.h.

References bunchCrossing.

Referenced by is_current().

46 { return (bunchCrossing < k.bunchCrossing); }
int bunchCrossing
Definition: TCCinput.h:14
std::ostream & TCCinput::operator<< ( std::ostream &  os)
inline

Definition at line 39 of file TCCinput.h.

References bunchCrossing, TauDecayModes::dec, get_energy(), get_fg(), input, and tower.

Referenced by is_current().

39  {
40  os << " tcc input "
41  << " bx:" << bunchCrossing << " tt:" << tower << " raw:0x" << std::hex << input << std::dec
42  << " fg:" << this->get_fg() << " energy:" << this->get_energy() << std::endl;
43  return os;
44 }
int bunchCrossing
Definition: TCCinput.h:14
int get_fg() const
Definition: TCCinput.h:28
int get_energy() const
Definition: TCCinput.h:24
int tower
Definition: TCCinput.h:13
unsigned input
Definition: TCCinput.h:15

Member Data Documentation

int TCCinput::bunchCrossing

Definition at line 14 of file TCCinput.h.

Referenced by operator<(), and operator<<().

unsigned TCCinput::input

Definition at line 15 of file TCCinput.h.

Referenced by EcalFEtoDigi::create_TPSample(), and operator<<().

int TCCinput::tower

Definition at line 13 of file TCCinput.h.

Referenced by EcalFEtoDigi::create_TTDetId(), and operator<<().