ATLAS Offline Software
Loading...
Searching...
No Matches
LArRodBlockCalibrationV1 Class Reference

This class provides decoding/encoding from/to ROD format. More...

#include <LArRodBlockCalibrationV1.h>

Inheritance diagram for LArRodBlockCalibrationV1:
Collaboration diagram for LArRodBlockCalibrationV1:

Public Types

enum  {
  NWTot , NWTot_h , FEBID , FEBID_h ,
  FEB_SN , FEB_SN_h , ResultsOff1 , ResultsDim1 ,
  ResultsOff2 , ResultsDim2 , RawDataBlkOff , RawDataBlkDim ,
  EventStatus , EventStatus_h , NGains , NSamples ,
  FebConfig , FebConfig_h , InFPGAFormat , InFPGAFormat_h
}
enum  {
  NTrigger , NTrigger_h , Dac , Dac_h ,
  Delay , Delay_h , IsPulsed , IsPulsed1 ,
  IsPulsed2 , IsPulsed3 , IsPulsed4 , IsPulsed5 ,
  IsPulsed6 , IsPulsed7 , feb_ssw , feb_ssw1 ,
  feb_ssw2 , feb_ssw3 , feb_ssw4 , feb_ssw5 ,
  feb_ssw6 , feb_ssw7 , endtag
}

Public Member Functions

 LArRodBlockCalibrationV1 ()
std::string BlockType ()
virtual uint8_t getTDCPhase () const
virtual int getNextRawData (int &channelNumber, std::vector< short > &samples, uint32_t &gain)
virtual int getNextAccumulatedCalibDigit (int &channelNumber, std::vector< std::vector< uint32_t > > &samplesSum, std::vector< std::vector< uint32_t > > &samples2Sum, uint32_t &iStepTrigger, uint32_t &gain)
virtual uint32_t getNumberOfSamples () const
virtual uint32_t getNumberOfGains () const
virtual uint32_t getRadd (uint32_t adc, uint32_t sample) const
virtual uint16_t getCtrl1 (uint32_t adc) const
virtual uint16_t getCtrl2 (uint32_t adc) const
virtual uint16_t getCtrl3 (uint32_t adc) const
virtual uint32_t getStatus () const
virtual uint32_t hasCalibBlock () const
virtual uint32_t hasPhysicsBlock () const
virtual uint32_t hasRawDataBlock () const
virtual uint32_t hasControlWords () const
uint16_t getNTrigger () const
uint16_t getDAC () const
uint16_t getDelay () const
uint32_t getFebConfig () const
bool getPulsed (const unsigned channelNumber) const
virtual bool canSetCalibration ()
virtual int getNextAccumulatedCalibDigit (int &channelNumber, std::vector< uint64_t > &SamplesSum, std::vector< uint64_t > &Samples2Sum, uint32_t &nStepTriggers, uint32_t &gain)
virtual void initializeFragment (std::vector< uint32_t > &fragment)
virtual void initializeFEB (const uint32_t id)
virtual void setNumberOfSamples (const uint8_t n)
virtual void setNumberOfGains (const uint8_t n)
virtual void setTDCPhase (const uint8_t n)
virtual void setNextEnergy (const int channel, const int32_t energy, const int32_t time, const int32_t quality, const uint32_t gain)
virtual void setRawData (const int channel, const std::vector< short > &samples, const uint32_t gain)
virtual void setRawDataFixed (const int channel, const std::vector< short > &samples, const uint32_t gain)
virtual void setEtQ (const int channel, const int32_t energy, const int32_t time, const int32_t quality, const uint32_t gain)
virtual void setDAC (const uint16_t DACValue)
virtual void setDelay (const uint16_t DelayValue)
virtual void setPulsed (const unsigned channelNumber)
virtual void setNTrigger (const uint16_t NTrigger)
virtual void finalizeFEB ()
virtual void setEx (double)
virtual void setEy (double)
virtual void setEz (double)
virtual void setSumE (double)
virtual void sortDataVector (std::vector< const LArRawChannel * > &)
virtual void sortDataVector (std::vector< const LArDigit * > &)
virtual void sortDataVector (std::vector< const LArCalibDigit * > &)
virtual void sortDataVector (std::vector< const LArAccumulatedCalibDigit * > &)
virtual void sortDataVector (std::vector< const LArAccumulatedDigit * > &)
virtual void concatinateFEBs ()
virtual bool canSetEnergy ()
virtual bool canSetRawData ()
virtual bool canSetRawDataFixed ()
virtual bool canSetNTrigger ()
virtual bool canIncludeRawData ()
bool setFragment (const uint32_t *p, uint32_t n)
bool nextFEB ()
uint32_t getNumberOfWords () const
uint32_t getFEBID () const
uint32_t getFEBSN () const
virtual int32_t getEx () const
virtual int32_t getEy () const
virtual int32_t getEz () const
virtual int32_t getSumE () const
virtual uint32_t getVROBFebId ()
virtual int32_t getVROBEx () const
virtual int32_t getVROBEy () const
virtual int32_t getVROBEz () const
virtual int32_t getVROBSumE () const
virtual uint32_t hasAccumBlock () const
virtual int getNextEnergy (int &channelNumber, int32_t &energy, int32_t &time, int32_t &quality, uint32_t &gain)
virtual int getNextAccumulatedDigit (int &channelNumber, std::vector< uint64_t > &SamplesSum, std::vector< uint64_t > &corr2Sum, uint32_t &gain)
virtual uint16_t getStepIndex () const
virtual uint16_t getNStep () const
virtual int setGain (const int GainValue)
virtual uint16_t getResults1Size () const
virtual uint16_t getResults2Size () const
virtual uint16_t getRawDataSize () const
virtual uint16_t getNbSweetCells1 () const
virtual uint16_t getNbSweetCells2 () const
virtual uint32_t getDspCodeVersion () const
virtual int32_t getDspEventCounter () const
virtual uint32_t onlineCheckSum () const
virtual uint32_t offlineCheckSum () const
virtual int setFragmentVirtualROB (const uint32_t *p, uint32_t n)
virtual void dumpFragment ()
void setFirstSample (const int rearrangeFirstSample)
uint32_t RawToOfflineGain (const uint32_t gain) const
uint32_t OfflineToRawGain (const uint32_t gain) const
virtual int FebToRodChannel (int ch) const
bool report_error (void) const

Protected Types

enum  {
  NWTot , NWTot_h , FEBID , FEBID_h ,
  FEBSN , FEBSN_h , endtag
}
typedef std::map< uint32_t, std::vector< uint32_t > > FEBMAPTYPE

Protected Member Functions

void setHeader16 (const unsigned n, const uint16_t w)
void setHeader32 (const unsigned n, const uint32_t w)
virtual bool setPointers ()
uint16_t getVectorHeader16 (const unsigned n) const
uint32_t getVectorHeader32 (const unsigned n) const
uint16_t getHeader16 (const unsigned n) const
uint32_t getHeader32 (const unsigned n) const
uint16_t LE_getHeader16 (const unsigned n) const
void LE_setHeader16 (const unsigned n, const uint16_t w)
uint16_t LE_getVectorHeader16 (const unsigned n) const
void setBit (uint32_t *const p, const unsigned chan)
int getBit (const uint32_t *const p, const unsigned chan) const

Protected Attributes

int32_t m_Ex
int32_t m_Ey
int32_t m_Ez
int32_t m_SumE
uint32_t m_numberOfEx
uint32_t m_numberOfEy
uint32_t m_numberOfEz
uint32_t m_numberOfSumE
unsigned short m_iHeadBlockSize
int m_channelsPerFEB
const uint32_t * m_FebBlock
const uint32_t * m_RodBlock
int32_t m_FebBlockSize
int32_t m_RodBlockSize
std::vector< uint32_t > * m_vFragment
std::vector< uint32_t > * m_pRODblock
FEBMAPTYPE m_mFebBlocks
int32_t m_MiddleHeaderSize
unsigned int m_rearrangeFirstSample
bool m_error_next_feb
uint32_t m_virtualROBJump
int32_t m_ROB_to_decode
const uint32_t * m_virtualROBPointer
const uint32_t * m_virtualROBPointerLocal

Static Protected Attributes

