ATLAS Offline Software
Loading...
Searching...
No Matches
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
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}
unsigned bcTag(unsigned bcBitMap)

◆ bcId()

uint16_t bcId ( uint32_t data)
inline

Definition at line 326 of file TgcByteStreamData.h.

326{ return data & 0xfff; }
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11

◆ 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{
331 fromBS32(data, counter);
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}
#define endmsg
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
void fromBS32(uint32_t data, T &s)
The struct for fragment count in ByteStream.

◆ 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}
uint16_t low16(uint32_t data)
uint16_t high16(uint32_t data)

◆ 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}
uint8_t low8(uint32_t data)

◆ 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)); }
DEST * my_pointer_cast(SRC *src)
end of structs for NewSL

◆ 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}
void * ptr(T *p)
Definition SGImplSvc.cxx:74
str DEST
Definition panic.py:3

◆ 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.