ATLAS Offline Software
Loading...
Searching...
No Matches
SectorLogicRXReadOut Class Reference

#include <SectorLogicRXReadOut.h>

Inheritance diagram for SectorLogicRXReadOut:
Collaboration diagram for SectorLogicRXReadOut:

Classes

struct  SLRXROData

Public Member Functions

 SectorLogicRXReadOut ()
 ~SectorLogicRXReadOut ()
void initialize ()
void reset ()
void writeRecord (ubit16 thisRecord, bool last)
uint16_t numberOfFragmentWords ()
uint16_t numberOfInputWords ()
void topSLBody ()
uint16_t readSLHitCurrent ()
void display (std::ostream &stream)
ObjectType tag () const
const std::string & name () const
virtual void Print (std::ostream &, bool) const

Private Member Functions

void deleteSLBody ()
void makeNewHit (ubit16 newHit)

Private Attributes

uint16_t m_Header
uint16_t m_SubHeader
uint16_t m_Footer
SLRXRODatam_BodyFirst
uint16_t m_numberOfWordsInFrag
uint16_t m_numberOfInputWords
SLRXRODatam_BodyLast
SLRXRODatam_BodyCurr
ObjectType m_tag
std::string m_name

Friends

std::ostream & operator<< (std::ostream &stream, SectorLogicRXReadOut *p)
std::ostream & operator<< (std::ostream &stream, SectorLogicRXReadOut &p)

Detailed Description

Definition at line 17 of file SectorLogicRXReadOut.h.

Constructor & Destructor Documentation

◆ SectorLogicRXReadOut()

SectorLogicRXReadOut::SectorLogicRXReadOut ( )

Definition at line 17 of file SectorLogicRXReadOut.cxx.

17: BaseObject(Hardware, "SectorLogicRXReadOut") { initialize(); } // end-of-SectorLogicRXReadOut
@ Hardware
Definition BaseObject.h:11
BaseObject(ObjectType, const std::string &)
Definition BaseObject.cxx:7

◆ ~SectorLogicRXReadOut()

SectorLogicRXReadOut::~SectorLogicRXReadOut ( )

Definition at line 20 of file SectorLogicRXReadOut.cxx.

20 {
21 //
22 // delete the SLRXROData dynamic structure used to describe Body part
23 // of the event fragment.
24 //
26}

Member Function Documentation

◆ deleteSLBody()

void SectorLogicRXReadOut::deleteSLBody ( )
private

Definition at line 28 of file SectorLogicRXReadOut.cxx.

28 {
29 SLRXROData *p, *q;
30 p = m_BodyFirst;
31 while (p) {
32 q = p;
33 p = p->next;
34 delete q;
35 } // end-of-while
36 p = 0;
37 q = 0;
38 m_BodyFirst = 0;
39 m_BodyLast = 0;
40 m_BodyCurr = 0;
42} // end-of-deleteSLBody

◆ display()

void SectorLogicRXReadOut::display ( std::ostream & stream)

Definition at line 118 of file SectorLogicRXReadOut.cxx.

118 {
119 stream << " **** Sector Logic ReadOut Fragment ****" << std::endl;
120 stream << " SectorLogic: Header " << std::hex << m_Header << std::dec << std::endl;
121 stream << " SectorLogic: SubHeader " << std::hex << m_SubHeader << std::dec << std::endl;
122 for (ubit16 i = 0; i < m_numberOfInputWords; i++) {
123 stream << " SectorLogic: hit " << (i + 1) << " ==> " << std::hex << readSLHitCurrent() << std::dec << std::endl;
124 }
125 stream << " SectorLogic: Footer " << std::hex << m_Footer << std::dec << std::endl;
126} // end-of-void SectorLogicRXReadOut::display
unsigned short int ubit16

◆ initialize()

void SectorLogicRXReadOut::initialize ( )

Definition at line 45 of file SectorLogicRXReadOut.cxx.

45 {
46 //
47 // initialize data members
48 //
49 m_Header = 0;
50 m_SubHeader = 0;
51 m_Footer = 0;
52 //
53 // initialize pointers
54 //
55 m_BodyFirst = 0;
56 m_BodyLast = 0;
57 m_BodyCurr = 0;
58 //
59 // initialize check flags
60 //
63} // end-of-initialize

◆ makeNewHit()

void SectorLogicRXReadOut::makeNewHit ( ubit16 newHit)
private

Definition at line 90 of file SectorLogicRXReadOut.cxx.

90 {
92 p = new SLRXROData;
93 p->hit = newHit;
94 p->next = 0;
95 if (!m_BodyFirst) {
96 m_BodyFirst = p;
97 } else {
98 m_BodyLast->next = p;
99 } // end-of-if
100 m_BodyLast = p;
101
104
105} // end-of-SectorLogicRXReadOut::makeNewHit

