ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
PadReadOut Class Reference

#include <PadReadOut.h>

Inheritance diagram for PadReadOut:
Collaboration diagram for PadReadOut:

Public Member Functions

 PadReadOut (ubit16 padID, MatrixReadOut *MROlist[8])
 
 ~PadReadOut ()
 
void reset ()
 
void makeFragment ()
 
void makeHeader ()
 
void makeFooter ()
 
void makeBody (bool debugPrint=false)
 
ubit16 readHeader ()
 
ubit16 readFooter ()
 
ubit16 readBody ()
 
void topPADBody ()
 
ubit16 readPADWord ()
 
ubit16 numberOfFragmentWords ()
 
ubit16 numberOfCMROFragments ()
 
void bytestream (std::ostream &stream)
 
void decodeBytestream ()
 
PadReadOutStructure getHeader ()
 
PadReadOutStructure getFooter ()
 
ObjectType tag () const
 
std::string name () const
 
virtual void Print (std::ostream &, bool) const
 

Private Attributes

ubit16 m_addressOfWordScanned
 
ubit16 m_numberOfCMFragments
 
ubit16 m_numberOfWordsInFragment
 
ubit16 m_newCMIndex
 
ubit16 m_newCMRO
 
ubit16 m_numberOfWordsRead
 
ubit16 m_numberOfWordsInCMRO
 
ubit16 m_endOfCMFragments
 
MatrixReadOutm_currentCMRO
 
PadReadOutStructure m_PROS
 
MatrixReadOutm_MROlist [8]
 
ubit16 m_padID
 
ubit16 m_Header
 
MatrixReadOutm_CMAFragment [8]
 
ubit16 m_Footer
 
ObjectType m_tag
 
std::string m_name
 

Detailed Description

Definition at line 15 of file PadReadOut.h.

Constructor & Destructor Documentation

◆ PadReadOut()

PadReadOut::PadReadOut ( ubit16  padID,
MatrixReadOut MROlist[8] 
)

Definition at line 15 of file PadReadOut.cxx.

15  : BaseObject(Hardware, "PadReadOut") {
16  m_padID = padID;
17  //
18  // copy MROlist pointers to m_MROlist
19  //
20  for (ubit16 i = 0; i < 8; i++) { m_MROlist[i] = MROlist[i]; }
21  reset();
22  makeFragment();
23  // cout<<" After makeFragment number of Words in PadID" << padID << " body =" << m_numberOfWordsInFragment<<endl;
24  topPADBody();
26  //
27 } // end-of-PadReadOut::PadReadOut

◆ ~PadReadOut()

PadReadOut::~PadReadOut ( )

Definition at line 29 of file PadReadOut.cxx.

29 {} // end-of-PadReadOut::PadReadOut

Member Function Documentation

◆ bytestream()

void PadReadOut::bytestream ( std::ostream &  stream)

Definition at line 167 of file PadReadOut.cxx.

167  {
168  stream << hex << m_Header << dec << endl; // header
169  for (ubit16 i = 0; i < m_numberOfCMFragments; i++) {
170  m_CMAFragment[i]->bytestream(stream); // body
171  } // end-of-for(ubit16 i
172  stream << hex << m_Footer << dec << endl; // footer
173 } // end-of-MatrixReadOut::bytestream

◆ decodeBytestream()

void PadReadOut::decodeBytestream ( )

Definition at line 175 of file PadReadOut.cxx.

175  {
176  PadReadOutStructure PROS;
177  char field;
178  ubit16 inputData;
179  //
180  ubit16 padHeaderfound = 0;
181  //
182  topPADBody();
183  for (ubit16 i = 0; i < m_numberOfWordsInFragment; i++) {
184  inputData = readPADWord();
185  // cout<<" bytestream: current word is "<<hex<<inputData<<dec<<endl;
186 
187  if (!padHeaderfound) {
188  PROS.decodeFragment(inputData, field);
189  if (PROS.isHeader()) {
190  padHeaderfound += 1;
191  // cout<<" decodeBytestream: PAD Header Found"<<endl;
192  }
193  } else {
194  }
195 
196  } // end-of-for(i
197 } // end-of-decodeBytestream

◆ getFooter()

PadReadOutStructure PadReadOut::getFooter ( )

Definition at line 204 of file PadReadOut.cxx.

204  {
205  PadReadOutStructure theStruct(m_Footer);
206  return theStruct;
207 } // end-of-PadReadOut::getFooter

◆ getHeader()

PadReadOutStructure PadReadOut::getHeader ( )

Definition at line 199 of file PadReadOut.cxx.

199  {
200  PadReadOutStructure theStruct(m_Header);
201  return theStruct;
202 } // end-of-PadReadOut::getHeader

◆ makeBody()

