CMS 3D CMS Logo

Public Member Functions | Public Attributes

TCCinput Struct Reference

#include <TCCinput.h>

List of all members.

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 18 of file TCCinput.h.

References gather_cfg::cout, and input.

                                                 : 
    tower(tt), bunchCrossing(bx), input(val) {
    if (input>0x7ff)  {
      std::cout << "[TCCinput] saturated value 0x" 
                << std::hex << input << std::dec
                << std::endl;
      input &= 0x7ff;
    }
  }; 

Member Function Documentation

int TCCinput::get_energy ( ) const [inline]

Definition at line 28 of file TCCinput.h.

References input.

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

                         {
    return input & 0x3ff; //get bits 9:0
  }
int TCCinput::get_fg ( ) const [inline]

Definition at line 32 of file TCCinput.h.

References input.

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

                     {
    return input & 0x400; //get bit number 10
  }
bool TCCinput::is_current ( int  n) const [inline]

Definition at line 36 of file TCCinput.h.

References bunchCrossing.

                                {
    return (n==bunchCrossing);
  }
bool TCCinput::operator< ( const TCCinput k) const [inline]

Definition at line 59 of file TCCinput.h.

References bunchCrossing.

                                                 {
  return (bunchCrossing < k.bunchCrossing);
}
std::ostream & TCCinput::operator<< ( std::ostream &  os) [inline]

Definition at line 47 of file TCCinput.h.

References bunchCrossing, get_energy(), get_fg(), input, and tower.

                                               {
  os << " tcc input " 
     << " bx:"     << bunchCrossing 
     << " tt:"     << tower 
     << " raw:0x"  << std::hex  << input << std::dec  
     << " fg:"     << this->get_fg()
     << " energy:" << this->get_energy()
     << std::endl;
  return os;
}

Member Data Documentation

Definition at line 15 of file TCCinput.h.

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

unsigned TCCinput::input

Definition at line 16 of file TCCinput.h.

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

Definition at line 14 of file TCCinput.h.

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