◆ name()

const std::string & BaseObject::name ( ) const
inlineinherited

Definition at line 23 of file BaseObject.h.

23{ return m_name; }
std::string m_name
Definition BaseObject.h:16

◆ numberOfFragmentWords()

uint16_t SectorLogicRXReadOut::numberOfFragmentWords ( )
inline

Definition at line 26 of file SectorLogicRXReadOut.h.

26{ return m_numberOfWordsInFrag; };

◆ numberOfInputWords()

uint16_t SectorLogicRXReadOut::numberOfInputWords ( )
inline

Definition at line 27 of file SectorLogicRXReadOut.h.

27{ return m_numberOfInputWords; };

◆ Print()

◆ readSLHitCurrent()

ubit16 SectorLogicRXReadOut::readSLHitCurrent ( )

Definition at line 107 of file SectorLogicRXReadOut.cxx.

107 {
108 if (m_BodyCurr) {
109 ubit16 hit = m_BodyCurr->hit;
110 m_BodyCurr = m_BodyCurr->next;
111 return hit;
112 } else {
113 return 0xefac;
114 }
115} // end-of-SectorLogicRXReadOut::readSLHitCurrent

◆ reset()

void SectorLogicRXReadOut::reset ( )

Definition at line 66 of file SectorLogicRXReadOut.cxx.

66 {
67 //
68 // reset the data structure to host a new fragment;
69 // first delete the dinamyc structure...
71 // then initialize the data members.
72 initialize();
73} // end-of-SectorLogicRXReadOut::reset()

◆ tag()

ObjectType BaseObject::tag ( ) const
inlineinherited

Definition at line 22 of file BaseObject.h.

22{ return m_tag; }
ObjectType m_tag
Definition BaseObject.h:15

◆ topSLBody()

void SectorLogicRXReadOut::topSLBody ( )
inline

Definition at line 29 of file SectorLogicRXReadOut.h.

◆ writeRecord()

void SectorLogicRXReadOut::writeRecord ( ubit16 thisRecord,
bool last )

Definition at line 76 of file SectorLogicRXReadOut.cxx.

76 {
77 if (m_numberOfWordsInFrag == 0) {
78 m_Header = thisRecord;
79 } else if (m_numberOfWordsInFrag == 1) {
80 m_SubHeader = thisRecord;
81 } else if (m_numberOfWordsInFrag && !last) {
82 makeNewHit(thisRecord);
83 } else {
84 m_Footer = thisRecord;
85 }
87} // end-of-void SectorLogicRXReadOut
void makeNewHit(ubit16 newHit)

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream & stream,
SectorLogicRXReadOut & p )
friend

Definition at line 42 of file SectorLogicRXReadOut.h.

42 {
43 p.display(stream);
44 return stream;
45 }

◆ operator<< [2/2]

std::ostream & operator<< ( std::ostream & stream,
SectorLogicRXReadOut * p )
friend

Definition at line 38 of file SectorLogicRXReadOut.h.

38 {
39 p->display(stream);
40 return stream;
41 }

Member Data Documentation

◆ m_BodyCurr

SLRXROData* SectorLogicRXReadOut::m_BodyCurr
private

Definition at line 66 of file SectorLogicRXReadOut.h.

◆ m_BodyFirst

SLRXROData* SectorLogicRXReadOut::m_BodyFirst
private

Definition at line 60 of file SectorLogicRXReadOut.h.

◆ m_BodyLast

SLRXROData* SectorLogicRXReadOut::m_BodyLast
private

Definition at line 65 of file SectorLogicRXReadOut.h.

◆ m_Footer

uint16_t SectorLogicRXReadOut::m_Footer
private

Definition at line 59 of file SectorLogicRXReadOut.h.

◆ m_Header

uint16_t SectorLogicRXReadOut::m_Header
private

Definition at line 57 of file SectorLogicRXReadOut.h.

◆ m_name

std::string BaseObject::m_name
privateinherited

Definition at line 16 of file BaseObject.h.

◆ m_numberOfInputWords

uint16_t SectorLogicRXReadOut::m_numberOfInputWords
private

Definition at line 62 of file SectorLogicRXReadOut.h.

◆ m_numberOfWordsInFrag

uint16_t SectorLogicRXReadOut::m_numberOfWordsInFrag
private

Definition at line 61 of file SectorLogicRXReadOut.h.

◆ m_SubHeader

uint16_t SectorLogicRXReadOut::m_SubHeader
private

Definition at line 58 of file SectorLogicRXReadOut.h.

◆ m_tag

ObjectType BaseObject::m_tag
privateinherited

Definition at line 15 of file BaseObject.h.


The documentation for this class was generated from the following files: