ATLAS Offline Software
Classes | Functions | Variables
TgcByteStreamData.h File Reference
#include "AthenaKernel/errorcheck.h"
#include <cstring>
Include dependency graph for TgcByteStreamData.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TGC_BYTESTREAM_SOURCEID
 The struct for source ID in ByteStream. More...
 
struct  TGC_BYTESTREAM_ERRORS
 The struct for errors in ByteStream. More...
 
struct  TGC_BYTESTREAM_LOCALSTATUS
 The struct for local status in ByteStream. More...
 
struct  TGC_BYTESTREAM_FRAGMENTCOUNT
 The struct for fragment count in ByteStream. More...
 
struct  TGC_BYTESTREAM_READOUTHIT
 The struct for hit in ByteStream. More...
 
struct  TGC_BYTESTREAM_READOUTTRACKLET
 The struct for tracklet in ByteStream. More...
 
struct  TGC_BYTESTREAM_READOUTTRIPLETSTRIP
 The struct for triplet strip in ByteStream. More...
 
struct  TGC_BYTESTREAM_HIPT
 The struct for HiPt in ByteStream. More...
 
struct  TGC_BYTESTREAM_HIPT_INNER
 The struct for Inner trigger bits in ByteStream. More...
 
struct  TGC_BYTESTREAM_SL
 The struct for SL in ByteStream. More...
 
struct  TGC_BYTESTREAM_NSL_ROI
 structs for NewSL More...
 
struct  TGC_BYTESTREAM_NSW_POS
 
struct  TGC_BYTESTREAM_NSW_ANG
 
struct  TGC_BYTESTREAM_RPCBIS78_POS
 
struct  TGC_BYTESTREAM_RPCBIS78_COIN
 
struct  TGC_BYTESTREAM_NSL_EIFI
 
struct  TGC_BYTESTREAM_NSL_HIPT
 
struct  TGC_BYTESTREAM_NSL_TMDB
 

Functions

template<typename DEST , typename SRC >
DEST * my_pointer_cast (SRC *src)
 end of structs for NewSL More...
 
template<class T >
uint32_t toBS32 (T &data)
 
template<class T >
uint16_t toBS16 (T &data)
 
template<class T >
void fromBS32 (uint32_t data, T &s)
 
template<class T >
void fromBS16 (uint16_t data, T &s)
 
uint8_t low8 (uint32_t data)
 
uint16_t low16 (uint32_t data)
 
uint16_t high16 (uint32_t data)
 
uint16_t bcId (uint32_t data)
 
int fragmentCount (uint32_t data, int id)
 
uint32_t from16 (uint16_t high16, uint16_t low16)
 
uint32_t from8 (uint8_t high8, uint8_t highmid8, uint8_t lowmid8, uint8_t low8)
 
unsigned bcBitmap (uint16_t bcTag)
 
unsigned bcTag (unsigned bcBitMap)
 

Variables

const uint32_t TGC_BYTESTREAM_HEADER = 0xee1234ee
 
const uint32_t TGC_BYTESTREAM_HEADERSIZE = 0x9
 
const uint32_t TGC_BYTESTREAM_HEADERVERSION = 0x03000300
 
const uint32_t TGC_BYTESTREAM_STATUSSIZE = 0x5
 

Function Documentation

◆ bcBitmap()

unsigned bcBitmap ( uint16_t  bcTag)
inline

Definition at line 351 of file TgcByteStreamData.h.

352 {
353  return (bcTag == 1 ? 4 :
354  ((bcTag == 0 || bcTag == 2) ? 2 :
355  (bcTag == 3 ? 1 :
356  0)));
357 }

◆ bcId()

uint16_t bcId ( uint32_t  data)
inline

Definition at line 326 of file TgcByteStreamData.h.

326 { return data & 0xfff; }

◆ bcTag()

unsigned bcTag ( unsigned  bcBitMap)
inline

Definition at line 359 of file TgcByteStreamData.h.

360 {
361  return (bcBitMap == 4 ? 1 :
362  (bcBitMap == 2 ? 2 :
363  (bcBitMap == 1 ? 3 :
364  0)));
365 }

◆ fragmentCount()

int fragmentCount ( uint32_t  data,
int  id 
)
inline

Definition at line 328 of file TgcByteStreamData.h.

