CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
MucFec Class Reference

#include <MucFec.h>

Public Member Functions

 MucFec (int id)
 
 MucFec (int id, int stripOrder, int part, int segment, int layer, int firstStripID, unsigned int vmeRecord, string chainName)
 
 ~MucFec ()
 
int GetID ()
 
int GetStripOrder ()
 
unsigned int GetVmeRecord ()
 
unsigned short GetVmeAddress ()
 
unsigned short GetData ()
 
int GetPart ()
 
int GetSegment ()
 
int GetLayer ()
 
unsigned short GetGeoAddress ()
 
int GetFirstStripID ()
 
string GetChainName ()
 
int GetFiredStripNumber ()
 
vector< int > * GetFiredStripVect ()
 
unsigned int GetPowerpcRecord ()
 
int DecodeModule ()
 
int DecodeSocket ()
 
int DecodeFecID ()
 
string GetBin (unsigned int record)
 
string GetBin (unsigned short record)
 
string GetVmeBin ()
 
string GetGeoBin ()
 
string GetDataBin ()
 
void SetStripOrder (int stripOrder)
 
void SetLocation (int part, int segment, int layer)
 
void SetFirstStripID (int firstStripID)
 
void SetChainName (string chainName)
 
void SetData (unsigned short data)
 

Detailed Description

Definition at line 40 of file MucFec.h.

Constructor & Destructor Documentation

◆ MucFec() [1/2]

MucFec::MucFec ( int id)

Definition at line 18 of file MucFec.cxx.

19{
20 //cout << "MucFec:: Create FEC : " << id << endl;
21
22 if( (id < 0) || (id > STRIP_NUM-1) )
23 {
24 cout << "Initialize failure, check id!" << endl;
25 m_ID = 0;
26 }
27 else m_ID = id;
28
29 m_Part = 0;
30 m_Segment = 0;
31 m_Layer = 0;
32 m_FirstStripID = 0;
33 m_StripOrder = DEFAULT_STRIP_ORDER;
34 m_ChainName = "NoName";
35 m_VmeRecord = 0;
36
37 MucFec::Initialize();
38}

◆ MucFec() [2/2]

MucFec::MucFec ( int id,
int stripOrder,
int part,
int segment,
int layer,
int firstStripID,
unsigned int vmeRecord,
string chainName )

Definition at line 40 of file MucFec.cxx.

42{
43// cout << "MucFec:: Create FEC : " << endl;
44// cout << "ID: " << id << "\tPart: " << part << "\tSegment: " << segment << "\tLayer: " << layer
45// << "\tfirstStripID: " << firstStripID << "\tvmeRecord: " << vmeRecord<<endl;
46
47 // Check parameters
48 if( (id < 0) || (id > STRIP_NUM-1) )
49 {
50 m_ID = 0;
51 cout << "MucFec::Check id:\t" << id << "!" << endl;
52 }else
53 if( (stripOrder != 1) && (stripOrder != -1) )
54 {
55 m_StripOrder = 0;
56 cout << "MucFec::Check stripOrder:\t" << stripOrder << "!" << endl;
57 }else
58 if( (part < 0) || ( part > PART_MAX-1) )
59 {
60 m_Part = 0;
61 cout << "MucFec::Check part:\t" << part << "!" << endl;
62 }else
63 if( (segment < 0) || ( segment > ((part==BRID)?(B_SEG_NUM-1):(E_SEG_NUM-1)) ) )
64 {
65 m_Segment = 0;
66 cout << "MucFec::Check segment:\t" << segment << "!" << endl;
67 }else
68 if( (layer <0) || ( layer > ((part==BRID)?(B_LAY_NUM-1):(E_LAY_NUM-1)) ) )
69 {
70 m_Layer = 0;
71 cout << "MucFec::Check layer:\t" << layer << "!" << endl;
72 }else
73 if( sizeof(vmeRecord) < 4 )
74 {
75 m_VmeRecord = 0;
76 cout << "MucFec::Check record:\t" << vmeRecord << "!" << endl;
77 }else
78 {
79 m_ID = id;
80 m_StripOrder = stripOrder;
81 m_Part = part;
82 m_Segment = segment;
83 m_Layer = layer;
84 m_FirstStripID = firstStripID;
85 m_ChainName = chainName;
86 m_VmeRecord = vmeRecord;
87 }
88
89 MucFec::Initialize();
90}

◆ ~MucFec()

MucFec::~MucFec ( )
inline

Definition at line 45 of file MucFec.h.

45{ ; }

Member Function Documentation

◆ DecodeFecID()

int MucFec::DecodeFecID ( )
inline

Definition at line 65 of file MucFec.h.

65{ return m_FecID; }

Referenced by MucMappingAlg::finalize().

◆ DecodeModule()

int MucFec::DecodeModule ( )
inline

Definition at line 63 of file MucFec.h.

63{ return m_Module; }

Referenced by MucMappingAlg::finalize().

◆ DecodeSocket()

int MucFec::DecodeSocket ( )
inline

Definition at line 64 of file MucFec.h.

64{ return m_Socket; }

Referenced by MucMappingAlg::finalize().

◆ GetBin() [1/2]

string MucFec::GetBin ( unsigned int record)

Definition at line 197 of file MucFec.cxx.

198{
199 const int SIZE = sizeof( unsigned int ) * 8;
200
201 string Bin;
202 unsigned int temp = 0;
203 for(int i=0; i<SIZE; i++)
204 {
205 temp = record >> SIZE-i-1;
206 Bin += ( temp & 1 ) ? "1" : "0";
207 }
208
209 return Bin;
210}