static const uint32_t m_RawToOfflineGainMap [4] ={0, 2, 1,0}
static const uint32_t m_OfflineToRawGainMap [3] ={3,2,1}

Private Member Functions

void clearBlocks ()
virtual void resetPointers ()

Private Attributes

std::vector< uint32_t > m_RawDataBlock
int m_Result1Counter = 0
int m_Result1Index = 0
int m_Result2Counter = 0
int m_Result2Index = 0
int m_RawDataCounter = 0
int m_RawDataIndex = 0
int m_fixedGain

Detailed Description

This class provides decoding/encoding from/to ROD format.

Authors
W. Lampl, R. Lafaye
Version
0-0-1 , Jul 17, 2003

Modified, 04.01.2006, IWS new format with averages

Definition at line 21 of file LArRodBlockCalibrationV1.h.

Member Typedef Documentation

◆ FEBMAPTYPE

typedef std::map<uint32_t, std::vector<uint32_t> > LArRodBlockStructure::FEBMAPTYPE
protectedinherited

Definition at line 233 of file LArRodBlockStructure.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
NWTot 
NWTot_h 
FEBID 
FEBID_h 
FEB_SN 
FEB_SN_h 
ResultsOff1 
ResultsDim1 
ResultsOff2 
ResultsDim2 
RawDataBlkOff 
RawDataBlkDim 
EventStatus 
EventStatus_h 
NGains 
NSamples 
FebConfig 
FebConfig_h 
InFPGAFormat 
InFPGAFormat_h 

Definition at line 25 of file LArRodBlockCalibrationV1.h.

25 {
26 NWTot, // First words: DSP event header
27 NWTot_h,
28 FEBID,
29 FEBID_h,
30 FEB_SN, // FEB serial number
31 FEB_SN_h, // FEB serial number
32 ResultsOff1, // Size of results (Calibration averages in DSP)
33 ResultsDim1, // Offset to results
34 ResultsOff2, // Size of times (in physics)
35 ResultsDim2, // Offset to times (in physics)
37 RawDataBlkDim, // Raw FEB event offset
38 EventStatus, // Bits describing the event
40 NGains,
41 NSamples,
44 InFPGAFormat, // added 08.09.2005 - wrong 28.09.2005?
46 };

◆ anonymous enum

anonymous enum
Enumerator
NTrigger 
NTrigger_h 
Dac 
Dac_h 
Delay 
Delay_h 
IsPulsed 
IsPulsed1 
IsPulsed2 
IsPulsed3 
IsPulsed4 
IsPulsed5 
IsPulsed6 
IsPulsed7 
feb_ssw 
feb_ssw1 
feb_ssw2 
feb_ssw3 
feb_ssw4 
feb_ssw5 
feb_ssw6 
feb_ssw7 
endtag 

Definition at line 47 of file LArRodBlockCalibrationV1.h.

47 {
50 Dac,
51 Dac_h,
52 Delay,
53 Delay_h,
62 feb_ssw,
70 endtag //This tag needs to be an odd number, see *) for constructor
71 };

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
NWTot 
NWTot_h 
FEBID 
FEBID_h 
FEBSN 
FEBSN_h 
endtag 

Definition at line 51 of file LArRodBlockStructure.h.

51 {
52 NWTot, // Number of words in DSP block
53 NWTot_h,
54 FEBID, // FEB ID
55 FEBID_h,
56 FEBSN, // FEB Serial Number
57 FEBSN_h,
58 endtag // This tag needs to be an odd number, see *) for constructor
59 };

Constructor & Destructor Documentation

◆ LArRodBlockCalibrationV1()

LArRodBlockCalibrationV1::LArRodBlockCalibrationV1 ( )

Member Function Documentation

◆ BlockType()

std::string LArRodBlockCalibrationV1::BlockType ( )
inline

Definition at line 76 of file LArRodBlockCalibrationV1.h.

76{ return std::string("RodBlockCalibrationV1");}

◆ canIncludeRawData()

virtual bool LArRodBlockStructure::canIncludeRawData ( )
inlinevirtualinherited

Reimplemented in LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 101 of file LArRodBlockStructure.h.

101{return false;}

◆ canSetCalibration()

virtual bool LArRodBlockCalibrationV1::canSetCalibration ( )
inlinevirtual

Reimplemented from LArRodBlockStructure.

Definition at line 129 of file LArRodBlockCalibrationV1.h.

129{return false;}

◆ canSetEnergy()

virtual bool LArRodBlockStructure::canSetEnergy ( )
inlinevirtualinherited

◆ canSetNTrigger()

virtual bool LArRodBlockStructure::canSetNTrigger ( )
inlinevirtualinherited

Definition at line 100 of file LArRodBlockStructure.h.

100{return false;}

◆ canSetRawData()

virtual bool LArRodBlockStructure::canSetRawData ( )
inlinevirtualinherited

◆ canSetRawDataFixed()

virtual bool LArRodBlockStructure::canSetRawDataFixed ( )
inlinevirtualinherited

Reimplemented in LArRodBlockTransparentV0< DSPHEADER >.

Definition at line 98 of file LArRodBlockStructure.h.

98{return false;}

◆ clearBlocks()

void LArRodBlockCalibrationV1::clearBlocks ( )
private

Definition at line 33 of file LArRodBlockCalibrationV1.cxx.

34{
35 m_RawDataBlock.clear();
36}
std::vector< uint32_t > m_RawDataBlock

◆ concatinateFEBs()

void LArRodBlockStructure::concatinateFEBs ( )
virtualinherited

Reimplemented in LArRodBlockPhysicsV0, LArRodBlockPhysicsV1, LArRodBlockPhysicsV2, LArRodBlockPhysicsV3, LArRodBlockPhysicsV5, LArRodBlockPhysicsV6, and LArRodBlockTransparentV0< DSPHEADER >.

Definition at line 81 of file LArRodBlockStructure.cxx.

82{
83 std::cout << "Error: Function concatinateFEBs not implemented in this instance of LArRodBlockStructure!\n";
84 return;
85}

◆ dumpFragment()

void LArRodBlockStructure::dumpFragment ( )
virtualinherited

Definition at line 175 of file LArRodBlockStructure.cxx.

176{
177 std::cout << "Error: Function dumpFragment() not implemented in this instance of LArRodBlockStructure!\n";
178 return;
179}

◆ FebToRodChannel()

virtual int LArRodBlockStructure::FebToRodChannel ( int ch) const
inlinevirtualinherited

◆ finalizeFEB()

void LArRodBlockStructure::finalizeFEB ( )
virtualinherited

Reimplemented in LArRodBlockPhysicsV0, LArRodBlockPhysicsV1, LArRodBlockPhysicsV2, LArRodBlockPhysicsV3, LArRodBlockPhysicsV5, LArRodBlockPhysicsV6, and LArRodBlockTransparentV0< DSPHEADER >.

Definition at line 194 of file LArRodBlockStructure.cxx.

195{
196 std::cout << "Error: Function finalizeFEB not implemented in this instance of LArRodBlockStructure!\n";
197 return;
198}

◆ getBit()

int LArRodBlockStructure::getBit ( const uint32_t *const p,
const unsigned chan ) const
inlineprotectedinherited

Definition at line 433 of file LArRodBlockStructure.h.

434{// chan = (0,127)
435 // int a = chan/32;
436 // int r = chan%32;
437 int a = chan>>5;
438 int r = chan&0x1f;
439 // a = (0,3), r = ( 0, 31 )
440 return (*(p+a)>>r) & 0x1;
441}
static Double_t a
int r
Definition globals.cxx:22

◆ getCtrl1()

uint16_t LArRodBlockCalibrationV1::getCtrl1 ( uint32_t adc) const
virtual

Reimplemented from LArRodBlockStructure.

Definition at line 320 of file LArRodBlockCalibrationV1.cxx.

321{
324 if(adc&0x1) x=x>>16;
325 else x=x&0xffff;
326 uint16_t ctrl=x;
327 return ctrl;
328 /*
329 int index=getHeader16(RawDataBlkOff)-16;
330 uint32_t x=m_FebBlock[index];
331 if(adc&0x1) return x>>16;
332 return x&0xffff;
333 */
334}
#define x
uint16_t getHeader16(const unsigned n) const
str index
Definition DeMoScan.py:362
setWord1 uint16_t
setEventNumber uint32_t

