ATLAS Offline Software
Classes | Functions | Variables
TgcByteStreamData.h File Reference
#include "GaudiKernel/ISvcLocator.h"
#include "GaudiKernel/Bootstrap.h"
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/IMessageSvc.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 359 of file TgcByteStreamData.h.

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

◆ bcId()

uint16_t bcId ( uint32_t  data)
inline

Definition at line 329 of file TgcByteStreamData.h.

329 { return data & 0xfff; }

◆ bcTag()

unsigned bcTag ( unsigned  bcBitMap)
inline

Definition at line 367 of file TgcByteStreamData.h.

368 {
369  return (bcBitMap == 4 ? 1 :
370  (bcBitMap == 2 ? 2 :
371  (bcBitMap == 1 ? 3 :
372  0)));
373 }

◆ fragmentCount()

int fragmentCount ( uint32_t  data,
int  id 
)
inline

Definition at line 331 of file TgcByteStreamData.h.

332 {
335  if(counter.id != (unsigned int)id)
336  {
337  IMessageSvc* msgSvc = 0;
338  ISvcLocator* svcLocator = Gaudi::svcLocator();
339  StatusCode sc = svcLocator->service("MessageSvc", msgSvc);
340  if(!sc.isFailure()) {
341  MsgStream log(msgSvc, "Muon TgcByteStreamData fragmentCount");
342  log << MSG::ERROR << "Requested count of frament " << id << ", data is for fragment " << counter.id << endmsg;
343  }
344  return 0;
345  }
346  return counter.count;
347 }

◆ from16()

uint32_t from16 ( uint16_t  high16,
uint16_t  low16 
)
inline

Definition at line 349 of file TgcByteStreamData.h.

350 {
351  return (uint32_t)((high16 << 16) | low16);
352 }

◆ from8()

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

Definition at line 354 of file TgcByteStreamData.h.

355 {
356  return (uint32_t)((high8 << 24) | (highmid8 << 16) | (lowmid8 << 8) | low8);
357 }

◆ fromBS16()

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

Definition at line 325 of file TgcByteStreamData.h.

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

◆ fromBS32()

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

Definition at line 324 of file TgcByteStreamData.h.

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

◆ high16()

uint16_t high16 ( uint32_t  data)
inline

Definition at line 328 of file TgcByteStreamData.h.

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

◆ low16()

uint16_t low16 ( uint32_t  data)
inline

Definition at line 327 of file TgcByteStreamData.h.

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

◆ low8()

uint8_t low8 ( uint32_t  data)
inline

Definition at line 326 of file TgcByteStreamData.h.

326 { 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 318 of file TgcByteStreamData.h.

318  {
319  void* ptr = src;
320  return reinterpret_cast<DEST*>(ptr);
321 }

◆ toBS16()

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

Definition at line 323 of file TgcByteStreamData.h.

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

◆ toBS32()

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

Definition at line 322 of file TgcByteStreamData.h.

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

Variable Documentation

◆ TGC_BYTESTREAM_HEADER

const uint32_t TGC_BYTESTREAM_HEADER = 0xee1234ee

Definition at line 15 of file TgcByteStreamData.h.

◆ TGC_BYTESTREAM_HEADERSIZE

const uint32_t TGC_BYTESTREAM_HEADERSIZE = 0x9

Definition at line 16 of file TgcByteStreamData.h.

◆ TGC_BYTESTREAM_HEADERVERSION

const uint32_t TGC_BYTESTREAM_HEADERVERSION = 0x03000300

Definition at line 17 of file TgcByteStreamData.h.

◆ TGC_BYTESTREAM_STATUSSIZE

const uint32_t TGC_BYTESTREAM_STATUSSIZE = 0x5

Definition at line 18 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:575
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:328
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
low8
uint8_t low8(uint32_t data)
Definition: TgcByteStreamData.h:326
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
fromBS32
void fromBS32(uint32_t data, T &s)
Definition: TgcByteStreamData.h:324
low16
uint16_t low16(uint32_t data)
Definition: TgcByteStreamData.h:327
bcTag
unsigned bcTag(unsigned bcBitMap)
Definition: TgcByteStreamData.h:367
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
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:71