#include <HFDataFrame.h>
Public Types | |
typedef HcalDetId | key_type |
For the sorted collection. | |
Public Member Functions | |
const HcalElectronicsId & | elecId () const |
int | fiberIdleOffset () const |
offset of bunch number for this channel relative to nominal set in the unpacker (range is +7->-7. -1000 indicates the data is invalid/unavailable) | |
HFDataFrame () | |
HFDataFrame (const HcalDetId &id) | |
const HcalDetId & | id () const |
const HcalQIESample & | operator[] (int i) const |
access a sample | |
int | presamples () const |
number of samples before the sample from the triggered beam crossing (according to the hardware) | |
const HcalQIESample & | sample (int i) const |
access a sample | |
void | setFiberIdleOffset (int offset) |
void | setPresamples (int ps) |
void | setReadoutIds (const HcalElectronicsId &eid) |
void | setSample (int i, const HcalQIESample &sam) |
void | setSize (int size) |
void | setZSInfo (bool unsuppressed, bool markAndPass, uint32_t crossingMask=0) |
int | size () const |
total number of samples in the digi | |
bool | validate (int firstSample=0, int nSamples=100) const |
validate appropriate DV and ER bits as well as capid rotation for the specified samples (default is all) | |
uint32_t | zsCrossingMask () const |
zs crossing mask (which sums considered) | |
bool | zsMarkAndPass () const |
was ZS MarkAndPass? | |
bool | zsUnsuppressed () const |
was ZS unsuppressed? | |
Static Public Attributes | |
static const int | MAXSAMPLES = 10 |
Private Attributes | |
HcalQIESample | data_ [MAXSAMPLES] |
HcalElectronicsId | electronicsId_ |
int | hcalPresamples_ |
HcalDetId | id_ |
int | size_ |
Precision readout digi for HF
Definition at line 15 of file HFDataFrame.h.
typedef HcalDetId HFDataFrame::key_type |
For the sorted collection.
Definition at line 17 of file HFDataFrame.h.
HFDataFrame::HFDataFrame | ( | ) |
Definition at line 3 of file HFDataFrame.cc.
: id_(0), size_(0), hcalPresamples_(0) { }
HFDataFrame::HFDataFrame | ( | const HcalDetId & | id | ) | [explicit] |
Definition at line 9 of file HFDataFrame.cc.
: id_(id), size_(0), hcalPresamples_(0) { // TODO : test id for HcalForward }
const HcalElectronicsId& HFDataFrame::elecId | ( | ) | const [inline] |
int HFDataFrame::fiberIdleOffset | ( | ) | const |
offset of bunch number for this channel relative to nominal set in the unpacker (range is +7->-7. -1000 indicates the data is invalid/unavailable)
Definition at line 48 of file HFDataFrame.cc.
References hcalPresamples_.
Referenced by operator<<().
{ int val=(hcalPresamples_&0xF00)>>8; return (val==0)?(-1000):(((val&0x8)==0)?(-(val&0x7)):(val&0x7)); }
const HcalDetId& HFDataFrame::id | ( | void | ) | const [inline] |
Definition at line 22 of file HFDataFrame.h.
References id_.
Referenced by HcalNominalCoder::adc2fC(), HcaluLUTTPGCoder::adc2Linear(), HcalTriggerPrimitiveAlgo::addSignal(), HFLightCalRand::analyze(), HcalPedestalMCWidths::analyze(), HFLightCal::analyze(), HcalPedestalsAnalysis::analyze(), HFPreLightCal::analyze(), HcalPedestalWidthsValidation::analyze(), HcalZSAlgoRealistic::keepMe(), operator<<(), HcalPedestalAnalysis::processEvent(), HcalCoarsePedestalMonitor::processEvent(), HcalBeamMonitor::processEvent(), HcalLedAnalysis::processLedEvent(), and HcalSimpleRecAlgo::reconstruct().
{ return id_; }
const HcalQIESample& HFDataFrame::operator[] | ( | int | i | ) | const [inline] |
int HFDataFrame::presamples | ( | ) | const [inline] |
number of samples before the sample from the triggered beam crossing (according to the hardware)
Definition at line 28 of file HFDataFrame.h.
References hcalPresamples_.
Referenced by HcalNominalCoder::adc2fC(), HcalTriggerPrimitiveAlgo::addSignal(), operator<<(), and HcalSimpleRecAlgo::reconstruct().
{ return hcalPresamples_&0xF; }
const HcalQIESample& HFDataFrame::sample | ( | int | i | ) | const [inline] |
access a sample
Definition at line 39 of file HFDataFrame.h.
Referenced by HcalPedestalMCWidths::analyze(), HcalPedestalsAnalysis::analyze(), HcalPedestalWidthsValidation::analyze(), HcalHFStatusBitFromDigis::hfSetFlagFromDigi(), operator<<(), HcalPedestalAnalysis::processEvent(), HcalCoarsePedestalMonitor::processEvent(), and HcalBeamMonitor::processEvent().
void HFDataFrame::setFiberIdleOffset | ( | int | offset | ) |
Definition at line 53 of file HFDataFrame.cc.
References hcalPresamples_, and evf::evtn::offset().
{ hcalPresamples_&=0x7FFFF0FF; if (offset>=7) hcalPresamples_|=0xF00; else if (offset>=0) hcalPresamples_|=(0x800)|(offset<<8); else if (offset>=-7) hcalPresamples_|=((-offset)<<8); else hcalPresamples_|=0x700; }
void HFDataFrame::setPresamples | ( | int | ps | ) |
Definition at line 22 of file HFDataFrame.cc.
References hcalPresamples_.
{ hcalPresamples_|=ps&0xF; }
void HFDataFrame::setReadoutIds | ( | const HcalElectronicsId & | eid | ) |
void HFDataFrame::setSample | ( | int | i, |
const HcalQIESample & | sam | ||
) | [inline] |
Definition at line 50 of file HFDataFrame.h.
Referenced by HcaluLUTTPGCoder::update().
void HFDataFrame::setSize | ( | int | size | ) |
Definition at line 17 of file HFDataFrame.cc.
References MAXSAMPLES, size(), and size_.
Referenced by HcaluLUTTPGCoder::update().
{ if (size>MAXSAMPLES) size_=MAXSAMPLES; else if (size<=0) size_=0; else size_=size; }
void HFDataFrame::setZSInfo | ( | bool | unsuppressed, |
bool | markAndPass, | ||
uint32_t | crossingMask = 0 |
||
) |
Definition at line 41 of file HFDataFrame.cc.
References hcalPresamples_.
{ hcalPresamples_&=0x7FC00F0F; // preserve actual presamples and fiber idle offset if (markAndPass) hcalPresamples_|=0x10; if (unsuppressed) hcalPresamples_|=0x20; hcalPresamples_|=(crossingMask&0x3FF)<<12; }
int HFDataFrame::size | ( | void | ) | const [inline] |
total number of samples in the digi
Definition at line 26 of file HFDataFrame.h.
References size_.
Referenced by HcalNominalCoder::adc2fC(), HcaluLUTTPGCoder::adc2Linear(), HcalTriggerPrimitiveAlgo::addSignal(), HFLightCalRand::analyze(), HFLightCal::analyze(), HcalPedestalsAnalysis::analyze(), HcalPedestalWidthsValidation::analyze(), HFPreLightCal::analyze(), HcalHFStatusBitFromDigis::hfSetFlagFromDigi(), HcalLedAnalysis::LedHFHists(), operator<<(), HcalPedestalAnalysis::processEvent(), HcalCoarsePedestalMonitor::processEvent(), HcalBeamMonitor::processEvent(), setSize(), and HcalZSAlgoRealistic::shouldKeep().
{ return size_&0xF; }
bool HFDataFrame::validate | ( | int | firstSample = 0 , |
int | nSamples = 100 |
||
) | const |
validate appropriate DV and ER bits as well as capid rotation for the specified samples (default is all)
Definition at line 29 of file HFDataFrame.cc.
References HcalQIESample::capid(), data_, castor_dqm_sourceclient_file_cfg::firstSample, i, convertSQLiteXML::ok, and size_.
{ int capid=-1; bool ok=true; for (int i=0; ok && i<nSamples && i+firstSample<size_; i++) { if (data_[i+firstSample].er() || !data_[i+firstSample].dv()) ok=false; if (i==0) capid=data_[i+firstSample].capid(); if (capid!=data_[i+firstSample].capid()) ok=false; capid=(capid+1)%4; } return ok; }
uint32_t HFDataFrame::zsCrossingMask | ( | ) | const [inline] |
zs crossing mask (which sums considered)
Definition at line 34 of file HFDataFrame.h.
References hcalPresamples_.
Referenced by HcalZSAlgoRealistic::shouldKeep().
{ return (hcalPresamples_&0x3FF000)>>12; }
bool HFDataFrame::zsMarkAndPass | ( | ) | const [inline] |
was ZS MarkAndPass?
Definition at line 30 of file HFDataFrame.h.
References hcalPresamples_.
Referenced by operator<<().
{ return (hcalPresamples_&0x10); }
bool HFDataFrame::zsUnsuppressed | ( | ) | const [inline] |
was ZS unsuppressed?
Definition at line 32 of file HFDataFrame.h.
References hcalPresamples_.
Referenced by operator<<().
{ return (hcalPresamples_&0x20); }
HcalQIESample HFDataFrame::data_[MAXSAMPLES] [private] |
Definition at line 60 of file HFDataFrame.h.
Referenced by operator[](), sample(), setSample(), and validate().
HcalElectronicsId HFDataFrame::electronicsId_ [private] |
Definition at line 57 of file HFDataFrame.h.
Referenced by elecId(), and setReadoutIds().
int HFDataFrame::hcalPresamples_ [private] |
Definition at line 59 of file HFDataFrame.h.
Referenced by fiberIdleOffset(), presamples(), setFiberIdleOffset(), setPresamples(), setZSInfo(), zsCrossingMask(), zsMarkAndPass(), and zsUnsuppressed().
HcalDetId HFDataFrame::id_ [private] |
Definition at line 56 of file HFDataFrame.h.
Referenced by id().
const int HFDataFrame::MAXSAMPLES = 10 [static] |
Definition at line 54 of file HFDataFrame.h.
Referenced by setSize().
int HFDataFrame::size_ [private] |
Definition at line 58 of file HFDataFrame.h.
Referenced by setSize(), size(), and validate().