◆ getCtrl2()

uint16_t LArRodBlockCalibrationV1::getCtrl2 ( uint32_t adc) const
virtual

Reimplemented from LArRodBlockStructure.

Definition at line 336 of file LArRodBlockCalibrationV1.cxx.

337{
340 if(adc&0x1) x=x>>16;
341 else x=x&0xffff;
342 uint16_t ctrl=x;
343 return ctrl;
344 /*
345 int index=getHeader16(RawDataBlkOff)-8 ;
346 uint32_t x=m_FebBlock[index];
347 if(adc&0x1) return x>>16;
348 return x&0xffff;
349 */
350}

◆ getCtrl3()

uint16_t LArRodBlockCalibrationV1::getCtrl3 ( uint32_t adc) const
virtual

Reimplemented from LArRodBlockStructure.

Definition at line 352 of file LArRodBlockCalibrationV1.cxx.

353{
355 int ngains=getHeader16(NGains);
356 int offset=nsamples*(8+64*ngains)+adc/2;
359 if(adc&0x1) x=x>>16;
360 else x=x&0xffff;
361 uint16_t ctrl=x;
362 return ctrl;
363 /*
364 int index=getHeader16(RawDataBlkOff)-3;
365 uint32_t x=m_FebBlock[index];
366 x=x>>16;
367 uint16_t ctrl=x;
368 return ctrl;
369 */
370}

◆ getDAC()

uint16_t LArRodBlockCalibrationV1::getDAC ( ) const
inlinevirtual

Reimplemented from LArRodBlockStructure.

Definition at line 288 of file LArRodBlockCalibrationV1.cxx.

289{
292 return (uint16_t) x;
293}

◆ getDelay()

uint16_t LArRodBlockCalibrationV1::getDelay ( ) const
inlinevirtual

Reimplemented from LArRodBlockStructure.

Definition at line 295 of file LArRodBlockCalibrationV1.cxx.

296{
299 return (uint32_t) x;
300}

◆ getDspCodeVersion()

uint32_t LArRodBlockStructure::getDspCodeVersion ( ) const
virtualinherited

Definition at line 258 of file LArRodBlockStructure.cxx.

259{
260 int i=getNumberOfWords()-2;
261 return m_FebBlock[i];
262}
uint32_t getNumberOfWords() const

◆ getDspEventCounter()

int32_t LArRodBlockStructure::getDspEventCounter ( ) const
virtualinherited

Definition at line 264 of file LArRodBlockStructure.cxx.

265{
266 int i=getNumberOfWords()-1;
267 return m_FebBlock[i];
268}

◆ getEx()

int32_t LArRodBlockStructure::getEx ( ) const
inlinevirtualinherited

Reimplemented in LArRodBlockPhysicsV3, LArRodBlockPhysicsV4, LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 303 of file LArRodBlockStructure.h.

303 {
304 return 0;
305}

◆ getEy()

int32_t LArRodBlockStructure::getEy ( ) const
inlinevirtualinherited

Reimplemented in LArRodBlockPhysicsV3, LArRodBlockPhysicsV4, LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 307 of file LArRodBlockStructure.h.

307 {
308 return 0;
309}

◆ getEz()

int32_t LArRodBlockStructure::getEz ( ) const
inlinevirtualinherited

Reimplemented in LArRodBlockPhysicsV3, LArRodBlockPhysicsV4, LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 311 of file LArRodBlockStructure.h.

311 {
312 return 0;
313}

◆ getFebConfig()

uint32_t LArRodBlockCalibrationV1::getFebConfig ( ) const
inline

Definition at line 133 of file LArRodBlockCalibrationV1.h.

134{
135 return getHeader32(FebConfig);
136}
uint32_t getHeader32(const unsigned n) const

◆ getFEBID()

uint32_t LArRodBlockStructure::getFEBID ( ) const
inlineinherited

Definition at line 297 of file LArRodBlockStructure.h.

298{return getHeader32(FEBID);}

◆ getFEBSN()

uint32_t LArRodBlockStructure::getFEBSN ( ) const
inlineinherited

Definition at line 300 of file LArRodBlockStructure.h.

301{return getHeader32(FEBSN);}

◆ getHeader16()

uint16_t LArRodBlockStructure::getHeader16 ( const unsigned n) const
inlineprotectedinherited

Definition at line 355 of file LArRodBlockStructure.h.

356{
357 // std::cout << "getHeader16: " << m_FebBlock << " " << m_FebBlock[5] << " "
358 // << n << " " << (n>>1) << " " << (m_FebBlock[5]&0xffff) << std::endl;
359 if (n&0x1) //n is a odd number
360 return m_FebBlock[n>>1] & 0xffff; //1,3,5... are fetched from lower bits
361 else //n is a even number
362 return m_FebBlock[n>>1] >> 16; //0,2,4... are fetched from higher bits
363}

◆ getHeader32()

uint32_t LArRodBlockStructure::getHeader32 ( const unsigned n) const
inlineprotectedinherited

Definition at line 365 of file LArRodBlockStructure.h.

366{return m_FebBlock[n>>1];}

◆ getNbSweetCells1()

uint16_t LArRodBlockStructure::getNbSweetCells1 ( ) const
virtualinherited

Reimplemented in LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 255 of file LArRodBlockStructure.cxx.

255{ return 0; }

◆ getNbSweetCells2()

uint16_t LArRodBlockStructure::getNbSweetCells2 ( ) const
virtualinherited

Reimplemented in LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 256 of file LArRodBlockStructure.cxx.

256{ return 0; }

◆ getNextAccumulatedCalibDigit() [1/2]

int LArRodBlockCalibrationV1::getNextAccumulatedCalibDigit ( int & channelNumber,
std::vector< std::vector< uint32_t > > & samplesSum,
std::vector< std::vector< uint32_t > > & samples2Sum,
uint32_t & iStepTrigger,
uint32_t & gain )
virtual

Definition at line 149 of file LArRodBlockCalibrationV1.cxx.

