#include <EcalMatacqDigi.h>
Public Types | |
typedef int | key_type |
Public Member Functions | |
const float | adcCount (const int &i) const |
const float | amplitudeV (const int &i) const |
int | attenuation_dB () const |
void | attenuation_dB (int value) |
int | bxId () const |
void | bxId (int value) |
int | chId () const |
int | delayA () const |
void | delayA (int value) |
EcalMatacqDigi (const std::vector< Short_t > &samples, const int &chId, const double &ts, const short &version=-1, const double &tTrig=999.) | |
EcalMatacqDigi () | |
void | emtcDelay (int value) |
int | emtcDelay () const |
int | emtcPhase () const |
void | emtcPhase (int value) |
int | id () const |
void | init () |
void | l1a (int value) |
int | l1a () const |
int | laserPower () const |
void | laserPower (int value) |
UInt_t | orbitId () const |
void | orbitId (UInt_t value) |
int | postTrig () const |
void | postTrig (int value) |
int | size () const |
void | swap (std::vector< short > &samples) |
void | swap (EcalMatacqDigi &a) |
void | timeStamp (timeval value) |
timeval | timeStamp () const |
int | triggerType () const |
void | triggerType (int value) |
int | trigRec () const |
void | trigRec (int value) |
float | ts () const |
float | tTrig () const |
void | vernier (const std::vector< int > &value) |
std::vector< int > | vernier () const |
short | version () const |
Static Public Attributes | |
static const double | lsb_ = 0.25e-3 |
static const int | MAXSAMPLES = 2560 |
Private Attributes | |
char | attenuation_dB_ |
Short_t | bxId_ |
int | chId_ |
std::vector< Short_t > | data_ |
Int_t | delayA_ |
Int_t | emtcDelay_ |
Int_t | emtcPhase_ |
int | freq |
Int_t | l1a_ |
Int_t | laserPower_ |
Int_t | orbitId_ |
Short_t | postTrig_ |
timeval | timeStamp_ |
char | triggerType_ |
Short_t | trigRec_ |
double | ts_ |
double | tTrigS_ |
std::vector< Int_t > | vernier_ |
short | version_ |
Definition at line 17 of file EcalMatacqDigi.h.
typedef int EcalMatacqDigi::key_type |
Definition at line 28 of file EcalMatacqDigi.h.
EcalMatacqDigi::EcalMatacqDigi | ( | ) | [inline] |
EcalMatacqDigi::EcalMatacqDigi | ( | const std::vector< Short_t > & | samples, |
const int & | chId, | ||
const double & | ts, | ||
const short & | version = -1 , |
||
const double & | tTrig = 999. |
||
) | [inline] |
Constructor
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 44 of file EcalMatacqDigi.h.
References init().
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 55 of file EcalMatacqDigi.h.
Referenced by EcalMatacqAnalyzer::analyze(), and EcalPerEvtMatacqAnalyzer::analyze().
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 60 of file EcalMatacqDigi.h.
References data_, i, and lsb_.
Referenced by operator<<().
int EcalMatacqDigi::attenuation_dB | ( | ) | const [inline] |
Gets the laser logarithmic attenuator setting in -10dB unit. Between 0 and 5*(-10dB), -1 if unknown.
Definition at line 249 of file EcalMatacqDigi.h.
References attenuation_dB_.
Referenced by MatacqDataFormatter::interpretRawData().
{ return attenuation_dB_; }
void EcalMatacqDigi::attenuation_dB | ( | int | value | ) | [inline] |
Sets the laser Logarithmic attenuator setting in -10dB unit. Between 0 and 5*(-10dB), -1 if unknown.
value | new value |
Definition at line 255 of file EcalMatacqDigi.h.
References attenuation_dB_, and relativeConstraints::value.
{ attenuation_dB_ = value; }
int EcalMatacqDigi::bxId | ( | ) | const [inline] |
Sets the raw data format, the digi is issued from.
version | internal matacq raw data format version Gets the bunch crossing id field contents. |
Definition at line 133 of file EcalMatacqDigi.h.
References bxId_.
Referenced by MatacqDataFormatter::interpretRawData().
{ return bxId_; }
void EcalMatacqDigi::bxId | ( | int | value | ) | [inline] |
Sets the bunch crossing id field contents.
value | new value |
Definition at line 138 of file EcalMatacqDigi.h.
References bxId_, and relativeConstraints::value.
int EcalMatacqDigi::chId | ( | ) | const [inline] |
Gets Matacq electronics channel id
Definition at line 64 of file EcalMatacqDigi.h.
References chId_.
{ return chId_;}
int EcalMatacqDigi::delayA | ( | ) | const [inline] |
Gets "Delay A" setting of laser delay box in ns.delayA
Definition at line 218 of file EcalMatacqDigi.h.
References delayA_.
Referenced by MatacqDataFormatter::interpretRawData().
{ return delayA_; }
void EcalMatacqDigi::delayA | ( | int | value | ) | [inline] |
Sets "Delay A" setting of laser delay box in ns.delayA
value | new value |
Definition at line 223 of file EcalMatacqDigi.h.
References delayA_, and relativeConstraints::value.
int EcalMatacqDigi::emtcDelay | ( | ) | const [inline] |
Gets the WTE-to-Laser delay of EMTC in LHC clock unit.
Definition at line 228 of file EcalMatacqDigi.h.
References emtcDelay_.
Referenced by MatacqDataFormatter::interpretRawData().
{ return emtcDelay_; }
void EcalMatacqDigi::emtcDelay | ( | int | value | ) | [inline] |
Sets the WTE-to-Laser delay of EMTC in LHC clock unit.
value | new value |
Definition at line 233 of file EcalMatacqDigi.h.
References emtcDelay_, and relativeConstraints::value.
{ emtcDelay_ = value; }
void EcalMatacqDigi::emtcPhase | ( | int | value | ) | [inline] |
Sets the EMTC laser phase in 1/8th LHC clock unit.
value | new value |
Definition at line 243 of file EcalMatacqDigi.h.
References emtcPhase_, and relativeConstraints::value.
{ emtcPhase_ = value; }
int EcalMatacqDigi::emtcPhase | ( | ) | const [inline] |
Gets the EMTC laser phase in 1/8th LHC clock unit.
Definition at line 238 of file EcalMatacqDigi.h.
References emtcPhase_.
Referenced by MatacqDataFormatter::interpretRawData().
{ return emtcPhase_; }
int EcalMatacqDigi::id | ( | void | ) | const [inline] |
Definition at line 69 of file EcalMatacqDigi.h.
References chId_.
{ return chId_;}
void EcalMatacqDigi::init | ( | void | ) | [inline] |
Definition at line 269 of file EcalMatacqDigi.h.
References attenuation_dB_, bxId_, delayA_, emtcDelay_, emtcPhase_, l1a_, laserPower_, orbitId_, postTrig_, triggerType_, trigRec_, and vernier_.
Referenced by EcalMatacqDigi().
{ #if (ECAL_MATACQ_DIGI_VERS>=2) bxId_ = -1; l1a_ = -1; triggerType_ = -1; orbitId_ = -1; trigRec_ = -1; postTrig_ = -1; vernier_ = std::vector<Int_t>(4,-1); delayA_ = -1; emtcDelay_ = -1; emtcPhase_ = -1; attenuation_dB_ = -1; laserPower_ = -1; #endif }
int EcalMatacqDigi::l1a | ( | ) | const [inline] |
Gets level one accept counter of the event
Definition at line 143 of file EcalMatacqDigi.h.
References l1a_.
Referenced by MatacqDataFormatter::interpretRawData().
{ return l1a_; }
void EcalMatacqDigi::l1a | ( | int | value | ) | [inline] |
Sets level one accept counter of the event
value | new value |
Definition at line 148 of file EcalMatacqDigi.h.
References l1a_, and relativeConstraints::value.
int EcalMatacqDigi::laserPower | ( | ) | const [inline] |
Gets the laser power setting in percents (set with the linear attenuator),
Definition at line 261 of file EcalMatacqDigi.h.
References laserPower_.
Referenced by MatacqDataFormatter::interpretRawData().
{ return laserPower_; }
void EcalMatacqDigi::laserPower | ( | int | value | ) | [inline] |
Sets the laser power setting in percents (set with the linear attenuator),
value | new value |
Definition at line 267 of file EcalMatacqDigi.h.
References laserPower_, and relativeConstraints::value.
{ laserPower_ = value; }
UInt_t EcalMatacqDigi::orbitId | ( | ) | const [inline] |
Gets the LHC orbit ID of the event Available only for Matacq data format version >=3 and for P5 data.
Definition at line 176 of file EcalMatacqDigi.h.
References orbitId_.
Referenced by MatacqDataFormatter::interpretRawData().
{ return orbitId_; }
void EcalMatacqDigi::orbitId | ( | UInt_t | value | ) | [inline] |
Sets the LHC orbit ID of the event.
value | new value |
Definition at line 181 of file EcalMatacqDigi.h.
References orbitId_, and relativeConstraints::value.
int EcalMatacqDigi::postTrig | ( | ) | const [inline] |
Gets the Posttrig value (see Matacq documentation). Available only for Matacq data format version >=3.
Definition at line 197 of file EcalMatacqDigi.h.
References postTrig_.
Referenced by MatacqDataFormatter::interpretRawData().
{ return postTrig_; }
void EcalMatacqDigi::postTrig | ( | int | value | ) | [inline] |
Sets the Posttrig value (see Matacq documentation).
value | new value |
Definition at line 202 of file EcalMatacqDigi.h.
References postTrig_, and relativeConstraints::value.
int EcalMatacqDigi::size | ( | void | ) | const [inline] |
Sets Matacq electronics channel id Number of time samples
Definition at line 77 of file EcalMatacqDigi.h.
References data_.
Referenced by EcalMatacqAnalyzer::analyze(), EcalPerEvtMatacqAnalyzer::analyze(), and operator<<().
{ return data_.size();}
void EcalMatacqDigi::swap | ( | std::vector< short > & | samples | ) | [inline] |
void EcalMatacqDigi::swap | ( | EcalMatacqDigi & | a | ) |
Definition at line 25 of file EcalMatacqDigi.cc.
References attenuation_dB_, bxId_, chId_, data_, delayA_, emtcDelay_, emtcPhase_, l1a_, laserPower_, orbitId_, postTrig_, std::swap(), timeStamp_, triggerType_, trigRec_, ts_, tTrigS_, vernier_, and version_.
{ data_.swap(a.data_); std::swap(chId_, a.chId_); std::swap(ts_, a.ts_); std::swap(tTrigS_, a.tTrigS_); std::swap(version_, a.version_); #if (ECAL_MATACQ_DIGI_VERS>=2) std::swap(bxId_, a.bxId_); std::swap(l1a_, a.l1a_); std::swap(triggerType_, a.triggerType_); std::swap(orbitId_, a.orbitId_); std::swap(trigRec_, a.trigRec_); std::swap(postTrig_, a.postTrig_); std::swap(vernier_, a.vernier_); std::swap(delayA_, a.delayA_); std::swap(emtcDelay_, a.emtcDelay_); std::swap(emtcPhase_, a.emtcPhase_); std::swap(attenuation_dB_, a.attenuation_dB_); std::swap(laserPower_, a.laserPower_); std::swap(timeStamp_, a.timeStamp_); #endif }
timeval EcalMatacqDigi::timeStamp | ( | ) | const [inline] |
Gets the matacq data timestamp with fine granularity (89.1us)
Definition at line 165 of file EcalMatacqDigi.h.
References timeStamp_.
Referenced by MatacqDataFormatter::interpretRawData().
{ return timeStamp_; }
void EcalMatacqDigi::timeStamp | ( | timeval | value | ) | [inline] |
Sets the matcq event timestmap
value | new value |
Definition at line 170 of file EcalMatacqDigi.h.
References timeStamp_, and relativeConstraints::value.
{ timeStamp_ = value; }
void EcalMatacqDigi::triggerType | ( | int | value | ) | [inline] |
Sets type of test trigger
value | new value |
Definition at line 158 of file EcalMatacqDigi.h.
References triggerType_, and relativeConstraints::value.
{ triggerType_ = value; }
int EcalMatacqDigi::triggerType | ( | ) | const [inline] |
Gets type of test trigger
Definition at line 153 of file EcalMatacqDigi.h.
References triggerType_.
Referenced by MatacqDataFormatter::interpretRawData().
{ return triggerType_; }
int EcalMatacqDigi::trigRec | ( | ) | const [inline] |
Gets the Trig Rec value (see Matacq documentation) Available only for Matacq data format version >=3.
Definition at line 187 of file EcalMatacqDigi.h.
References trigRec_.
Referenced by MatacqDataFormatter::interpretRawData().
{ return trigRec_; }
void EcalMatacqDigi::trigRec | ( | int | value | ) | [inline] |
Sets the Trig Rec value (see Matacq documentation)
value | new value |
Definition at line 192 of file EcalMatacqDigi.h.
References trigRec_, and relativeConstraints::value.
float EcalMatacqDigi::ts | ( | ) | const [inline] |
Gets time of sample i. i between 0 and size()-1. Gets sampling time in seconds
Definition at line 93 of file EcalMatacqDigi.h.
References ts_.
{ return ts_;}
float EcalMatacqDigi::tTrig | ( | ) | const [inline] |
Sets sampling time period
ts | sampling time period in seconds Gets time of trigger in seconds. |
Definition at line 107 of file EcalMatacqDigi.h.
References tTrigS_.
Referenced by EcalMatacqAnalyzer::analyze(), and EcalPerEvtMatacqAnalyzer::analyze().
{ return tTrigS_;}
void EcalMatacqDigi::vernier | ( | const std::vector< int > & | value | ) | [inline] |
Sets verniers
value | new value |
Definition at line 212 of file EcalMatacqDigi.h.
References relativeConstraints::value, and vernier_.
std::vector<int> EcalMatacqDigi::vernier | ( | ) | const [inline] |
Gets the vernier values (see Matacq documentation)
Definition at line 207 of file EcalMatacqDigi.h.
References vernier_.
Referenced by MatacqDataFormatter::interpretRawData().
{ return vernier_; }
short EcalMatacqDigi::version | ( | ) | const [inline] |
Sets trigger time position
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. |
Definition at line 120 of file EcalMatacqDigi.h.
References version_.
{return version_;}
char EcalMatacqDigi::attenuation_dB_ [private] |
Logarithmic attenuator setting in -10dB unit. Between 0 and 5*(-10dB), -1 if unknown.
Definition at line 322 of file EcalMatacqDigi.h.
Referenced by attenuation_dB(), init(), and swap().
Short_t EcalMatacqDigi::bxId_ [private] |
Bunch crossing Id
Definition at line 326 of file EcalMatacqDigi.h.
int EcalMatacqDigi::chId_ [private] |
Electronic channel id
Definition at line 291 of file EcalMatacqDigi.h.
std::vector<Short_t> EcalMatacqDigi::data_ [private] |
ADC count of time samples
Definition at line 295 of file EcalMatacqDigi.h.
Referenced by adcCount(), amplitudeV(), size(), and swap().
Int_t EcalMatacqDigi::delayA_ [private] |
"Delay A" setting of laser delay box in ns.
Definition at line 350 of file EcalMatacqDigi.h.
Int_t EcalMatacqDigi::emtcDelay_ [private] |
WTE-to-Laser delay of EMTC in LHC clock unit.
Definition at line 354 of file EcalMatacqDigi.h.
Referenced by emtcDelay(), init(), and swap().
Int_t EcalMatacqDigi::emtcPhase_ [private] |
EMTC laser phase in 1/8th LHC clock unit.
Definition at line 358 of file EcalMatacqDigi.h.
Referenced by emtcPhase(), init(), and swap().
int EcalMatacqDigi::freq [private] |
Frequency mode. 1->1GHz sampling, 2->2GHz sampling
Definition at line 299 of file EcalMatacqDigi.h.
Int_t EcalMatacqDigi::l1a_ [private] |
Int_t EcalMatacqDigi::laserPower_ [private] |
Laser power in percents (set with the linear attenuator).
Definition at line 362 of file EcalMatacqDigi.h.
Referenced by init(), laserPower(), and swap().
const double EcalMatacqDigi::lsb_ = 0.25e-3 [static] |
LSB of ADC count in Volt
Definition at line 21 of file EcalMatacqDigi.h.
Referenced by amplitudeV().
const int EcalMatacqDigi::MAXSAMPLES = 2560 [static] |
Maximum number of time samples
Definition at line 25 of file EcalMatacqDigi.h.
Int_t EcalMatacqDigi::orbitId_ [private] |
Definition at line 334 of file EcalMatacqDigi.h.
Short_t EcalMatacqDigi::postTrig_ [private] |
Posttrig value (see Matacq documentation)
Definition at line 342 of file EcalMatacqDigi.h.
Referenced by init(), postTrig(), and swap().
timeval EcalMatacqDigi::timeStamp_ [private] |
Matacq acquisition time stamp
Definition at line 366 of file EcalMatacqDigi.h.
Referenced by swap(), and timeStamp().
char EcalMatacqDigi::triggerType_ [private] |
Type of test trigger
Definition at line 317 of file EcalMatacqDigi.h.
Referenced by init(), swap(), and triggerType().
Short_t EcalMatacqDigi::trigRec_ [private] |
Trig Rec value (see Matacq documentation)
Definition at line 338 of file EcalMatacqDigi.h.
double EcalMatacqDigi::ts_ [private] |
Sampling period in seconds. In priniciple 1ns or 0.5ns
Definition at line 303 of file EcalMatacqDigi.h.
double EcalMatacqDigi::tTrigS_ [private] |
Trigger time in seconds
Definition at line 307 of file EcalMatacqDigi.h.
std::vector<Int_t> EcalMatacqDigi::vernier_ [private] |
Vernier values (see Matacq documentation)
Definition at line 346 of file EcalMatacqDigi.h.
short EcalMatacqDigi::version_ [private] |
version of raw data format, the digis originate from.
Definition at line 311 of file EcalMatacqDigi.h.