CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
< EcalTriggerPrimitiveSample
data_
 
EcalTrigTowerDetId id_
 
int size_
 

Detailed Description

see also EcalTrigPrimCompactColl.

Definition at line 17 of file EcalTriggerPrimitiveDigi.h.

Member Typedef Documentation

For the sorted collection.

Definition at line 19 of file EcalTriggerPrimitiveDigi.h.

Constructor & Destructor Documentation

EcalTriggerPrimitiveDigi::EcalTriggerPrimitiveDigi ( )

Definition at line 5 of file EcalTriggerPrimitiveDigi.cc.

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

Definition at line 7 of file EcalTriggerPrimitiveDigi.cc.

7  : id_(id),
8  size_(0), data_(MAXSAMPLES) {
9 }
std::vector< EcalTriggerPrimitiveSample > data_

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 EcalTrigPrimAnalyzer::analyze(), TPGCheck::analyze(), TCCBlockFormatter::DigiToRaw(), EcalTPGScale::getTPGInGeV(), EcalFEtoDigi::produce(), and EcalTrigPrimFunctionalAlgo::run_part2().

23 {
24  int sample = sampleOfInterest();
25  if (sample != -1)
26  return data_[sample].compressedEt();
27  else
28  return -1;
29 }
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 32 of file EcalTriggerPrimitiveDigi.cc.

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

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

33 {
34  int sample = sampleOfInterest();
35  if (sample != -1)
36  return data_[sample].fineGrain();
37  else
38  return false;
39 }
const EcalTriggerPrimitiveSample & sample(int i) const
int sampleOfInterest() const
Gets the interesting sample.
std::vector< EcalTriggerPrimitiveSample > data_
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_.

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

References sFGVB().

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

Definition at line 34 of file EcalTriggerPrimitiveDigi.h.

References data_, and i.

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

Definition at line 35 of file EcalTriggerPrimitiveDigi.h.

References data_, and i.

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

35 { return data_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< EcalTriggerPrimitiveSample > data_
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().

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

Definition at line 39 of file EcalTriggerPrimitiveDigi.h.

References data_, and i.

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

39 { data_[i].setValue(value); }
int i
Definition: DBlmapReader.cc:9
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 50 of file EcalTriggerPrimitiveDigi.cc.

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

Referenced by l1aSpike().

51 {
52  int sample = sampleOfInterest();
53  if (sample != -1)
54  return data_[sample].l1aSpike();
55  else
56  return -1;
57 }
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 25 of file EcalTriggerPrimitiveDigi.h.

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

Referenced by swap().

25  {
26  std::swap(id_,rh.id_);
27  std::swap(size_,rh.size_);
28  std::swap(data_,rh.data_);
29  }
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 41 of file EcalTriggerPrimitiveDigi.cc.

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

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

42 {
43  int sample = sampleOfInterest();
44  if (sample != -1)
45  return data_[sample].ttFlag();
46  else
47  return -1;
48 }
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 72 of file EcalTriggerPrimitiveDigi.h.

Referenced by id(), and swap().

const int EcalTriggerPrimitiveDigi::MAXSAMPLES = 20
static

Definition at line 41 of file EcalTriggerPrimitiveDigi.h.

Referenced by setSize().

int EcalTriggerPrimitiveDigi::size_
private

Definition at line 73 of file EcalTriggerPrimitiveDigi.h.

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