150{
151#ifdef LARBSDBGOUTPUT
152 MsgStream logstr(Athena::getMessageSvc(), BlockType());
153#endif
154 //Debug output
155 LARBSDBG("GetAccumulatedCalibDigits for FEB 0x" << MSG::hex <<
156 (uint32_t)getHeader32(FEBID) << MSG::dec << "iStepTriggers=" << iStepTriggers);
157 LARBSDBG("m_Result1Counter" << m_Result1Counter << " m_Result1Index="<< m_Result1Index
158 << " m_channelsPerFEB=" << m_channelsPerFEB);
159 LARBSDBG("requested gain= " << m_fixedGain);
160 if (m_Result1Counter>=m_channelsPerFEB) { //Already beyond maximal number of channels
161 LARBSDBG("Maximum number of channels reached");
162 return 0;
163 }
164 const uint16_t block = getHeader16(ResultsOff1);//Position of the AccumulatedCalibDigits FEB data block
165 if (!block) { //Block does not exist
166 LARBSDBG("No Accumulated Calib Digit Block in this FEB");
167 // std::cout << "index= " << ResultsOff1 << "word= " << getHeader16(ResultsOff1) << std::endl;
168 return 0;
169 }
170 //The m_Result1Channel keeps track of the last read channel
171 //std::cout << "endtag=" << endtag << " m_iHeadBlockSize=" << m_iHeadBlockSize << std::endl;
172
173 // Get next channel
174 channelNumber=m_Result1Counter;
175 uint32_t febgain=0;
176 // This is just for fun; these data are not stored here but in RodBlockDecoder.cxx
177 // IWS 08.08.2005 This part is useless in fact - just for debugging
178 const unsigned int nsamples = getHeader16(NSamples);
179 const unsigned int ngains = getHeader16(NGains);
180 const unsigned int ntriggers = (int) getNTrigger();
181 const unsigned int dac = (int) getDAC();
182 const unsigned int delay = (int) getDelay();
183 // const unsigned int nStepTriggers = (int) getnStepTriggers();
184 unsigned int nStepTriggers = 1;
185 const unsigned int FebConfig = (int) getFebConfig();
186 LARBSDBG("This FEB has " << nsamples << " samples");
187 LARBSDBG("This FEB has " << ngains << " gains");
188 LARBSDBG("This FEB has " << ntriggers << " ntriggers");
189 LARBSDBG("This FEB has " << dac << " dac");
190 LARBSDBG("This FEB has " << delay << " delay");
191 LARBSDBG("This FEB has " << std::hex << FebConfig << " FebConfig");
192 if(ngains==0 || nsamples==0) return 0;
193 // IWS 11.01.2006 book vectors
194 if(!iStepTriggers)
195 {
196 samplesSum.resize(nStepTriggers);
197 samples2Sum.resize(nStepTriggers);
198 }
199 // Loop over gains to look for m_fixedGain
200 //unsigned int this_gain=0;
201 int offset;
202 uint32_t x,x2;
203 if (m_fixedGain!=CaloGain::LARNGAIN) { //Fixed gain: Search for gain
204 if(FebConfig==0) // free gain - dontknow what to do
205 {
206 LARBSDBG("free gain - dont know what to do Accumulated Calib Digit - return 0");
207 return 0;
208 }
209 else if(FebConfig <4 ) // one fixed gain
210 {
211 febgain=FebConfig;
212 }
213 else if ((FebConfig>3) && (FebConfig<10)) // two gains - not yet ready
214 {
215 LARBSDBG("two gains - dont know what to do yet in Accumulated Calib Digit - return 0");
216 return 0;
217 }
218 else if (FebConfig>9) // three gains - not yet ready
219 {
220 LARBSDBG("three gains - dont know what to do yet in Accumulated Calib Digit - return 0");
221 return 0;
222 }
223 }
224 else
225 {
226 febgain=FebConfig&0x3; // to be done better when this is better understood
227 }
228
229 // nsamples*2 for Sum + Sum2
230 // 11 is the size of the calibration header
231 offset=block + 11 + (channelNumber&0x7F)*(nsamples*2); // needs to be updated for loop on gains
233
234 /*
235 if(dac==3000)
236 {
237 std::cout << "Chid" << channelNumber << " offset= " << std::dec << offset << std::endl;
238 for(int i=0; i<50; i++)
239 {
240 std::cout << " i= " << std::dec << i <<" x=" << std::hex << m_FebBlock[block+i] << std::endl;
241 }
242 }
243 */
244 /*
245 float * pfloat;
246 pfloat = (float *) &m_FebBlock[index];
247 */
248 for (unsigned int i=0;i<nsamples;i++)
249 {
250 /*
251 x = *pfloat++;
252 x2 = *pfloat++;
253 */
256
257 samplesSum[iStepTriggers].push_back(x);
258 samples2Sum[iStepTriggers].push_back(x2);
259 // std::cout << "isample=" << i << " x= " << std::hex << x << " x2=" << std::hex << x2 << std::endl;
260 index+=2;
261 }
262
263 gain=RawToOfflineGain(febgain);
264
266 return 1;
267}
double delay(std::size_t d)
#define LARBSDBG(text)
This class provides decoding/encoding from/to ROD format.
uint32_t RawToOfflineGain(const uint32_t gain) const
IMessageSvc * getMessageSvc(bool quiet=false)

◆ getNextAccumulatedCalibDigit() [2/2]

int LArRodBlockStructure::getNextAccumulatedCalibDigit ( int & channelNumber,
std::vector< uint64_t > & SamplesSum,
std::vector< uint64_t > & Samples2Sum,
uint32_t & nStepTriggers,
uint32_t & gain )
virtual

Reimplemented from LArRodBlockStructure.

Definition at line 130 of file LArRodBlockStructure.cxx.

95{
96 std::cout << "Error: Function getNextAccumulatedCalibDigit not implemented in this instance of LArRodBlockStructure!\n";
97 return 0;
98}

◆ getNextAccumulatedDigit()

int LArRodBlockStructure::getNextAccumulatedDigit ( int & channelNumber,
std::vector< uint64_t > & SamplesSum,
std::vector< uint64_t > & corr2Sum,
uint32_t & gain )
virtualinherited

Reimplemented in LArRodBlockAccumulatedV3.

Definition at line 100 of file LArRodBlockStructure.cxx.

101{
102 std::cout << "Error: Function getNextAccumulatedDigit not implemented in this instance of LArRodBlockStructure!\n";
103 return 0;
104}

◆ getNextEnergy()

int LArRodBlockStructure::getNextEnergy ( int & channelNumber,
int32_t & energy,
int32_t & time,
int32_t & quality,
uint32_t & gain )
inlinevirtualinherited

Reimplemented in LArRodBlockPhysicsV0, LArRodBlockPhysicsV1, LArRodBlockPhysicsV2, LArRodBlockPhysicsV3, LArRodBlockPhysicsV4, LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 456 of file LArRodBlockStructure.h.

457{
458 std::cout << "Error: Function getNextEnergy not implemented in this instance of LArRodBlockStructure!\n";
459 return 0;
460}

◆ getNextRawData()

int LArRodBlockCalibrationV1::getNextRawData ( int & channelNumber,
std::vector< short > & samples,
uint32_t & gain )
virtual

Reimplemented from LArRodBlockStructure.

Definition at line 58 of file LArRodBlockCalibrationV1.cxx.

59{
60#ifdef LARBSDBGOUTPUT
61 MsgStream logstr(Athena::getMessageSvc(), BlockType());
62#endif
63 //Debug output
64 /*
65 LARBSDBG("GetNextRawData for FEB 0x" << MSG::hex << (uint32_t)getHeader32(FEBID) << MSG::dec);
66 LARBSDBG("m_RawDataCounter=" << m_RawDataCounter << " m_RawDataIndex="<< m_RawDataIndex
67 << " m_channelsPerFEB=" << m_channelsPerFEB);
68 LARBSDBG("requested gain= " << m_fixedGain);
69 */
70 if (m_RawDataCounter>=m_channelsPerFEB) { //Already beyond maximal number of channels
71 LARBSDBG("Maximum number of channels reached");
72 return 0;
73 }
74 //const uint16_t block = getHeader16(m_RawDataOff);//Position of the raw FEB data block
75 const uint16_t block = getHeader16(RawDataBlkOff);
76 if (!block) { //Block does not exist
77 LARBSDBG("No Raw Data Block in this FEB");
78 return 0;
79 }
80 //The m_RawDataChannel keeps track of the last read channel
81 //std::cout << "endtag=" << endtag << " m_iHeadBlockSize=" << m_iHeadBlockSize << std::endl;
82
83 // Get next channel
84 channelNumber=m_RawDataCounter;
85 uint32_t febgain;
86 const unsigned int nsamples = getHeader16(NSamples) & 0xff;
87 const unsigned int ngains = getHeader16(NGains);
88 /*
89 LARBSDBG("This FEB has " << nsamples << " samples");
90 LARBSDBG("This FEB has " << ngains << " gains");
91 */
92 if(ngains==0 || nsamples==0) return 0;
93 // Loop over gains to look for m_fixedGain
94 unsigned int this_gain=0;
95 int offset;
96 LARBSDBG(" ===> fixedGain= " << m_fixedGain << " CaloGain = " << CaloGain::LARNGAIN);
97 if (m_fixedGain!=CaloGain::LARNGAIN) { //Fixed gain: Search for gain
98 offset=block + 8 + ((channelNumber&0x3F)>>3) + ((channelNumber & 0x7)<<3);
99 for(this_gain=0;this_gain<ngains;this_gain++) {
100 int index = offset + 64*this_gain;
102 if(channelNumber>=64)
103 x = (x & 0x3000) >> 12;
104 else
105 x = (x & 0x30000000) >> 28;
106 int data_gain = RawToOfflineGain(x);
107 if(data_gain==m_fixedGain) break;
108 }
109 }
110 if (this_gain<ngains) { //Gain found in this fragment
111 int s_size = 8 + 64 * ngains; // Size of one sample block 16 RADD of 16 bit + 128 channels (16 bit data)
112 offset = block + 8 + ((channelNumber&0x3F)>>3) + ((channelNumber & 0x7)<<3) + 64*this_gain;
113 int index = offset;
115 if(channelNumber>=64) { //low channels on lower bits
116 // First decode gain
117 febgain = (x & 0x3000) >> 12; // gain on bits 12 and 13
118 // Than samples
119 for(unsigned int s=0;s<nsamples;s++) {
120 index = offset + s*s_size;
121 x = m_FebBlock[index];
122 // if((s==0) && (channelNumber==64)) std::cout << "===> " << std::dec << channelNumber << " " << (x&0xfff) << " " << std::endl;
123 samples.push_back((short) (x & 0x0fff)); // sample on bits 0 to 11
124 }
125 } else { //high channels on higher bits
126 // First decode gain
127 febgain = (x & 0x30000000) >> 28; // gain on bits 12 and 13
128 // Than samples
129 for(unsigned int s=0;s<nsamples;s++) {
130 index = offset + s*s_size;
131 x = (m_FebBlock[index]) >> 16;
132 samples.push_back((short) (x & 0x0fff)); // sample on bits 0 to 11
133 }
134 }
135 gain=RawToOfflineGain(febgain);
136 }
137 //std::cout << "Gain= " << gain << " Febgain=" << febgain << std::endl;
139 if (m_rearrangeFirstSample && m_rearrangeFirstSample<samples.size()) //FIXME: Very ugly hack! See explanation in LArRodDecoder.h file
140 {//Change e.g. 3 0 1 2 4 to 0 1 2 3 4
141 short movedSample=samples[0];
142 for (unsigned i=1;i<=m_rearrangeFirstSample;i++)
143 samples[i-1]=samples[i];
144 samples[m_rearrangeFirstSample]=movedSample;
145 }
146 LARBSDBG("GetNextRawData for FEB finished 0x" << MSG::hex << (uint32_t)getHeader32(FEBID) << MSG::dec);
147 return 1;
148}

