ATLAS Offline Software
Trigger/TrigT1/L1Topo/L1TopoRDO/L1TopoRDO/Helpers.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef L1TOPORDO_L1TOPORDOHELPERS_H
6 #define L1TOPORDO_L1TOPORDOHELPERS_H
7 
8 #include <vector>
9 #include <bitset>
10 #include <utility>
11 #include <string>
12 #include <sstream>
13 #include <iostream>
14 #include <cstdint>
15 
16 class L1TopoRDO;
18 class L1TopoResult;
19 
20 namespace L1Topo {
21  class L1TopoTOB;
22 }
23 
26 std::ostream& operator<<(std::ostream&, const L1TopoRDO&);
28 
29 
30 namespace L1Topo {
32  uint32_t decode(const uint32_t &word, const uint32_t &offset, const uint32_t &size);
34  std::string formatHex8(uint32_t word);
36  std::string formatHex4(uint32_t word);
38  const std::string formatVecHex8(const std::vector<uint32_t>& vec);
39 
41  unsigned int triggerBitIndex(uint32_t moduleId, const L1Topo::L1TopoTOB&);
42 
44 
45  unsigned int triggerBitIndexNew(uint32_t moduleId, const L1Topo::L1TopoTOB&, unsigned int bitIdx);
46 
47  // Converting trigger position to CTP position for phase1
48  unsigned int triggerBitIndexPhase1(uint32_t topo, uint32_t fpga, size_t bitIdx);
49 
51  //std::pair< std::bitset<128>,std::bitset<128> > getDecisionAndOverflowBits(const std::vector<L1TopoResult>&);
52  std::pair< std::bitset<128>,std::bitset<128> > getDecisionAndOverflowBits(const L1TopoRDOCollection&);
53 
54 } // namespace L1Topo
55 
56 
57 #endif // L1TOPORDO_L1TOPORDOHELPERS_H
L1TopoRDO
The class that represents the raw data received from an L1Topo board.
Definition: L1TopoRDO.h:29
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
L1Topo::L1TopoTOB
Represents the L1Topo TOB word of the L1Topo ROI data, with decode and encoder.
Definition: L1TopoTOB.h:17
L1Topo::getDecisionAndOverflowBits
std::pair< std::bitset< 128 >, std::bitset< 128 > > getDecisionAndOverflowBits(const L1TopoRDOCollection &)
Get the trigger decision and overflow bits from the L1Topo ROI data block 'L1Topo TOB' and order them...
Definition: Trigger/TrigT1/L1Topo/L1TopoRDO/src/Helpers.cxx:169
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
L1Topo::formatVecHex8
const std::string formatVecHex8(const std::vector< uint32_t > &vec)
Helper function to format a vector of 32-bit integers as 8-digit hex numbers for printing.
Definition: Trigger/TrigT1/L1Topo/L1TopoRDO/src/Helpers.cxx:124
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
operator<<
std::ostream & operator<<(std::ostream &, const L1TopoRDO &)
This file contains some static helper functions to help users of L1TopoRDO.
Definition: Trigger/TrigT1/L1Topo/L1TopoRDO/src/Helpers.cxx:24
L1TopoRDOCollection
Container of L1TopoRDOs (standard Athena boilerplate)
Definition: L1TopoRDOCollection.h:13
L1Topo::formatHex4
std::string formatHex4(uint32_t word)
Helper function to format a 32-bit integer as a 4-digit hex number for printing.
Definition: Trigger/TrigT1/L1Topo/L1TopoRDO/src/Helpers.cxx:117
L1Topo::formatHex8
std::string formatHex8(uint32_t word)
Helper function to format a 32-bit integer as an 8-digit hex number for printing.
Definition: Trigger/TrigT1/L1Topo/L1TopoRDO/src/Helpers.cxx:111
L1Topo::decode
uint32_t decode(const uint32_t &word, const uint32_t &offset, const uint32_t &size)
Helper function to decode word based on offset and size.
Definition: Trigger/TrigT1/L1Topo/L1TopoRDO/src/Helpers.cxx:107
L1Topo::triggerBitIndexPhase1
unsigned int triggerBitIndexPhase1(uint32_t topo, uint32_t fpga, size_t bitIdx)
Definition: Trigger/TrigT1/L1Topo/L1TopoRDO/src/Helpers.cxx:152
L1Topo::triggerBitIndex
unsigned int triggerBitIndex(uint32_t moduleId, const L1Topo::L1TopoTOB &)
OUT OF DATE DO NOT USE Helper to calculate the index needed to pack trigger bits into the full 128-bi...
Definition: Trigger/TrigT1/L1Topo/L1TopoRDO/src/Helpers.cxx:137
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
L1Topo
Definition: BlockTypes.h:11