void PadReadOut::makeBody ( bool  debugPrint = false)

Definition at line 74 of file PadReadOut.cxx.

74  {
75  MatrixReadOut *CMAFragment[8] = {0};
77  ubit16 numberOfCMBodyWords = 0;
78  ubit16 i;
79  if (debugPrint) cout << " makeBody " << endl;
80 
81  for (i = 0; i < 8; i++) {
82  if (m_MROlist[i]) {
83  if (debugPrint) cout << m_MROlist[i] << endl;
84  MROS = m_MROlist[i]->getHeader();
85  numberOfCMBodyWords = m_MROlist[i]->numberOfBodyWords();
86  ubit16 cmid = MROS.cmid();
87  if (debugPrint)
88  cout << " Identificatore di questa Matrice e': " << cmid << endl
89  << " il numnero di Body words = " << numberOfCMBodyWords << endl;
90  if (cmid < 8) {
91  if (!CMAFragment[cmid]) {
92  CMAFragment[cmid] = m_MROlist[i];
93  } else {
94  if (debugPrint) cout << " PadReadOut::makeBody: more than one CMA with address " << cmid << endl;
95  }
96  if (debugPrint) cout << " Matrix: " << hex << m_MROlist[i]->readHeader() << dec << endl;
97  } else {
98  if (debugPrint) cout << " PadReadOut::makeBody: cmid address " << cmid << " is bad " << endl;
99  } // end-of-if(cmid<8
100  } // end-of-if(m_MROlist
101  } // end-of-while
102  //
103  // copy CMAFragment to the array data member m_CMAFragment
104  //
105  ubit16 j = 0;
106  for (i = 0; i < 8; i++) {
107  if (CMAFragment[i]) {
108  m_CMAFragment[j] = CMAFragment[i];
109  if (debugPrint) cout << " makeBody; number of CM WOrds=" << m_CMAFragment[j]->numberOfFragmentWords() << endl;
111  j++;
112  } // end-of-if(
113  } // end-of-for(i
115  if (debugPrint) cout << " Number of CMA Fragments= " << m_numberOfCMFragments << endl;
116 } // end-of-PadReadOut::makeBody

◆ makeFooter()

void PadReadOut::makeFooter ( )

Definition at line 67 of file PadReadOut.cxx.

67  {
68  ubit16 errorCodes[6] = {0, 0, 0, 0, 0, 0};
69  // m_Footer = m_PROS.makeFooter(0);
70  m_Footer = m_PROS.makeFooter(errorCodes);
72 } // end-of-PadReadOut::makeFooter()

◆ makeFragment()

void PadReadOut::makeFragment ( )

Definition at line 51 of file PadReadOut.cxx.

51  {
52  makeHeader();
53  makeBody();
54  makeFooter();
55 } // end-of-PadReadOut::makeFragment

◆ makeHeader()

void PadReadOut::makeHeader ( )

Definition at line 57 of file PadReadOut.cxx.

57  {
58  ubit16 headerval[3];
59  headerval[0] = 0;
60  headerval[1] = m_padID;
61  headerval[2] = 0; // Status bits (to be defined yet)
62  m_Header = m_PROS.makeHeader(headerval);
64  // cout<<" Header: "<<hex<<m_Header<<dec<<endl;
65 } // end-of-PadReadOut::makeHeader()

◆ name()

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

Definition at line 23 of file BaseObject.h.

23 { return m_name; }

◆ numberOfCMROFragments()

ubit16 PadReadOut::numberOfCMROFragments ( )
inline

Definition at line 30 of file PadReadOut.h.

30 { return m_numberOfCMFragments; };

◆ numberOfFragmentWords()

ubit16 PadReadOut::numberOfFragmentWords ( )
inline

Definition at line 29 of file PadReadOut.h.

29 { return m_numberOfWordsInFragment; };

◆ Print()

virtual void BaseObject::Print ( std::ostream &  ,
bool   
) const
inlinevirtualinherited

◆ readBody()

ubit16 PadReadOut::readBody ( )

Definition at line 122 of file PadReadOut.cxx.

122  {
123  ubit16 output = 0xffff;
124 
125  // cout<<" m_newCMIndex "<<m_newCMIndex
126  // <<" m_newCMRO "<<m_newCMRO
127  // <<" m_numberOfWordsInCMRO "<<m_numberOfWordsInCMRO
128  // <<" m_numberOfWordsRead "<<m_numberOfWordsRead
129  // <<" m_endOfCMFragments "<<m_endOfCMFragments<<endl;
130 
131  if (m_newCMRO) {
132  if (m_newCMIndex < 8) {
138  m_newCMRO = 0;
139  } // end
140  m_newCMIndex++;
141  } else {
142  m_endOfCMFragments = 1;
143  } // end
144 
145  } // end-of-if(m_newCMRO
146  //
147  if (!m_endOfCMFragments) {
151  } // end-of-if(!m_endOfCMFragments
152  return output;
153 } // end-of-PadReadOut::readBody()

