mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-28 17:10:03 +02:00
gotthard: moving confgain to configuration part
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@68 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
145de52af3
commit
0044bdf0fd
@ -72,6 +72,55 @@ int gotthardDetector::readConfigurationFile(string const fname){
|
||||
std::cout<< ans << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
//---------------mac address----------
|
||||
getline(infile,str);
|
||||
iline++;
|
||||
#ifdef VERBOSE
|
||||
std::cout<< str << std::endl;
|
||||
#endif
|
||||
istringstream sstr(str);
|
||||
sstr >> sargname >> sargname2;
|
||||
#ifdef VERBOSE
|
||||
std::cout<< sargname << " is " << sargname2 << std::endl;
|
||||
#endif
|
||||
//getting rid of dots
|
||||
pos = sargname2.find(":");
|
||||
while(pos != string::npos)
|
||||
{
|
||||
sargname2.erase( pos, 1 );
|
||||
pos = sargname2.find(":");
|
||||
}
|
||||
strcpy(thisDetector->clientMacAddress,sargname2.c_str());
|
||||
//sprintf(thisDetector->clientMacAddress,"%0llX",atoll(sargname2.c_str()));
|
||||
cout<<"macaddress:"<<thisDetector->clientMacAddress<<endl;
|
||||
|
||||
//---------------ip address---------------
|
||||
getline(infile,str);
|
||||
iline++;
|
||||
#ifdef VERBOSE
|
||||
std::cout<< str << std::endl;
|
||||
#endif
|
||||
istringstream sssstr(str);
|
||||
sssstr >> sargname >> sargname2;
|
||||
#ifdef VERBOSE
|
||||
std::cout<< sargname << " is " << sargname2 << std::endl;
|
||||
#endif
|
||||
//getting rid of dots
|
||||
pos = sargname2.find(".");
|
||||
while(pos != string::npos)
|
||||
{
|
||||
sargname2.erase( pos, 1 );
|
||||
pos = sargname2.find(".");
|
||||
}
|
||||
strcpy(thisDetector->clientIPAddress,sargname2.c_str());
|
||||
cout<<"ipaddress:"<<thisDetector->clientIPAddress<<endl;
|
||||
*/
|
||||
|
||||
|
||||
|
||||
iline++;
|
||||
}
|
||||
infile.close();
|
||||
@ -370,7 +419,7 @@ int gotthardDetector::retrieveDetectorSetup(string fname1, int level){
|
||||
ifstream infile;
|
||||
ostringstream oss;
|
||||
int iline=0;
|
||||
string sargname,sargname2;
|
||||
string sargname;
|
||||
int ival;
|
||||
int ichan=0, ichip=0, idac=0;
|
||||
string::size_type pos=0;
|
||||
@ -402,64 +451,6 @@ int gotthardDetector::retrieveDetectorSetup(string fname1, int level){
|
||||
idac++;
|
||||
}
|
||||
|
||||
//---------------gain---------------
|
||||
getline(infile,str);
|
||||
iline++;
|
||||
#ifdef VERBOSE
|
||||
std::cout<< str << std::endl;
|
||||
#endif
|
||||
istringstream ssstr(str);
|
||||
ssstr >> sargname >> ival;
|
||||
#ifdef VERBOSE
|
||||
std::cout<< sargname << " is " << ival << std::endl;
|
||||
#endif
|
||||
thisDetector->confGain = ival;
|
||||
|
||||
//---------------mac address----------
|
||||
getline(infile,str);
|
||||
iline++;
|
||||
#ifdef VERBOSE
|
||||
std::cout<< str << std::endl;
|
||||
#endif
|
||||
istringstream sstr(str);
|
||||
sstr >> sargname >> sargname2;
|
||||
#ifdef VERBOSE
|
||||
std::cout<< sargname << " is " << sargname2 << std::endl;
|
||||
#endif
|
||||
//getting rid of dots
|
||||
pos = sargname2.find(":");
|
||||
while(pos != string::npos)
|
||||
{
|
||||
sargname2.erase( pos, 1 );
|
||||
pos = sargname2.find(":");
|
||||
}
|
||||
strcpy(thisDetector->clientMacAddress,sargname2.c_str());
|
||||
//sprintf(thisDetector->clientMacAddress,"%0llX",atoll(sargname2.c_str()));
|
||||
cout<<"macaddress:"<<thisDetector->clientMacAddress<<endl;
|
||||
|
||||
//---------------ip address---------------
|
||||
getline(infile,str);
|
||||
iline++;
|
||||
#ifdef VERBOSE
|
||||
std::cout<< str << std::endl;
|
||||
#endif
|
||||
istringstream sssstr(str);
|
||||
sssstr >> sargname >> sargname2;
|
||||
#ifdef VERBOSE
|
||||
std::cout<< sargname << " is " << sargname2 << std::endl;
|
||||
#endif
|
||||
//getting rid of dots
|
||||
pos = sargname2.find(".");
|
||||
while(pos != string::npos)
|
||||
{
|
||||
sargname2.erase( pos, 1 );
|
||||
pos = sargname2.find(".");
|
||||
}
|
||||
strcpy(thisDetector->clientIPAddress,sargname2.c_str());
|
||||
cout<<"ipaddress:"<<thisDetector->clientIPAddress<<endl;
|
||||
|
||||
|
||||
|
||||
infile.close();
|
||||
strcpy(thisDetector->settingsFile,fname.c_str());
|
||||
return myMod;
|
||||
|
Loading…
x
Reference in New Issue
Block a user