ATLAS Offline Software
Loading...
Searching...
No Matches
ITkPixelEncodingTool.cxx
Go to the documentation of this file.
1/*
2Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5/*
6* Author: Ondra Kovanda, ondrej.kovanda at cern.ch
7* Date: 05/2024
8* Description: Athena tool wrapper around the ITkPix encoder
9*/
10
12
13ITkPixelEncodingTool::ITkPixelEncodingTool(const std::string& type, const std::string& name, const IInterface* parent) :
14 AthAlgTool(type,name,parent)
15{
16 //not much to construct as of now
17}
18
20
21 return StatusCode::SUCCESS;
22}
23
24std::vector<uint32_t> ITkPixelEncodingTool::encodeFE(const HitMap & hitMap, const uint8_t chipID) const {
25 // uint8_t FE_id to also be passed to this function in the future
26 //call the addToStream() method. For now assuming 1-event stream.
27 //The FE_id functionality for data merging is yet to be implemented.
28
29 std::unique_ptr<ITkPixV2Encoder> encoder = std::make_unique<ITkPixV2Encoder>();
30 encoder->setChipID(chipID);
31 encoder->setEventsPerStream(1);
32 encoder->addToStream(hitMap);
33 return encoder->getWords();
34
35}
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
std::vector< uint32_t > encodeFE(const HitMap &hitMap, const uint8_t chipID) const
ITkPixelEncodingTool(const std::string &type, const std::string &name, const IInterface *parent)
ITkPixLayout< uint16_t > HitMap