Referenced by GetDataBin(), GetGeoBin(), and GetVmeBin().

◆ GetBin() [2/2]

string MucFec::GetBin ( unsigned short record)

Definition at line 212 of file MucFec.cxx.

213{
214 const int SIZE = sizeof( unsigned short ) * 8;
215
216 string Bin;
217 unsigned short temp = 0;
218 for(int i=0; i<SIZE; i++)
219 {
220 temp = record >> SIZE-i-1;
221 Bin += ( temp & 1 ) ? "1" : "0";
222 }
223
224 return Bin;
225}

◆ GetChainName()

string MucFec::GetChainName ( )
inline

Definition at line 59 of file MucFec.h.

59{ return m_ChainName; }

Referenced by MucMappingAlg::finalize().

◆ GetData()

unsigned short MucFec::GetData ( )
inline

Definition at line 52 of file MucFec.h.

52{ return m_Data; }

◆ GetDataBin()

string MucFec::GetDataBin ( )

Definition at line 237 of file MucFec.cxx.

238{
239 return MucFec::GetBin( m_Data );
240}
string GetBin(unsigned int record)
Definition MucFec.cxx:197

Referenced by MucMappingAlg::finalize().

◆ GetFiredStripNumber()

int MucFec::GetFiredStripNumber ( )

Definition at line 191 of file MucFec.cxx.

191{ return m_FiredStripNumber; }

◆ GetFiredStripVect()

vector< int > * MucFec::GetFiredStripVect ( )

Definition at line 195 of file MucFec.cxx.

195{ return &m_FiredStripVect; }

◆ GetFirstStripID()

int MucFec::GetFirstStripID ( )
inline

Definition at line 58 of file MucFec.h.

58{ return m_FirstStripID; }

Referenced by MucMappingAlg::finalize().

◆ GetGeoAddress()

unsigned short MucFec::GetGeoAddress ( )
inline

Definition at line 57 of file MucFec.h.

57{ return m_GeoAddress; }

Referenced by MucMappingAlg::finalize().

◆ GetGeoBin()

string MucFec::GetGeoBin ( )

Definition at line 232 of file MucFec.cxx.

233{
234 return MucFec::GetBin( m_GeoAddress );
235}

Referenced by MucMappingAlg::finalize().

◆ GetID()

int MucFec::GetID ( )
inline

Definition at line 48 of file MucFec.h.

48{ return m_ID; }

◆ GetLayer()

int MucFec::GetLayer ( )
inline

Definition at line 56 of file MucFec.h.

56{ return m_Layer; }

Referenced by MucMappingAlg::finalize().

◆ GetPart()

int MucFec::GetPart ( )
inline

Definition at line 54 of file MucFec.h.

54{ return m_Part; }

Referenced by MucMappingAlg::finalize().

◆ GetPowerpcRecord()

unsigned int MucFec::GetPowerpcRecord ( )

Definition at line 193 of file MucFec.cxx.

193{ return m_PowerpcRecord; }

◆ GetSegment()

int MucFec::GetSegment ( )
inline

Definition at line 55 of file MucFec.h.

55{ return m_Segment; }

Referenced by MucMappingAlg::finalize().

◆ GetStripOrder()

int MucFec::GetStripOrder ( )
inline

Definition at line 49 of file MucFec.h.

49{ return m_StripOrder; }

Referenced by MucMappingAlg::finalize().

◆ GetVmeAddress()

unsigned short MucFec::GetVmeAddress ( )
inline

Definition at line 51 of file MucFec.h.

51{ return m_VmeAddress; }

Referenced by MucMappingAlg::finalize().

◆ GetVmeBin()

string MucFec::GetVmeBin ( )

Definition at line 227 of file MucFec.cxx.

228{
229 return MucFec::GetBin( m_VmeAddress );
230}

Referenced by MucMappingAlg::finalize().

◆ GetVmeRecord()

unsigned int MucFec::GetVmeRecord ( )
inline

Definition at line 50 of file MucFec.h.

50{ return m_VmeRecord; }

◆ SetChainName()

void MucFec::SetChainName ( string chainName)

◆ SetData()

void MucFec::SetData ( unsigned short data)

Definition at line 179 of file MucFec.cxx.

180{
181 m_Data = data;
182 m_VmeRecord = (m_VmeRecord | m_Data);
183 MucFec :: EncodePowerpcRecord();
184 MucFec :: SetFiredStripNumber();
185 MucFec :: SetFiredStripVect();
186}
TTree * data

◆ SetFirstStripID()

void MucFec::SetFirstStripID ( int firstStripID)

Definition at line 172 of file MucFec.cxx.

173{
174 m_FirstStripID = firstStripID;
175 MucFec :: EncodePowerpcRecord();
176 MucFec :: SetFiredStripVect();
177}

◆ SetLocation()

void MucFec::SetLocation ( int part,
int segment,
int layer )

Definition at line 163 of file MucFec.cxx.

164{
165 m_Part = part;
166 m_Segment = segment;
167 m_Layer = layer;
168
169 MucFec::Initialize();
170}

◆ SetStripOrder()

void MucFec::SetStripOrder ( int stripOrder)

Definition at line 156 of file MucFec.cxx.

157{
158 m_StripOrder = stripOrder;
159
160 MucFec::SetFiredStripVect();
161}

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