basename for hdf5 fixes

This commit is contained in:
Dhanya Maliakal 2017-07-27 09:31:14 +02:00
parent 8a8e76e839
commit 0fcf768772
7 changed files with 21 additions and 16 deletions

View File

@ -15,7 +15,7 @@ CFLAGS= -g -DC_ONLY -fPIC
DFLAGS= -g -DDACS_INT -DSLS_RECEIVER_UDP_FUNCTIONS #-DVERBOSE
INCLUDES?= $(INCLUDESRXR) -I include/ -I ../slsDetectorCalibration
INCLUDES?= $(INCLUDESRXR) -I include/
##############################################################
# ZMQ specific: in this case, you need ZMQ libraries already included in this package

View File

@ -1,9 +1,9 @@
Path: slsDetectorsPackage/slsReceiverSoftware
URL: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git
Repsitory UUID: 0f98b8580c70f3866bc904033a65a269a6edd39c
Revision: 606
Repsitory UUID: b915d8978354e41020084bc2c3e770f46574277a
Revision: 607
Branch: 3.0-rc
Last Changed Author: Dhanya_Maliakal
Last Changed Rev: 611
Last Changed Date: 2017-07-26 11:21:45.000000002 +0200 ./src/main.cpp
Last Changed Rev: 612
Last Changed Date: 2017-07-27 08:53:15.000000002 +0200 ./include/HDF5FileStatic.h

View File

@ -14,8 +14,9 @@
using namespace H5;
#endif
#include "sls_receiver_defs.h"
#include "logger.h"
#include <iostream>
#include <string>
#include <iomanip>
#include <stdlib.h> //malloc
@ -646,7 +647,7 @@ public:
FILE_LOG(logERROR) << "unknown datatype";
return 1;
}
FILE_LOG(logINFO) << "owenable:" << owenable?1:0 << endl
FILE_LOG(logINFO) << "owenable:" << (owenable?1:0) << endl
<< "oldFileName:" << oldFileName << endl
<< "oldDatasetName:" << oldDatasetName << endl
<< "newFileName:" << newFileName << endl

View File

@ -1,11 +1,11 @@
//#define SVNPATH ""
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_receiver_software.git"
//#define SVNREPPATH ""
#define SVNREPUUID "0f98b8580c70f3866bc904033a65a269a6edd39c"
//#define SVNREV 0x611
#define SVNREPUUID "b915d8978354e41020084bc2c3e770f46574277a"
//#define SVNREV 0x612
//#define SVNKIND ""
//#define SVNSCHED ""
#define SVNAUTH "Dhanya_Maliakal"
#define SVNREV 0x611
#define SVNDATE 0x20170726
#define SVNREV 0x612
#define SVNDATE 0x20170727
//

View File

@ -64,12 +64,13 @@ int BinaryFile::CreateFile(uint64_t fnum) {
FILE_LOG(logINFO) << "[" << *udpPortNumber << "]: Binary File created: " << currentFileName;
//other files
else {
char c[1000]; strcpy(c, currentFileName.c_str());
if (loss)
bprintf(RED,"[%u]: Packet_Loss:%lu Fifo_Max_Level:%d \tNew_File:%s\n",
*udpPortNumber,loss, fifo->GetMaxLevelForFifoBound() , basename(currentFileName.c_str()));
*udpPortNumber,loss, fifo->GetMaxLevelForFifoBound() , basename(c));
else
bprintf(GREEN,"[%u]: Packet_Loss:%lu Fifo_Max_Level:%d \tNew_File:%s\n",
*udpPortNumber,loss, fifo->GetMaxLevelForFifoBound(), basename(currentFileName.c_str()));
*udpPortNumber,loss, fifo->GetMaxLevelForFifoBound(), basename(c));
}
return OK;

View File

@ -229,7 +229,7 @@ void DataProcessor::SetupFileWriter(int* nd, char* fname, char* fpath, uint64_t*
file = new HDF5File(index, generalData->maxFramesPerFile, &generalData->packetsPerFrame,
nd, fname, fpath, findex,
frindexenable, owenable,
dindex, nunits, nf, dr, portno
dindex, nunits, nf, dr, portno,
generalData->nPixelsX, generalData->nPixelsY, fifo);
break;
#endif

View File

@ -9,6 +9,8 @@
#include <iostream>
#include <iomanip>
#include <libgen.h> //basename
#include <string.h>
using namespace std;
@ -119,12 +121,13 @@ int HDF5File::CreateFile(uint64_t fnum) {
FILE_LOG(logINFO) << *udpPortNumber << ": HDF5 File created: " << currentFileName;
//other files
else {
char c[1000]; strcpy(c, currentFileName.c_str());
if (loss)
bprintf(RED,"[%u]: Packet_Loss:%lu Fifo_Max_Level:%d \tNew_File:%s\n",
*udpPortNumber,loss, fifo->GetMaxLevelForFifoBound() , basename(currentFileName.c_str()));
*udpPortNumber,loss, fifo->GetMaxLevelForFifoBound() , basename(c));
else
bprintf(GREEN,"[%u]: Packet_Loss:%lu Fifo_Max_Level:%d \tNew_File:%s\n",
*udpPortNumber,loss, fifo->GetMaxLevelForFifoBound(), basename(currentFileName.c_str()));
*udpPortNumber,loss, fifo->GetMaxLevelForFifoBound(), basename(c));
}