◆ readFooter()

ubit16 PadReadOut::readFooter ( )

Definition at line 120 of file PadReadOut.cxx.

120 { return m_Footer; } // end-of-PadReadOut::readFooter()

◆ readHeader()

ubit16 PadReadOut::readHeader ( )

Definition at line 118 of file PadReadOut.cxx.

118 { return m_Header; } // end-of-PadReadOut::readHeader()

◆ readPADWord()

ubit16 PadReadOut::readPADWord ( )

Definition at line 155 of file PadReadOut.cxx.

155  {
156  ubit16 output = 0xffff;
157  if (m_addressOfWordScanned == 0)
158  output = readHeader();
160  output = readFooter();
161  else
162  output = readBody();
164  return output;
165 } // end-of-PadReadOut::readPADWord

◆ reset()

void PadReadOut::reset ( )

Definition at line 31 of file PadReadOut.cxx.

31  {
32  m_Header = 0x0000;
33  m_Footer = 0x0000;
34  for (ubit16 i = 0; i < 8; i++) { m_CMAFragment[i] = 0; }
37  //
38  topPADBody();
39 } // end-of-PadReadOut::reset

◆ tag()

ObjectType BaseObject::tag ( ) const
inlineinherited

Definition at line 22 of file BaseObject.h.

22 { return m_tag; }

◆ topPADBody()

void PadReadOut::topPADBody ( )

Definition at line 41 of file PadReadOut.cxx.

41  {
43  m_newCMIndex = 0;
44  m_newCMRO = 1;
48  m_currentCMRO = 0;
49 } // end-of-PadReadOut::topPADBody

Member Data Documentation

◆ m_addressOfWordScanned

ubit16 PadReadOut::m_addressOfWordScanned
private

Definition at line 40 of file PadReadOut.h.

◆ m_CMAFragment

MatrixReadOut* PadReadOut::m_CMAFragment[8]
private

Definition at line 55 of file PadReadOut.h.

◆ m_currentCMRO

MatrixReadOut* PadReadOut::m_currentCMRO
private

Definition at line 48 of file PadReadOut.h.

◆ m_endOfCMFragments

ubit16 PadReadOut::m_endOfCMFragments
private

Definition at line 47 of file PadReadOut.h.

◆ m_Footer

ubit16 PadReadOut::m_Footer
private

Definition at line 56 of file PadReadOut.h.

◆ m_Header

ubit16 PadReadOut::m_Header
private

Definition at line 54 of file PadReadOut.h.

◆ m_MROlist

MatrixReadOut* PadReadOut::m_MROlist[8]
private

Definition at line 52 of file PadReadOut.h.

◆ m_name

std::string BaseObject::m_name
privateinherited

Definition at line 16 of file BaseObject.h.

◆ m_newCMIndex

ubit16 PadReadOut::m_newCMIndex
private

Definition at line 43 of file PadReadOut.h.

◆ m_newCMRO

ubit16 PadReadOut::m_newCMRO
private

Definition at line 44 of file PadReadOut.h.

◆ m_numberOfCMFragments

ubit16 PadReadOut::m_numberOfCMFragments
private

Definition at line 41 of file PadReadOut.h.

◆ m_numberOfWordsInCMRO

ubit16 PadReadOut::m_numberOfWordsInCMRO
private

Definition at line 46 of file PadReadOut.h.

◆ m_numberOfWordsInFragment

ubit16 PadReadOut::m_numberOfWordsInFragment
private

Definition at line 42 of file PadReadOut.h.

◆ m_numberOfWordsRead

ubit16 PadReadOut::m_numberOfWordsRead
private

Definition at line 45 of file PadReadOut.h.

◆ m_padID

ubit16 PadReadOut::m_padID
private

Definition at line 53 of file PadReadOut.h.

◆ m_PROS

PadReadOutStructure PadReadOut::m_PROS
private

