CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
EcalTriggerPrimitiveDigi Class Reference

#include <EcalTriggerPrimitiveDigi.h>

Public Types

typedef EcalTrigTowerDetId key_type
 For the sorted collection. More...
 

Public Member Functions

int compressedEt () const
 get the encoded/compressed Et of interesting sample More...
 
 EcalTriggerPrimitiveDigi ()
 
 EcalTriggerPrimitiveDigi (const EcalTrigTowerDetId &id)
 
bool fineGrain () const
 get the fine-grain bit of interesting sample More...
 
const EcalTrigTowerDetIdid () const
 
bool isDebug () const
 True if debug mode (# of samples > 1) More...
 
int l1aSpike () const
 
const EcalTriggerPrimitiveSampleoperator[] (int i) const
 
const EcalTriggerPrimitiveSamplesample (int i) const
 
int sampleOfInterest () const
 Gets the interesting sample. More...
 
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 More...
 

Static Public Attributes

static const int MAXSAMPLES = 20
 

Private Attributes

std::vector< EcalTriggerPrimitiveSampledata_
 
EcalTrigTowerDetId id_
 
int size_
 

Detailed Description

see also EcalTrigPrimCompactColl.

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 4 of file EcalTriggerPrimitiveDigi.cc.

4  : size_(0), data_(MAXSAMPLES) {
5 }
std::vector< EcalTriggerPrimitiveSample > data_
EcalTriggerPrimitiveDigi::EcalTriggerPrimitiveDigi ( const EcalTrigTowerDetId id)
explicit

Definition at line 7 of file EcalTriggerPrimitiveDigi.cc.

7  : id_(id),
9 }
std::vector< EcalTriggerPrimitiveSample > data_

Member Function Documentation

int EcalTriggerPrimitiveDigi::compressedEt ( ) const

get the encoded/compressed Et of interesting sample

Definition at line 24 of file EcalTriggerPrimitiveDigi.cc.

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

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

25 {
26  int sample = sampleOfInterest();
27  if (sample != -1)
28  return data_[sample].compressedEt();
29  else
30  return -1;
31 }
const EcalTriggerPrimitiveSample & sample(int i) const
int sampleOfInterest() const
Gets the interesting sample.
std::vector< EcalTriggerPrimitiveSample > data_
bool EcalTriggerPrimitiveDigi::fineGrain ( ) const

get the fine-grain bit of interesting sample

Definition at line 34 of file EcalTriggerPrimitiveDigi.cc.

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

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

35 {
36  int sample = sampleOfInterest();
37  if (sample != -1)
38  return data_[sample].fineGrain();
39  else
40  return false;
41 }
const EcalTriggerPrimitiveSample & sample(int i) const
int sampleOfInterest() const
Gets the interesting sample.
std::vector< EcalTriggerPrimitiveSample > data_
const EcalTrigTowerDetId& EcalTriggerPrimitiveDigi::id ( ) const
inline
bool EcalTriggerPrimitiveDigi::isDebug ( ) const

True if debug mode (# of samples > 1)

Definition at line 61 of file EcalTriggerPrimitiveDigi.cc.

References size_.

Referenced by l1aSpike().

62 {
63  if (size_ == 1)
64  return false;
65  else if (size_ > 1)
66  return true;
67  return false;
68 }
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 66 of file EcalTriggerPrimitiveDigi.h.

References isDebug(), sampleOfInterest(), and sFGVB().

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

Definition at line 38 of file EcalTriggerPrimitiveDigi.h.

References data_, and i.

38 { return data_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< EcalTriggerPrimitiveSample > data_
const EcalTriggerPrimitiveSample& EcalTriggerPrimitiveDigi::sample ( int  i) const
inline

Definition at line 39 of file EcalTriggerPrimitiveDigi.h.

References data_, i, setSize(), and size().

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

39 { return data_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< EcalTriggerPrimitiveSample > data_
int EcalTriggerPrimitiveDigi::sampleOfInterest ( ) const

Gets the interesting sample.

Definition at line 13 of file EcalTriggerPrimitiveDigi.cc.

References size_.

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

14 {
15  if (size_ == 1)
16  return 0;
17  else if (size_ == 5)
18  return 2;
19  else
20  return -1;
21 }
void EcalTriggerPrimitiveDigi::setSample ( int  i,
const EcalTriggerPrimitiveSample sam 
)
inline
void EcalTriggerPrimitiveDigi::setSampleValue ( int  i,
uint16_t  value 
)
inline

Definition at line 43 of file EcalTriggerPrimitiveDigi.h.

References data_, and i.

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

43 { data_[i].setValue(value); }
int i
Definition: DBlmapReader.cc:9
Definition: value.py:1
std::vector< EcalTriggerPrimitiveSample > data_
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 52 of file EcalTriggerPrimitiveDigi.cc.

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

Referenced by l1aSpike().

53 {
54  int sample = sampleOfInterest();
55  if (sample != -1)
56  return data_[sample].l1aSpike();
57  else
58  return -1;
59 }
const EcalTriggerPrimitiveSample & sample(int i) const
int sampleOfInterest() const
Gets the interesting sample.
std::vector< EcalTriggerPrimitiveSample > data_
int EcalTriggerPrimitiveDigi::size ( void  ) const
inline
void EcalTriggerPrimitiveDigi::swap ( EcalTriggerPrimitiveDigi rh)
inline

Definition at line 28 of file EcalTriggerPrimitiveDigi.h.

References data_, id_, size_, and std::swap().

Referenced by swap().

28  {
29  std::swap(id_,rh.id_);
30  std::swap(size_,rh.size_);
31  std::swap(data_,rh.data_);
32  }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::vector< EcalTriggerPrimitiveSample > data_
int EcalTriggerPrimitiveDigi::ttFlag ( ) const

get the Trigger tower Flag of interesting sample

Definition at line 43 of file EcalTriggerPrimitiveDigi.cc.

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

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

44 {
45  int sample = sampleOfInterest();
46  if (sample != -1)
47  return data_[sample].ttFlag();
48  else
49  return -1;
50 }
const EcalTriggerPrimitiveSample & sample(int i) const
int sampleOfInterest() const
Gets the interesting sample.
std::vector< EcalTriggerPrimitiveSample > data_

Member Data Documentation

std::vector<EcalTriggerPrimitiveSample> EcalTriggerPrimitiveDigi::data_
private
EcalTrigTowerDetId EcalTriggerPrimitiveDigi::id_
private

Definition at line 75 of file EcalTriggerPrimitiveDigi.h.

Referenced by id(), and swap().

const int EcalTriggerPrimitiveDigi::MAXSAMPLES = 20
static

Definition at line 45 of file EcalTriggerPrimitiveDigi.h.

Referenced by setSize().

int EcalTriggerPrimitiveDigi::size_
private

Definition at line 76 of file EcalTriggerPrimitiveDigi.h.

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