5#ifndef GLOBALSIM_LARCELLMUXALG_H
6#define GLOBALSIM_LARCELLMUXALG_H
17#include "GaudiKernel/ToolHandle.h"
30 using AthReentrantAlgorithm::AthReentrantAlgorithm;
40 using Feb2BitsetMap = std::map<std::string, std::bitset<FEB2_BITSTREAM_SIZE>>;
45 virtual StatusCode
execute(
const EventContext& )
const override;
54 std::bitset<FEB2_BITSTREAM_SIZE>
assembleBitsetForFeb2(
const std::vector<GlobalSim::GlobalLArCell*>& cells, std::size_t maxCells,
bool inOverflow,
bool inError, uint32_t bcid)
const;
56 template <std::
size_t N,
typename T>
static std::size_t
appendBits(std::bitset<N>& target,
const T& src, std::size_t pos);
66 Gaudi::Property<bool>
m_writeMuxInputBitstreamToFile {
this,
"WriteMuxInputBitstreamToFile",
true,
"Flag to enable the writing of MUX input bitstreams to file"};
69 Gaudi::Property<bool>
m_writeMuxOutputBitstreamToFile {
this,
"WriteMuxOutputBitstreamToFile",
true,
"Flag to enable the writing of MUX output bitstreams to file"};
An algorithm that can be simultaneously executed in multiple threads.
static constexpr std::size_t FEB2_BITSTREAM_SIZE
Gaudi::Property< bool > m_writeMuxInputBitstreamToFile
Flag to enable writing of MUX input bitstreams (FEB2/LASP -> MUX) to file.
std::map< std::string, std::bitset< FEB2_BITSTREAM_SIZE > > Feb2BitsetMap
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
Key for the EventInfo object.
Gaudi::Property< bool > m_writeMuxOutputBitstreamToFile
Flag to enable writing ofMUX output bitstreams (MUX -> GEP) to file.
static constexpr std::size_t BITWIDTH_MUX_OUTPUT
static constexpr std::size_t BITWIDTH_MUX_INPUT
static constexpr std::size_t N_WORDS_MUX_FOOTER
virtual StatusCode initialize() override
initialize function running before first event
SG::ReadHandleKey< GlobalSim::GlobalLArCellContainer > m_gblLArCellContainerKey
Key to the GlobalLArCellContainer.
StatusCode writeMuxInputBitstream(Feb2BitsetMap &feb2Bitsets, const xAOD::EventInfo &eventInfo, const GlobalSim::GlobalLArCellContainer &gblLArCells) const
Function that compiles the LASP to MUX bitstream and writes it to file.
static constexpr std::size_t N_WORDS_MUX_HEADER
static constexpr std::size_t BITWIDTH_2SIGMAMASK
StatusCode writeMuxOutputBitstream(const Feb2BitsetMap &feb2Bitsets, const xAOD::EventInfo &eventInfo, const GlobalSim::GlobalLArCellContainer &gblLArCells) const
Function that compiles the MUX to GEP bitstream and writes it to file.
virtual StatusCode execute(const EventContext &) const override
execute function running for every event
std::bitset< FEB2_BITSTREAM_SIZE > assembleBitsetForFeb2(const std::vector< GlobalSim::GlobalLArCell * > &cells, std::size_t maxCells, bool inOverflow, bool inError, uint32_t bcid) const
Function which compiles the bitset for one particular FEB2.
static std::size_t appendBits(std::bitset< N > &target, const T &src, std::size_t pos)
Helper function to append a bitset or vector of bools at a specific position in another bitset.
Property holding a SG store/key/clid from which a ReadHandle is made.
AlgTool that to test whether expected the TIP values generated by data supplied by eEmMultTestBench c...
EventInfo_v1 EventInfo
Definition of the latest event info version.