20 enum { BufferSize = 1024 };
45 if( fullName.length() == 0 )
47 std::ifstream
file(fullName.c_str() ,std::ios::in);
50 int oPP,oCon,oCh,i1PP,i2PP,totalCh;
52 while(
file.getline(buf,BufferSize)){
53 std::istringstream line(buf);
54 line>>inLabel>>totalCh;
64 while(
file.getline(buf,BufferSize)&&(isspace(buf[0])||isdigit(buf[0]))){
68 std::istringstream line2(buf);
69 line2 >> oPP >> oCon >> oCh >> i1PP >> iCon >> iCh;
71 if((i1PP!=-1)&&(PP->
getId()==oPP)){
72 if(PP->
getId()==i1PP){
90#ifdef TGCDEBUG_CONNECTION
91 std::cout <<
"TGCConnectionInPP: " <<
label <<
" PPIn= " << i1PP
94 <<
" PPOut= " << oPP <<
" " << oCon <<
" " << oCh;
98 line2 >> i2PP >> iCon >> iCh;
101 if((i2PP>0)||(iCon!=0)||(iCh!=0)){
110#ifdef TGCDEBUG_CONNECTION
115 if(PP->
getId()==i2PP){
131#ifdef TGCDEBUG_CONNECTION
132 std::cout << std::endl;
154 file.open(
"dumpConnection.out", std::ios::out | std::ios::app);
155 file.setf(std::ios::right);
158 for(
int j=0; j<
m_nCh[i]; j+=1){
224 int nPPOutCh =
m_nCh[i];
267 if(
this != &right ) {
270 int nPPOutCh =
m_nCh[i];
355 const std::vector<const TGCPatchPanel*>& oldPatchPanels)
361 if(oldPatchPanels.size()!=3)
return false;
364 int nPPOutCh =
m_nCh[i];
366 for(
int iCh=0; iCh<nPPOutCh; iCh++) {
383 for(
int iCh=0; iCh<nPPOutCh; iCh++) {
int * m_oredConnectorIn[NumberOfPPOutputConnector]
int getConnectorIn(int connectorOut, int chOut)
int m_nCh[NumberOfPPOutputConnector]
int * m_oredChannelIn[NumberOfPPOutputConnector]
TGCPatchPanel ** m_patchPanelIn[NumberOfPPOutputConnector]
void dumpConnection(int PPId=0) const
TGCPatchPanel ** m_oredPatchPanelIn[NumberOfPPOutputConnector]
int * m_channelIn[NumberOfPPOutputConnector]
void readConnectionTable(TGCPatchPanel *PP)
int getOredChannelIn(int connectorOut, int chOut)
int getOredConnectorIn(int connectorOut, int chOut)
TGCPatchPanel * getPPIn(int connectorOut, int chOut)
TGCConnectionInPP & operator=(const TGCConnectionInPP &right)
bool replacePatchPanelPointers(TGCPatchPanel *newPatchPanel, const std::vector< const TGCPatchPanel * > &oldPatchPanels)
TGCPatchPanel * getOredPPIn(int connectorOut, int chOut)
bool existOredSignal() const
int getChannelIn(int connectorOut, int chOut)
int * m_connectorIn[NumberOfPPOutputConnector]
static std::string getFilename(int type)
TGCPatchPanel * getAdjacentPP(int side)
TGCRegionType getRegion() const
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
std::string label(const std::string &format, int i)
const int NumberOfPPOutputConnector