CMS 3D CMS Logo

EcalMatacqDigi Class Reference

#include <DataFormats/EcalDigi/interface/EcalMatacqDigi.h>

List of all members.

Public Types

typedef int key_type

Public Member Functions

const float adcCount (const int &i) const
 Gets amplitude in ADC count of time sample i.
const float amplitudeV (const int &i) const
 Gets amplitude in Volt of time sample i.
int chId () const
 Gets Matacq electronics channel id.
 EcalMatacqDigi (const std::vector< Short_t > &samples, const int &chId, const double &ts, const short &version=-1, const double &tTrig=999.)
 Constructor.
 EcalMatacqDigi ()
 Default constructor.
int id () const
 For edm::SortedCollection.
int size () const
 Sets Matacq electronics channel id.
void swap (EcalMatacqDigi &a)
void swap (std::vector< short > &samples)
 Swaps samples with the passed samples.
float ts () const
 Gets time of sample i.
float tTrig () const
 Sets sampling time period.
short version () const
 Sets trigger time position.

Static Public Attributes

static const double lsb_ = 0.25e-3
 LSB of ADC count in Volt.
static const int MAXSAMPLES = 2560
 Maximum number of time samples.

Private Attributes

int chId_
 Sets the raw data format, the digi is issued from.
std::vector< Short_t > data_
 ADC count of time samples.
int freq
 Frequency mode.
double ts_
 Sampling period in seconds.
double tTrigS_
 Trigger time in seconds.
short version_
 version of raw data format, the digis originate from.


Detailed Description

Definition at line 15 of file EcalMatacqDigi.h.


Member Typedef Documentation

typedef int EcalMatacqDigi::key_type

Definition at line 26 of file EcalMatacqDigi.h.


Constructor & Destructor Documentation

EcalMatacqDigi::EcalMatacqDigi (  )  [inline]

Default constructor.

Definition at line 31 of file EcalMatacqDigi.h.

00031 : chId_(-1), ts_(0.), tTrigS_(999.), version_(-1){}; 

EcalMatacqDigi::EcalMatacqDigi ( const std::vector< Short_t > &  samples,
const int chId,
const double &  ts,
const short &  version = -1,
const double &  tTrig = 999. 
) [inline]

Constructor.

Parameters:
samples adc time samples
chId Matacq channel ID
ts sampling time in seconds
version Matacq raw data private version
tTrigg time position of the trigger in seconds

Definition at line 40 of file EcalMatacqDigi.h.

00042     : chId_(chId), data_(samples), ts_(ts), tTrigS_(tTrig),
00043       version_(version){};


Member Function Documentation

const float EcalMatacqDigi::adcCount ( const int i  )  const [inline]

Gets amplitude in ADC count of time sample i.

i between 0 and size()-1. Note: Amplitude is pedestal subtracted at acquisition time.

Definition at line 49 of file EcalMatacqDigi.h.

References data_.

00049 { return data_[i]; }

const float EcalMatacqDigi::amplitudeV ( const int i  )  const [inline]

Gets amplitude in Volt of time sample i.

i between 0 and size()-1. Note: Amplitude is pedestal subtracted at acquisition time.

Definition at line 54 of file EcalMatacqDigi.h.

References data_, and lsb_.

Referenced by operator<<().

00054 { return data_[i]*lsb_;}

int EcalMatacqDigi::chId (  )  const [inline]

Gets Matacq electronics channel id.

Definition at line 58 of file EcalMatacqDigi.h.

References chId_.

00058 { return chId_;}

int EcalMatacqDigi::id ( void   )  const [inline]

For edm::SortedCollection.

Returns:
as key the matacq channel id

Definition at line 63 of file EcalMatacqDigi.h.

References chId_.

00063 { return chId_;}

int EcalMatacqDigi::size ( void   )  const [inline]

Sets Matacq electronics channel id.

Number of time samples

Definition at line 71 of file EcalMatacqDigi.h.

References data_.

Referenced by operator<<().

00071 { return data_.size();}

void EcalMatacqDigi::swap ( EcalMatacqDigi a  ) 

Definition at line 25 of file EcalMatacqDigi.cc.

References chId_, data_, std::swap(), ts_, tTrigS_, and version_.

00025                                           {
00026   data_.swap(a.data_);
00027   std::swap(chId_, a.chId_);
00028   std::swap(ts_, a.ts_);
00029   std::swap(tTrigS_, a.tTrigS_);
00030   std::swap(version_, a.version_);
00031 }

void EcalMatacqDigi::swap ( std::vector< short > &  samples  )  [inline]

Swaps samples with the passed samples.

For package internal use.

Parameters:
samples new time samples in unit used in raw data (a priori ADC count).

Definition at line 77 of file EcalMatacqDigi.h.

References data_, and std::swap().

00077 { std::swap(data_, samples);}

float EcalMatacqDigi::ts (  )  const [inline]

Gets time of sample i.

i between 0 and size()-1. Gets sampling time in seconds

Definition at line 87 of file EcalMatacqDigi.h.

References ts_.

00087 { return ts_;}

float EcalMatacqDigi::tTrig (  )  const [inline]

Sets sampling time period.

Parameters:
ts sampling time period in seconds Gets time of trigger in seconds.
Returns:
(t_trig-t_0), with t_trig the trigger time and t_0 the first. Returns 999 if not available. sample time.

Definition at line 101 of file EcalMatacqDigi.h.

References tTrigS_.

00101 { return tTrigS_;}

short EcalMatacqDigi::version (  )  const [inline]

Sets trigger time position.

Parameters:
tTrigS (t_trig-t_0) in seconds, with t_trig the time of MATACQ trigger and t_0 the time of the first sample of each MATACQ channel. version of raw data format, the digis originate from.
Returns:
raw data format version, -1 if not available.

Definition at line 114 of file EcalMatacqDigi.h.

References version_.

00114 {return version_;}


Member Data Documentation

int EcalMatacqDigi::chId_ [private]

Sets the raw data format, the digi is issued from.

Parameters:
version internal matacq raw data format version Electronic channel id

Definition at line 126 of file EcalMatacqDigi.h.

Referenced by chId(), id(), and swap().

std::vector<Short_t> EcalMatacqDigi::data_ [private]

ADC count of time samples.

Definition at line 130 of file EcalMatacqDigi.h.

Referenced by adcCount(), amplitudeV(), size(), and swap().

int EcalMatacqDigi::freq [private]

Frequency mode.

1->1GHz sampling, 2->2GHz sampling

Definition at line 134 of file EcalMatacqDigi.h.

const double EcalMatacqDigi::lsb_ = 0.25e-3 [static]

LSB of ADC count in Volt.

Definition at line 19 of file EcalMatacqDigi.h.

Referenced by amplitudeV().

const int EcalMatacqDigi::MAXSAMPLES = 2560 [static]

Maximum number of time samples.

Definition at line 23 of file EcalMatacqDigi.h.

double EcalMatacqDigi::ts_ [private]

Sampling period in seconds.

In priniciple 1ns or 0.5ns

Definition at line 138 of file EcalMatacqDigi.h.

Referenced by swap(), and ts().

double EcalMatacqDigi::tTrigS_ [private]

Trigger time in seconds.

Definition at line 142 of file EcalMatacqDigi.h.

Referenced by swap(), and tTrig().

short EcalMatacqDigi::version_ [private]

version of raw data format, the digis originate from.

Definition at line 146 of file EcalMatacqDigi.h.

Referenced by swap(), and version().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:19:44 2009 for CMSSW by  doxygen 1.5.4