ATLAS Offline Software
PixelRawContByteStreamTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // PixelRawContByteStreamTool.h
7 // Header file for class PixelRawContByteStreamTool
9 // (c) ATLAS Pixel Detector software
12 // Version 00-00-39 05/03/2007 Daniel Dobos
14 
15 #ifndef PIXELRAWDATABYTESTREAMCNV_PIXELRAWCONTRAWEVENTTOOL_H
16 #define PIXELRAWDATABYTESTREAMCNV_PIXELRAWCONTRAWEVENTTOOL_H
17 
18 // #define _DEBUG
19 
20 
21 
23 
24 #include "GaudiKernel/ServiceHandle.h"
25 
26 #include "ByteStreamData/RawEvent.h"
28 
29 #include "ByteStreamCnvSvcBase/FullEventAssembler.h" // needed, template class
31 
33 
35 
40 #include <cstdint>
41 #include <string>
42 
43 class PixelID;
44 
45 namespace InDetDD{
46  class PixelDetectorManager;
47 }
48 
50 
51  public:
52  // constructor
53  PixelRawContByteStreamTool(const std::string& type,const std::string& name,const IInterface* parent);
54 
55  // destructor
57 
58  // AlgTool InterfaceID
59  static const InterfaceID& interfaceID();
60 
61  virtual StatusCode initialize() override;
62  virtual StatusCode finalize() override;
64 
65  void fillROD(std::vector<uint32_t>& v32rod, std::vector<const PixelRDORawData*> RDOs, int BCs_per_LVL1ID) const;
66 
67  void packIBLcondensed(std::vector <uint32_t > & v32rod, std::vector <uint32_t > & vRows, std::vector <uint32_t > & vCols, std::vector<int> & vTots) const;
68  void packIBLCondensed(std::vector <uint32_t > & v32rod, const std::vector<const PixelRDORawData*> &rdos_sameIBL_offlineId);
73  uint32_t packLinkTrailer(uint32_t errors) const; // for Pixel
74  uint32_t packLinkTrailer_IBL(uint32_t FEonSLink, bool timeOutErrorBit, bool condensedModeBit, bool linkMasked) const; // for IBL
75 
76  private:
78  { this, "ByteStreamCnvSvc", "ByteStreamCnvSvc" };
79 
81  { this, "PixelReadoutManager", "PixelReadoutManager", "Pixel readout manager" };
82 
83  const PixelID* m_PixelID{};
84 
86 
87  unsigned short m_RodBlockVersion;
89 
91  {this, "PixelCablingCondData", "PixelCablingCondData", "Pixel cabling key"};
92 
94  {this, "PixelHitDiscCnfgData", "PixelHitDiscCnfgData", "Pixel FEI4 HitDiscConfig key"};
95 };
96 
97 class OrderRdos {
98 
99  private:
102 
103  public:
105  m_pixelReadout(pixelReadout), m_offlineId(offlineId) { }
106 
107  // copy constructor
108  OrderRdos(const OrderRdos & orderFunct) = default;
109 
110  // assignment operator
112  m_pixelReadout = other.m_pixelReadout;
113  return *this;
114  }
115 
116  bool operator() (const PixelRDORawData* rdo0, const PixelRDORawData* rdo1);
117 };
118 
120 
121  private:
125 
126  public:
128  m_pixelReadout(pixelReadout), m_PixelID(pixelID), m_pixCabling(pixCabling) { }
129 
130  // copy constructor
131  OrderInitialRdos(const OrderInitialRdos & orderFunct) = default;
132 
133  // assignment operator
134  // cppcheck-suppress operatorEqVarError
136  m_pixelReadout = other.m_pixelReadout;
137  return *this;
138  }
139 
140  bool operator() (const PixelRDORawData* rdo0, const PixelRDORawData* rdo1);
141 };
142 
143 #endif // PIXELRAWDATABYTESTREAMCNV_PIXELRAWCONTRAWEVENTTOOL_H
query_example.row
row
Definition: query_example.py:24
PixelRawContByteStreamTool::packIBLCondensed
void packIBLCondensed(std::vector< uint32_t > &v32rod, const std::vector< const PixelRDORawData * > &rdos_sameIBL_offlineId)
PixelRawContByteStreamTool
Definition: PixelRawContByteStreamTool.h:49
PixelRawContByteStreamTool::initialize
virtual StatusCode initialize() override
Definition: PixelRawContByteStreamTool.cxx:43
PixelRawContByteStreamTool::m_condHitDiscCnfgKey
SG::ReadCondHandleKey< PixelHitDiscCnfgData > m_condHitDiscCnfgKey
Definition: PixelRawContByteStreamTool.h:94
PixelRawContByteStreamTool::interfaceID
static const InterfaceID & interfaceID()
Definition: PixelRawContByteStreamTool.cxx:120
PixelCablingCondData.h
PixelRawContByteStreamTool::packRawDataWord_IBL
uint32_t packRawDataWord_IBL(uint32_t row, uint32_t column, int ToT, uint32_t nLink) const
Definition: PixelRawContByteStreamTool.cxx:657
OrderRdos::m_offlineId
Identifier m_offlineId
Definition: PixelRawContByteStreamTool.h:101
PixelRawContByteStreamTool::fillROD
void fillROD(std::vector< uint32_t > &v32rod, std::vector< const PixelRDORawData * > RDOs, int BCs_per_LVL1ID) const
Definition: PixelRawContByteStreamTool.cxx:128
OrderInitialRdos::m_pixCabling
SG::ReadCondHandle< PixelCablingCondData > m_pixCabling
Definition: PixelRawContByteStreamTool.h:124
SG::ReadCondHandle< PixelCablingCondData >
PixelRawContByteStreamTool::m_byteStreamCnvSvc
ServiceHandle< ByteStreamCnvSvc > m_byteStreamCnvSvc
Definition: PixelRawContByteStreamTool.h:78
PixelRawContByteStreamTool::packLinkTrailer_IBL
uint32_t packLinkTrailer_IBL(uint32_t FEonSLink, bool timeOutErrorBit, bool condensedModeBit, bool linkMasked) const
Definition: PixelRawContByteStreamTool.cxx:701
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
PixelRawContByteStreamTool::m_pixelReadout
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
Definition: PixelRawContByteStreamTool.h:81
PixelRawContByteStreamTool::m_RodBlockVersion
unsigned short m_RodBlockVersion
Definition: PixelRawContByteStreamTool.h:87
OrderRdos::OrderRdos
OrderRdos(const OrderRdos &orderFunct)=default
PixelRawContByteStreamTool::convert
StatusCode convert(PixelRDO_Container *cont) const
Definition: PixelRawContByteStreamTool.cxx:69
DeMoUpdate.column
dictionary column
Definition: DeMoUpdate.py:1110
OrderInitialRdos::m_PixelID
const PixelID * m_PixelID
Definition: PixelRawContByteStreamTool.h:123
OrderRdos::operator()
bool operator()(const PixelRDORawData *rdo0, const PixelRDORawData *rdo1)
Definition: PixelRawContByteStreamTool.cxx:754
PixelRawContByteStreamTool::finalize
virtual StatusCode finalize() override
Definition: PixelRawContByteStreamTool.cxx:62
InDetRawDataContainer
Definition: InDetRawDataContainer.h:27
PixelRawContByteStreamTool::packLinkHeader_IBL
uint32_t packLinkHeader_IBL(uint32_t module, uint32_t bcid, uint32_t lvl1id, uint32_t feFlag) const
Definition: PixelRawContByteStreamTool.cxx:640
OrderRdos::OrderRdos
OrderRdos(Identifier offlineId, const ServiceHandle< InDetDD::IPixelReadoutManager > &pixelReadout)
Definition: PixelRawContByteStreamTool.h:104
OrderInitialRdos::operator()
bool operator()(const PixelRDORawData *rdo0, const PixelRDORawData *rdo1)
Definition: PixelRawContByteStreamTool.cxx:790
PixelRawContByteStreamTool::~PixelRawContByteStreamTool
virtual ~PixelRawContByteStreamTool()
Definition: PixelRawContByteStreamTool.cxx:37
SrcIdMap.h
python.PyAthena.module
module
Definition: PyAthena.py:134
OrderRdos
Definition: PixelRawContByteStreamTool.h:97
OrderInitialRdos
Definition: PixelRawContByteStreamTool.h:119
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
RawEvent.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
OrderInitialRdos::operator=
OrderInitialRdos & operator=(const OrderInitialRdos &other)
Definition: PixelRawContByteStreamTool.h:135
ByteStreamCnvSvc.h
PixelRawContByteStreamTool::m_condCablingKey
SG::ReadCondHandleKey< PixelCablingCondData > m_condCablingKey
Definition: PixelRawContByteStreamTool.h:91
IPixelReadoutManager.h
FullEventAssembler.h
PixelRawContByteStreamTool::m_pixelManager
const InDetDD::PixelDetectorManager * m_pixelManager
Definition: PixelRawContByteStreamTool.h:85
OrderInitialRdos::OrderInitialRdos
OrderInitialRdos(const ServiceHandle< InDetDD::IPixelReadoutManager > &pixelReadout, const PixelID *pixelID, SG::ReadCondHandle< PixelCablingCondData > &pixCabling)
Definition: PixelRawContByteStreamTool.h:127
ReadCondHandleKey.h
mergePhysValFiles.errors
list errors
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:43
PixelRawContByteStreamTool::packIBLcondensed
void packIBLcondensed(std::vector< uint32_t > &v32rod, std::vector< uint32_t > &vRows, std::vector< uint32_t > &vCols, std::vector< int > &vTots) const
Definition: PixelRawContByteStreamTool.cxx:725
InDetDD::PixelDetectorManager
Definition: PixelDetectorManager.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
PixelByteStreamModuleMask.h
PixelRawContByteStreamTool::PixelRawContByteStreamTool
PixelRawContByteStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: PixelRawContByteStreamTool.cxx:26
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
OrderInitialRdos::m_pixelReadout
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
Definition: PixelRawContByteStreamTool.h:122
SG::ReadCondHandleKey< PixelCablingCondData >
PixelRawContByteStreamTool::m_BCs_per_LVL1ID
int m_BCs_per_LVL1ID
Definition: PixelRawContByteStreamTool.h:88
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
PixelRawContByteStreamTool::packRawDataWord
uint32_t packRawDataWord(uint32_t FE, uint32_t row, uint32_t column, uint32_t ToT) const
Definition: PixelRawContByteStreamTool.cxx:673
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
PixelRawContByteStreamTool::packLinkTrailer
uint32_t packLinkTrailer(uint32_t errors) const
Definition: PixelRawContByteStreamTool.cxx:688
PixelHitDiscCnfgData.h
PixelRawContByteStreamTool::m_PixelID
const PixelID * m_PixelID
Definition: PixelRawContByteStreamTool.h:83
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
PixelRDORawData
Definition: PixelRDORawData.h:23
PixelRawContByteStreamTool::packLinkHeader
uint32_t packLinkHeader(uint32_t module, uint32_t bcid, uint32_t lvl1id, uint32_t lvl1idskip, uint32_t errors) const
Definition: PixelRawContByteStreamTool.cxx:624
AthAlgTool
Definition: AthAlgTool.h:26
InDetRawDataCLASS_DEF.h
OrderRdos::operator=
OrderRdos & operator=(const OrderRdos &other)
Definition: PixelRawContByteStreamTool.h:111
PixelID
Definition: PixelID.h:67
ServiceHandle< ByteStreamCnvSvc >
OrderInitialRdos::OrderInitialRdos
OrderInitialRdos(const OrderInitialRdos &orderFunct)=default
OrderRdos::m_pixelReadout
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
Definition: PixelRawContByteStreamTool.h:100