mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-31 14:04:55 +01:00
merging refactor (replacing)
This commit is contained in:
13
slsReceiverSoftware/src/BinaryFile.cpp
Normal file → Executable file
13
slsReceiverSoftware/src/BinaryFile.cpp
Normal file → Executable file
@@ -11,14 +11,14 @@
|
||||
#include <iostream>
|
||||
|
||||
|
||||
FILE* BinaryFile::masterfd = 0;
|
||||
FILE* BinaryFile::masterfd = nullptr;
|
||||
|
||||
BinaryFile::BinaryFile(int ind, uint32_t* maxf,
|
||||
int* nd, char* fname, char* fpath, uint64_t* findex, bool* owenable,
|
||||
int* dindex, int* nunits, uint64_t* nf, uint32_t* dr, uint32_t* portno,
|
||||
bool* smode):
|
||||
File(ind, maxf, nd, fname, fpath, findex, owenable, dindex, nunits, nf, dr, portno, smode),
|
||||
filefd(0),
|
||||
filefd(nullptr),
|
||||
numFramesInFile(0),
|
||||
numActualPacketsInFile(0)
|
||||
{
|
||||
@@ -31,13 +31,13 @@ BinaryFile::~BinaryFile() {
|
||||
CloseAllFiles();
|
||||
}
|
||||
|
||||
void BinaryFile::PrintMembers() {
|
||||
File::PrintMembers();
|
||||
void BinaryFile::PrintMembers(TLogLevel level) {
|
||||
File::PrintMembers(level);
|
||||
FILE_LOG(logINFO) << "Max Frames Per File: " << *maxFramesPerFile;
|
||||
FILE_LOG(logINFO) << "Number of Frames in File: " << numFramesInFile;
|
||||
}
|
||||
|
||||
slsReceiverDefs::fileFormat BinaryFile::GetFileType() {
|
||||
slsDetectorDefs::fileFormat BinaryFile::GetFileType() {
|
||||
return BINARY;
|
||||
}
|
||||
|
||||
@@ -106,8 +106,7 @@ int BinaryFile::WriteToFile(char* buffer, int buffersize, uint64_t fnum, uint32_
|
||||
|
||||
// if write error
|
||||
if (ret != buffersize) {
|
||||
cprintf(RED,"%d Error: Write to file failed for image number %lld\n",
|
||||
index, (long long int)fnum);
|
||||
FILE_LOG(logERROR) << index << " Error: Write to file failed for image number " << fnum;
|
||||
return FAIL;
|
||||
}
|
||||
return OK;
|
||||
|
||||
Reference in New Issue
Block a user