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 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 # ZMQ specific: in this case, you need ZMQ libraries already included in this package

View File

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

View File

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

View File

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

View File

@ -64,12 +64,13 @@ int BinaryFile::CreateFile(uint64_t fnum) {
FILE_LOG(logINFO) << "[" << *udpPortNumber << "]: Binary File created: " << currentFileName; FILE_LOG(logINFO) << "[" << *udpPortNumber << "]: Binary File created: " << currentFileName;
//other files //other files
else { else {
char c[1000]; strcpy(c, currentFileName.c_str());
if (loss) if (loss)
bprintf(RED,"[%u]: Packet_Loss:%lu Fifo_Max_Level:%d \tNew_File:%s\n", 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 else
bprintf(GREEN,"[%u]: Packet_Loss:%lu Fifo_Max_Level:%d \tNew_File:%s\n", 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; 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, file = new HDF5File(index, generalData->maxFramesPerFile, &generalData->packetsPerFrame,
nd, fname, fpath, findex, nd, fname, fpath, findex,
frindexenable, owenable, frindexenable, owenable,
dindex, nunits, nf, dr, portno dindex, nunits, nf, dr, portno,
generalData->nPixelsX, generalData->nPixelsY, fifo); generalData->nPixelsX, generalData->nPixelsY, fifo);
break; break;
#endif #endif

View File

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