gotthard: got rid of HV in settings file and changing the way macadd read from settings file

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@56 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d 2011-11-22 11:01:27 +00:00
parent b2723feb47
commit 1ecde6beeb

View File

@ -386,7 +386,7 @@ int gotthardDetector::retrieveDetectorSetup(string fname1, int level){
#endif #endif
infile.open(myfname.c_str(), ios_base::in); infile.open(myfname.c_str(), ios_base::in);
if (infile.is_open()) { if (infile.is_open()) {
//dacs--------------- //---------------dacs---------------
for (int iarg=0; iarg<thisDetector->nDacs; iarg++) { for (int iarg=0; iarg<thisDetector->nDacs; iarg++) {
getline(infile,str); getline(infile,str);
iline++; iline++;
@ -402,7 +402,7 @@ int gotthardDetector::retrieveDetectorSetup(string fname1, int level){
idac++; idac++;
} }
//config--------------- //---------------config---------------
getline(infile,str); getline(infile,str);
iline++; iline++;
#ifdef VERBOSE #ifdef VERBOSE
@ -415,20 +415,7 @@ int gotthardDetector::retrieveDetectorSetup(string fname1, int level){
#endif #endif
int configval = ival;//myMod->dacs[idac]=ival; int configval = ival;//myMod->dacs[idac]=ival;
//HV--------------- //---------------mac address----------
getline(infile,str);
iline++;
#ifdef VERBOSE
std::cout<< str << std::endl;
#endif
ssstr.str(str);
ssstr >> sargname >> ival;
#ifdef VERBOSE
std::cout<< sargname << " is " << ival << std::endl;
#endif
int HVval = ival;//myMod->dacs[idac]=ival;
//mac address----------
getline(infile,str); getline(infile,str);
iline++; iline++;
#ifdef VERBOSE #ifdef VERBOSE
@ -440,16 +427,17 @@ int gotthardDetector::retrieveDetectorSetup(string fname1, int level){
std::cout<< sargname << " is " << sargname2 << std::endl; std::cout<< sargname << " is " << sargname2 << std::endl;
#endif #endif
//getting rid of dots //getting rid of dots
pos = sargname2.find("."); pos = sargname2.find(":");
while(pos != string::npos) while(pos != string::npos)
{ {
sargname2.erase( pos, 1 ); sargname2.erase( pos, 1 );
pos = sargname2.find("."); pos = sargname2.find(":");
} }
strcpy(thisDetector->clientMacAddress,sargname2.c_str()); strcpy(thisDetector->clientMacAddress,sargname2.c_str());
//sprintf(thisDetector->clientMacAddress,"%0llX",atoll(sargname2.c_str()));
cout<<"macaddress:"<<thisDetector->clientMacAddress<<endl; cout<<"macaddress:"<<thisDetector->clientMacAddress<<endl;
//ip address--------------- //---------------ip address---------------
getline(infile,str); getline(infile,str);
iline++; iline++;
#ifdef VERBOSE #ifdef VERBOSE
@ -482,7 +470,7 @@ int gotthardDetector::retrieveDetectorSetup(string fname1, int level){
return NULL; return NULL;
} }
}; };
int gotthardDetector::writeSettingsFile(string fname, sls_detector_module mod){ int gotthardDetector::writeSettingsFile(string fname, sls_detector_module mod){