ATLAS Offline Software
LArRodBlockPhysicsV3.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Implementation of the LArRODBlockStructure_3 class
6 // This version contains LArRawChannels (=E,t,Q)
7 // and LArDigits (=5 time samples)
8 // See .h file for more details.
9 
12 #include "LArRawEvent/LArDigit.h"
14 #include "GaudiKernel/Bootstrap.h"
15 #include "GaudiKernel/ISvcLocator.h"
16 #include "GaudiKernel/IToolSvc.h"
17 #include <stdlib.h>
18 #include <cstdio>
19 #include <iostream>
20 
21 //#define LARBSDBGOUTPUT
22 #ifdef LARBSDBGOUTPUT
23 #define LARBSDBG(text) m_logstr<<MSG::DEBUG<<text<<endmsg
24 #else
25 #define LARBSDBG(text)
26 #endif
27 
28 namespace {
29 union ShortLong {
30  uint16_t s[2];
31  uint32_t l;
32 };
33 }
34 
36 
38 m_logstr(Athena::getMessageSvc(), BlockType())
39 {
40  // retrieve onlineHelper
41  const LArOnlineID* online_id;
43  ISvcLocator* svcLoc = Gaudi::svcLocator( );
44  StatusCode sc =svcLoc->service( "DetectorStore", detStore );
45  if (sc.isFailure()) {
46  m_logstr << MSG::ERROR << "Unable to locate DetectorStore" << endmsg;
47  std::abort();
48  }
49  sc = detStore->retrieve(online_id, "LArOnlineID");
50  if (sc.isFailure()) {
51  m_logstr << MSG::FATAL << "Could not get LArOnlineID helper !" << endmsg;
52  std::abort();
53  }
54  else {
55  m_onlineHelper=online_id;
56  m_logstr << MSG::DEBUG << " Found the LArOnlineID helper. " << endmsg;
57  }
58 
59  m_iHeadBlockSize=endtag/2; // The implicit cast rounds down to the right size
60  m_NSumBlkWords=4; // BL : words of 32 bits here
63  m_NEnergyBlkWords=128*16/32;
64  m_NGainBlkWords=128*2/32;
65 
66  // Move this to properties of the algorithm but set default values.
67  m_EnergyThreshold = 100; // MeV
68  m_OffTimeCut = 30; // ns
69 
71 
73  m_vFragment=NULL;
74  m_FebBlock=NULL;
75  m_pRODblock=NULL;
76 
77  m_Ex=0;
78  m_Ey=0;
79  m_Ez=0;
80  m_HottestCellIndex=255; // 255 is unphysical since cells index are between 0 and 127 per FEB.
82 
83  m_CounterPtr=NULL;
84  m_EnergyPtr=NULL;
85  m_FebInfoDataPtr=NULL;
86  m_GainPtr=NULL;
87  m_RawDataFlagsPtr=NULL;
88  m_RawDataPtr=NULL;
89  m_SumBlkPtr=NULL;
90  m_TimeQualityPtr=NULL;
91 }
92 
93 // clear temporary block vectors
95 {
96  m_SumBlkBlock.clear();
97  m_CounterBlkBlock.clear();
98  m_EnergyBlock.clear();
99  m_GainBlock.clear();
100  m_TimeQualityBlock.clear();
101  m_RawDataBlock.clear();
102  m_FebInfoBlock.clear();
103 }
104 
106 {
108  m_RawDataIndex=0;
109  m_CounterIndex=0;
110  m_EnergyIndex=0;
111  m_GainIndex=0;
113  m_SumBlkIndex=0;
114  m_FebInfoIndex=0;
115 
117  m_numberHotCell=0;
118  m_Ex=0;
119  m_Ey=0;
120  m_Ez=0;
121  m_HottestCellIndex=255; // 255 is unphysical since cells index are between 0 and 127 per FEB.
123 }
124 
125 //For reading (to speed up the process)
127 {//Set pointers to data blocks (pesuming, they exist)
129  {
132  else m_SumBlkPtr=(const uint32_t*)m_DummyBitMap;
133 
136  else m_CounterPtr=(const uint16_t*)m_DummyBitMap;
137 
140  else m_EnergyPtr=(const uint16_t*)m_DummyBitMap;
141 
144  else m_GainPtr=(const uint32_t*)m_DummyBitMap;
145 
149 
152  else m_RawDataPtr=(const int16_t*)m_DummyBitMap;
153 
157 
158 #ifdef LARBSDBGOUTPUT
159  m_logstr << MYLEVEL << "***********************************************************************"<< endmsg;
160  m_logstr << MYLEVEL << "Energy Pointed values :"<< endmsg;
161  m_logstr << MYLEVEL << "************************************************************************"<< endmsg;
162  m_logstr << MYLEVEL << "LE_getHeader16(SumBlkOffset) = "<< MSG::hex << LE_getHeader16(SumBlkOffset) << endmsg;
163  m_logstr << MYLEVEL << "LE_getHeader16(CounterBlkOffset) = "<< MSG::hex << LE_getHeader16(CounterBlkOffset) << endmsg;
164  m_logstr << MYLEVEL << "LE_getHeader16(GainBlkOffset) = "<< MSG::hex << LE_getHeader16(GainBlkOffset) << endmsg;
165  m_logstr << MYLEVEL << "LE_getHeader16(EBlkOffset) = "<< MSG::hex << LE_getHeader16(EBlkOffset) << endmsg;
166  m_logstr << MYLEVEL << "LE_getHeader16(FebInfoBlkOffset) = "<< MSG::hex << LE_getHeader16(FebInfoBlkOffset) << endmsg;
167  m_logstr << MYLEVEL << "LE_getHeader16(TimeQualityBlkOffset) = "<< MSG::hex << LE_getHeader16(TimeQualityBlkOffset) << endmsg;
168  m_logstr << MYLEVEL << "************************************************************************"<< endmsg;
169 
170  m_logstr << MYLEVEL << "********************* SumBlck ************************************"<< endmsg;
171  for(int toto=0;toto<4;toto++)
172  m_logstr << MYLEVEL << "hexa = 0x" << MSG::hex << m_SumBlkPtr[toto] << endmsg;
173  m_logstr << MYLEVEL << "************************************************************************"<< endmsg;
174 
175  m_logstr << MYLEVEL << "********************* CounterBlck ************************************"<< endmsg;
176  for(int toto=0;toto<10;toto++) m_logstr << MYLEVEL << "hexa = 0x" << MSG::hex << m_CounterPtr[toto] << endmsg;
177  m_logstr << MYLEVEL << "************************************************************************"<< endmsg;
178 
179  m_logstr << MYLEVEL << "********************* FebInfoBlck ************************************"<< endmsg;
180  for(int toto=0;toto<4;toto++) m_logstr << MYLEVEL << "hexa = 0x" << MSG::hex << m_FebInfoDataPtr[toto] << endmsg;
181  m_logstr << MYLEVEL << "************************************************************************"<< endmsg;
182 
183 
184  m_logstr << MYLEVEL << "********************* Energies ************************************"<< endmsg;
185  for(int toto=0;toto<128;toto++)
186  m_logstr << MYLEVEL << "hexa = 0x" << MSG::hex << m_EnergyPtr[toto] << endmsg;
187  m_logstr << MYLEVEL << "************************************************************************"<< endmsg;
188 
189  m_logstr << MYLEVEL << "********************* Time & Quality ************************************"<< endmsg;
190  for(int toto=0;toto<10;toto++)
191  m_logstr << MYLEVEL << "hexa = 0x" << MSG::hex << m_TimeQualityPtr[toto] << endmsg;
192  m_logstr << MYLEVEL << "************************************************************************"<< endmsg;
193 #endif
194 
195  }
196  else
197  {
198  m_SumBlkPtr=NULL;
199  m_CounterPtr=NULL;
200  m_EnergyPtr=NULL;
201  m_TimeQualityPtr=NULL;
202  m_GainPtr=NULL;
203  m_FebInfoDataPtr=NULL;
204  m_RawDataPtr=NULL;
205  m_RawDataFlagsPtr=NULL;
206  }
207 
208  return true;
209 }
210 
213  LE_setHeader16(NGainNSamples,(oldword & 0xFF00) | n);
214 }
215 
218  LE_setHeader16(NGainNSamples,(oldword & 0x00FF) | (n<<8));
219 }
220 
221 
222 
223 void LArRodBlockPhysicsV3::setNextEnergy(const int channel, const int32_t energy,
224  const int32_t time, const int32_t quality, const uint32_t gain)
225 {
226  m_logstr << MYLEVEL << "setNextEnergy-------------------->>>>>********************** new format V3 ***********" << endmsg;
227  m_logstr << MYLEVEL << "Channel=" << channel << " energy =" << energy << endmsg;
228  int rcNb=FebToRodChannel(channel);
229  //rcNb ist supposed to equal or bigger than m_EIndex.
230  //In the latter case, we fill up the missing channels with zero
231  if (rcNb<m_EnergyIndex) {
232  m_logstr << MSG::ERROR << "LArRODBlockStructure ERROR: Internal error. Channels not ordered correctly. rcNb=" << rcNb
233  << " m_EnergyIndex=" << m_EnergyIndex << endmsg;
234  return;
235  }
236 
237  //Fill up missing channels with zeros:
238  while (m_EnergyIndex<rcNb)
239  setNextEnergy((int16_t)0,(int16_t)32767,(int16_t)-32767,(uint32_t)0);
240 
241 
242  // update fi needed the hottest cell info
243  // m_logstr << MYLEVEL << "Before " << endmsg;
244  // m_logstr << MYLEVEL << "m_HottestCellIndex : "<< m_HottestCellIndex << endmsg;
245  // m_logstr << MYLEVEL << "m_HottestCellEnergy : "<< m_HottestCellEnergy << endmsg;
246 
247  if ((energy>0)&&(energy>(int)m_HottestCellEnergy))
248  {
251  }
252 
253  // m_logstr << MYLEVEL << "After " << endmsg;
254  // m_logstr << MYLEVEL << "m_HottestCellIndex : "<< m_HottestCellIndex << endmsg;
255  // m_logstr << MYLEVEL << "m_HottestCellEnergy : "<< m_HottestCellEnergy << endmsg;
256 
257 
258  // transform 32 bits data into 16 bits data
259 
260  uint16_t theenergy;
261  uint32_t abse,EncodedE;
262  int16_t thetime,thequality;
263  int32_t sign;
264 
265  thetime = (int16_t) time >> 4;
266  thequality = (int16_t) quality;
267 
268  sign=(energy>=0?1:-1); // get sign of energy
269  abse=(uint32_t)abs(energy);
270 
271  EncodedE=abse; // range 0
272 
273  if ((abse>8192)&&(abse<65536))
274  {
275  EncodedE=((abse>>3)|0x2000); // range 1 : drop last 3 bits and put range bits (bits 14 and 13 = 01)
276  }
277  else if ((abse>65535)&&(abse<524288))
278  {
279  EncodedE=((abse>>6)|0x4000); // range 2 : drop last 6 bits and put range bits (bits 14 and 13 = 10)
280  }
281  else if ((abse>524288))
282  {
283  EncodedE=((abse>>9)|0x6000); // range 3 : drop last 9 bits and put range bits (bits 14 and 13 = 11)
284  }
285 
286  // treat sign now :
287 
288  if (sign<0) EncodedE |= 0x8000;
289  theenergy = (uint16_t) EncodedE;
290 
291 
292  // Add data...
293 
294  m_logstr << MYLEVEL << "setNextEnergy-------------------->>>>> Energy = "<< energy << " Encoded Energy =" << theenergy << endmsg;
295 
296  if (abse> m_EnergyThreshold)
297  {
298  setNextEnergy(theenergy,thetime,thequality,gain);
299  }
300  else
301  {
302  setNextEnergy(theenergy,(int16_t)32767,(int16_t)-32767,gain);
303  }
304  return;
305 }
306 
307 //Private function, expects channel number is rod-style ordering
309 {
310 
311  if (m_EnergyIndex>=m_channelsPerFEB) //Use m_EIndex to count total number of channels
312  {m_logstr << MSG::ERROR << "LArRodBlockStructure ERROR: Attempt to write Energy for channel "
313  << m_EnergyIndex << " channels into a FEB!" <<endmsg;
314  return;
315  }
316  LARBSDBG("LArRodBlockStructure: Setting Energy for channel " << m_EnergyIndex << ". E=" << energy);
317 
318  m_logstr << MYLEVEL << "In setNextEnergy-------------------->>>>> time = " << time << " quality=" << quality << endmsg;
319 
320  // write for all cells energy and hardware gain
321 
322  // Energy
323 
324  m_EnergyIndex++; //Use m_EIndex to count the channels put in the Energy block
325 
326  ShortLong twoValues{};
327  if (m_EnergyIndex%2) // m_EIndex-1 is even
328  {
329  twoValues.s[0]= energy;
330  twoValues.s[1]=0;
331  }
332  else
333  { //Even number: Merging with previous block
334  uint32_t oneValue=m_EnergyBlock[m_EnergyBlock.size()-1]; //Take last element of vector
335  m_EnergyBlock.pop_back();
336  uint16_t* valptr=reinterpret_cast<uint16_t*>(&oneValue);
337  twoValues.s[0]=valptr[0];
338  twoValues.s[1]=(uint16_t)energy;
339  }
340 
341  //m_logstr << MSG::DEBUG << "In setNextEnergy-------------------->>>>> Length of m_EnergyBlock =" << m_EnergyBlock.size() << endmsg;
342 
343  LARBSDBG("Writing words: val0= " << twoValues.s[0] << " val1= " << twoValues.s[1]);
344  m_EnergyBlock.push_back(twoValues.l);
345  LARBSDBG("Writing Raw data to E block. E=" << energy);
346 
347  // update summary block
348  // Summary block is one bit per cell
349 
350  int mylocalBitwiseIndex = (int) (m_EnergyIndex-1)%32; // 1 bits in SB per channel
351  // m_logstr << MYLEVEL << "In setNextEnergy-------------------->> Summary Block Construction " << endmsg;
352  // m_logstr << MYLEVEL << "In setNextEnergy-------------------->> mylocalBitwiseIndex= " << mylocalBitwiseIndex << endmsg;
353  if (mylocalBitwiseIndex==0) // need for a new 32 bits word to store SM info of that cell
354  {
355  // m_logstr << MYLEVEL << "In setNextEnergy-------------------->> Set new 32 bits word " << endmsg;
356  uint32_t SB;
357  SB = (quality==-32767?0x00000000:0x00000001);
358  m_SumBlkBlock.push_back(SB);
359  }
360  else
361  {
362  // m_logstr << MYLEVEL << "In setNextEnergy-------------------->> Use existing 32 bits word " << endmsg;
363  uint32_t SB=m_SumBlkBlock[m_GainBlock.size()-1]; //Take out last element of vector
364  m_SumBlkBlock.pop_back();
365  SB=(SB<<1)|(quality==-32767?0x00000000:0x00000001);
366  m_SumBlkBlock.push_back(SB);
367  }
368 
369  // Hardware gain
370 
371  mylocalBitwiseIndex = (m_EnergyIndex-1)%16; // 2 bits of gain per channel
372  if (mylocalBitwiseIndex==0) // need for a new 32 bits word to store the gain of that cell
373  {
374  m_GainBlock.push_back(gain&0x00000003);
375  }
376  else
377  {
378  uint32_t encodedgains=m_GainBlock[m_GainBlock.size()-1]; //Take out last element of vector
379  m_GainBlock.pop_back();
380  encodedgains=(encodedgains<<2)|(gain&0x00000003);
381  m_GainBlock.push_back(encodedgains);
382  }
383 
384  // write Time and Chi2 for cells above HighEnergyCellCut threshold
385 
386  // m_logstr << MYLEVEL << "In setNextEnergy-------------------->>>>> treat Time and Chi2" << endmsg;
387 
388  if (quality!=-32767) // Do write Time and Chi2 information
389  {
390  // m_logstr << MSG::DEBUG << "In setNextEnergy-------------------->>>>> treat Time and Chi2 of that hot cell " << endmsg;
391  // count the number of hot cells
392  m_numberHotCell++;
393  // count the number of cells offtime
395 
396  mylocalBitwiseIndex = (m_numberHotCell-1)%2; // 16 bits per channel
397  ShortLong twoValues{};
398  if (mylocalBitwiseIndex==0) // need for a new 32 bits word to store the time quality of that cell
399  {
400  twoValues.s[0]=0;
401  twoValues.s[1]=0;
402  twoValues.s[0]=(int16_t)(time)|((quality>>10)&0x003F); // Quality on the first 6 bits and Time on the last 10 bits;
403  }
404  else
405  { //Even number: Merging with previous block
406  uint32_t oneValue=m_TimeQualityBlock[m_TimeQualityBlock.size()-1]; //Take last element of vector
407  m_TimeQualityBlock.pop_back();
408  int16_t* valptr=reinterpret_cast<int16_t*>(&oneValue);
409  twoValues.s[0]=valptr[0];
410  twoValues.s[1]=(int16_t)(time)|((quality>>12)&0x003F); // Quality on the first 4 bits and Time on the last 12 bits;
411  }
412  m_TimeQualityBlock.push_back(twoValues.l);
413  }
414 
415 }
416 
417 void LArRodBlockPhysicsV3::setRawData(const int channel, const std::vector<short>& samples, const uint32_t gain) {
418  //Convert Feb to Rod Channel Number:
419  //int rcNb=(channel>>3) + ((channel&0x7)<<4);
420  int rcNb=FebToRodChannel(channel);
421  if (rcNb>=m_channelsPerFEB)
422  {m_logstr << MSG::ERROR << "Attempt to write Energy for channel " << rcNb << " channels into a FEB!" << endmsg;
423  return;
424  }
425  unsigned int nsamples = LE_getVectorHeader16(NGainNSamples) & 0x00FF;
426  if(samples.size() != nsamples) {
427  m_logstr << MSG::ERROR << "Number of samples mismatch!\n";
428  m_logstr << " nsamples =" << nsamples;
429  m_logstr << " samples.size() =" << samples.size() << endmsg;
430  std::abort();
431  }
432 
433  setBit(&m_RawDataBlock[0],rcNb);
434  //Samples have 12 bit and are shifted to the left by 2 bits.
435  // odd samples in high bits, even samples in low bits
436  if((nsamples/2)*2!=nsamples) { //odd number of samples - gain is alone
437  m_RawDataBlock.push_back((gain<<30) | samples[0]<<2);
438  for (unsigned int i=1;i<nsamples;i+=2)
439  m_RawDataBlock.push_back((samples[i+1]<<18) | samples[i]<<2);
440  }
441  else { //even number of samples - gain is packed with sample 0
442  m_RawDataBlock.push_back((gain<<30) | (samples[1]<<18) | samples[0]<<2);
443  for (unsigned int i=2;i<nsamples;i+=2)
444  m_RawDataBlock.push_back((samples[i+1]<<18) | samples[i]<<2);
445  }
446 }
447 
448 
449 //For writing: takes existing Fragment and splits it into Feb-Blocks
450 void LArRodBlockPhysicsV3::initializeFragment(std::vector<uint32_t>& fragment)
451 {
452  m_pRODblock=&fragment; //remember pointer to fragment
453  if (fragment.size()>m_iHeadBlockSize) { //Got filled fragment
454  unsigned int sizeRead=0;
455  //Store existing data in the FEB-Map
456  while (sizeRead<fragment.size()) {
458  FebIter=fragment.begin()+sizeRead; //Store pointer to current Feb-Header
459  m_FebBlock=&(*FebIter); //Set m_FebBlock in order to use getHeader-functions.
460  uint32_t currFEBid=getHeader32(FEBID); //Get this FEB-ID
461  uint16_t currFebSize=getNumberOfWords(); //Size of this FEB-Block
462  //std::cout << "FebID=" << currFEBid << " FEBSize=" << currFebSize << " Vector size=" << fragment.size() << std::endl;
463  if (FebIter+currFebSize>fragment.end()) {
464  fragment.clear(); //Clear existing vector
465  m_logstr << MSG::ERROR << "Got inconsistent ROD-Fragment!" << endmsg;
466  return;
467  }
468  m_mFebBlocks[currFEBid].assign(FebIter,FebIter+currFebSize); //Copy data from ROD-fragment into FEB-Block
469  sizeRead+=currFebSize+m_MiddleHeaderSize; //6 is the middle header size
470  LARBSDBG("Found FEB-id " << currFEBid << " in existing ROD-Fragment");
471  } // end while
472  }
473  fragment.clear(); //Clear existing vector
474  return;
475 }
476 
477 //For writing: Initalizes a single FEB-Block
479 {
481  if (m_vFragment->size()<m_iHeadBlockSize) //Got empty or spoiled fragment
482  {
483  m_vFragment->resize(m_iHeadBlockSize,0); //Initialize FEB-Header
484  setHeader32(FEBID,id); //Set Feb ID
485  }
486 
487  m_SumBlkBlock.resize(0);
488  m_CounterBlkBlock.resize(0);
489  m_EnergyBlock.resize(0);
490  m_GainBlock.resize(0);
491  m_FebInfoBlock.resize(0);
492  m_RawDataBlock.resize(0);
493 
494  resetPointers();
495 
496 }
497 
499 {
500 //Complete non-complete Energy block
502  setNextEnergy((uint16_t)0,(int16_t)32767,(int32_t)-32767,(uint32_t)0);//E=0,t=32767,q=-32767,G=0
503 
504  uint16_t n;
505  uint16_t BlockOffset;
506 
507  // Summary block....
508  n = m_SumBlkBlock.size();
509  BlockOffset=LE_getVectorHeader16(SumBlkOffset);
510  //Check if Summary Block exists and is not yet part of the fragment
511  LARBSDBG("Checking for Summary Block n=" << n << "BlockOffset=" << BlockOffset);
512  if (n && !BlockOffset)
513  {
515  BlockOffset=LE_getVectorHeader16(SumBlkOffset);
516  m_logstr << MSG::DEBUG << "In finalizeFEB-------------------->>>>> " << "Checking for Summary Block : length= " << n << " BlockOffset=" << BlockOffset << endmsg;
517  for (unsigned i=0;i<n;i++)
518  m_vFragment->push_back(m_SumBlkBlock[i]);
519  }
520 
521  // Counter block....
522 
523  // fill info from counters
524  ShortLong twoValues{};
525  twoValues.s[0]=(uint16_t)m_numberHotCell;
526  twoValues.s[1]=(uint16_t)m_numberHotCellOffTime;
527  m_CounterBlkBlock.push_back(twoValues.l);
528 
529  twoValues.s[0]=(uint16_t)m_EnergyThreshold;
530  twoValues.s[1]=(uint16_t)m_OffTimeCut;
531  m_CounterBlkBlock.push_back(twoValues.l);
532 
533  // Write the Energy threshold used to determine which cell is a hot cell in the first
534  // 32 bit word of the counters
535  // Write the Energy Ex of the ROD block in a 32 bits word
536  // Write the Energy Ey of the ROD block in a 32 bits word
537  // Ex and Ey have to be 32 bits words as they are sums of multiple 16 bits words
538 
539 
540 
541 
542 /* uint32_t aux;
543  aux = abs(m_Ex);
544  if (m_Ex<0) aux|=0x80000000;
545  m_CounterBlkBlock.push_back(aux);
546  aux = abs(m_Ey);
547  if (m_Ey<0) aux|=0x80000000;
548  m_CounterBlkBlock.push_back(aux);
549 */
550 
551  uint32_t* aux = (uint32_t*)&m_Ex;
552  m_CounterBlkBlock.push_back(*aux);
553  aux = (uint32_t*)&m_Ey;
554  m_CounterBlkBlock.push_back(*aux);
555 
556  // write the hottest cell index for that FEB and its energy in MeV
557 
558  twoValues.s[0]=(uint16_t)((m_HottestCellIndex<<9)|((uint16_t)((m_HottestCellEnergy>>16))&0x01FF));
559  twoValues.s[1]=(uint16_t)m_HottestCellEnergy;
560  m_CounterBlkBlock.push_back(twoValues.l);
561 
562  aux = (uint32_t*)&m_Ez;
563  m_CounterBlkBlock.push_back(*aux);
564 
565  n = m_CounterBlkBlock.size();
567  //Check if Counter Block exists and is not yet part of the fragment
568  LARBSDBG("Checking for Counter Block n=" << n << "BlockOffset=" << BlockOffset);
569  if (n && !BlockOffset)
570  {
573  m_logstr << MSG::INFO << "In finalyseFEB-------------------->>>>> " << "Checking for Counter Block : length= " << n << " BlockOffset=" << BlockOffset << endmsg;
574  for (unsigned i=0;i<n;i++)
575  m_vFragment->push_back(m_CounterBlkBlock[i]);
576  }
577 
578  // Energy block...
579  n = m_EnergyBlock.size();
580  BlockOffset=LE_getVectorHeader16(EBlkOffset);
581  LARBSDBG("Checking Energy Block n=" << n << "BlockOffset=" << BlockOffset);
582  //Check if Energy-Block exists and is not yet part of the fragment
583  if (n && !BlockOffset)
584  {
586  BlockOffset=LE_getVectorHeader16(EBlkOffset);
587  m_logstr << MSG::DEBUG << "In finalyseFEB-------------------->>>>> " << "Checking for Energy Block : length= " << n << " BlockOffset=" << BlockOffset << endmsg;
588  //m_logstr << MSG::DEBUG << "In finalyseFEB-------------------->>>>> " << "Checking for Energy Block : m_EnergyIndex= " << m_EnergyIndex << endmsg;
589  for(unsigned int i=0;i<n;i++)
590  m_vFragment->push_back(m_EnergyBlock[i]);
591  }
592 
593  // Gain block...
594  n = m_GainBlock.size();
595  BlockOffset=LE_getVectorHeader16(GainBlkOffset);
596  LARBSDBG("Checking Gain Block n=" << n << "BlockOffset=" << BlockOffset);
597  //Check if Gain-Block exists and is not yet part of the fragment
598  if (n && !BlockOffset)
599  {
601  BlockOffset=LE_getVectorHeader16(GainBlkOffset);
602  //m_logstr << MSG::DEBUG << "In finalyseFEB-------------------->>>>> " << "Checking for Gain Block : length= " << n << " BlockOffset=" << BlockOffset << endmsg;
603  for(unsigned int i=0;i<n;i++)
604  m_vFragment->push_back(m_GainBlock[i]);
605  }
606 
607 
608  // FeBInfo Block... // offline encoder just put dummy info there
609  for (int nword=0; nword<m_NFebInfoBlkWords ; nword++)
610  m_FebInfoBlock.push_back(0L);
611 
612  n = m_FebInfoBlock.size();
614  LARBSDBG("Checking FebInfo Block n=" << n << "BlockOffset=" << BlockOffset);
615  //Check if Gain-Block exists and is not yet part of the fragment
616  if (n && !BlockOffset)
617  {
620  //m_logstr << MSG::DEBUG << "In finalyseFEB-------------------->>>>> " << "Checking for FEB Info Block : length= " << n << " BlockOffset=" << BlockOffset << endmsg;
621  for(unsigned int i=0;i<n;i++)
622  m_vFragment->push_back(m_FebInfoBlock[i]);
623  }
624 
625  // Time and Quality block
626  n = m_TimeQualityBlock.size();
628  LARBSDBG("Checking Time and Quality Block n=" << n << "BlockOffset=" << BlockOffset);
629  //Check if Time and Quality Block exists and is not yet part of the fragment
630  if (n && !BlockOffset)
631  {
634  m_logstr << MSG::DEBUG << "In finalyseFEB-------------------->>>>> " << "Checking for Time and Quality Block : length= " << n << " BlockOffset=" << BlockOffset << endmsg;
635  for(unsigned int i=0;i<n;i++)
636  m_vFragment->push_back(m_TimeQualityBlock[i]);
637  }
638 
639  // Raw data
640  LARBSDBG("Checking Raw Data Block");
641  n = m_RawDataBlock.size();
643  LARBSDBG("Checking Raw Data Block. n=" << n << "BlockOffset=" << BlockOffset);
644  //Check if Raw Data block exists and is not yet part of the fragment
645  if ((n>m_NFlaggingWords) && (!BlockOffset))
646  {
648  for(unsigned int i=0;i<n;i++)
649  m_vFragment->push_back(m_RawDataBlock[i]);
650  }
651  setHeader32(NWTot,m_vFragment->size());
652 
653  // m_logstr << MSG::DEBUG << "############################################################################>>>>> " << endmsg;
654  // m_logstr << MSG::DEBUG << "In finalyseFEB-------------------->>>>> Ofsets summary (en hexa) : " << endmsg;
655  // m_logstr << MSG::DEBUG << "Summary Block Offset : " << LE_getVectorHeader16(SumBlkOffset) << endmsg;
656  // m_logstr << MSG::DEBUG << "Counter Block Offset : " << LE_getVectorHeader16(CounterBlkOffset) << endmsg;
657  // m_logstr << MSG::DEBUG << "Energy Block Offset : " << LE_getVectorHeader16(EBlkOffset) << endmsg;
658  // m_logstr << MSG::DEBUG << "Gain Block Offset : " << LE_getVectorHeader16(GainBlkOffset) << endmsg;
659  // m_logstr << MSG::DEBUG << "Gain Block Offset : " << LE_getVectorHeader16(FebInfoBlkOffset) << endmsg;
660  // m_logstr << MSG::DEBUG << "Raw Data Block Offset: " << LE_getVectorHeader16(RawDataBlkOffset) << endmsg;
661  // m_logstr << MSG::DEBUG << "Number of hot cells : " << m_numberHotCell << endmsg;
662  // m_logstr << MSG::DEBUG << "############################################################################>>>>> " << endmsg;
663 
664  m_logstr << MYLEVEL << "***********************************************************************"<< endmsg;
665  m_logstr << MYLEVEL << "m_HottestCellIndex : "<< m_HottestCellIndex << endmsg;
666  m_logstr << MYLEVEL << "m_HottestCellEnergy : "<< m_HottestCellEnergy << endmsg;
667  m_logstr << MYLEVEL << "***********************************************************************"<< endmsg;
668  m_logstr << MYLEVEL << "m_Ex : "<< m_Ex << endmsg;
669  m_logstr << MYLEVEL << "m_Ey : "<< m_Ey << endmsg;
670  m_logstr << MYLEVEL << "***********************************************************************"<< endmsg;
671 
672 
673  clearBlocks();
674  return;
675 }
676 
677 
679 {
680  //std::cout << "Concatinating FEBs. Have "<< m_mFebBlocks.size() <<" febs." << std::endl;
681  FEBMAPTYPE::const_iterator feb_it_b=m_mFebBlocks.begin();
682  FEBMAPTYPE::const_iterator feb_it_e=m_mFebBlocks.end();
683  FEBMAPTYPE::const_iterator feb_it;
684  for (feb_it=feb_it_b;feb_it!=feb_it_e;++feb_it) {
685  if (feb_it!=feb_it_b) //Not first Feb
686 /*
687  if (fullHeader) {//Add middle header
688  m_pRODblock->push_back(fullHeader->version().full());//Format Version number
689  m_pRODblock->push_back(fullHeader->source_id()); //Source identifer
690  m_pRODblock->push_back(fullHeader->run_no());
691  m_pRODblock->push_back(fullHeader->lvl1_id()); //Level 1 identifer
692  m_pRODblock->push_back(fullHeader->bc_id()); //Bunch Crossing identifer
693  m_pRODblock->push_back(fullHeader->lvl1_type()); //Level 1 trigger type
694  m_pRODblock->push_back(fullHeader->detev_type()); //Detector event type
695  }
696  else //No ROD-Header
697 */
698  m_pRODblock->resize( m_pRODblock->size()+m_MiddleHeaderSize);
699 
700  //Add feb data to rod data block
701  m_pRODblock->insert (m_pRODblock->end(),
702  feb_it->second.begin(), feb_it->second.end());
703  } //end for feb_it
704 
705  m_mFebBlocks.clear();
706  return;
707 }
708 
709 int LArRodBlockPhysicsV3::getNextRawData(int& channelNumber, std::vector<short>& samples, uint32_t& gain)
710 {
711  LARBSDBG("in LArRodBlockPhysicsV3::getNextRawData.");
712  LARBSDBG("m_RawDataCounter=" << m_RawDataCounter << " m_RawDataIndex="<< m_RawDataIndex);
713  LARBSDBG("m_channelsPerFEB=" << m_channelsPerFEB);
714  if(m_FebBlockSize<=m_iHeadBlockSize) return 0;
716 
718  if (!flags)
719  return 0; //Block not existing
720  if (m_RawDataCounter>=m_channelsPerFEB) //Already beyond maximal number of channels
721  return 0;
722 
723  LARBSDBG("Flags="<<flags);
724 
725  while (!getBit(m_RawDataFlagsPtr,m_RawDataCounter)) //Look for next filled channel
726  {++m_RawDataCounter;
727  LARBSDBG("RawDataCounter ist now " << m_RawDataCounter);
728  if (m_RawDataCounter>=m_channelsPerFEB) //No more channel available
729  return 0;
730  }
731  LARBSDBG("Found filled channel at positon " << m_RawDataCounter);
732  //Found next filled channel
733  channelNumber=m_RawDataCounter;
734  //channelNumber=(m_RawDataCounter>>4) + ((m_RawDataCounter&0xf)<<3); //Convert ROD to FEB channel ordering
735  unsigned int nsamples = LE_getHeader16(NGainNSamples) & 0x00FF;
736  LARBSDBG("This run has " << nsamples << " samples");
738  LARBSDBG( "index="<<index);
739  ++m_RawDataIndex;
740  LARBSDBG("In getnextRawData(). index= " << index);
741  gain=3-((m_GainPtr[channelNumber/16] >> (channelNumber%16)*2) & 0x3);
742  if(gain>=CaloGain::LARNGAIN) return 0;
743  for(unsigned int i=0;i<nsamples;i++) {
744  uint16_t x;
745  if((index+i)%2==0)
746  x=m_RawDataPtr[index+i+1];
747  else
748  x=m_RawDataPtr[index+i-1];
749  samples.push_back((short) (x & 0xfff));
750  }
752 
753  if (m_rearrangeFirstSample && m_rearrangeFirstSample<samples.size()) //FIXME: Very ugly hack! See explanation in LArRodDecoder.h file
754  {//Change e.g. 3 0 1 2 4 to 0 1 2 3 4
755  short movedSample=samples[0];
756  for (unsigned i=1;i<=m_rearrangeFirstSample;i++)
757  samples[i-1]=samples[i];
758  samples[m_rearrangeFirstSample]=movedSample;
759  }
760 
761  return 1;
762 }
763 
764 
765 
766 
767 //Sort functions & ordering relation:
768 template<class RAWDATA>
769 bool LArRodBlockPhysicsV3::operator ()
770  //(const LArRawChannel* ch1, const LArRawChannel* ch2) const
771  (const RAWDATA* ch1, const RAWDATA* ch2) const
772 {
773  HWIdentifier id1 = ch1->channelID();
774  HWIdentifier id2 = ch2->channelID();
775 
776  HWIdentifier febId1= m_onlineHelper->feb_Id(id1);
777  HWIdentifier febId2= m_onlineHelper->feb_Id(id2);
778 
779  if(febId1 == febId2 ){
780  int cId1 = m_onlineHelper->channel(id1);
781  int cId2 = m_onlineHelper->channel(id2);
782  return FebToRodChannel(cId1) < FebToRodChannel(cId2);
783  }
784 
785  return febId1 < febId2 ;
786 }
787 
788 void LArRodBlockPhysicsV3::sortDataVector(std::vector<const LArRawChannel*>& vRC)
789 {std::sort(vRC.begin(),vRC.end(),*this);}
790 
791 void LArRodBlockPhysicsV3::sortDataVector( std::vector<const LArDigit*>& vDigit)
792 {std::sort(vDigit.begin(),vDigit.end(),*this);
793 }
794 
796 {
797  return LE_getHeader16(NGainNSamples)&0xff;
798 }
799 
801 {
802  return LE_getHeader16(NGainNSamples)>>8;
803 }
804 
806 {
809  //if(sample&0x1) x=x&0xffff;
810  //else
811  x=x&0xffff;
812  return x;
813 }
814 
816 {
819  x=x>>16;
820  uint16_t ctrl=x;
821  return ctrl;
822 }
823 
825 {
828  x=x&0xffff;
829  uint16_t ctrl=x;
830  return ctrl;
831 }
832 
834 {
837  x=x>>16;
838  uint16_t ctrl=x;
839  return ctrl;
840 }
841 
843 {
844  if(getNumberOfWords()<Status2/2) return 0;
846  return x;
847 }
848 
849 
851 {
852  m_EnergyThreshold=thres;
853 }
854 
856 {
857 m_OffTimeCut=TimeCut;
858 }
859 
861 {
862  m_Ex=(int32_t)Ex;
863  return;
864 }
866 {
867  m_Ey=(int32_t)Ey;
868  return;
869 }
870 
872 {
873  m_Ez=(int32_t)Ez;
874  return;
875 }
876 
LArRodBlockStructure
Definition: LArRodBlockStructure.h:48
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
LArRodBlockPhysicsV3::m_OffTimeCut
int16_t m_OffTimeCut
Definition: LArRodBlockPhysicsV3.h:195
LArRodBlockPhysicsV3::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition: LArRodBlockPhysicsV3.h:200
LArRodBlockStructure::m_vFragment
std::vector< uint32_t > * m_vFragment
Definition: LArRodBlockStructure.h:231
LArRodBlockPhysicsV3::CounterBlkOffset
@ CounterBlkOffset
Definition: LArRodBlockPhysicsV3.h:66
LArRodBlockPhysicsV3::m_RawDataFlagsPtr
const uint32_t * m_RawDataFlagsPtr
Definition: LArRodBlockPhysicsV3.h:182
LArRodBlockPhysicsV3::setEThreshold
virtual void setEThreshold(uint16_t thres)
Definition: LArRodBlockPhysicsV3.cxx:850
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
febId1
HWIdentifier febId1
Definition: LArRodBlockPhysicsV3.cxx:776
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
LArRodBlockPhysicsV3::m_DummyBitMap
static const uint32_t m_DummyBitMap[4]
Definition: LArRodBlockPhysicsV3.h:201
LArRodBlockPhysicsV3::setEy
virtual void setEy(double Ey)
Definition: LArRodBlockPhysicsV3.cxx:865
LArRodBlockPhysicsV3::m_NCounterBlkWords
int m_NCounterBlkWords
Definition: LArRodBlockPhysicsV3.h:185
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LArRodBlockStructure::getNumberOfWords
uint32_t getNumberOfWords() const
Definition: LArRodBlockStructure.h:428
LARBSDBG
#define LARBSDBG(text)
Definition: LArRodBlockPhysicsV3.cxx:25
index
Definition: index.py:1
LArRodBlockPhysicsV3::sortDataVector
virtual void sortDataVector(std::vector< const LArRawChannel * > &)
AthenaPoolTestRead.flags
flags
Definition: AthenaPoolTestRead.py:8
LArRodBlockStructure::m_FebBlockSize
int32_t m_FebBlockSize
Definition: LArRodBlockStructure.h:229
LArRodBlockPhysicsV3::m_GainIndex
int m_GainIndex
Definition: LArRodBlockPhysicsV3.h:171
LArRodBlockPhysicsV3::setOffTimeCut
virtual void setOffTimeCut(uint16_t TimeCut)
Definition: LArRodBlockPhysicsV3.cxx:855
LArRodBlockStructure::m_Ez
int32_t m_Ez
Definition: LArRodBlockStructure.h:209
LArRodBlockStructure::LE_getVectorHeader16
uint16_t LE_getVectorHeader16(const unsigned n) const
Definition: LArRodBlockStructure.h:410
LArRodBlockPhysicsV3::m_NFlaggingWords
int m_NFlaggingWords
Definition: LArRodBlockPhysicsV3.h:190
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
LArRodBlockPhysicsV3::m_NEnergyBlkWords
int m_NEnergyBlkWords
Definition: LArRodBlockPhysicsV3.h:186
LArRodBlockPhysicsV3::NWTot
@ NWTot
Definition: LArRodBlockPhysicsV3.h:58
LArRodBlockPhysicsV3::GainBlkOffset
@ GainBlkOffset
Definition: LArRodBlockPhysicsV3.h:68
LArRodBlockPhysicsV3::setNumberOfGains
virtual void setNumberOfGains(const uint8_t n)
Definition: LArRodBlockPhysicsV3.cxx:216
id2
HWIdentifier id2
Definition: LArRodBlockPhysicsV3.cxx:774
LArRodBlockPhysicsV3::Status2
@ Status2
Definition: LArRodBlockPhysicsV3.h:72
LArRodBlockPhysicsV3::FebToRodChannel
int FebToRodChannel(int ch) const
Definition: LArRodBlockPhysicsV3.h:211
febId2
HWIdentifier febId2
Definition: LArRodBlockPhysicsV3.cxx:777
LArRodBlockPhysicsV3::m_TimeQualityBlock
std::vector< uint32_t > m_TimeQualityBlock
Definition: LArRodBlockPhysicsV3.h:161
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
LArRodBlockStructure::m_FebBlock
const uint32_t * m_FebBlock
Definition: LArRodBlockStructure.h:227
LArRodBlockPhysicsV3::m_RawDataBlock
std::vector< uint32_t > m_RawDataBlock
Definition: LArRodBlockPhysicsV3.h:162
LArRodBlockPhysicsV3::TimeQualityBlkOffset
@ TimeQualityBlkOffset
Definition: LArRodBlockPhysicsV3.h:70
LArRodBlockPhysicsV3::getRadd
virtual uint32_t getRadd(uint32_t adc, uint32_t sample) const
Definition: LArRodBlockPhysicsV3.cxx:805
HWIdentifier
Definition: HWIdentifier.h:13
LArRodBlockPhysicsV3::m_logstr
MsgStream m_logstr
Definition: LArRodBlockPhysicsV3.h:207
CaloGain::LARNGAIN
@ LARNGAIN
Definition: CaloGain.h:19
x
#define x
LArRodBlockPhysicsV3::initializeFragment
virtual void initializeFragment(std::vector< uint32_t > &fragment)
Definition: LArRodBlockPhysicsV3.cxx:450
xAOD::int16_t
setScaleOne setStatusOne setSaturated int16_t
Definition: gFexGlobalRoI_v1.cxx:55
LArRodBlockStructure::m_pRODblock
std::vector< uint32_t > * m_pRODblock
Definition: LArRodBlockStructure.h:232
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
LArRodBlockPhysicsV3::getNumberOfSamples
virtual uint32_t getNumberOfSamples() const
LArRodBlockPhysicsV3::m_CounterIndex
int m_CounterIndex
Definition: LArRodBlockPhysicsV3.h:168
LArRodBlockPhysicsV3::setNumberOfSamples
virtual void setNumberOfSamples(const uint8_t n)
Definition: LArRodBlockPhysicsV3.cxx:211
LArRodBlockPhysicsV3::concatinateFEBs
virtual void concatinateFEBs()
Definition: LArRodBlockPhysicsV3.cxx:678
LArRodBlockPhysicsV3::getCtrl2
virtual uint16_t getCtrl2(uint32_t adc) const
Definition: LArRodBlockPhysicsV3.cxx:824
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
LArRodBlockPhysicsV3::finalizeFEB
virtual void finalizeFEB()
Definition: LArRodBlockPhysicsV3.cxx:498
LArRodBlockPhysicsV3::m_NFebInfoBlkWords
int m_NFebInfoBlkWords
Definition: LArRodBlockPhysicsV3.h:188
LArRodBlockStructure::m_iHeadBlockSize
unsigned short m_iHeadBlockSize
Definition: LArRodBlockStructure.h:221
LArRodBlockStructure::m_rearrangeFirstSample
unsigned int m_rearrangeFirstSample
Definition: LArRodBlockStructure.h:241
LArRodBlockPhysicsV3::m_FebInfoIndex
int m_FebInfoIndex
Definition: LArRodBlockPhysicsV3.h:170
LArRodBlockStructure::getHeader32
uint32_t getHeader32(const unsigned n) const
Definition: LArRodBlockStructure.h:365
LArRodBlockPhysicsV3::initializeFEB
virtual void initializeFEB(const uint32_t id)
Definition: LArRodBlockPhysicsV3.cxx:478
LArRodBlockPhysicsV3::m_CounterPtr
const uint16_t * m_CounterPtr
Definition: LArRodBlockPhysicsV3.h:176
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
LArRodBlockPhysicsV3::setEx
virtual void setEx(double Ex)
Definition: LArRodBlockPhysicsV3.cxx:860
LArRodBlockPhysicsV3::m_numberHotCellOffTime
uint16_t m_numberHotCellOffTime
Definition: LArRodBlockPhysicsV3.h:193
LArRodBlockPhysicsV3::m_TimeQualityPtr
const int16_t * m_TimeQualityPtr
Definition: LArRodBlockPhysicsV3.h:178
LArDigit.h
LArRodBlockPhysicsV3::m_TimeQualityIndex
int m_TimeQualityIndex
Definition: LArRodBlockPhysicsV3.h:172
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
LArRodBlockPhysicsV3::FebInfoBlkOffset
@ FebInfoBlkOffset
Definition: LArRodBlockPhysicsV3.h:69
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:100
LArRodBlockPhysicsV3::m_GainPtr
const uint32_t * m_GainPtr
Definition: LArRodBlockPhysicsV3.h:179
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArRodBlockPhysicsV3::setNextEnergy
virtual void setNextEnergy(const int channel, const int32_t energy, const int32_t time, const int32_t quality, const uint32_t gain)
Definition: LArRodBlockPhysicsV3.cxx:223
Athena
Some weak symbol referencing magic...
Definition: AthLegacySequence.h:21
beamspotman.n
n
Definition: beamspotman.py:731
LArRodBlockPhysicsV3::RawDataBlkOffset
@ RawDataBlkOffset
Definition: LArRodBlockPhysicsV3.h:71
LArRodBlockPhysicsV3.h
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArRodBlockPhysicsV3::EBlkOffset
@ EBlkOffset
Definition: LArRodBlockPhysicsV3.h:67
01SubmitToGrid.samples
samples
Definition: 01SubmitToGrid.py:58
LArRodBlockPhysicsV3::getStatus
virtual uint32_t getStatus() const
Definition: LArRodBlockPhysicsV3.cxx:842
LArRodBlockPhysicsV3::m_EnergyBlock
std::vector< uint32_t > m_EnergyBlock
Definition: LArRodBlockPhysicsV3.h:158
LArRodBlockPhysicsV3::getCtrl3
virtual uint16_t getCtrl3(uint32_t adc) const
Definition: LArRodBlockPhysicsV3.cxx:833
LArRodBlockPhysicsV3::m_SumBlkBlock
std::vector< uint32_t > m_SumBlkBlock
Definition: LArRodBlockPhysicsV3.h:156
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:127
LArRodBlockPhysicsV3::m_FebInfoBlock
std::vector< uint32_t > m_FebInfoBlock
Definition: LArRodBlockPhysicsV3.h:160
MYLEVEL
#define MYLEVEL
Definition: LArRodBlockPhysicsV3.h:47
LArRodBlockPhysicsV3::getNumberOfGains
virtual uint32_t getNumberOfGains() const
LArRodBlockStructure::getBit
int getBit(const uint32_t *const p, const unsigned chan) const
Definition: LArRodBlockStructure.h:433
LArRodBlockStructure::LE_setHeader16
void LE_setHeader16(const unsigned n, const uint16_t w)
Definition: LArRodBlockStructure.h:417
LArRodBlockPhysicsV3::SumBlkOffset
@ SumBlkOffset
Definition: LArRodBlockPhysicsV3.h:65
LArRodBlockStructure::m_Ex
int32_t m_Ex
Definition: LArRodBlockStructure.h:207
LArRodBlockPhysicsV3::resetPointers
virtual void resetPointers()
Definition: LArRodBlockPhysicsV3.cxx:105
LArRawChannel.h
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
LArRodBlockPhysicsV3::m_GainBlock
std::vector< uint32_t > m_GainBlock
Definition: LArRodBlockPhysicsV3.h:159
LArRodBlockPhysicsV3::m_CounterBlkBlock
std::vector< uint32_t > m_CounterBlkBlock
Definition: LArRodBlockPhysicsV3.h:157
LArRodBlockPhysicsV3::setEz
virtual void setEz(double Ez)
Definition: LArRodBlockPhysicsV3.cxx:871
LArRodBlockPhysicsV3::m_SumBlkIndex
int m_SumBlkIndex
Definition: LArRodBlockPhysicsV3.h:173
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
LArRodBlockPhysicsV3::m_SumBlkPtr
const uint32_t * m_SumBlkPtr
Definition: LArRodBlockPhysicsV3.h:175
LArRodBlockPhysicsV3::m_EnergyThreshold
uint16_t m_EnergyThreshold
Definition: LArRodBlockPhysicsV3.h:194
LArRodBlockPhysicsV3::m_numberHotCell
uint16_t m_numberHotCell
Definition: LArRodBlockPhysicsV3.h:192
LArOnlineID
Definition: LArOnlineID.h:20
LArRodBlockPhysicsV3::NGainNSamples
@ NGainNSamples
Definition: LArRodBlockPhysicsV3.h:64
LArRodBlockPhysicsV3::LArRodBlockPhysicsV3
LArRodBlockPhysicsV3()
Definition: LArRodBlockPhysicsV3.cxx:37
LArRodBlockStructure::LE_getHeader16
uint16_t LE_getHeader16(const unsigned n) const
Definition: LArRodBlockStructure.h:405
ReadOfcFromCool.nsamples
nsamples
Definition: ReadOfcFromCool.py:115
LArRodBlockStructure::m_MiddleHeaderSize
int32_t m_MiddleHeaderSize
Definition: LArRodBlockStructure.h:239
DeMoScan.index
string index
Definition: DeMoScan.py:362
LArRodBlockPhysicsV3::setPointers
virtual bool setPointers()
Definition: LArRodBlockPhysicsV3.cxx:126
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
LArRodBlockPhysicsV3::endtag
@ endtag
Definition: LArRodBlockPhysicsV3.h:77
LArRodBlockPhysicsV3::setRawData
virtual void setRawData(const int channel, const std::vector< short > &samples, const uint32_t gain)
Definition: LArRodBlockPhysicsV3.cxx:417
LArRodBlockPhysicsV3::getNextRawData
virtual int getNextRawData(int &channelNumber, std::vector< short > &samples, uint32_t &gain)
Definition: LArRodBlockPhysicsV3.cxx:709
LArRodBlockPhysicsV3::m_RawDataCounter
int m_RawDataCounter
Definition: LArRodBlockPhysicsV3.h:166
DEBUG
#define DEBUG
Definition: page_access.h:11
LArRodBlockPhysicsV3::getCtrl1
virtual uint16_t getCtrl1(uint32_t adc) const
Definition: LArRodBlockPhysicsV3.cxx:815
LArRodBlockPhysicsV3::m_NGainBlkWords
int m_NGainBlkWords
Definition: LArRodBlockPhysicsV3.h:187
LArRodBlockStructure::m_Ey
int32_t m_Ey
Definition: LArRodBlockStructure.h:208
LArRodBlockPhysicsV3::m_HottestCellIndex
uint16_t m_HottestCellIndex
Definition: LArRodBlockPhysicsV3.h:196
LArRodBlockStructure::setBit
void setBit(uint32_t *const p, const unsigned chan)
Definition: LArRodBlockStructure.h:444
LArRodBlockPhysicsV3::clearBlocks
void clearBlocks()
Definition: LArRodBlockPhysicsV3.cxx:94
LArRodBlockPhysicsV3::FEBID
@ FEBID
Definition: LArRodBlockPhysicsV3.h:60
LArRodBlockPhysicsV3::m_HottestCellEnergy
uint32_t m_HottestCellEnergy
Definition: LArRodBlockPhysicsV3.h:197
LArRodBlockPhysicsV3::m_EnergyIndex
int m_EnergyIndex
Definition: LArRodBlockPhysicsV3.h:169
LArRodBlockPhysicsV3::m_FebInfoDataPtr
const int16_t * m_FebInfoDataPtr
Definition: LArRodBlockPhysicsV3.h:180
LArRodBlockStructure::m_channelsPerFEB
int m_channelsPerFEB
Definition: LArRodBlockStructure.h:225
LArRodBlockPhysicsV3::m_NSumBlkWords
int m_NSumBlkWords
Definition: LArRodBlockPhysicsV3.h:184
LArRodBlockPhysicsV3::m_RawDataIndex
int m_RawDataIndex
Definition: LArRodBlockPhysicsV3.h:167
LArRodBlockPhysicsV3::m_EnergyPtr
const uint16_t * m_EnergyPtr
Definition: LArRodBlockPhysicsV3.h:177
LArRodBlockStructure::m_mFebBlocks
FEBMAPTYPE m_mFebBlocks
Definition: LArRodBlockStructure.h:234
LArRodBlockPhysicsV3::m_RawDataPtr
const int16_t * m_RawDataPtr
Definition: LArRodBlockPhysicsV3.h:181
LArOnlineID.h
LArRodBlockStructure::setHeader32
void setHeader32(const unsigned n, const uint32_t w)
Definition: LArRodBlockStructure.h:394