◆ getNStep()

uint16_t LArRodBlockStructure::getNStep ( ) const
inlinevirtualinherited

Reimplemented in LArRodBlockAccumulatedV3, and LArRodBlockCalibrationV3.

Definition at line 491 of file LArRodBlockStructure.h.

492{
493 std::cout << "Error: Function getNStep not implemented in this instance of LArRodBlockStructure!\n";
494 return 0;
495}

◆ getNTrigger()

uint16_t LArRodBlockCalibrationV1::getNTrigger ( ) const
inlinevirtual

Reimplemented from LArRodBlockStructure.

Definition at line 280 of file LArRodBlockCalibrationV1.cxx.

281{
282
285 return (uint16_t) x;
286}

◆ getNumberOfGains()

uint32_t LArRodBlockCalibrationV1::getNumberOfGains ( ) const
virtual

Reimplemented from LArRodBlockStructure.

Definition at line 275 of file LArRodBlockCalibrationV1.cxx.

276{
277 return getHeader16(NGains);
278}

◆ getNumberOfSamples()

uint32_t LArRodBlockCalibrationV1::getNumberOfSamples ( ) const
virtual

Reimplemented from LArRodBlockStructure.

Definition at line 270 of file LArRodBlockCalibrationV1.cxx.

271{
272 return getHeader16(NSamples);
273}

◆ getNumberOfWords()

uint32_t LArRodBlockStructure::getNumberOfWords ( ) const
inlineinherited

Definition at line 428 of file LArRodBlockStructure.h.

429{
430 return getHeader32(NWTot);
431}

◆ getPulsed()

bool LArRodBlockCalibrationV1::getPulsed ( const unsigned channelNumber) const
inlinevirtual

Reimplemented from LArRodBlockStructure.

Definition at line 138 of file LArRodBlockCalibrationV1.h.

139{
141 //std::cout << " ===> in getPulsed " << std::hex << (m_FebBlock[index+IsPulsed/2]) << " " << (m_FebBlock[index+(IsPulsed/2+1)]) << " " << (m_FebBlock[index+(IsPulsed/2+2)]) << " " << (m_FebBlock[index+(IsPulsed/2+3)]) << " " << std::dec << channelNumber << " i=" << i << " ii=" << ii << std::endl;
142 return getBit(m_FebBlock+index+IsPulsed/2,channelNumber);
143}
int getBit(const uint32_t *const p, const unsigned chan) const

◆ getRadd()

uint32_t LArRodBlockCalibrationV1::getRadd ( uint32_t adc,
uint32_t sample ) const
virtual

Reimplemented from LArRodBlockStructure.

Definition at line 309 of file LArRodBlockCalibrationV1.cxx.

310{
313 if(index<=0) return 0;
314 index+=(8+64*ngain)*sample+adc/2;
316 if(adc&0x1) return x>>16;
317 return x&0xffff;
318}

◆ getRawDataSize()

uint16_t LArRodBlockStructure::getRawDataSize ( ) const
virtualinherited

◆ getResults1Size()

uint16_t LArRodBlockStructure::getResults1Size ( ) const
virtualinherited

◆ getResults2Size()

uint16_t LArRodBlockStructure::getResults2Size ( ) const
virtualinherited

◆ getStatus()

uint32_t LArRodBlockCalibrationV1::getStatus ( ) const
virtual

Reimplemented from LArRodBlockStructure.

Definition at line 372 of file LArRodBlockCalibrationV1.cxx.

373{
374 // Old version: get Dsp status word
375 // if(getNumberOfWords()<EventStatus/2) return 0;
376 // uint32_t x=getHeader32(EventStatus);
377 // return x;
378
379 // New verion: get Rod status word
381 int ngains = getHeader16(NGains);
382 int offset = nsamples*(8+64*ngains)+8;
385 return x;
386
387}

◆ getStepIndex()

uint16_t LArRodBlockStructure::getStepIndex ( ) const
inlinevirtualinherited

Reimplemented in LArRodBlockAccumulatedV3, and LArRodBlockCalibrationV3.

Definition at line 486 of file LArRodBlockStructure.h.

487{
488 std::cout << "Error: Function getStepIndex not implemented in this instance of LArRodBlockStructure!\n";
489 return 0;
490}

◆ getSumE()

int32_t LArRodBlockStructure::getSumE ( ) const
inlinevirtualinherited

Reimplemented in LArRodBlockPhysicsV6.

Definition at line 315 of file LArRodBlockStructure.h.

315 {
316 return 0;
317}

◆ getTDCPhase()

uint8_t LArRodBlockCalibrationV1::getTDCPhase ( ) const
virtual

Reimplemented from LArRodBlockStructure.

Definition at line 50 of file LArRodBlockCalibrationV1.cxx.

51{
52 return (getHeader16(NSamples)>>8);
53}

◆ getVectorHeader16()

uint16_t LArRodBlockStructure::getVectorHeader16 ( const unsigned n) const
inlineprotectedinherited

Definition at line 368 of file LArRodBlockStructure.h.

369{ if (n&0x1) //n is a odd number
370 return (std::as_const(*m_vFragment).at(n>>1) & 0xffff);
371 else //n is a even number
372 return (std::as_const(*m_vFragment).at(n>>1) >> 16);
373}

◆ getVectorHeader32()

uint32_t LArRodBlockStructure::getVectorHeader32 ( const unsigned n) const
inlineprotectedinherited

Definition at line 375 of file LArRodBlockStructure.h.

376{
377 return (*m_vFragment)[n>>1];
378}
std::vector< uint32_t > * m_vFragment

◆ getVROBEx()

int32_t LArRodBlockStructure::getVROBEx ( ) const
inlinevirtualinherited

Reimplemented in LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 323 of file LArRodBlockStructure.h.

323 {
324return 0;
325}

◆ getVROBEy()

int32_t LArRodBlockStructure::getVROBEy ( ) const
inlinevirtualinherited

Reimplemented in LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 327 of file LArRodBlockStructure.h.

327 {
328return 0;
329}

◆ getVROBEz()

int32_t LArRodBlockStructure::getVROBEz ( ) const
inlinevirtualinherited

Reimplemented in LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 331 of file LArRodBlockStructure.h.

331 {
332return 0;
333}

◆ getVROBFebId()

uint32_t LArRodBlockStructure::getVROBFebId ( )
inlinevirtualinherited

Reimplemented in LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 319 of file LArRodBlockStructure.h.

319 {
320return 0;
321}

◆ getVROBSumE()

int32_t LArRodBlockStructure::getVROBSumE ( ) const
inlinevirtualinherited

Reimplemented in LArRodBlockPhysicsV6.

Definition at line 335 of file LArRodBlockStructure.h.

335 {
336return 0;
337}

◆ hasAccumBlock()

virtual uint32_t LArRodBlockStructure::hasAccumBlock ( ) const
inlinevirtualinherited

Reimplemented in LArRodBlockAccumulatedV3.

Definition at line 123 of file LArRodBlockStructure.h.

123{return 0;} ;

◆ hasCalibBlock()

virtual uint32_t LArRodBlockCalibrationV1::hasCalibBlock ( ) const
inlinevirtual

Reimplemented from LArRodBlockStructure.

Definition at line 97 of file LArRodBlockCalibrationV1.h.

97{return getHeader16(ResultsOff1);} ;

◆ hasControlWords()

virtual uint32_t LArRodBlockCalibrationV1::hasControlWords ( ) const
inlinevirtual

Reimplemented from LArRodBlockStructure.

Definition at line 100 of file LArRodBlockCalibrationV1.h.

100{return getHeader16(RawDataBlkOff);} ;

◆ hasPhysicsBlock()

virtual uint32_t LArRodBlockCalibrationV1::hasPhysicsBlock ( ) const
inlinevirtual

Reimplemented from LArRodBlockStructure.

Definition at line 98 of file LArRodBlockCalibrationV1.h.

98{return getHeader16(ResultsOff2);} ;

◆ hasRawDataBlock()

virtual uint32_t LArRodBlockCalibrationV1::hasRawDataBlock ( ) const
inlinevirtual

Reimplemented from LArRodBlockStructure.

Definition at line 99 of file LArRodBlockCalibrationV1.h.

99{return getHeader16(RawDataBlkOff);} ;

◆ initializeFEB()

void LArRodBlockStructure::initializeFEB ( const uint32_t id)
virtualinherited

Reimplemented in LArRodBlockPhysicsV0, LArRodBlockPhysicsV1, LArRodBlockPhysicsV2, LArRodBlockPhysicsV3, LArRodBlockPhysicsV5, LArRodBlockPhysicsV6, and LArRodBlockTransparentV0< DSPHEADER >.

Definition at line 182 of file LArRodBlockStructure.cxx.

183{
184 std::cout << "Error: Function initializeFEB not implemented in this instance of LArRodBlockStructure!\n";
185 return;
186}

◆ initializeFragment()

void LArRodBlockStructure::initializeFragment ( std::vector< uint32_t > & fragment)
virtualinherited

Reimplemented in LArRodBlockPhysicsV0, LArRodBlockPhysicsV1, LArRodBlockPhysicsV2, LArRodBlockPhysicsV3, LArRodBlockPhysicsV5, LArRodBlockPhysicsV6, and LArRodBlockTransparentV0< DSPHEADER >.

Definition at line 188 of file LArRodBlockStructure.cxx.

189{
190 std::cout << "Error: Function initializeFragment not implemented in this instance of LArRodBlockStructure!\n";
191 return;
192}

◆ LE_getHeader16()

uint16_t LArRodBlockStructure::LE_getHeader16 ( const unsigned n) const
inlineprotectedinherited

Definition at line 405 of file LArRodBlockStructure.h.

406{
407 return (reinterpret_cast<const uint16_t*>(m_FebBlock))[n];
408}

◆ LE_getVectorHeader16()

uint16_t LArRodBlockStructure::LE_getVectorHeader16 ( const unsigned n) const
inlineprotectedinherited

Definition at line 410 of file LArRodBlockStructure.h.

411{
412 const uint32_t* data32 = std::as_const(*m_vFragment).data();
413 const uint16_t* data16 = reinterpret_cast<const uint16_t*> (data32);
414 return data16[n];
415}

◆ LE_setHeader16()

void LArRodBlockStructure::LE_setHeader16 ( const unsigned n,
const uint16_t w )
inlineprotectedinherited

Definition at line 417 of file LArRodBlockStructure.h.

418{
419#ifdef LARBYTESTREAMRODBLOCK_CHCKBOUNDARIES
420 if ((unsigned)n>=m_vFragment->size()*2) {
421 std::cout << "LArRodBlockStructure::LE_setHeader16 Error: WRITE BEYOND ARRAY BONDARY!" << std::endl;
422 std::abort();
423 }
424#endif
425 reinterpret_cast<uint16_t*>(m_vFragment->data())[n] = w;
426}

◆ nextFEB()

bool LArRodBlockStructure::nextFEB ( )
inlineinherited

Definition at line 497 of file LArRodBlockStructure.h.

498{
500
501 const int32_t FebOffset = m_FebBlockSize+m_MiddleHeaderSize;
502 const int32_t LeftSize = m_RodBlockSize-FebOffset+m_RodBlock-m_FebBlock;
503 if ( LeftSize<=0 ) return false; //No next feb
504
505 m_FebBlock += FebOffset; //Jump to the next FEB fragment
506 const int32_t BlockSize = getNumberOfWords();
507 //std::cout << "LeftSize=" << LeftSize << " BlockSize=" << BlockSize << std::endl;
508 if (BlockSize>LeftSize) {
509 std::cout << "Error while decoding LArByteStream: Found FEB block of size " << BlockSize << " in a ROD block of size " << LeftSize << std::endl;
510 m_error_next_feb = true;
511 return false;
512 }
513 //std::cout << "Second FEB ok, size= " << LeftSize <<std::endl;
514
515 //m_FebBlockSize = LeftSize; //should be =BlockSize;
516 m_FebBlockSize=BlockSize;
517
518 //std::cout << "2: FEB found with size " << m_FebBlockSize << std::endl;
519 setPointers();
520 return true;
521}

◆ offlineCheckSum()

uint32_t LArRodBlockStructure::offlineCheckSum ( ) const
virtualinherited

Reimplemented in LArRodBlockPhysicsV4.

Definition at line 163 of file LArRodBlockStructure.cxx.

164{
165 int end = getNumberOfWords()-3;
166 int start = 1;
167 uint32_t sum = 0;
169 for(int i=start;i<end;i++) {
170 sum += m_FebBlock[i];
171 }
172 return sum & 0x7fffffff;
173}

◆ OfflineToRawGain()

uint32_t LArRodBlockStructure::OfflineToRawGain ( const uint32_t gain) const
inlineinherited

Definition at line 352 of file LArRodBlockStructure.h.

353{return m_OfflineToRawGainMap[gain];} //For efficency, don't check range
static const uint32_t m_OfflineToRawGainMap[3]

◆ onlineCheckSum()

uint32_t LArRodBlockStructure::onlineCheckSum ( ) const
virtualinherited

Reimplemented in LArRodBlockPhysicsV4.

Definition at line 155 of file LArRodBlockStructure.cxx.

156{
157 int offset = getNumberOfWords()-1;
158 if(offset>=m_FebBlockSize) return 0;
159 if(offset<0) return 0;
160 return m_FebBlock[offset];
161}

◆ RawToOfflineGain()

uint32_t LArRodBlockStructure::RawToOfflineGain ( const uint32_t gain) const
inlineinherited

Definition at line 349 of file LArRodBlockStructure.h.

350{return m_RawToOfflineGainMap[gain];} //For efficency, don't check range
static const uint32_t m_RawToOfflineGainMap[4]

◆ report_error()

bool LArRodBlockStructure::report_error ( void ) const
inlineinherited

Definition at line 177 of file LArRodBlockStructure.h.

177{ return m_error_next_feb;}

◆ resetPointers()

void LArRodBlockCalibrationV1::resetPointers ( )
privatevirtual

◆ setBit()

void LArRodBlockStructure::setBit ( uint32_t *const p,
const unsigned chan )
inlineprotectedinherited

Definition at line 444 of file LArRodBlockStructure.h.

445{
446 // chan = (0,127)
447 // int a = chan/32;
448 // int r = chan%32;
449 int a = chan>>5;
450 int r = chan&0x1f;
451 // a = (0,3), r = ( 0, 31 )
452 *(p+a) |= (1<<r) ;
453 return;
454}

◆ setDAC()