Definition at line 51 of file PadReadOut.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:
MatrixReadOut::numberOfFragmentWords
ubit16 numberOfFragmentWords()
Definition: MatrixReadOut.h:50
PadReadOut::m_numberOfWordsInFragment
ubit16 m_numberOfWordsInFragment
Definition: PadReadOut.h:42
PadReadOutStructure::makeHeader
ubit16 makeHeader(ubit16 *inputData)
Definition: PadReadOutStructure.cxx:74
PadReadOutStructure
Definition: PadReadOutStructure.h:13
BaseObject::m_name
std::string m_name
Definition: BaseObject.h:16
PadReadOut::makeHeader
void makeHeader()
Definition: PadReadOut.cxx:57
MatrixReadOut::getHeader
MatrixReadOutStructure getHeader()
Definition: MatrixReadOut.cxx:948
MatrixReadOut::readCMAWord
ubit16 readCMAWord()
Definition: MatrixReadOut.cxx:685
PadReadOut::m_Footer
ubit16 m_Footer
Definition: PadReadOut.h:56
MatrixReadOut::readHeader
ubit16 readHeader()
Definition: MatrixReadOut.cxx:657
PadReadOut::makeFooter
void makeFooter()
Definition: PadReadOut.cxx:67
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
MatrixReadOutStructure::cmid
ubit16 cmid()
Definition: MatrixReadOutStructure.h:30
PadReadOut::m_numberOfCMFragments
ubit16 m_numberOfCMFragments
Definition: PadReadOut.h:41
PadReadOut::makeBody
void makeBody(bool debugPrint=false)
Definition: PadReadOut.cxx:74
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
PadReadOut::readPADWord
ubit16 readPADWord()
Definition: PadReadOut.cxx:155
PadReadOut::m_PROS
PadReadOutStructure m_PROS
Definition: PadReadOut.h:51
MatrixReadOut
Definition: MatrixReadOut.h:18
PadReadOutStructure::decodeFragment
ubit16 decodeFragment(ubit16 inputWord, char &field)
Definition: PadReadOutStructure.cxx:118
lumiFormat.i
int i
Definition: lumiFormat.py:92
PadReadOut::m_addressOfWordScanned
ubit16 m_addressOfWordScanned
Definition: PadReadOut.h:40
PadReadOutStructure::makeFooter
ubit16 makeFooter(ubit16 errorCode)
Definition: PadReadOutStructure.h:25
PadReadOutStructure::isHeader
bool isHeader()
Definition: PadReadOutStructure.cxx:166
PadReadOut::m_numberOfWordsRead
ubit16 m_numberOfWordsRead
Definition: PadReadOut.h:45
MatrixReadOut::topCMABody
void topCMABody()
Definition: MatrixReadOut.cxx:718
PadReadOut::decodeBytestream
void decodeBytestream()
Definition: PadReadOut.cxx:175
PadReadOut::readFooter
ubit16 readFooter()
Definition: PadReadOut.cxx:120
PadReadOut::topPADBody
void topPADBody()
Definition: PadReadOut.cxx:41
PadReadOut::m_endOfCMFragments
ubit16 m_endOfCMFragments
Definition: PadReadOut.h:47
merge.output
output
Definition: merge.py:17
PadReadOut::m_newCMRO
ubit16 m_newCMRO
Definition: PadReadOut.h:44
Hardware
@ Hardware
Definition: BaseObject.h:11
PadReadOut::m_MROlist
MatrixReadOut * m_MROlist[8]
Definition: PadReadOut.h:52
MatrixReadOutStructure
Definition: MatrixReadOutStructure.h:13
PadReadOut::readHeader
ubit16 readHeader()
Definition: PadReadOut.cxx:118
PadReadOut::m_Header
ubit16 m_Header
Definition: PadReadOut.h:54
BaseObject::BaseObject
BaseObject(ObjectType, const std::string &)
Definition: BaseObject.cxx:7
MatrixReadOut::numberOfBodyWords
ubit16 numberOfBodyWords()
Definition: MatrixReadOut.h:49
PadReadOut::m_newCMIndex
ubit16 m_newCMIndex
Definition: PadReadOut.h:43
PadReadOut::m_numberOfWordsInCMRO
ubit16 m_numberOfWordsInCMRO
Definition: PadReadOut.h:46
MatrixReadOut::bytestream
void bytestream(std::ostream &stream)
Definition: MatrixReadOut.cxx:795
BaseObject::m_tag
ObjectType m_tag
Definition: BaseObject.h:15
PadReadOut::m_currentCMRO
MatrixReadOut * m_currentCMRO
Definition: PadReadOut.h:48
PadReadOut::reset
void reset()
Definition: PadReadOut.cxx:31
ubit16
unsigned short int ubit16
Definition: RpcByteStreamEncoder.h:20
Overlay::debugPrint
std::string debugPrint(const IDC_Container *container, unsigned numprint=25)
Diagnostic output of Identifiable Containers.
PadReadOut::m_CMAFragment
MatrixReadOut * m_CMAFragment[8]
Definition: PadReadOut.h:55
PadReadOut::readBody
ubit16 readBody()
Definition: PadReadOut.cxx:122
PadReadOut::makeFragment
void makeFragment()
Definition: PadReadOut.cxx:51
PadReadOut::m_padID
ubit16 m_padID
Definition: PadReadOut.h:53