ATLAS Offline Software
L1TopoSimulation.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "L1TopoSimulation.h"
6 
7 // Histogram Service
8 #include "AthenaL1TopoHistSvc.h"
9 
10 // Trigger includes
13 
14 
15 // L1Topo includes
18 #include "L1TopoCommon/Types.h"
19 
21 
22 #include "L1TopoRDO/BlockTypes.h"
23 #include "L1TopoRDO/Header.h"
24 #include "L1TopoRDO/Helpers.h"
25 #include "L1TopoRDO/L1TopoTOB.h"
27 #include "L1TopoRDO/L1TopoResult.h"
28 
29 // xAOD
32 
33 using namespace LVL1;
34 
35 
36 L1TopoSimulation::L1TopoSimulation(const std::string &name, ISvcLocator *pSvcLocator) :
37  AthAlgorithm(name, pSvcLocator),
38  m_topoSteering( std::make_unique<TCS::TopoSteering>() ),
39  m_scaler( std::make_unique<LVL1::PeriodicScaler>() )
40 {
41 }
42 
43 
44 bool
46 {
47  return true;
48 }
49 
52  ATH_MSG_INFO("initialize");
53 
54  m_topoSteering->setMsgLevel( TrigConf::MSGTC::Level((int)m_topoSteeringOutputLevel) );
55 
56  m_topoSteering->setLegacyMode(m_isLegacyTopo);
57 
58  ATH_MSG_DEBUG("retrieving " << m_histSvc);
59  CHECK( m_histSvc.retrieve() );
60 
61  ATH_MSG_DEBUG("retrieving " << m_emtauInputProvider);
62  CHECK( m_emtauInputProvider.retrieve() );
63 
64  ATH_MSG_DEBUG("retrieving " << m_jetInputProvider);
65  CHECK( m_jetInputProvider.retrieve() );
66 
67  ATH_MSG_DEBUG("retrieving " << m_energyInputProvider);
68  CHECK( m_energyInputProvider.retrieve() );
69 
70  ATH_MSG_DEBUG("retrieving " << m_muonInputProvider);
71  CHECK( m_muonInputProvider.retrieve(DisableTool{m_isLegacyTopo}) );
72 
73  ATH_MSG_DEBUG("retrieving " << m_ControlHistSvc);
74  CHECK( m_ControlHistSvc.retrieve());
75 
76  CHECK(m_l1topoRawDataKey.initialize(m_fillHistogramsBasedOnHardwareDecision));
77 
78  CHECK(m_legacyTopoCTPLocation.initialize(m_isLegacyTopo));
79  CHECK(m_legacyTopoOverflowCTPLocation.initialize(m_isLegacyTopo));
80  CHECK(m_topoCTPLocation.initialize(!m_isLegacyTopo));
81  CHECK(m_topoOverflowCTPLocation.initialize(!m_isLegacyTopo));
82  if (m_isLegacyTopo){
83  ATH_MSG_DEBUG("Legacy output trigger key property " << m_legacyTopoCTPLocation);
84  ATH_MSG_DEBUG("Legacy output overflow key property " << m_legacyTopoOverflowCTPLocation);
85  }
86  else {
87  ATH_MSG_DEBUG("Output trigger key property " << m_topoCTPLocation);
88  ATH_MSG_DEBUG("Output overflow key property " << m_topoOverflowCTPLocation);
89  }
90 
91  ATH_MSG_DEBUG("Prescale factor set to " << m_prescale);
92  ATH_MSG_DEBUG("PrescaleDAQROBAccess factor set to " << m_prescaleForDAQROBAccess);
93  ATH_MSG_DEBUG("FillHistoBasedOnHardware " << m_fillHistogramsBasedOnHardwareDecision);
94  if(m_fillHistogramsBasedOnHardwareDecision and
95  (m_prescaleForDAQROBAccess % m_prescale)) {
96  ATH_MSG_FATAL("PrescaleDAQROBAccess must be a multiple of Prescale"
97  <<" : current values :"
98  <<" "<<m_prescaleForDAQROBAccess
99  <<", "<<m_prescale);
100  return StatusCode::FAILURE;
101  }
102 
103  const TrigConf::L1Menu * l1menu = nullptr;
105  ATH_MSG_INFO( "initialize(): retrieving new-style L1 trigger menu from Detector Store" );
106 
107  m_topoSteering->setUseBitwise(m_enableBitwise);
108  try {
109  m_topoSteering->setupFromConfiguration(*l1menu);
110  }
111  catch(std::exception & e) {
112  ATH_MSG_FATAL("Caught exception when configuring topo steering from menu: " << e.what() );
113  return StatusCode::FAILURE;
114  }
115 
116  m_topoSteering->setAlgMsgLevel( TrigConf::MSGTC::Level((int)m_topoOutputLevel) );
117  m_topoSteering->setOutputAlgosFillBasedOnHardware(m_fillHistogramsBasedOnHardwareDecision);
118 
119  ATH_CHECK(m_ControlHistSvc->SetHistSvc(m_topoSteering, m_histBaseDir.value()));
120 
121  ATH_CHECK(m_legacyL1topoKey.initialize(m_isLegacyTopo));
122  ATH_CHECK(m_l1topoKey.initialize(!m_isLegacyTopo));
123 
124  return StatusCode::SUCCESS;
125 }
126 
127 
128 // Exectued once per offline job and for every new run online
131  ATH_MSG_DEBUG("start");
132 
133  m_scaler->reset();
134 
135  try {
136  m_topoSteering->initializeAlgorithms();
137  }
138  catch(std::exception & e) {
139  ATH_MSG_FATAL("Caught exception when initializing topo algorithms" << e.what() );
140  return StatusCode::FAILURE;
141  }
142 
143  if( m_enableInputDump ) {
144  m_topoSteering->inputEvent().enableInputDump( m_inputDumpFile );
145  m_topoSteering->inputEvent().dumpStart();
146  }
147 
148  return StatusCode::SUCCESS;
149 }
150 
151 
152 
155  const EventContext& ctx = Gaudi::Hive::currentContext();
156 
157  if (m_prescale>1 && not m_scaler->decision(m_prescale)){
158  ATH_MSG_DEBUG( "This event not processed due to prescale");
159  return StatusCode::SUCCESS;
160  // do not record dummy output:
161  // LVL1::FrontPanelCTP is initialised with all 6 32-bit words set to 0 which is valid data
162  // LVL1::FrontPanelCTP * topo2CTP = new LVL1::FrontPanelCTP();
163  // CHECK(evtStore()->record( topo2CTP, m_topoCTPLocation ));
164  }
165  else {
166  ATH_MSG_DEBUG( "This event is processed - not prescaled");
167  }
168 
169  // reset input and internal state
170  m_topoSteering->reset();
171 
172  // fill the L1Topo Input Event
173  TCS::TopoInputEvent & inputEvent = m_topoSteering->inputEvent();
174 
175  inputEvent.setEventInfo(ctx.eventID().run_number(),
176  ctx.eventID().event_number(),
177  ctx.eventID().lumi_block(),
178  ctx.eventID().bunch_crossing_id());
179 
180  // EM TAU
181  CHECK(m_emtauInputProvider->fillTopoInputEvent(inputEvent));
182 
183  // JET
184  CHECK(m_jetInputProvider->fillTopoInputEvent(inputEvent));
185 
186  // ET sum, ET miss
187  CHECK(m_energyInputProvider->fillTopoInputEvent(inputEvent));
188 
189  // Muon
190  if (m_muonInputProvider.isEnabled()) {
191  CHECK(m_muonInputProvider->fillTopoInputEvent(inputEvent));
192  }
193 
194  ATH_MSG_DEBUG("" << inputEvent);
195 
196  inputEvent.dump();
197 
199  if (retrieveHardwareDecision(m_isLegacyTopo, ctx).isSuccess()) {
200  m_topoSteering->propagateHardwareBitsToAlgos();
201  m_topoSteering->setOutputAlgosSkipHistograms(false);
202  }
203  else {
204  m_topoSteering->setOutputAlgosSkipHistograms(true);
205  }
207  m_topoSteering->setOutputAlgosSkipHistograms(true);
208  }
209  }
210 
211  // execute the toposteering
212  m_topoSteering->executeEvent();
213 
214  ATH_MSG_DEBUG("Global Decision:\n" << m_topoSteering->simulationResult().globalOutput());
215 
216 
226  // Format for CTP still undecided
227 
228  const TCS::GlobalOutput & globalOutput = m_topoSteering->simulationResult().globalOutput();
229  auto topoOutput2CTP = std::make_unique< LVL1::FrontPanelCTP >();
230  auto topoOverflow2CTP = std::make_unique< LVL1::FrontPanelCTP >();
231 
232  const TrigConf::L1Menu * l1menu = nullptr;
234 
235 
237  ATH_MSG_DEBUG(" write: " << outputHandle.key() << " = " << "..." );
238  ATH_CHECK(outputHandle.record(std::make_unique<xAOD::L1TopoSimResultsContainer>(), std::make_unique<xAOD::L1TopoSimResultsAuxContainer>()));
239 
240 
241  if( m_isLegacyTopo ) {
242  // set electrical connectors
243  std::string conn1 = l1menu->board("LegacyTopo0").connectorNames()[0];
244  std::string conn2 = l1menu->board("LegacyTopo1").connectorNames()[0];
245  for(unsigned int clock=0; clock<2; ++clock) {
246  topoOutput2CTP->setCableWord0( clock, 0 ); // ALFA
247  ATH_MSG_DEBUG("Word 1 " << conn1 << " clock " << clock << " " << globalOutput.decision_field( conn1, clock) );
248  topoOutput2CTP->setCableWord1( clock, globalOutput.decision_field( conn1, clock) ); // TOPO 0
249  WriteEDM(outputHandle,conn1,clock,globalOutput.decision_field( conn1, clock));
250  ATH_MSG_DEBUG("Word 2 " << conn2 << " clock " << clock << " " << globalOutput.decision_field( conn2, clock) );
251  topoOutput2CTP->setCableWord2( clock, globalOutput.decision_field( conn2, clock) ); // TOPO 1
252  WriteEDM(outputHandle,conn2,clock,globalOutput.decision_field( conn2, clock));
253  // topoOverflow2CTP->setCableWord0( clock, 0 ); // ALFA
254  // topoOverflow2CTP->setCableWord1( clock, dec.overflow( 0, clock) ); // TOPO 0
255  // topoOverflow2CTP->setCableWord2( clock, dec.overflow( 1, clock) ); // TOPO 1
256  }
257 
258  CHECK(SG::makeHandle(m_legacyTopoCTPLocation) .record(std::move(topoOutput2CTP)));
259  CHECK(SG::makeHandle(m_legacyTopoOverflowCTPLocation).record(std::move(topoOverflow2CTP)));
260 
261  } else {
262  // set electrical connectors
263  std::string conn1 = l1menu->board("Topo2").connectorNames()[0];
264  std::string conn2 = l1menu->board("Topo3").connectorNames()[0];
265  for(unsigned int clock=0; clock<2; ++clock) {
266  ATH_MSG_DEBUG("Word 1 " << conn1 << " clock " << clock << " " << globalOutput.decision_field( conn1, clock) );
267  topoOutput2CTP->setCableWord1( clock, globalOutput.decision_field( conn1, clock) ); // TOPO 0
268  WriteEDM(outputHandle,conn1,clock,globalOutput.decision_field( conn1, clock));
269  ATH_MSG_DEBUG("Word 2 " << conn2 << " clock " << clock << " " << globalOutput.decision_field( conn2, clock) );
270  topoOutput2CTP->setCableWord2( clock, globalOutput.decision_field( conn2, clock) ); // TOPO 1
271  WriteEDM(outputHandle,conn2,clock,globalOutput.decision_field( conn2, clock));
272 
273  topoOverflow2CTP->setCableWord0( clock, 0 ); // ALFA
274  topoOverflow2CTP->setCableWord1( clock, globalOutput.overflow_field( conn1, clock) ); // TOPO 0
275  WriteEDM_Overflow(outputHandle,"Overflow"+conn1,clock,globalOutput.overflow_field( conn1, clock));
276  topoOverflow2CTP->setCableWord2( clock, globalOutput.overflow_field( conn2, clock) ); // TOPO 1
277  WriteEDM_Overflow(outputHandle,"Overflow"+conn2,clock,globalOutput.overflow_field( conn2, clock));
278 
279  WriteEDM(outputHandle,"Ambiguity"+conn1,clock,globalOutput.ambiguity_field( conn1, clock));
280  WriteEDM(outputHandle,"Ambiguity"+conn2,clock,globalOutput.ambiguity_field( conn2, clock));
281  }
282 
283  // set optical connectors
284  for( const auto& connOpt : l1menu->board("Topo1").connectorNames() ) {
285  auto outputOpt = globalOutput.count_field(connOpt);
286  std::bitset<64> outputOpt_1(outputOpt.to_string());
287  std::bitset<64> outputOpt_2((outputOpt<<64).to_string());
288  topoOutput2CTP->setOptCableWord( connOpt, outputOpt );
289  WriteEDM(outputHandle,connOpt,1,outputOpt_1.to_ulong());
290  WriteEDM(outputHandle,connOpt,0,outputOpt_2.to_ulong());
291  }
292 
293  CHECK(SG::makeHandle(m_topoCTPLocation) .record(std::move(topoOutput2CTP)));
294  CHECK(SG::makeHandle(m_topoOverflowCTPLocation).record(std::move(topoOverflow2CTP)));
295  }
296 
297  return StatusCode::SUCCESS;
298 }
299 
300 
303  m_topoSteering->inputEvent().dumpFinish();
304  return StatusCode::SUCCESS;
305 }
306 
307 void
308 L1TopoSimulation::WriteEDM(SG::WriteHandle<xAOD::L1TopoSimResultsContainer> &handle, const std::string &name, unsigned int clock, uint32_t word) {
309 
310  handle->push_back(std::make_unique<xAOD::L1TopoSimResults>());
311  handle->back()->setConnectionId(TCS::outputType(name));
312  handle->back()->setClock(clock);
313  handle->back()->setBitWidth(32);
314  handle->back()->setTopoWord(word);
315 
316  ATH_MSG_DEBUG( "L1Topo EDM:: Connection Id: " << handle->back()->connectionId() << " Clock: " << handle->back()->clock() << " Decision: " << handle->back()->topoWord() );
317 }
318 
319 void
321 
322  handle->push_back(std::make_unique<xAOD::L1TopoSimResults>());
323  handle->back()->setConnectionId(TCS::outputType(name));
324  handle->back()->setClock(clock);
325  handle->back()->setBitWidth(32);
326  handle->back()->setTopoWordOverflow(word);
327 
328  ATH_MSG_DEBUG( "L1Topo EDM:: Connection Id: " << handle->back()->connectionId() << " Clock: " << handle->back()->clock() << " Decision: " << handle->back()->topoWord() );
329 }
330 
331 void
332 L1TopoSimulation::WriteEDM(SG::WriteHandle<xAOD::L1TopoSimResultsContainer> &handle, const std::string &name, unsigned int clock, uint64_t word) {
333 
334  handle->push_back(std::make_unique<xAOD::L1TopoSimResults>());
335  handle->back()->setConnectionId(TCS::outputType(name));
336  handle->back()->setClock(clock);
337  handle->back()->setBitWidth(64);
338  handle->back()->setTopoWord64(word);
339 
340  ATH_MSG_DEBUG( "L1Topo EDM:: Connection Id: " << handle->back()->connectionId() << " Clock: " << handle->back()->clock() << " Decision: " << handle->back()->topoWord() );
341 }
342 
343 void
345 
346  handle->push_back(std::make_unique<xAOD::L1TopoSimResults>());
347  handle->back()->setConnectionId(TCS::outputType(name));
348  handle->back()->setClock(clock);
349  handle->back()->setBitWidth(64);
350  handle->back()->setTopoWord64Overflow(word);
351 
352  ATH_MSG_DEBUG( "L1Topo EDM:: Connection Id: " << handle->back()->connectionId() << " Clock: " << handle->back()->clock() << " Decision: " << handle->back()->topoWord() );
353 }
354 
356 L1TopoSimulation::retrieveHardwareDecision(bool isLegacy, const EventContext& ctx)
357 {
358  if (isLegacy) {return hardwareDecisionLegacy();}
359  else {return hardwareDecisionPhase1(ctx);}
360 }
361 
364 {
365  // some duplication with L1TopoRDO::Helpers
366  // getDecisionAndOverflowBits() ?
367  StatusCode sc = StatusCode::SUCCESS;
368  std::bitset<TCS::TopoSteering::numberOfL1TopoBits> hardwareDaqRobTriggerBits;
369  std::bitset<TCS::TopoSteering::numberOfL1TopoBits> hardwareDaqRobOvrflowBits;
370  bool prescalForDAQROBAccess = true; // DG-2017-06-30 decide what to do when the hdw dec is not to be retrieved
371  if (prescalForDAQROBAccess){
372  std::vector<L1Topo::L1TopoTOB> daqTobsBC0;
373  std::vector<uint32_t> tobsbc0SourceIds; // to compute bit indices
374  const L1TopoRDOCollection* rdos = 0;
375  sc = evtStore()->retrieve(rdos);
376  if (sc.isFailure() or 0 == rdos) {
377  ATH_MSG_INFO ( "Could not retrieve L1Topo DAQ RDO collection from StoreGate" );
378  } else if (rdos->empty()) {
379  ATH_MSG_INFO ( "L1Topo DAQ RDO collection is empty" );
380  } else {
381  for (const L1TopoRDO* rdo : *rdos){
382  const std::vector<uint32_t> cDataWords = rdo->getDataWords();
383  // initialise header: set version 15, BCN -7, which is unlikely
384  L1Topo::Header header(0xf,0,0,0,0,1,0x7);
385  for (const uint32_t word : cDataWords){
386  switch (L1Topo::blockType(word)){
388  header = L1Topo::Header(word);
389  break;
390  }
392  auto tob = L1Topo::L1TopoTOB(word);
393  if (header.bcn_offset()==0){
394  daqTobsBC0.push_back(tob);
395  tobsbc0SourceIds.push_back(rdo->getSourceID());
396  }
397  break;
398  }
399  default: break;
400  }
401  } // for(word)
402  } // for(rdo)
403  }
404  for(uint32_t iTob=0; iTob<daqTobsBC0.size(); ++iTob){
405  const L1Topo::L1TopoTOB &tob = daqTobsBC0[iTob];
406  const uint32_t &sourceId = tobsbc0SourceIds[iTob];
407  for(unsigned int i=0; i<8; ++i){
408  unsigned int index = L1Topo::triggerBitIndexNew(sourceId, tob, i);
409  hardwareDaqRobTriggerBits[index] = (tob.trigger_bits()>>i)&1;
410  hardwareDaqRobOvrflowBits[index] = (tob.overflow_bits()>>i)&1;
411  }
412  }
413  m_topoSteering->setHardwareBits(hardwareDaqRobTriggerBits,
414  hardwareDaqRobOvrflowBits);
415  }
416  return sc;
417 }
418 
419 
422 {
423  // some duplication with L1TopoRDO::Helpers
424  // getDecisionAndOverflowBits() ?
425  StatusCode sc = StatusCode::SUCCESS;
426 
427  std::bitset<TCS::TopoSteering::numberOfL1TopoBits> hardwareDaqRobTriggerBits;
428  std::bitset<TCS::TopoSteering::numberOfL1TopoBits> hardwareDaqRobOvrflowBits;
429 
431  if(!cont.isValid()){
432  ATH_MSG_FATAL("Could not retrieve L1Topo RAW Data Container from the BS data.");
433  return StatusCode::FAILURE;
434  }
435 
436  std::unique_ptr<L1Topo::L1TopoResult> l1topoResult = std::make_unique<L1Topo::L1TopoResult>(*cont);
437  if (!l1topoResult->getStatus()) {
438  ATH_MSG_WARNING("Decoding L1Topo results failed!!");
439  return StatusCode::FAILURE;
440  }
441  hardwareDaqRobTriggerBits = l1topoResult->getDecisions();
442  hardwareDaqRobOvrflowBits = l1topoResult->getOverflows();
443 
444 
445 
446  m_topoSteering->setHardwareBits(hardwareDaqRobTriggerBits,
447  hardwareDaqRobOvrflowBits);
448 
449  return sc;
450 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
L1TopoRDO
The class that represents the raw data received from an L1Topo board.
Definition: L1TopoRDO.h:29
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
L1Topo::triggerBitIndexNew
unsigned int triggerBitIndexNew(uint32_t moduleId, const L1Topo::L1TopoTOB &, unsigned int bitIdx)
Helper to calculate the index needed to pack trigger bits into the full 128-bit decision....
Definition: Trigger/TrigT1/L1Topo/L1TopoRDO/src/Helpers.cxx:144
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
EmTauROI_ClassDEF.h
header
Definition: hcg.cxx:526
AthenaL1TopoHistSvc.h
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
L1Topo::L1TopoTOB
Represents the L1Topo TOB word of the L1Topo ROI data, with decode and encoder.
Definition: L1TopoTOB.h:17
ATLAS_NOT_THREAD_SAFE
StatusCode L1TopoSimulation::initialize ATLAS_NOT_THREAD_SAFE()
Install fatal handler with default options.
Definition: L1TopoSimulation.cxx:51
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
make_unique
std::unique_ptr< T > make_unique(Args &&... args)
Definition: SkimmingToolEXOT5.cxx:23
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
L1TopoMenu.h
L1TopoSimResults.h
initialize
void initialize()
Definition: run_EoverP.cxx:894
BlockTypes.h
L1Topo::blockType
L1Topo::BlockTypes blockType(const uint32_t word, uint32_t offset=28, uint32_t size=0x0f)
Function to return the block type of a data word from L1Topo
Definition: BlockTypes.cxx:9
TCS::outputType
outputTopoType_t outputType(const std::string &output)
Definition: Types.cxx:146
LVL1::L1TopoSimulation::m_topoCTPLocation
SG::WriteHandleKey< LVL1::FrontPanelCTP > m_topoCTPLocation
SG key of decision bits for CTP.
Definition: L1TopoSimulation.h:80
Types.h
TrigConf::L1Menu
L1 menu configuration.
Definition: L1Menu.h:28
LVL1::L1TopoSimulation::m_fillHistogramsBasedOnHardwareDecision
Gaudi::Property< bool > m_fillHistogramsBasedOnHardwareDecision
Definition: L1TopoSimulation.h:101
TCS::TopoInputEvent::setEventInfo
StatusCode setEventInfo(const uint32_t runNo, const uint32_t evtNo, const uint32_t lumiB, const uint32_t BCID)
Definition: TopoInputEvent.cxx:215
LVL1::L1TopoSimulation::m_scaler
std::unique_ptr< LVL1::PeriodicScaler > m_scaler
Definition: L1TopoSimulation.h:66
LVL1::L1TopoSimulation::m_isLegacyTopo
Gaudi::Property< bool > m_isLegacyTopo
Definition: L1TopoSimulation.h:93
LVL1::L1TopoSimulation::m_emtauInputProvider
ToolHandle< IInputTOBConverter > m_emtauInputProvider
Definition: L1TopoSimulation.h:71
TCS::GlobalOutput::overflow_field
uint64_t overflow_field(const std::string &l1connName) const
Definition: GlobalOutput.cxx:84
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::L1TopoSimulation::m_enableInputDump
Gaudi::Property< bool > m_enableInputDump
Definition: L1TopoSimulation.h:94
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
LVL1::L1TopoSimulation::start
virtual StatusCode start() override
Definition: L1TopoSimulation.cxx:130
LVL1::L1TopoSimulation::m_topoSteering
std::unique_ptr< TCS::TopoSteering > m_topoSteering
the topo steering
Definition: L1TopoSimulation.h:65
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
LVL1::L1TopoSimulation::m_l1topoKey
SG::WriteHandleKey< xAOD::L1TopoSimResultsContainer > m_l1topoKey
Definition: L1TopoSimulation.h:88
L1Topo::Header
Represents the L1Topo header word of the L1Topo DAQ data, with decoder and encoder.
Definition: L1Topo/L1TopoRDO/L1TopoRDO/Header.h:18
LVL1::L1TopoSimulation::m_prescale
Gaudi::Property< unsigned int > m_prescale
Definition: L1TopoSimulation.h:103
LVL1::L1TopoSimulation::m_energyInputProvider
ToolHandle< IInputTOBConverter > m_energyInputProvider
Definition: L1TopoSimulation.h:73
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
LVL1::L1TopoSimulation::WriteEDM_Overflow
void WriteEDM_Overflow(SG::WriteHandle< xAOD::L1TopoSimResultsContainer > &handle, const std::string &name, unsigned int clock, uint32_t word)
Definition: L1TopoSimulation.cxx:320
Header.h
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
LVL1::L1TopoSimulation::m_muonInputProvider
ToolHandle< IInputTOBConverter > m_muonInputProvider
Definition: L1TopoSimulation.h:74
TopoInputEvent.h
TCS::GlobalOutput
Definition: GlobalOutput.h:37
LVL1::L1TopoSimulation::m_l1topoRawDataKey
SG::ReadHandleKey< xAOD::L1TopoRawDataContainer > m_l1topoRawDataKey
Definition: L1TopoSimulation.h:90
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
LVL1::L1TopoSimulation::m_jetInputProvider
ToolHandle< IInputTOBConverter > m_jetInputProvider
Definition: L1TopoSimulation.h:72
lumiFormat.i
int i
Definition: lumiFormat.py:85
L1Topo::BlockTypes::L1TOPO_TOB
@ L1TOPO_TOB
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
LVL1::L1TopoSimulation::hardwareDecisionPhase1
StatusCode hardwareDecisionPhase1(const EventContext &ctx)
Definition: L1TopoSimulation.cxx:421
LVL1::L1TopoSimulation::isClonable
virtual bool isClonable() const override
Definition: L1TopoSimulation.cxx:45
TCS::TopoInputEvent
Definition: TopoInputEvent.h:42
calibdata.exception
exception
Definition: calibdata.py:496
L1TopoSimResultsAuxContainer.h
L1TopoRDOCollection.h
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
LVL1::L1TopoSimulation::execute
virtual StatusCode execute() override
Definition: L1TopoSimulation.cxx:154
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1::L1TopoSimulation::m_topoOverflowCTPLocation
SG::WriteHandleKey< LVL1::FrontPanelCTP > m_topoOverflowCTPLocation
SG key of overflow bits for CTP.
Definition: L1TopoSimulation.h:81
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
LVL1::L1TopoSimulation::WriteEDM
void WriteEDM(SG::WriteHandle< xAOD::L1TopoSimResultsContainer > &handle, const std::string &name, unsigned int clock, uint32_t word)
Definition: L1TopoSimulation.cxx:308
IL1TopoHistSvc.h
LVL1::L1TopoSimulation::m_legacyL1topoKey
SG::WriteHandleKey< xAOD::L1TopoSimResultsContainer > m_legacyL1topoKey
Definition: L1TopoSimulation.h:87
DataVector::back
const T * back() const
Access the last element in the collection as an rvalue.
L1Topo::L1TopoResult::getDecisions
const std::bitset< s_nTopoOutputs > & getDecisions() const
Definition: L1Topo/L1TopoRDO/L1TopoRDO/L1TopoResult.h:45
AthAlgorithm
Definition: AthAlgorithm.h:47
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
TrigConf::name
Definition: HLTChainList.h:35
L1Topo::L1TopoResult::getOverflows
const std::bitset< s_nTopoOutputs > & getOverflows() const
Definition: L1Topo/L1TopoRDO/L1TopoRDO/L1TopoResult.h:46
LVL1::L1TopoSimulation::m_legacyTopoOverflowCTPLocation
SG::WriteHandleKey< LVL1::FrontPanelCTP > m_legacyTopoOverflowCTPLocation
SG key of overflow bits for CTP.
Definition: L1TopoSimulation.h:84
LVL1::L1TopoSimulation::m_inputDumpFile
Gaudi::Property< std::string > m_inputDumpFile
Definition: L1TopoSimulation.h:96
LVL1::L1TopoSimulation::L1TopoSimulation
L1TopoSimulation(const std::string &name, ISvcLocator *pSvcLocator)
Definition: L1TopoSimulation.cxx:36
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
LVL1::L1TopoSimulation::hardwareDecisionLegacy
StatusCode hardwareDecisionLegacy()
Definition: L1TopoSimulation.cxx:363
L1TopoRDOCollection
Container of L1TopoRDOs (standard Athena boilerplate)
Definition: L1TopoRDOCollection.h:13
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
TCS::TopoInputEvent::dump
void dump()
Definition: TopoInputEvent.cxx:494
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
TrigT1CaloDefs.h
LVL1::L1TopoSimulation::m_prescaleForDAQROBAccess
Gaudi::Property< unsigned int > m_prescaleForDAQROBAccess
Definition: L1TopoSimulation.h:102
L1Topo::L1TopoTOB::trigger_bits
uint32_t trigger_bits() const
accessor method for trigger bits
Definition: L1TopoTOB.cxx:84
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
TCS::GlobalOutput::decision_field
uint64_t decision_field(const std::string &l1connName) const
Definition: GlobalOutput.cxx:47
DeMoScan.index
string index
Definition: DeMoScan.py:364
TCS::GlobalOutput::count_field
std::bitset< 128 > count_field(const std::string &l1connName) const
Definition: GlobalOutput.cxx:74
L1Topo::L1TopoTOB::overflow_bits
uint32_t overflow_bits() const
accessor method for overflow bits
Definition: L1TopoTOB.cxx:81
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TCS
Definition: Global/GlobalSimulation/src/IO/Decision.h:18
L1TopoSimulation.h
LVL1::L1TopoSimulation::m_legacyTopoCTPLocation
SG::WriteHandleKey< LVL1::FrontPanelCTP > m_legacyTopoCTPLocation
SG key of decision bits for CTP.
Definition: L1TopoSimulation.h:83
python.XMLReader.l1menu
l1menu
Definition: XMLReader.py:73
L1Topo::BlockTypes::HEADER
@ HEADER
L1Topo::L1TopoResult::getStatus
bool getStatus()
Definition: L1Topo/L1TopoRDO/L1TopoRDO/L1TopoResult.h:51
L1TopoTOB.h
LVL1::L1TopoSimulation::finalize
virtual StatusCode finalize() override
Definition: L1TopoSimulation.cxx:302
LVL1::PeriodicScaler
Definition: PeriodicScaler.h:43
makeTOC.header
header
Definition: makeTOC.py:28
TCS::GlobalOutput::ambiguity_field
uint64_t ambiguity_field(const std::string &l1connName) const
Definition: GlobalOutput.cxx:111
LVL1::L1TopoSimulation::retrieveHardwareDecision
StatusCode retrieveHardwareDecision(bool isLegacy, const EventContext &ctx)
Retrieve the L1Topo hardware bits from the DAQ RODs.
Definition: L1TopoSimulation.cxx:356
L1TopoResult.h
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
Helpers.h