ATLAS Offline Software
jFexInputByteStreamTool.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 //***************************************************************************
6 // jFexInputByteStreamTool - This tool decodes Run3 jFEX input data!
7 // -------------------
8 // begin : 01 07 2022
9 // email : Sergi.Rodriguez@cern.ch
10 // ***************************************************************************/
11 
13 #include "jFexBits.h"
14 #include "eformat/SourceIdentifier.h"
15 #include "eformat/Status.h"
16 
17 #include <span>
18 #include <fstream>
19 
22 
23 namespace jBits = LVL1::jFEXBits;
24 
25 struct color {
26  std::string RED ="\033[1;31m";
27  std::string ORANGE ="\033[1;38;5;208m";
28  std::string YELLOW ="\033[1;33m";
29  std::string GREEN ="\033[1;32m";
30  std::string BLUE ="\033[1;34m";
31  std::string PURPLE ="\033[1;35m";
32  std::string END ="\033[0m";
33  std::string B_BLUE ="\033[1;44m";
34  std::string B_PURPLE ="\033[1;45m";
35  std::string B_ORANGE ="\033[1;48;5;208;30m";
36  std::string B_GRAY ="\033[1;100m";
37  std::string B_RED ="\033[1;41m";
38  std::string B_GREEN ="\033[1;42m";
39 } const C;
40 
42  const std::string& name,
43  const IInterface* parent)
44  : base_class(type, name, parent) {}
45 
47 
48  ATH_MSG_INFO( "Initializing L1CaloFEXByteStream/jFexInputByteStreamTool algorithm with name: "<< name());
49  ATH_MSG_INFO( "Reading into SG key: "<< m_jTowersReadKey);
50  ATH_MSG_INFO( "Writting into SG key: "<< m_jTowersWriteKey);
51  ATH_MSG_INFO( "Thinnig towers: "<< m_doThinning);
52 
53 
54  // Conversion mode for jTowers
55  ConversionMode jTowersmode = getConversionMode(m_jTowersReadKey, m_jTowersWriteKey, msg());
57  ATH_CHECK(m_jTowersWriteKey.initialize(jTowersmode==ConversionMode::Decoding));
58  ATH_CHECK(m_jTowersReadKey.initialize(jTowersmode==ConversionMode::Encoding));
59  ATH_MSG_DEBUG((jTowersmode==ConversionMode::Encoding ? "Encoding" : "Decoding") << " jTowers ROB IDs: " << MSG::hex << m_robIds.value() << MSG::dec);
60 
61 
62 
63  //Since the mapping is constant in everyentry, better to be read in the initialize function
64  //Reading from CVMFS Fiber mapping
66 
67 
68  // Initialize monitoring tool if not empty
69  if (!m_monTool.empty()) {
70  ATH_CHECK(m_monTool.retrieve());
71  ATH_MSG_INFO("Logging errors to " << m_monTool.name() << " monitoring tool");
72  m_UseMonitoring = true;
73  }
74 
75 
76  return StatusCode::SUCCESS;
77 }
78 
79 // BS->xAOD conversion
80 StatusCode jFexInputByteStreamTool::convertFromBS(const std::vector<const ROBF*>& vrobf, const EventContext& ctx) const {
81 
82  //WriteHandle for jFEX EDMs
83 
84  //---jTower EDM
86  ATH_CHECK(jTowersContainer.record(std::make_unique<xAOD::jFexTowerContainer>(), std::make_unique<xAOD::jFexTowerAuxContainer>()));
87  ATH_MSG_DEBUG("Recorded jFexTowerContainer with key " << jTowersContainer.key());
88 
89 
90 
91  // Iterate over ROBFragments to decode
92  for (const ROBF* rob : vrobf) {
93  // Iterate over ROD words and decode
94 
95 
96  ATH_MSG_DEBUG("Starting to decode " << rob->rod_ndata() << " ROD words from ROB 0x" << std::hex << rob->rob_source_id() << std::dec);
97 
98  //There is no data to decode.. not even the ROD trailers
99  if(rob->rod_ndata() <= 0){
100  ATH_MSG_DEBUG(C.B_RED<<" No ROD words to decode: " << rob->rod_ndata() <<" in ROB 0x"<< std::hex << rob->rob_source_id()<< std::dec <<". Skipping"<<C.END);
101  continue;
102  }
103 
104  const auto dataArray = std::span{rob->rod_data(), rob->rod_ndata()};
105  std::vector<uint32_t> vec_words(dataArray.begin(),dataArray.end());
106 
107  // jFEX to ROD trailer position
108  unsigned int trailers_pos = rob->rod_ndata();
109 
110  // Starting to loop over the different jFEX blocks
111  bool READ_WORDS = true;
112  while(READ_WORDS){
113 
114  if( trailers_pos < jBits::jFEX2ROD_WORDS ){
115  std::stringstream sdetail;
116  sdetail << "There are not enough words ("<< trailers_pos <<") for the jFEX to ROD trailer decoder. Expected at least " << jBits::jFEX2ROD_WORDS<<". Skipping this FPGA(?)" ;
117  std::stringstream slocation;
118  slocation << "0x"<< std::hex << rob->rob_source_id();
119  std::stringstream stitle;
120  stitle << "Invalid trailer words" ;
121  printError(slocation.str(),stitle.str(),MSG::WARNING,sdetail.str());
122 
123 
124  READ_WORDS = false;
125  continue;
126  }
127 
128  const auto [payload, jfex, fpga, error] = jFEXtoRODTrailer ( vec_words.at(trailers_pos-2), vec_words.at(trailers_pos-1) );
129 
130  if(error != 0 ){
131 
132  bool corTrailer = ((error >> jBits::ERROR_CORR_TRAILER ) & jBits::ROD_TRAILER_1b);
133  bool safemode = ((error >> jBits::ERROR_SAFE_MODE ) & jBits::ROD_TRAILER_1b);
134  bool proterror = ((error >> jBits::ERROR_PROTOCOL_ERROR ) & jBits::ROD_TRAILER_1b);
135  bool lenerror = ((error >> jBits::ERROR_LENGTH_MISMATCH ) & jBits::ROD_TRAILER_1b);
136  bool headmismatch = ((error >> jBits::ERROR_HEADER_MISMATCH ) & jBits::ROD_TRAILER_1b);
137  bool processerror = ((error >> jBits::ERROR_PROC_TIMEOUT ) & jBits::ROD_TRAILER_1b);
138 
139  std::stringstream sdetail;
140  sdetail << "jFEX to ROD Trailer Error bits set - 6-bits error word: 0x"<< std::hex <<error << std::dec<< std::endl;
141  sdetail << "Corrective Trailer: "<< corTrailer << std::endl;
142  sdetail << "Safe Mode : "<< safemode << std::endl;
143  sdetail << "Protocol error : "<< proterror << std::endl;
144  sdetail << "Length Mismatch : "<< lenerror << std::endl;
145  sdetail << "Header Mismatch : "<< headmismatch << std::endl;
146  sdetail << "Processor timeout : "<< processerror << std::endl;
147  std::stringstream slocation;
148  slocation << "Error bit set";
149 
150  if( corTrailer ){
151  std::stringstream stitle;
152  stitle << "Corrective Trailer" ;
153  printError(slocation.str(),stitle.str(),MSG::WARNING,sdetail.str());
154  break;
155  }
156  if( safemode ){
157  std::stringstream stitle;
158  stitle << "Safe Mode" ;
159  printError(slocation.str(),stitle.str(),MSG::WARNING,sdetail.str());
160  break;
161  }
162  if( proterror ){
163  std::stringstream stitle;
164  stitle << "Protocol error" ;
165  printError(slocation.str(),stitle.str(),MSG::WARNING,sdetail.str());
166  break;
167  }
168  if( lenerror ){
169  std::stringstream stitle;
170  stitle << "Length mismatch" ;
171  printError(slocation.str(),stitle.str(),MSG::DEBUG,sdetail.str());
172  break;
173  }
174  if( headmismatch ){
175  std::stringstream stitle;
176  stitle << "Header mismatch" ;
177  printError(slocation.str(),stitle.str(),MSG::DEBUG,sdetail.str());
178  break;
179  }
180  if( processerror ){
181  std::stringstream stitle;
182  stitle << "Processor Timeout" ;
183  printError(slocation.str(),stitle.str(),MSG::DEBUG,sdetail.str());
184  break;
185  }
186  break;
187  }
188 
189  if(payload % jBits::DATA_BLOCKS != 0){
190  ATH_MSG_DEBUG(" Not full readout activated (" << payload << "). Data blocks/channels expected (" << jBits::DATA_BLOCKS <<")"<<C.END);
191  }
192 
193  if(payload % jBits::DATA_WORDS_PER_BLOCK != 0) {
194  std::stringstream sdetail;
195  sdetail << " Payload number (" << payload << ") not a multiple of data words per channel. Expected: " << jBits::DATA_WORDS_PER_BLOCK ;
196  std::stringstream slocation;
197  slocation << "jFEX "<< jfex << " FPGA "<< fpga << " in 0x"<< std::hex << rob->rob_source_id();
198  std::stringstream stitle;
199  stitle << "Invalid Data Blocks" ;
200  printError(slocation.str(),stitle.str(),MSG::DEBUG,sdetail.str());
201 
202  READ_WORDS = false;
203  continue;
204  }
205 
206  //Position index, removing jFEX to ROD, TOB and xTOB Trailers from trailers_pos (4 positions), possible padding word added on the data to get even number of 32bit words
207  unsigned int wordIndex = trailers_pos - (jBits::jFEX2ROD_WORDS);
208 
209  // Number of iterations that must be done. It is divisible otherwise it throws out an error (Line 108)
210  unsigned int Max_iter = payload/jBits::DATA_WORDS_PER_BLOCK;
211 
212  if(Max_iter>trailers_pos) {
213  std::stringstream sdetail;
214  sdetail << "Block size error in fragment 0x"<< std::hex << rob->rob_source_id() << std::dec<<". Words available: " << trailers_pos << ". Number of words wanted to decode: " << Max_iter ;
215  std::stringstream slocation;
216  slocation << "jFEX "<< jfex << " FPGA "<< fpga << " in 0x"<< std::hex << rob->rob_source_id();
217  std::stringstream stitle;
218  stitle << "Block Size Error" ;
219 
220  //Currently under investigation...
221  printError(slocation.str(),stitle.str(),MSG::DEBUG,sdetail.str());
222  return StatusCode::SUCCESS;
223 
224  //DO NOT REMOVE, once fixed it should return and error and FAILURE
225  //printError(slocation.str(),stitle.str(),m_ERROR,sdetail.str());
226  //return StatusCode::FAILURE;
227  }
228 
229  for (unsigned int iblock = 0; iblock < Max_iter; iblock++){
230  const auto [channel, saturation] = BulkStreamTrailer(vec_words.at(wordIndex-1),vec_words.at(wordIndex-2), jfex);
231 
232  const auto [DATA13_low , DATA15, DATA14] = Dataformat1(vec_words.at(wordIndex-3));
233  const auto [DATA13_up,DATA10_up , DATA12, DATA11] = Dataformat2(vec_words.at(wordIndex-4));
234  const auto [DATA10_low , DATA9 , DATA8 ] = Dataformat1(vec_words.at(wordIndex-5));
235  const auto [DATA5_low , DATA7 , DATA6 ] = Dataformat1(vec_words.at(wordIndex-6));
236  const auto [DATA5_up ,DATA2_up , DATA4 , DATA3 ] = Dataformat2(vec_words.at(wordIndex-7));
237  const auto [DATA2_low , DATA1 , DATA0 ] = Dataformat1(vec_words.at(wordIndex-8));
238 
239  //uncomment for mergeing splitted Et
240  uint16_t DATA2 = ( DATA2_up << jBits::BS_MERGE_DATA ) + DATA2_low;
241  uint16_t DATA5 = ( DATA5_up << jBits::BS_MERGE_DATA ) + DATA5_low;
242  uint16_t DATA10 = ( DATA10_up << jBits::BS_MERGE_DATA ) + DATA10_low;
243  uint16_t DATA13 = ( DATA13_up << jBits::BS_MERGE_DATA ) + DATA13_low;
244 
245  std::array<uint16_t,16> allDATA = {DATA0, DATA1, DATA2, DATA3, DATA4, DATA5, DATA6, DATA7, DATA8, DATA9, DATA10, DATA11, DATA12, DATA13, DATA14, DATA15 };
246  //std::array<uint16_t,16> allsat = {0};
247 
248  for(uint idata = 0; idata < allDATA.size(); idata++){
249 
250  char et_saturation = ((saturation >> idata) & jBits::BS_TRAILER_1b);
251 
252  //allsat[idata] = et_saturation;
253 
254  // read ID, eta and phi from map
255  unsigned int intID = mapIndex(jfex, fpga, channel, idata);
256 
257  // Exists the jTower in the mapping?
258  auto it_Firm2Tower_map = m_Firm2Tower_map.find(intID);
259  if(it_Firm2Tower_map == m_Firm2Tower_map.end()){
260 
261  // jTower not found in the mapping.. skipping.
262  // If we are here means that the jTower is not actually used in the firmware
263  continue;
264  }
265 
266  const auto [IDsim, eta, phi, source, iEta, iPhi] = it_Firm2Tower_map->second;
267 
268  std::vector<uint16_t> vtower_ET;
269  vtower_ET.clear();
270  vtower_ET.push_back(allDATA[idata]);
271 
272  std::vector<char> vtower_SAT;
273  vtower_SAT.clear();
274  vtower_SAT.push_back(et_saturation);
275 
276  //initilize the jTower EDM
277  jTowersContainer->push_back( std::make_unique<xAOD::jFexTower>() );
278  jTowersContainer->back()->initialize(eta, phi, iEta, iPhi, IDsim, source, vtower_ET, jfex, fpga, channel, idata, vtower_SAT );
279 
280  if( m_doThinning && !jTowersContainer->back()->isCore() ){
281  jTowersContainer->pop_back();
282  }
283  }
284 
285  // keeping this for future x-checks
286  //if(m_verbose ){
287 
288  //printf("DATA00 :%5x DATA01 :%5x DATA02_lo :%5x\n" , DATA0 ,DATA1 ,DATA2_low);
289  //printf("DATA03 :%5x DATA04 :%5x DATA02_up :%5x DATA05_up :%5x\n" , DATA3 ,DATA4 ,DATA2_up ,DATA5_up);
290  //printf("DATA06 :%5x DATA07 :%5x DATA05_lo :%5x\n" , DATA6 ,DATA7 ,DATA5_low);
291  //printf("DATA08 :%5x DATA09 :%5x DATA10_lo :%5x\n" , DATA8 ,DATA9 ,DATA10_low);
292  //printf("DATA11 :%5x DATA12 :%5x DATA10_up :%5x DATA13_up :%5x\n" , DATA11 ,DATA12 ,DATA10_up ,DATA13_up );
293  //printf("DATA14 :%5x DATA15 :%5x DATA13_lo :%5x\n" , DATA14 ,DATA15 ,DATA13_low);
294  //printf("*merged* DATA02 :%5x DATA05 :%5x DATA10 :%5x DATA13 :%5x\n" , DATA2 ,DATA5 ,DATA10 ,DATA13 );
295 
296  //printf("DATA0 :%5d DATA1 :%5d DATA2 :%5d DATA3 :%5d\n",allsat[0] ,allsat[1] ,allsat[2] ,allsat[3] );
297  //printf("DATA4 :%5d DATA5 :%5d DATA6 :%5d DATA7 :%5d\n",allsat[4] ,allsat[5] ,allsat[6] ,allsat[7] );
298  //printf("DATA8 :%5d DATA8 :%5d DATA10:%5d DATA11:%5d\n",allsat[8] ,allsat[9] ,allsat[10] ,allsat[11] );
299  //printf("DATA12:%5d DATA13:%5d DATA14:%5d DATA15:%5d\n",allsat[12] ,allsat[13] ,allsat[14] ,allsat[15] );
300  //}
301 
302 
303  wordIndex -= jBits::DATA_WORDS_PER_BLOCK;
304  }
305 
306  //moving trailer position index to the next jFEX data block
307  trailers_pos -= (payload + jBits::jFEX2ROD_WORDS);
308 
309  if(trailers_pos == 0){
310  READ_WORDS = false;
311  }
312  }
313  }
314 
315  return StatusCode::SUCCESS;
316 }
317 
318 
319 // Unpack jFEX to ROD Trailer
320 std::array<uint32_t,4> jFexInputByteStreamTool::jFEXtoRODTrailer (uint32_t word0, uint32_t word1) const {
321 
322  uint32_t payload = ((word0 >> jBits::PAYLOAD_ROD_TRAILER ) & jBits::ROD_TRAILER_16b);
323  uint32_t jfex = ((word0 >> jBits::jFEX_ROD_TRAILER ) & jBits::ROD_TRAILER_4b );
324  uint32_t fpga = ((word0 >> jBits::FPGA_ROD_TRAILER ) & jBits::ROD_TRAILER_2b );
325 
326  uint32_t error = ((word1 >> jBits::ERROR_ROD_TRAILER ) & jBits::ROD_TRAILER_6b );
327 
328  return {payload,jfex,fpga,error};
329 
330 }
331 
332 // Unpack Bulk stream trailer
333 std::array<uint16_t,2> jFexInputByteStreamTool::BulkStreamTrailer (uint32_t word0, uint32_t word1, uint32_t jfex) const {
334 
335  uint16_t Satur_high = ((word1 >> jBits::BS_SATUR_1_TRAILER ) & jBits::BS_TRAILER_8b );
336  uint16_t Satur_down = ((word1 >> jBits::BS_SATUR_0_TRAILER ) & jBits::BS_TRAILER_8b );
337  uint16_t Channel = ((word0 >> jBits::BS_CHANNEL_TRAILER ) & jBits::BS_TRAILER_8b );
338 
339  //Tile fibre are decoded differently, no saturation bits are set for tile
340  bool isTileFibre = false;
341  for(unsigned int i=0; i< jBits::tile_channels.at(jfex).size(); i++){
342  if(jBits::tile_channels.at(jfex).at(i) == Channel){
343  isTileFibre=true;
344  break;
345  }
346  }
347 
348  if(isTileFibre){
349  //If it is tile then return just the channel number and sat = 0
350  return {Channel, 0};
351  }
352 
353  uint16_t Satur = ( Satur_high << jBits::BS_SATUR_1_TRAILER ) + Satur_down;
354 
355  return {Channel, Satur};
356 
357 }
358 
359 
360 // Unpack Bulk stream data format 1 : DATA4 [7:0], DATA1 [12:0], DATA0 [12:0]
361 std::array<uint16_t,3> jFexInputByteStreamTool::Dataformat1 (uint32_t word0) const {
362 
363  uint16_t data_low = ((word0 >> jBits::BS_ET_DATA_0 ) & jBits::BS_TRAILER_12b);
364  uint16_t data_mid = ((word0 >> jBits::BS_ET_DATA_1 ) & jBits::BS_TRAILER_12b );
365  uint16_t data_up = ((word0 >> jBits::BS_ET_DATA_4 ) & jBits::BS_TRAILER_8b );
366 
367  return {data_up,data_mid,data_low};
368 }
369 
370 
371 // Unpack Bulk stream data format 2 : DATA7 [11:8], DATA4 [11:8], DATA1 [12:0], DATA0 [12:0]
372 std::array<uint16_t,4> jFexInputByteStreamTool::Dataformat2 (uint32_t word0) const {
373 
374  uint16_t data_low = ((word0 >> jBits::BS_ET_DATA_0 ) & jBits::BS_TRAILER_12b);
375  uint16_t data_mid = ((word0 >> jBits::BS_ET_DATA_1 ) & jBits::BS_TRAILER_12b );
376  uint16_t data_up_1 = ((word0 >> jBits::BS_ET_DATA_4 ) & jBits::BS_TRAILER_4b );
377  uint16_t data_up_2 = ((word0 >> jBits::BS_ET_DATA_7 ) & jBits::BS_TRAILER_4b );
378 
379  return {data_up_2,data_up_1,data_mid,data_low};
380 }
381 
382 
383 
385 StatusCode jFexInputByteStreamTool::convertToBS(std::vector<WROBF*>& /*vrobf*/, const EventContext& /*eventContext*/) {
386 
387 /*
388  // Retrieve the RoI container
389  auto muonRoIs = SG::makeHandle(m_roiReadKey, eventContext);
390  ATH_CHECK(muonRoIs.isValid());
391 
392  // Clear BS data cache
393  clearCache(eventContext);
394 
395  // Create raw ROD data words
396  ATH_MSG_DEBUG("Converting " << muonRoIs->size() << " L1 Muon RoIs to ByteStream");
397  uint32_t* data = newRodData(eventContext, muonRoIs->size());
398  for (size_t i=0; i<muonRoIs->size(); ++i) {
399  data[i] = muonRoIs->at(i)->roiWord();
400  }
401 
402  // Create ROBFragment containing the ROD words
403  const eformat::helper::SourceIdentifier sid(eformat::TDAQ_MUON_CTP_INTERFACE, m_muCTPIModuleID.value());
404  vrobf.push_back(newRobFragment(
405  eventContext,
406  sid.code(),
407  muonRoIs->size(),
408  data,
409  eformat::STATUS_BACK // status_position is system-specific
410  ));
411 */
412  return StatusCode::SUCCESS;
413 }
414 
416 
417  std::string myline;
418 
419  //openning file with ifstream
420  std::ifstream myfile(fileName);
421 
422  if ( !myfile.is_open() ){
423  ATH_MSG_ERROR("Could not open file:" << fileName);
424  return StatusCode::FAILURE;
425  }
426 
427  //loading the mapping information
428  while ( std::getline (myfile, myline) ) {
429 
430  //removing the header of the file (it is just information!)
431  if(myline[0] == '#') continue;
432 
433  //Splitting myline in different substrings
434  std::stringstream oneLine(myline);
435 
436  //reading elements
437  std::vector<float> elements;
438  std::string element;
439  while(std::getline(oneLine, element, ' '))
440  {
441  elements.push_back(std::stof(element));
442  }
443 
444  // It should have 10 elements
445  // ordered as: jfex fpga channel towerNr source globalEtaIndex globalPhiIndex IDSimulation eta phi
446  if(elements.size() != 10){
447  ATH_MSG_ERROR("Unexpected number of elemennts (10 expected) in file: "<< fileName);
448  return StatusCode::FAILURE;
449  }
450  // building array of <IDSimulation, eta, phi, source, iEta, iPhi>
451  std::array<float,6> aux_arr{ {elements.at(7),elements.at(8),elements.at(9),elements.at(4),elements.at(5),elements.at(6)} };
452 
453  //filling the map with the hash given by mapIndex()
454  m_Firm2Tower_map[ mapIndex(elements.at(0),elements.at(1),elements.at(2),elements.at(3)) ] = aux_arr;
455 
456  }
457  myfile.close();
458 
459  return StatusCode::SUCCESS;
460 }
461 
462 
463 constexpr unsigned int jFexInputByteStreamTool::mapIndex(unsigned int jfex, unsigned int fpga, unsigned int channel, unsigned int tower) {
464  // values from hardware: jfex=[0,5] 4 bits, fpga=[0,3] 4 bits, channel=[0,59] 8 bits, tower=[0,15] 4 bits
465  return (jfex << 16) | (fpga << 12) | (channel << 4) | tower;
466 }
467 
468 void jFexInputByteStreamTool::printError(const std::string& location, const std::string& title, MSG::Level type, const std::string& detail) const{
469 
470  if(m_UseMonitoring){
472  Monitored::Scalar("jfexDecoderErrorLocation",location.empty() ? std::string("UNKNOWN") : location),
473  Monitored::Scalar("jfexDecoderErrorTitle" ,title.empty() ? std::string("UNKNOWN") : title)
474  );
475  }
476  else {
477  msg() << type << detail << endmsg;
478  }
479 }
PathResolver::find_calib_file
static std::string find_calib_file(const std::string &logical_file_name)
Definition: PathResolver.cxx:384
CxxUtils::span
span(T *ptr, std::size_t sz) -> span< T >
A couple needed deduction guides.
color::B_GRAY
std::string B_GRAY
Definition: jFexInputByteStreamTool.cxx:36
color
Definition: jFexInputByteStreamTool.cxx:25
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
Undefined
@ Undefined
Definition: MaterialTypes.h:8
jFexBits.h
xAOD::word1
word1
Definition: eFexEMRoI_v1.cxx:82
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
jFexInputByteStreamTool::m_FiberMapping
Gaudi::Property< std::string > m_FiberMapping
Definition: jFexInputByteStreamTool.h:65
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LVL1::jFEXBits
Definition: jFexBits.h:13
jFexInputByteStreamTool::mapIndex
constexpr static unsigned int mapIndex(unsigned int jfex, unsigned int fpga, unsigned int channel, unsigned int tower)
Definition: jFexInputByteStreamTool.cxx:463
LArBadChanBlobUtils::Channel
Identifier32::value_type Channel
Definition: LArBadChanBlobUtils.h:24
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
color::GREEN
std::string GREEN
Definition: jFexInputByteStreamTool.cxx:29
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
jFexInputByteStreamTool::m_robIds
Gaudi::Property< std::vector< uint32_t > > m_robIds
Definition: jFexInputByteStreamTool.h:62
jFexInputByteStreamTool::Dataformat2
std::array< uint16_t, 4 > Dataformat2(uint32_t) const
Definition: jFexInputByteStreamTool.cxx:372
color::B_GREEN
std::string B_GREEN
Definition: jFexInputByteStreamTool.cxx:38
jFexInputByteStreamTool::m_jTowersWriteKey
SG::WriteHandleKey< xAOD::jFexTowerContainer > m_jTowersWriteKey
Definition: jFexInputByteStreamTool.h:68
color::END
std::string END
Definition: jFexInputByteStreamTool.cxx:32
color::PURPLE
std::string PURPLE
Definition: jFexInputByteStreamTool.cxx:31
LVL1::jFEXBits::tile_channels
const std::unordered_map< uint32_t, std::vector< uint16_t > > tile_channels
Definition: jFexBits.h:144
detail
Definition: extract_histogram_tag.cxx:14
jFexInputByteStreamTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: jFexInputByteStreamTool.h:56
jFexInputByteStreamTool::convertFromBS
virtual StatusCode convertFromBS(const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vrobf, const EventContext &eventContext) const override
BS->xAOD conversion.
Definition: jFexInputByteStreamTool.cxx:80
jFexInputByteStreamTool::BulkStreamTrailer
std::array< uint16_t, 2 > BulkStreamTrailer(uint32_t, uint32_t, uint32_t) const
Definition: jFexInputByteStreamTool.cxx:333
PixelByteStreamErrors::Decoding
@ Decoding
Definition: PixelByteStreamErrors.h:14
jFexInputByteStreamTool::convertToBS
virtual StatusCode convertToBS(std::vector< OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment * > &vrobf, const EventContext &eventContext) override
xAOD->BS conversion
Definition: jFexInputByteStreamTool.cxx:385
color::B_BLUE
std::string B_BLUE
Definition: jFexInputByteStreamTool.cxx:33
jFexInputByteStreamTool::printError
void printError(const std::string &location, const std::string &title, MSG::Level type, const std::string &detail) const
{map index, {IDsimulation,eta,phi,source,iEta,iPhi}}
Definition: jFexInputByteStreamTool.cxx:468
jFexInputByteStreamTool::m_UseMonitoring
bool m_UseMonitoring
Definition: jFexInputByteStreamTool.h:57
ROBF
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment ROBF
Definition: ByteStreamMergeOutputSvc.cxx:16
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
jFexInputByteStreamTool::ReadfromFile
StatusCode ReadfromFile(const std::string &)
Definition: jFexInputByteStreamTool.cxx:415
jFexInputByteStreamTool::m_doThinning
Gaudi::Property< bool > m_doThinning
Definition: jFexInputByteStreamTool.h:59
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
color::RED
std::string RED
Definition: jFexInputByteStreamTool.cxx:26
covarianceTool.title
title
Definition: covarianceTool.py:542
jFexInputByteStreamTool::Dataformat1
std::array< uint16_t, 3 > Dataformat1(uint32_t) const
Definition: jFexInputByteStreamTool.cxx:361
test_pyathena.parent
parent
Definition: test_pyathena.py:15
color::BLUE
std::string BLUE
Definition: jFexInputByteStreamTool.cxx:30
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
DataVector::back
const T * back() const
Access the last element in the collection as an rvalue.
jFexInputByteStreamTool::m_jTowersReadKey
SG::ReadHandleKey< xAOD::jFexTowerContainer > m_jTowersReadKey
Definition: jFexInputByteStreamTool.h:71
color::B_PURPLE
std::string B_PURPLE
Definition: jFexInputByteStreamTool.cxx:34
jFexInputByteStreamTool::initialize
virtual StatusCode initialize() override
Definition: jFexInputByteStreamTool.cxx:46
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
eformat::ROBFragment< PointerType > ROBFragment
Definition: RawEvent.h:27
SG::VarHandleBase::key
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:64
jFexInputByteStreamTool.h
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:47
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
color::B_RED
std::string B_RED
Definition: jFexInputByteStreamTool.cxx:37
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment
eformat::write::ROBFragment ROBFragment
Definition: RawEvent.h:33
color::YELLOW
std::string YELLOW
Definition: jFexInputByteStreamTool.cxx:28
DataVector::pop_back
void pop_back()
Remove the last element from the collection.
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
WROBF
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment WROBF
Definition: eFexByteStreamTool.cxx:27
DEBUG
#define DEBUG
Definition: page_access.h:11
jFexInputByteStreamTool::jFEXtoRODTrailer
std::array< uint32_t, 4 > jFEXtoRODTrailer(uint32_t, uint32_t) const
Definition: jFexInputByteStreamTool.cxx:320
jFexInputByteStreamTool::jFexInputByteStreamTool
jFexInputByteStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: jFexInputByteStreamTool.cxx:41
copySelective.source
string source
Definition: copySelective.py:32
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
jFexInputByteStreamTool::m_Firm2Tower_map
std::unordered_map< unsigned int, std::array< float, 6 > > m_Firm2Tower_map
Definition: jFexInputByteStreamTool.h:84
get_generator_info.error
error
Definition: get_generator_info.py:40
xAOD::iEta
setScale setgFexType iEta
Definition: gFexJetRoI_v1.cxx:74
color::ORANGE
std::string ORANGE
Definition: jFexInputByteStreamTool.cxx:27
error
Definition: IImpactPoint3dEstimator.h:70
color::B_ORANGE
std::string B_ORANGE
Definition: jFexInputByteStreamTool.cxx:35
C
struct color C
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7