BOSS 7.0.4
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)
 
 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

Constructor & Destructor Documentation

◆ MucFec() [1/4]

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/4]

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() [1/2]

MucFec::~MucFec ( )
inline

Definition at line 45 of file InstallArea/include/MucMappingAlg/MucMappingAlg/MucFec.h.

45{ ; }

◆ MucFec() [3/4]

MucFec::MucFec ( int  id)

◆ MucFec() [4/4]

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

◆ ~MucFec() [2/2]

MucFec::~MucFec ( )
inline

Member Function Documentation

◆ DecodeFecID() [1/2]

int MucFec::DecodeFecID ( )
inline

Definition at line 65 of file InstallArea/include/MucMappingAlg/MucMappingAlg/MucFec.h.

65{ return m_FecID; }

Referenced by MucMappingAlg::finalize().

◆ DecodeFecID() [2/2]

int MucFec::DecodeFecID ( )
inline

Definition at line 65 of file Muc/MucMappingAlg/MucMappingAlg-00-00-02/MucMappingAlg/MucFec.h.

65{ return m_FecID; }

◆ DecodeModule() [1/2]

int MucFec::DecodeModule ( )
inline

Definition at line 63 of file InstallArea/include/MucMappingAlg/MucMappingAlg/MucFec.h.

63{ return m_Module; }

Referenced by MucMappingAlg::finalize().

◆ DecodeModule() [2/2]

int MucFec::DecodeModule ( )
inline

Definition at line 63 of file Muc/MucMappingAlg/MucMappingAlg-00-00-02/MucMappingAlg/MucFec.h.

63{ return m_Module; }

◆ DecodeSocket() [1/2]

int MucFec::DecodeSocket ( )
inline

Definition at line 64 of file InstallArea/include/MucMappingAlg/MucMappingAlg/MucFec.h.

64{ return m_Socket; }

Referenced by MucMappingAlg::finalize().

◆ DecodeSocket() [2/2]

int MucFec::DecodeSocket ( )
inline

Definition at line 64 of file Muc/MucMappingAlg/MucMappingAlg-00-00-02/MucMappingAlg/MucFec.h.

64{ return m_Socket; }

◆ GetBin() [1/4]

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/4]

string MucFec::GetBin ( unsigned int  record)

◆ GetBin() [3/4]

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}

◆ GetBin() [4/4]

string MucFec::GetBin ( unsigned short  record)

◆ GetChainName() [1/2]

string MucFec::GetChainName ( )
inline

Definition at line 59 of file InstallArea/include/MucMappingAlg/MucMappingAlg/MucFec.h.

59{ return m_ChainName; }

Referenced by MucMappingAlg::finalize().

◆ GetChainName() [2/2]

string MucFec::GetChainName ( )
inline

Definition at line 59 of file Muc/MucMappingAlg/MucMappingAlg-00-00-02/MucMappingAlg/MucFec.h.

59{ return m_ChainName; }

◆ GetData() [1/2]

unsigned short MucFec::GetData ( )
inline

Definition at line 52 of file InstallArea/include/MucMappingAlg/MucMappingAlg/MucFec.h.

52{ return m_Data; }

◆ GetData() [2/2]

unsigned short MucFec::GetData ( )
inline

Definition at line 52 of file Muc/MucMappingAlg/MucMappingAlg-00-00-02/MucMappingAlg/MucFec.h.

52{ return m_Data; }

◆ GetDataBin() [1/2]

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().

◆ GetDataBin() [2/2]

string MucFec::GetDataBin ( )

◆ GetFiredStripNumber() [1/2]

int MucFec::GetFiredStripNumber ( )

Definition at line 191 of file MucFec.cxx.

191{ return m_FiredStripNumber; }

◆ GetFiredStripNumber() [2/2]

int MucFec::GetFiredStripNumber ( )

◆ GetFiredStripVect() [1/2]

vector< int > * MucFec::GetFiredStripVect ( )

Definition at line 195 of file MucFec.cxx.

195{ return &m_FiredStripVect; }

◆ GetFiredStripVect() [2/2]

vector< int > * MucFec::GetFiredStripVect ( )

◆ GetFirstStripID() [1/2]

int MucFec::GetFirstStripID ( )
inline

Definition at line 58 of file InstallArea/include/MucMappingAlg/MucMappingAlg/MucFec.h.

58{ return m_FirstStripID; }

Referenced by MucMappingAlg::finalize().

◆ GetFirstStripID() [2/2]

int MucFec::GetFirstStripID ( )
inline

Definition at line 58 of file Muc/MucMappingAlg/MucMappingAlg-00-00-02/MucMappingAlg/MucFec.h.

58{ return m_FirstStripID; }

◆ GetGeoAddress() [1/2]

unsigned short MucFec::GetGeoAddress ( )
inline

Definition at line 57 of file InstallArea/include/MucMappingAlg/MucMappingAlg/MucFec.h.

57{ return m_GeoAddress; }

Referenced by MucMappingAlg::finalize().

◆ GetGeoAddress() [2/2]

unsigned short MucFec::GetGeoAddress ( )
inline

Definition at line 57 of file Muc/MucMappingAlg/MucMappingAlg-00-00-02/MucMappingAlg/MucFec.h.

57{ return m_GeoAddress; }

◆ GetGeoBin() [1/2]