void LArRodBlockStructure::setDAC ( const uint16_t DACValue)
virtualinherited

Reimplemented in LArRodBlockCalibrationV0< DSPHEADER >.

Definition at line 57 of file LArRodBlockStructure.cxx.

58{
59 std::cout << "Error: Function setDAC not implemented in this instance of LArRodBlockStructure!\n";
60 return;
61}

◆ setDelay()

void LArRodBlockStructure::setDelay ( const uint16_t DelayValue)
virtualinherited

Reimplemented in LArRodBlockCalibrationV0< DSPHEADER >.

Definition at line 63 of file LArRodBlockStructure.cxx.

64{
65 std::cout << "Error: Function setDelay not implemented in this instance of LArRodBlockStructure!\n";
66 return;
67}

◆ setEtQ()

void LArRodBlockStructure::setEtQ ( const int channel,
const int32_t energy,
const int32_t time,
const int32_t quality,
const uint32_t gain )
virtualinherited

Definition at line 120 of file LArRodBlockStructure.cxx.

121{
122 std::cout << "Error: Function setEtQ not implemented in this instance of LArRodBlockStructure!\n";
123 return;
124}

◆ setEx()

void LArRodBlockStructure::setEx ( double )
virtualinherited

Reimplemented in LArRodBlockPhysicsV3, LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 200 of file LArRodBlockStructure.cxx.

201{
202 // Do not set anything
203 return;
204}

◆ setEy()

void LArRodBlockStructure::setEy ( double )
virtualinherited

Reimplemented in LArRodBlockPhysicsV3, LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 206 of file LArRodBlockStructure.cxx.

207{
208 // Do not set anything
209 return;
210}

◆ setEz()

void LArRodBlockStructure::setEz ( double )
virtualinherited

Reimplemented in LArRodBlockPhysicsV3, LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 212 of file LArRodBlockStructure.cxx.

213{
214 // Do not set anything
215 return;
216}

◆ setFirstSample()

void LArRodBlockStructure::setFirstSample ( const int rearrangeFirstSample)
inlineinherited

Definition at line 168 of file LArRodBlockStructure.h.

169 {m_rearrangeFirstSample=rearrangeFirstSample;}

◆ setFragment()

bool LArRodBlockStructure::setFragment ( const uint32_t * p,
uint32_t n )
inlineinherited

Definition at line 252 of file LArRodBlockStructure.h.

253{
255 m_FebBlock = p;
258 uint32_t BlockSize = 0;
259
260 if (n==0) {
261 std::cout << "Error while decoding LArByteStream: Got Rod block size 0" << std::endl;
262 return false;
263 }
264
265 BlockSize = getNumberOfWords();
266 if (BlockSize>n) {
267 std::cout << "Error while decoding LArByteStream: Found FEB block of size " << BlockSize << " in a ROD block of size " << n << std::endl;
268 return false;
269 }
270 m_FebBlockSize = BlockSize;
271
272 m_error_next_feb = false;
273 //std::cout << "1: FEB found with size " << m_FebBlockSize << std::endl;
274
275 return setPointers();
276}

◆ setFragmentVirtualROB()

int LArRodBlockStructure::setFragmentVirtualROB ( const uint32_t * p,
uint32_t n )
inlinevirtualinherited

Definition at line 280 of file LArRodBlockStructure.h.

281 {
286 if ( n<2 ) { std::cout << "Error" << std::endl; return 0;}
287 m_virtualROBJump = ((*p)>>16)>>1; // Divide by two (two FEBs-1ROB)
288 m_ROB_to_decode = ( (*p) & 0xFFFF )<<1; // Multiply by two
289 if ( (n - m_virtualROBJump*m_ROB_to_decode-1) ){
290 std::cout << "Error AGAIN" << std::endl;
291 return 0;
292 }
294 return m_ROB_to_decode;
295}
const uint32_t * m_virtualROBPointerLocal
const uint32_t * m_virtualROBPointer

◆ setGain()

int LArRodBlockStructure::setGain ( const int GainValue)
virtualinherited

◆ setHeader16()

void LArRodBlockStructure::setHeader16 ( const unsigned n,
const uint16_t w )
inlineprotectedinherited

Definition at line 380 of file LArRodBlockStructure.h.

381{
382#ifdef LARBYTESTREAMRODBLOCK_CHCKBOUNDARIES
383 if ((unsigned)n>=m_vFragment->size()*2) {
384 std::cout << "Error WRITE BEYOND ARRAY BONDARY!" << std::endl;
385 std::abort();
386 }
387#endif
388 if (n&0x1) // n is a odd number
389 m_vFragment->at(n>>1)=((m_vFragment->at(n>>1) & 0xffff0000) | w);
390 else
391 m_vFragment->at(n>>1)=((m_vFragment->at(n>>1) & 0xffff) | (w << 16));
392}

◆ setHeader32()

void LArRodBlockStructure::setHeader32 ( const unsigned n,
const uint32_t w )
inlineprotectedinherited

Definition at line 394 of file LArRodBlockStructure.h.

395{
396#ifdef LARBYTESTREAMRODBLOCK_CHCKBOUNDARIES
397 if ((unsigned)n>=m_vFragment->size()*2) {
398 std::cout << "Error WRITE BEYOND ARRAY BONDARY!" << std::endl;
399 std::abort();
400 }
401#endif
402 m_vFragment->at(n>>1) = w;
403}

◆ setNextEnergy()

void LArRodBlockStructure::setNextEnergy ( const int channel,
const int32_t energy,
const int32_t time,
const int32_t quality,
const uint32_t gain )
virtualinherited

Reimplemented in LArRodBlockPhysicsV0, LArRodBlockPhysicsV1, LArRodBlockPhysicsV2, LArRodBlockPhysicsV3, LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 106 of file LArRodBlockStructure.cxx.

107{
108 std::cout << "Error: Function setNextEnergy not implemented in this instance of LArRodBlockStructure!\n";
109 return;
110}

◆ setNTrigger()

void LArRodBlockStructure::setNTrigger ( const uint16_t NTrigger)
virtualinherited

Definition at line 75 of file LArRodBlockStructure.cxx.

76{
77 std::cout << "Error: Function setNTrigger not implemented in this instance of LArRodBlockStructure!\n";
78 return;
79}

◆ setNumberOfGains()

void LArRodBlockStructure::setNumberOfGains ( const uint8_t n)
virtualinherited

Reimplemented in LArRodBlockPhysicsV0, LArRodBlockPhysicsV1, LArRodBlockPhysicsV2, LArRodBlockPhysicsV3, and LArRodBlockTransparentV0< DSPHEADER >.

Definition at line 138 of file LArRodBlockStructure.cxx.

139{
140 std::cout << "Error: Function setNumberOfGains not implemented in this instance of LArRodBlockStructure!\n";
141 return;
142}

◆ setNumberOfSamples()

void LArRodBlockStructure::setNumberOfSamples ( const uint8_t n)
virtualinherited

Reimplemented in LArRodBlockPhysicsV0, LArRodBlockPhysicsV1, LArRodBlockPhysicsV2, LArRodBlockPhysicsV3, and LArRodBlockTransparentV0< DSPHEADER >.

Definition at line 132 of file LArRodBlockStructure.cxx.

133{
134 std::cout << "Error: Function setNumberOfSamples not implemented in this instance of LArRodBlockStructure!\n";
135 return;
136}

◆ setPointers()

virtual bool LArRodBlockStructure::setPointers ( )
inlineprotectedvirtualinherited

◆ setPulsed()

void LArRodBlockStructure::setPulsed ( const unsigned channelNumber)
virtualinherited

Reimplemented in LArRodBlockCalibrationV0< DSPHEADER >.

Definition at line 69 of file LArRodBlockStructure.cxx.

70{
71 std::cout << "Error: Function setPulsed not implemented in this instance of LArRodBlockStructure!\n";
72 return;
73}

◆ setRawData()

void LArRodBlockStructure::setRawData ( const int channel,
const std::vector< short > & samples,
const uint32_t gain )
virtualinherited

Reimplemented in LArRodBlockPhysicsV0, LArRodBlockPhysicsV1, LArRodBlockPhysicsV2, LArRodBlockPhysicsV3, LArRodBlockPhysicsV5, and LArRodBlockPhysicsV6.

