CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Attributes | Private Attributes

EcalTriggerPrimitiveDigi Class Reference

#include <EcalTriggerPrimitiveDigi.h>

List of all members.

Public Types

typedef EcalTrigTowerDetId key_type
 For the sorted collection.

Public Member Functions

int compressedEt () const
 get the encoded/compressed Et of interesting sample
 EcalTriggerPrimitiveDigi ()
 EcalTriggerPrimitiveDigi (const EcalTrigTowerDetId &id)
bool fineGrain () const
 get the fine-grain bit of interesting sample
const EcalTrigTowerDetIdid () const
bool isDebug () const
 True if debug mode (# of samples > 1)
int l1aSpike () const
const EcalTriggerPrimitiveSampleoperator[] (int i) const
const EcalTriggerPrimitiveSamplesample (int i) const
int sampleOfInterest () const
 Gets the interesting sample.
void setSample (int i, const EcalTriggerPrimitiveSample &sam)
void setSampleValue (int i, uint16_t value)
void setSize (int size)
int sFGVB () const
int size () const
void swap (EcalTriggerPrimitiveDigi &rh)
int ttFlag () const
 get the Trigger tower Flag of interesting sample

Static Public Attributes

static const int MAXSAMPLES = 20

Private Attributes

std::vector
< EcalTriggerPrimitiveSample
data_
EcalTrigTowerDetId id_
int size_

Detailed Description

see also EcalTrigPrimCompactColl.

$Id : $

Definition at line 18 of file EcalTriggerPrimitiveDigi.h.


Member Typedef Documentation

For the sorted collection.

Definition at line 20 of file EcalTriggerPrimitiveDigi.h.


Constructor & Destructor Documentation

EcalTriggerPrimitiveDigi::EcalTriggerPrimitiveDigi ( )

Definition at line 5 of file EcalTriggerPrimitiveDigi.cc.

                                                   : size_(0), data_(MAXSAMPLES) {
}
EcalTriggerPrimitiveDigi::EcalTriggerPrimitiveDigi ( const EcalTrigTowerDetId id) [explicit]

Definition at line 7 of file EcalTriggerPrimitiveDigi.cc.

                                                                               : id_(id),
                                                                                   size_(0), data_(MAXSAMPLES) {
}

Member Function Documentation

int EcalTriggerPrimitiveDigi::compressedEt ( ) const

get the encoded/compressed Et of interesting sample

Definition at line 22 of file EcalTriggerPrimitiveDigi.cc.

References data_, sample(), and sampleOfInterest().

Referenced by TPGCheck::analyze(), EcalTrigPrimAnalyzer::analyze(), TCCBlockFormatter::DigiToRaw(), EcalTPGScale::getTPGInGeV(), EcalFEtoDigi::produce(), and EcalTrigPrimFunctionalAlgo::run_part2().

{
  int sample = sampleOfInterest();
  if (sample != -1)
    return data_[sample].compressedEt();
  else
    return -1;
}
bool EcalTriggerPrimitiveDigi::fineGrain ( ) const

get the fine-grain bit of interesting sample

Definition at line 32 of file EcalTriggerPrimitiveDigi.cc.

References data_, sample(), and sampleOfInterest().

Referenced by TPGCheck::analyze(), EcalTrigPrimAnalyzer::analyze(), TCCBlockFormatter::DigiToRaw(), and EcalFEtoDigi::produce().

{ 
  int sample = sampleOfInterest();
  if (sample != -1)
    return data_[sample].fineGrain();
  else
    return false;
}
const EcalTrigTowerDetId& EcalTriggerPrimitiveDigi::id ( void  ) const [inline]
bool EcalTriggerPrimitiveDigi::isDebug ( ) const

True if debug mode (# of samples > 1)

Definition at line 59 of file EcalTriggerPrimitiveDigi.cc.

References size_.

{
  if (size_ == 1)
    return false;
  else if (size_ > 1)
    return true;
  return false;
}
int EcalTriggerPrimitiveDigi::l1aSpike ( ) const [inline]

Gets the L1A spike detection flag. Beware the flag is inverted. Deprecated, use instead sFGVB() method, whose name is less missleading

Returns:
0 spike like pattern 1 EM shower like pattern

Definition at line 63 of file EcalTriggerPrimitiveDigi.h.

References sFGVB().

{ return sFGVB(); }
const EcalTriggerPrimitiveSample& EcalTriggerPrimitiveDigi::operator[] ( int  i) const [inline]

Definition at line 35 of file EcalTriggerPrimitiveDigi.h.

References data_, and i.

{ return data_[i]; }
const EcalTriggerPrimitiveSample& EcalTriggerPrimitiveDigi::sample ( int  i) const [inline]

Definition at line 36 of file EcalTriggerPrimitiveDigi.h.

References data_, and i.

Referenced by compressedEt(), fineGrain(), L1EmulBias::ModifyCollection(), operator<<(), sFGVB(), and ttFlag().

{ return data_[i]; }
int EcalTriggerPrimitiveDigi::sampleOfInterest ( ) const

Gets the interesting sample.

Definition at line 11 of file EcalTriggerPrimitiveDigi.cc.

References size_.

Referenced by compressedEt(), fineGrain(), EcalSimRawData::getTp(), sFGVB(), and ttFlag().

{
  if (size_ == 1)
    return 0;
  else if (size_ == 5)
    return 2;
  else
    return -1;
} 
void EcalTriggerPrimitiveDigi::setSample ( int  i,
const EcalTriggerPrimitiveSample sam 
) [inline]
void EcalTriggerPrimitiveDigi::setSampleValue ( int  i,
uint16_t  value 
) [inline]

Definition at line 40 of file EcalTriggerPrimitiveDigi.h.

References data_, and i.

Referenced by DCCEBTCCBlock::addTriggerPrimitivesToCollection(), and L1EmulBias::ModifyCollection().

{ data_[i].setValue(value); }
void EcalTriggerPrimitiveDigi::setSize ( int  size)
int EcalTriggerPrimitiveDigi::sFGVB ( ) const

Gets the "strip fine grain veto bit" (sFGVB) used as L1A spike detection

Returns:
0 spike like pattern 1 EM shower like pattern

Definition at line 50 of file EcalTriggerPrimitiveDigi.cc.

References data_, sample(), and sampleOfInterest().

Referenced by l1aSpike().

{
  int sample = sampleOfInterest();
  if (sample != -1)
    return data_[sample].l1aSpike();
  else
    return -1;
}
int EcalTriggerPrimitiveDigi::size ( void  ) const [inline]

Definition at line 33 of file EcalTriggerPrimitiveDigi.h.

References size_.

Referenced by TCCBlockFormatter::DigiToRaw(), operator<<(), EcalFEtoDigi::produce(), and setSize().

{ return size_; }
void EcalTriggerPrimitiveDigi::swap ( EcalTriggerPrimitiveDigi rh) [inline]

Definition at line 26 of file EcalTriggerPrimitiveDigi.h.

References data_, id_, and size_.

Referenced by swap().

int EcalTriggerPrimitiveDigi::ttFlag ( ) const

get the Trigger tower Flag of interesting sample

Definition at line 41 of file EcalTriggerPrimitiveDigi.cc.

References data_, sample(), and sampleOfInterest().

Referenced by TPGCheck::analyze(), EcalTrigPrimAnalyzer::analyze(), TCCBlockFormatter::DigiToRaw(), and EcalFEtoDigi::produce().

{ 
  int sample = sampleOfInterest();
  if (sample != -1)
    return data_[sample].ttFlag();
  else
    return -1;
} 

Member Data Documentation

Definition at line 73 of file EcalTriggerPrimitiveDigi.h.

Referenced by id(), and swap().

const int EcalTriggerPrimitiveDigi::MAXSAMPLES = 20 [static]

Definition at line 42 of file EcalTriggerPrimitiveDigi.h.

Referenced by setSize().

Definition at line 74 of file EcalTriggerPrimitiveDigi.h.

Referenced by isDebug(), sampleOfInterest(), setSize(), size(), and swap().