ATLAS Offline Software
Loading...
Searching...
No Matches
TgcRODReadOut.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONTGC_CNVTOOLS_TGCRODREADOUT_H
6#define MUONTGC_CNVTOOLS_TGCRODREADOUT_H
7
8#include <inttypes.h>
9#include <vector>
10
11#include "MuonRDO/TgcRdo.h"
14
15namespace Muon
16{
17 class TgcSlbData;
18 class TgcSlbDataHelper;
19
20
34
36 {
37 private:
39
40 public:
42 TgcRODReadOut(const MuonTGC_CablingSvc& cabling);
44 virtual ~TgcRODReadOut();
45
47 StatusCode byteStream2Rdo(const ByteStream& bs,
48 TgcRdo& tgcRdo,
49 uint32_t source_id) const;
52 StatusCode check(const ByteStream& bs,
53 TgcRdo& tgcRdo,
54 uint32_t source_id) const;
56 StatusCode compare(TgcRdo* rdo, TgcRdo* newRdo) const;
58 static bool isMatched(const TgcRawData* rdo1,
59 const TgcRawData* rdo2) ;
61 StatusCode decodeRodToRdo(TgcRdo& tgcRdo,
62 const ByteStream& vData,
63 uint16_t subDetectorId,
64 uint16_t rodId,
65 uint32_t l1Id,
66 uint16_t bcId) const;
67
68 protected:
69 enum {
70 RawDataFragMask =0xFF000000, // RawData Fragment HEADER Mask
71 FragmentIdMask =0xFF000000, // Fragmen ID Mask
72 FragmentCountMask =0x00FFFFFF, // Fragmen ID Mask
73 HeaderMask =0xE0000000, //
74 HeaderEvent =0x00000000, // Event Header
75 HeaderError =0x20000000, // Error Report
76 HeaderSLB10 =0x40000000, // SLB Header 10
77 HeaderSLB11 =0x60000000, // SLB Header 11
78 HeaderSLBC =0x80000000, // central bunch
79 HeaderSLBP =0xA0000000, // previous bunch
80 HeaderSLBN =0xC0000000, // next bunch
81 HeaderTrailer =0x70000000, // SLB Header 11
82
83 ROD_START = 0xEE1234EE,
86 };
87
89 bool setSbLoc(uint16_t subDetectorId,
90 uint16_t rodId,
91 TgcSlbData * slb, int rxId) const;
92
93 private:
95 enum NROD_SIDE {
96 NROD = 24+1,
97 NSROD = 6+1,
98 ASIDE = 0x67, // 103
99 CSIDE = 0x68 // 104
100 };
101
102 mutable std::atomic<unsigned int> m_failedDecodeRodToRdo[NROD+1];
104 mutable std::atomic<unsigned int> m_failedHeaderSizeRawData[NROD+1];
106 mutable std::atomic<unsigned int> m_failedSetSbLoc[NROD+1];
108 mutable std::atomic<unsigned int> m_failedSetType[NROD+1];
110 mutable std::atomic<unsigned int> m_failedGetSLBIDfromRxID[NROD+1];
112 mutable std::atomic<unsigned int> m_failedGetReadoutIDfromSLBID[NROD+1];
113
116
119
122 };
123
124} // end of namespace
125
126#endif // MUONTGC_CNVTOOLS_TGCRODREADOUT_H
uint16_t bcId(uint32_t data)
StatusCode decodeRodToRdo(TgcRdo &tgcRdo, const ByteStream &vData, uint16_t subDetectorId, uint16_t rodId, uint32_t l1Id, uint16_t bcId) const
Decode BS to RDO container.
NROD_SIDE
The number of RODs (1-24 for 12-fold)
std::atomic< unsigned int > m_failedSetType[NROD+1]
The number of failures on setType.
virtual ~TgcRODReadOut()
Destructor.
const MuonTGC_CablingSvc & m_cabling
TGC Cabling Svc.
TgcSlbDataHelper * m_tgcSlbDataHelper
TGC SLB data helper.
std::atomic< unsigned int > m_failedDecodeRodToRdo[NROD+1]
The number of failures on decodeRodToRdo.
OFFLINE_FRAGMENTS_NAMESPACE::PointerType ByteStream
TgcRODReadOut & operator=(const TgcRODReadOut &right)
StatusCode check(const ByteStream &bs, TgcRdo &tgcRdo, uint32_t source_id) const
Convert BS (ROB fragment) to RDO and compare decoded RDO container and another RDO container decoded ...
bool setSbLoc(uint16_t subDetectorId, uint16_t rodId, TgcSlbData *slb, int rxId) const
Set sbLoc.
StatusCode byteStream2Rdo(const ByteStream &bs, TgcRdo &tgcRdo, uint32_t source_id) const
Convert BS (ROB fragment) to RDO.
std::atomic< unsigned int > m_failedGetSLBIDfromRxID[NROD+1]
The number of failures on getSLBIDfromRxID.
TgcRODReadOut(const MuonTGC_CablingSvc &cabling)
Constructor.
std::atomic< unsigned int > m_failedSetSbLoc[NROD+1]
The number of failures on setSbLoc.
StatusCode compare(TgcRdo *rdo, TgcRdo *newRdo) const
Compare two RDO containers.
std::atomic< unsigned int > m_failedGetReadoutIDfromSLBID[NROD+1]
The number of failures on getReadoutIDfromSLBID.
std::atomic< unsigned int > m_failedHeaderSizeRawData[NROD+1]
The number of strange header and SizeRawData.
TgcRODReadOut(const TgcRODReadOut &)
static bool isMatched(const TgcRawData *rdo1, const TgcRawData *rdo2)
Compare two RDOs.
This is the SLB data helper class which stores bit map, reconstructs to hits and coincidences,...
This is the SLB data class which represents an SLB block.
Definition TgcSlbData.h:22
An unit object of TGC ROD output.
Definition TgcRawData.h:23
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
const DataType * PointerType
Definition RawEvent.h:25