From 0044bdf0fd7705f3768f6fc4a937575abf98952e Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Mon, 28 Nov 2011 15:02:39 +0000 Subject: [PATCH] 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 --- .../gotthardDetector/gotthardDetector.cpp | 109 ++++++++---------- 1 file changed, 50 insertions(+), 59 deletions(-) diff --git a/slsDetectorSoftware/gotthardDetector/gotthardDetector.cpp b/slsDetectorSoftware/gotthardDetector/gotthardDetector.cpp index f93605759..d13d5a712 100644 --- a/slsDetectorSoftware/gotthardDetector/gotthardDetector.cpp +++ b/slsDetectorSoftware/gotthardDetector/gotthardDetector.cpp @@ -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:"<clientMacAddress<> 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:"<clientIPAddress<> 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:"<clientMacAddress<> 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:"<clientIPAddress<settingsFile,fname.c_str()); return myMod;