ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
GETTopologyFrame.cxx
Go to the documentation of this file.
1 #include "GETTopologyFrame.h"
2 
3 #include <Rtypes.h>
4 
5 #include <cstring>
6 #include <iostream>
7 
9 
11 {
12  Clear();
13 }
14 
16 {
17  return (UInt_t)fCoboIdx;
18 }
20 {
21  return {(UInt_t)fAsadMask};
22 }
24 {
25  return (UInt_t)f2pMode;
26 }
28 {
29  return (UInt_t)fUNUSED;
30 }
32 {
33  return 0;
34 }
36 {
37  return 0;
38 }
39 
40 void GETTopologyFrame::Clear(Option_t *)
41 {
43 
44  memset(&fCoboIdx, 0, sizeof(uint8_t));
45  memset(&fAsadMask, 0, sizeof(uint8_t));
46  memset(&f2pMode, 0, sizeof(uint8_t));
47  memset(&fUNUSED, 0, sizeof(uint8_t));
48 }
49 
50 void GETTopologyFrame::Read(ifstream &stream)
51 {
52  Clear();
53 
54  GETHeaderBase::Read(stream);
55 
56  stream.read((Char_t *)&fCoboIdx, 1);
57  stream.read((Char_t *)&fAsadMask, 1);
58  stream.read((Char_t *)&f2pMode, 1);
59  stream.read((Char_t *)&fUNUSED, 1);
60 }
61 
63 {
64  cout << showbase << hex;
65  cout << " == GETTopologyFrame =======================" << endl;
66  cout << " metaType: " << GetMetaType() << endl;
67  cout << " - Endianness: " << (IsLittleEndian() ? "Little" : "Big") << endl;
68  cout << " - Blobness: " << (IsBlob() ? "YES" : "NO") << endl;
69  cout << " - UnitBlock: " << dec << GetUnitBlock() << " Bytes" << hex << endl;
70  cout << " frameSize: " << GetFrameSize(false) << " (" << dec << GetFrameSize(false)
71  << " Blocks = " << GetFrameSize() << hex << " Bytes)" << endl;
72  cout << " dataSource: " << GetDataSource() << endl;
73  cout << " frameType: " << GetFrameType() << endl;
74  cout << " revision: " << GetRevision() << endl;
75  cout << " coboIdx: " << GetCoboIdx() << endl;
76  cout << " asadMask: " << GetAsadMask() << " (" << bitset<4>(GetAsadMask()) << ")" << endl;
77  cout << " 2pMode: " << Get2pMode() << endl;
78  cout << " UNUSED: " << GetUNUSED() << endl;
79  cout << " ===========================================" << endl;
80 }
GETTopologyFrame::GetFrameSkip
ULong64_t GetFrameSkip()
Definition: GETTopologyFrame.cxx:31
GETHeaderBase::GetFrameSize
UInt_t GetFrameSize(Bool_t inBytes=kTRUE)
Definition: GETHeaderBase.cxx:21
GETHeaderBase::Clear
void Clear(Option_t *="")
Definition: GETHeaderBase.cxx:74
GETHeaderBase::GetRevision
UInt_t GetRevision()
Definition: GETHeaderBase.cxx:33
GETHeaderBase::GetMetaType
UInt_t GetMetaType()
Definition: GETHeaderBase.cxx:17
GETHeaderBase::IsLittleEndian
Bool_t IsLittleEndian()
Definition: GETHeaderBase.cxx:42
GETTopologyFrame::GETTopologyFrame
GETTopologyFrame()
ClassImp
ClassImp(GETTopologyFrame) GETTopologyFrame
Definition: GETTopologyFrame.cxx:8
GETHeaderBase::GetFrameType
UInt_t GetFrameType()
Definition: GETHeaderBase.cxx:29
GETHeaderBase::IsBlob
Bool_t IsBlob()
Definition: GETHeaderBase.cxx:46
GETHeaderBase::GetUnitBlock
UInt_t GetUnitBlock()
Definition: GETHeaderBase.cxx:50
GETTopologyFrame::GetHeaderSkip
ULong64_t GetHeaderSkip()
Definition: GETTopologyFrame.cxx:35
GETTopologyFrame::GetAsadMask
bitset< 4 > GetAsadMask()
Definition: GETTopologyFrame.cxx:19
GETHeaderBase::Read
void Read(ifstream &file, Bool_t rewind=kFALSE)
Definition: GETHeaderBase.cxx:83
GETTopologyFrame::GetCoboIdx
UInt_t GetCoboIdx()
Definition: GETTopologyFrame.cxx:15
GETTopologyFrame.h
GETTopologyFrame::Read
void Read(ifstream &Stream)
Definition: GETTopologyFrame.cxx:50
GETTopologyFrame::Get2pMode
UInt_t Get2pMode()
Definition: GETTopologyFrame.cxx:23
GETHeaderBase::GetDataSource
UInt_t GetDataSource()
Definition: GETHeaderBase.cxx:25
GETTopologyFrame::GetUNUSED
UInt_t GetUNUSED()
Definition: GETTopologyFrame.cxx:27
GETTopologyFrame
Definition: GETTopologyFrame.h:20
GETTopologyFrame::Print
void Print()
Definition: GETTopologyFrame.cxx:62
GETTopologyFrame::Clear
void Clear(Option_t *="")
Definition: GETTopologyFrame.cxx:40