329 {
332  if(counter.id != (unsigned int)id)
333  {
334  REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "TgcByteStreamData")
335  << "Requested count of frament " << id << ", data is for fragment " << counter.id << endmsg;
336  return 0;
337  }
338  return counter.count;
339 }

◆ from16()

uint32_t from16 ( uint16_t  high16,
uint16_t  low16 
)
inline

Definition at line 341 of file TgcByteStreamData.h.

342 {
343  return (uint32_t)((high16 << 16) | low16);
344 }

◆ from8()

uint32_t from8 ( uint8_t  high8,
uint8_t  highmid8,
uint8_t  lowmid8,
uint8_t  low8 
)
inline

Definition at line 346 of file TgcByteStreamData.h.

347 {
348  return (uint32_t)((high8 << 24) | (highmid8 << 16) | (lowmid8 << 8) | low8);
349 }

◆ fromBS16()

template<class T >
void fromBS16 ( uint16_t  data,
T &  s 
)
inline

Definition at line 322 of file TgcByteStreamData.h.

322 { s = *(my_pointer_cast<T>(&data)); }

◆ fromBS32()

template<class T >
void fromBS32 ( uint32_t  data,
T &  s 
)
inline

Definition at line 321 of file TgcByteStreamData.h.

321 { s = *(my_pointer_cast<T>(&data)); }

◆ high16()

uint16_t high16 ( uint32_t  data)
inline

Definition at line 325 of file TgcByteStreamData.h.

325 { return (uint16_t)(data >> 16); }

◆ low16()

uint16_t low16 ( uint32_t  data)
inline

Definition at line 324 of file TgcByteStreamData.h.

324 { return (uint16_t)(data & 0x0000ffff); }

◆ low8()

uint8_t low8 ( uint32_t  data)
inline

Definition at line 323 of file TgcByteStreamData.h.

323 { return (uint8_t)(data & 0x000000ff); }

◆ my_pointer_cast()

template<typename DEST , typename SRC >
DEST* my_pointer_cast ( SRC *  src)

end of structs for NewSL

Definition at line 315 of file TgcByteStreamData.h.

315  {
316  void* ptr = src;
317  return reinterpret_cast<DEST*>(ptr);
318 }

◆ toBS16()

template<class T >
uint16_t toBS16 ( T &  data)
inline

Definition at line 320 of file TgcByteStreamData.h.

320 { return *(my_pointer_cast<uint16_t>(&data)); }

◆ toBS32()

template<class T >
uint32_t toBS32 ( T &  data)
inline

Definition at line 319 of file TgcByteStreamData.h.

319 { return *(my_pointer_cast<uint32_t>(&data)); }

Variable Documentation

◆ TGC_BYTESTREAM_HEADER

const uint32_t TGC_BYTESTREAM_HEADER = 0xee1234ee

Definition at line 12 of file TgcByteStreamData.h.

◆ TGC_BYTESTREAM_HEADERSIZE

const uint32_t TGC_BYTESTREAM_HEADERSIZE = 0x9

Definition at line 13 of file TgcByteStreamData.h.

◆ TGC_BYTESTREAM_HEADERVERSION

const uint32_t TGC_BYTESTREAM_HEADERVERSION = 0x03000300

Definition at line 14 of file TgcByteStreamData.h.

◆ TGC_BYTESTREAM_STATUSSIZE

const uint32_t TGC_BYTESTREAM_STATUSSIZE = 0x5

Definition at line 15 of file TgcByteStreamData.h.

data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
WriteCellNoiseToCool.src
src
Definition: WriteCellNoiseToCool.py:513
high16
uint16_t high16(uint32_t data)
Definition: TgcByteStreamData.h:325
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
low8
uint8_t low8(uint32_t data)
Definition: TgcByteStreamData.h:323
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
fromBS32
void fromBS32(uint32_t data, T &s)
Definition: TgcByteStreamData.h:321
REPORT_MESSAGE_WITH_CONTEXT
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:345
low16
uint16_t low16(uint32_t data)
Definition: TgcByteStreamData.h:324
bcTag
unsigned bcTag(unsigned bcBitMap)
Definition: TgcByteStreamData.h:359
python.panic.DEST
string DEST
Definition: panic.py:3
test_pyathena.counter
counter
Definition: test_pyathena.py:15
TGC_BYTESTREAM_FRAGMENTCOUNT
The struct for fragment count in ByteStream.
Definition: TgcByteStreamData.h:68