Definition at line 113 of file LArRodBlockStructure.cxx.

114{
115 std::cout << "Error: Function setRawData not implemented in this instance of LArRodBlockStructure!\n";
116 return;
117}

◆ setRawDataFixed()

void LArRodBlockStructure::setRawDataFixed ( const int channel,
const std::vector< short > & samples,
const uint32_t gain )
virtualinherited

Reimplemented in LArRodBlockTransparentV0< DSPHEADER >.

Definition at line 126 of file LArRodBlockStructure.cxx.

127{
128 std::cout << "Error: Function setRawDataFixed not implemented in this instance of LArRodBlockStructure!\n";
129 return;
130}

◆ setSumE()

void LArRodBlockStructure::setSumE ( double )
virtualinherited

Reimplemented in LArRodBlockPhysicsV6.

Definition at line 218 of file LArRodBlockStructure.cxx.

219{
220 // Do not set anything
221 return;
222}

◆ setTDCPhase()

void LArRodBlockStructure::setTDCPhase ( const uint8_t n)
virtualinherited

Reimplemented in LArRodBlockTransparentV0< DSPHEADER >.

Definition at line 144 of file LArRodBlockStructure.cxx.

145{
146 std::cout << "Error: Function setTDCPhase not implemented in this instance of LArRodBlockStructure!\n";
147 return;
148}

◆ sortDataVector() [1/5]

void LArRodBlockStructure::sortDataVector ( std::vector< const LArAccumulatedCalibDigit * > & )
virtualinherited

◆ sortDataVector() [2/5]

void LArRodBlockStructure::sortDataVector ( std::vector< const LArAccumulatedDigit * > & )
virtualinherited

◆ sortDataVector() [3/5]

void LArRodBlockStructure::sortDataVector ( std::vector< const LArCalibDigit * > & )
virtualinherited

◆ sortDataVector() [4/5]

void LArRodBlockStructure::sortDataVector ( std::vector< const LArDigit * > & )
virtualinherited

◆ sortDataVector() [5/5]

void LArRodBlockStructure::sortDataVector ( std::vector< const LArRawChannel * > & )
virtualinherited

Member Data Documentation

◆ m_channelsPerFEB

int LArRodBlockStructure::m_channelsPerFEB
protectedinherited

Definition at line 225 of file LArRodBlockStructure.h.

◆ m_error_next_feb

bool LArRodBlockStructure::m_error_next_feb
protectedinherited

Definition at line 243 of file LArRodBlockStructure.h.

◆ m_Ex

int32_t LArRodBlockStructure::m_Ex
protectedinherited

Definition at line 207 of file LArRodBlockStructure.h.

◆ m_Ey

int32_t LArRodBlockStructure::m_Ey
protectedinherited

Definition at line 208 of file LArRodBlockStructure.h.

◆ m_Ez

int32_t LArRodBlockStructure::m_Ez
protectedinherited

Definition at line 209 of file LArRodBlockStructure.h.

◆ m_FebBlock

const uint32_t* LArRodBlockStructure::m_FebBlock
protectedinherited

Definition at line 227 of file LArRodBlockStructure.h.

◆ m_FebBlockSize

int32_t LArRodBlockStructure::m_FebBlockSize
protectedinherited

Definition at line 229 of file LArRodBlockStructure.h.

◆ m_fixedGain

int LArRodBlockCalibrationV1::m_fixedGain
private

Definition at line 120 of file LArRodBlockCalibrationV1.h.

◆ m_iHeadBlockSize

unsigned short LArRodBlockStructure::m_iHeadBlockSize
protectedinherited

Definition at line 221 of file LArRodBlockStructure.h.

◆ m_mFebBlocks

FEBMAPTYPE LArRodBlockStructure::m_mFebBlocks
protectedinherited

Definition at line 234 of file LArRodBlockStructure.h.

◆ m_MiddleHeaderSize

int32_t LArRodBlockStructure::m_MiddleHeaderSize
protectedinherited

Definition at line 239 of file LArRodBlockStructure.h.

◆ m_numberOfEx

uint32_t LArRodBlockStructure::m_numberOfEx
protectedinherited

Definition at line 214 of file LArRodBlockStructure.h.

◆ m_numberOfEy

uint32_t LArRodBlockStructure::m_numberOfEy
protectedinherited

Definition at line 215 of file LArRodBlockStructure.h.

◆ m_numberOfEz

uint32_t LArRodBlockStructure::m_numberOfEz
protectedinherited

Definition at line 216 of file LArRodBlockStructure.h.

◆ m_numberOfSumE

uint32_t LArRodBlockStructure::m_numberOfSumE
protectedinherited

Definition at line 217 of file LArRodBlockStructure.h.

◆ m_OfflineToRawGainMap

const uint32_t LArRodBlockStructure::m_OfflineToRawGainMap ={3,2,1}
staticprotectedinherited

Definition at line 21 of file LArRodBlockStructure.h.

◆ m_pRODblock

std::vector<uint32_t>* LArRodBlockStructure::m_pRODblock
protectedinherited

Definition at line 232 of file LArRodBlockStructure.h.

◆ m_RawDataBlock

std::vector<uint32_t> LArRodBlockCalibrationV1::m_RawDataBlock
private

Definition at line 111 of file LArRodBlockCalibrationV1.h.

◆ m_RawDataCounter

int LArRodBlockCalibrationV1::m_RawDataCounter = 0
private

Definition at line 117 of file LArRodBlockCalibrationV1.h.

◆ m_RawDataIndex

int LArRodBlockCalibrationV1::m_RawDataIndex = 0
private

Definition at line 118 of file LArRodBlockCalibrationV1.h.

◆ m_RawToOfflineGainMap

const uint32_t LArRodBlockStructure::m_RawToOfflineGainMap ={0, 2, 1,0}
staticprotectedinherited

Definition at line 20 of file LArRodBlockStructure.h.

◆ m_rearrangeFirstSample

unsigned int LArRodBlockStructure::m_rearrangeFirstSample
protectedinherited

Definition at line 241 of file LArRodBlockStructure.h.

◆ m_Result1Counter

int LArRodBlockCalibrationV1::m_Result1Counter = 0
private

Definition at line 113 of file LArRodBlockCalibrationV1.h.

◆ m_Result1Index

int LArRodBlockCalibrationV1::m_Result1Index = 0
private

Definition at line 114 of file LArRodBlockCalibrationV1.h.

◆ m_Result2Counter

int LArRodBlockCalibrationV1::m_Result2Counter = 0
private

Definition at line 115 of file LArRodBlockCalibrationV1.h.

◆ m_Result2Index

int LArRodBlockCalibrationV1::m_Result2Index = 0
private

Definition at line 116 of file LArRodBlockCalibrationV1.h.

◆ m_ROB_to_decode

int32_t LArRodBlockStructure::m_ROB_to_decode
protectedinherited

Definition at line 246 of file LArRodBlockStructure.h.

◆ m_RodBlock

const uint32_t* LArRodBlockStructure::m_RodBlock
protectedinherited

Definition at line 228 of file LArRodBlockStructure.h.

◆ m_RodBlockSize

int32_t LArRodBlockStructure::m_RodBlockSize
protectedinherited

Definition at line 230 of file LArRodBlockStructure.h.

◆ m_SumE

int32_t LArRodBlockStructure::m_SumE
protectedinherited

Definition at line 210 of file LArRodBlockStructure.h.

◆ m_vFragment

std::vector<uint32_t>* LArRodBlockStructure::m_vFragment
protectedinherited

Definition at line 231 of file LArRodBlockStructure.h.

◆ m_virtualROBJump

uint32_t LArRodBlockStructure::m_virtualROBJump
protectedinherited

Definition at line 245 of file LArRodBlockStructure.h.

◆ m_virtualROBPointer

const uint32_t* LArRodBlockStructure::m_virtualROBPointer
protectedinherited

Definition at line 247 of file LArRodBlockStructure.h.

◆ m_virtualROBPointerLocal

const uint32_t* LArRodBlockStructure::m_virtualROBPointerLocal
protectedinherited

Definition at line 248 of file LArRodBlockStructure.h.


The documentation for this class was generated from the following files: