resolved warnings, also from esrf: todo: include changes in zmq

This commit is contained in:
Dhanya Maliakal
2017-05-01 13:11:10 +02:00
parent e9f6dcf479
commit 445da80df8
14 changed files with 179 additions and 136 deletions

View File

@ -255,8 +255,8 @@ int angularConversionStatic::readAngularConversion( ifstream& infile, int nmod,
angOff[nm].etilt=epitch;
}
// cout << angOff[nm].center << " " << \
// angOff[nm].r_conversion << " " << \
// cout << angOff[nm].center << " " <<
// angOff[nm].r_conversion << " " <<
// angOff[nm].offset << endl;
} else

View File

@ -457,7 +457,7 @@ slsDetectorDefs::sls_detector_module* energyConversion::readSettingsFile(string
};
int energyConversion::writeSettingsFile(string fname, detectorType myDetectorType, sls_detector_module mod, int& iodelay, int& tau){
int energyConversion::writeSettingsFile(string fname, detectorType myDetectorType, sls_detector_module mod, int iodelay, int tau){
ofstream outfile;
@ -537,8 +537,8 @@ int energyConversion::writeSettingsFile(string fname, detectorType myDetectorTyp
std::cout << "tau: " << tau << std::endl;
#endif
outfile.write((char*)mod.dacs, sizeof(dacs_t)*(mod.ndac));
outfile.write((char*)iodelay, sizeof(iodelay));
outfile.write((char*)tau, sizeof(tau));
outfile.write(reinterpret_cast<char*>(&iodelay), sizeof(iodelay));
outfile.write(reinterpret_cast<char*>(&tau), sizeof(tau));
outfile.write((char*)mod.chanregs, sizeof(int)*(mod.nchan));
outfile.close();

View File

@ -119,7 +119,7 @@ class energyConversion
\sa ::sls_detector_module mythenDetector::writeSettingsFile(string, sls_detector_module)
*/
int writeSettingsFile(string fname, detectorType myDetectorType, sls_detector_module mod, int& iodelay, int& tau);
int writeSettingsFile(string fname, detectorType myDetectorType, sls_detector_module mod, int iodelay, int tau);
/** allocates the momery for a detector module structure
\param myDetectorType detector type (needed for number of channels, chips, dacs etc.)

View File

@ -534,9 +534,7 @@ class fileIOStatic {
static int readDataFile(int nch, string fname, double *data, double *err=NULL, double *ang=NULL, char dataformat='f') { \
ifstream infile; \
int iline=0; \
int maxchans; \
string str; \
maxchans=nch; \
infile.open(fname.c_str(), ios_base::in); \
if (infile.is_open()) { \
iline=readDataFile(nch, infile, data, err, ang, dataformat, 0); \

View File

@ -38,7 +38,7 @@ int postProcessing::kbhit(){
}
postProcessing::postProcessing(): expTime(NULL), ang(NULL), val(NULL), err(NULL), numberOfChannels(0), badChannelMask(NULL){
postProcessing::postProcessing(): expTime(NULL), badChannelMask(NULL), ang(NULL), val(NULL), err(NULL), numberOfChannels(0) {
pthread_mutex_t mp1 = PTHREAD_MUTEX_INITIALIZER;
mp=mp1;
pthread_mutex_init(&mp, NULL);
@ -433,10 +433,9 @@ void* postProcessing::processData(int delflag) {
int *myData;
char *p;
int dum=1;
int nf=1, ii, nch;
int jctb=0;
// int nf=1, ii, nch;
// int jctb=0;
// if (getDetectorsType()==JUNGFRAUCTB) {
@ -467,7 +466,7 @@ void* postProcessing::processData(int delflag) {
// if (jctb) {
// p=(char*)myData;
// char* p=(char*)myData;
// for (ii=0; ii<nf; ii++) {
// processFrame((int*)p,delflag, 1);
// p+=2*nch;
@ -891,6 +890,9 @@ void postProcessing::startThread(int delflag) {
else
ret = pthread_create(&dataProcessingThread, &tattr,startProcessDataNoDelete, (void*)this);
if (ret)
printf("ret %d\n", ret);
pthread_attr_destroy(&tattr);
// scheduling parameters of target thread