string MucFec::GetGeoBin ( )

Definition at line 232 of file MucFec.cxx.

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

Referenced by MucMappingAlg::finalize().

◆ GetGeoBin() [2/2]

string MucFec::GetGeoBin ( )

◆ GetID() [1/2]

int MucFec::GetID ( )
inline

Definition at line 48 of file InstallArea/include/MucMappingAlg/MucMappingAlg/MucFec.h.

48{ return m_ID; }

◆ GetID() [2/2]

int MucFec::GetID ( )
inline

Definition at line 48 of file Muc/MucMappingAlg/MucMappingAlg-00-00-02/MucMappingAlg/MucFec.h.

48{ return m_ID; }

◆ GetLayer() [1/2]

int MucFec::GetLayer ( )
inline

Definition at line 56 of file InstallArea/include/MucMappingAlg/MucMappingAlg/MucFec.h.

56{ return m_Layer; }

Referenced by MucMappingAlg::finalize().

◆ GetLayer() [2/2]

int MucFec::GetLayer ( )
inline

Definition at line 56 of file Muc/MucMappingAlg/MucMappingAlg-00-00-02/MucMappingAlg/MucFec.h.

56{ return m_Layer; }

◆ GetPart() [1/2]

int MucFec::GetPart ( )
inline

Definition at line 54 of file InstallArea/include/MucMappingAlg/MucMappingAlg/MucFec.h.

54{ return m_Part; }

Referenced by MucMappingAlg::finalize().

◆ GetPart() [2/2]

int MucFec::GetPart ( )
inline

Definition at line 54 of file Muc/MucMappingAlg/MucMappingAlg-00-00-02/MucMappingAlg/MucFec.h.

54{ return m_Part; }

◆ GetPowerpcRecord() [1/2]

unsigned int MucFec::GetPowerpcRecord ( )

Definition at line 193 of file MucFec.cxx.

193{ return m_PowerpcRecord; }

◆ GetPowerpcRecord() [2/2]

unsigned int MucFec::GetPowerpcRecord ( )

◆ GetSegment() [1/2]

int MucFec::GetSegment ( )
inline

Definition at line 55 of file InstallArea/include/MucMappingAlg/MucMappingAlg/MucFec.h.

55{ return m_Segment; }

Referenced by MucMappingAlg::finalize().

◆ GetSegment() [2/2]

int MucFec::GetSegment ( )
inline

Definition at line 55 of file Muc/MucMappingAlg/MucMappingAlg-00-00-02/MucMappingAlg/MucFec.h.

55{ return m_Segment; }

◆ GetStripOrder() [1/2]

int MucFec::GetStripOrder ( )
inline

Definition at line 49 of file InstallArea/include/MucMappingAlg/MucMappingAlg/MucFec.h.

49{ return m_StripOrder; }

Referenced by MucMappingAlg::finalize().

◆ GetStripOrder() [2/2]

int MucFec::GetStripOrder ( )
inline

Definition at line 49 of file Muc/MucMappingAlg/MucMappingAlg-00-00-02/MucMappingAlg/MucFec.h.

49{ return m_StripOrder; }

◆ GetVmeAddress() [1/2]

unsigned short MucFec::GetVmeAddress ( )
inline

Definition at line 51 of file InstallArea/include/MucMappingAlg/MucMappingAlg/MucFec.h.

51{ return m_VmeAddress; }

Referenced by MucMappingAlg::finalize().

◆ GetVmeAddress() [2/2]

unsigned short MucFec::GetVmeAddress ( )
inline

Definition at line 51 of file Muc/MucMappingAlg/MucMappingAlg-00-00-02/MucMappingAlg/MucFec.h.

51{ return m_VmeAddress; }

◆ GetVmeBin() [1/2]

string MucFec::GetVmeBin ( )

Definition at line 227 of file MucFec.cxx.

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

Referenced by MucMappingAlg::finalize().

◆ GetVmeBin() [2/2]

string MucFec::GetVmeBin ( )

◆ GetVmeRecord() [1/2]

unsigned int MucFec::GetVmeRecord ( )
inline

Definition at line 50 of file InstallArea/include/MucMappingAlg/MucMappingAlg/MucFec.h.

50{ return m_VmeRecord; }

◆ GetVmeRecord() [2/2]

unsigned int MucFec::GetVmeRecord ( )
inline

Definition at line 50 of file Muc/MucMappingAlg/MucMappingAlg-00-00-02/MucMappingAlg/MucFec.h.

50{ return m_VmeRecord; }

◆ SetChainName() [1/2]

void MucFec::SetChainName ( string  chainName)

◆ SetChainName() [2/2]

void MucFec::SetChainName ( string  chainName)

◆ SetData() [1/2]

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

◆ SetData() [2/2]

void MucFec::SetData ( unsigned short  data)

◆ SetFirstStripID() [1/2]

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}

◆ SetFirstStripID() [2/2]

void MucFec::SetFirstStripID ( int  firstStripID)

◆ SetLocation() [1/2]

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}

◆ SetLocation() [2/2]

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

◆ SetStripOrder() [1/2]

void MucFec::SetStripOrder ( int  stripOrder)

Definition at line 156 of file MucFec.cxx.

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

◆ SetStripOrder() [2/2]

void MucFec::SetStripOrder ( int  stripOrder)

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