mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-10 12:08:41 +01:00
formattin
This commit is contained in:
@@ -414,7 +414,6 @@ void Implementation::ResetRois() {
|
||||
setMultiROIMetadata(multiRoi);
|
||||
}
|
||||
|
||||
|
||||
void Implementation::setPortROIs(const std::vector<defs::ROI> &args) {
|
||||
int nx = static_cast<int>(generalData->nPixelsX);
|
||||
int ny = static_cast<int>(generalData->nPixelsY);
|
||||
@@ -996,12 +995,17 @@ void Implementation::StartMasterWriter() {
|
||||
// create virtual and master file
|
||||
if (fileFormatType == HDF5) {
|
||||
|
||||
bool gotthard25um = ((generalData->detType == GOTTHARD || generalData->detType == GOTTHARD2) && (numPorts.x * numPorts.y) == 2);
|
||||
bool gotthard25um = ((generalData->detType == GOTTHARD ||
|
||||
generalData->detType == GOTTHARD2) &&
|
||||
(numPorts.x * numPorts.y) == 2);
|
||||
|
||||
// virtual hdf5 not allowed with roi for the following cases in hdf5
|
||||
if (multiRoiMetadata.size() > 1 || (!multiRoiMetadata[0].completeRoi())) {
|
||||
if (multiRoiMetadata.size() > 1 ||
|
||||
(!multiRoiMetadata[0].completeRoi())) {
|
||||
if (generalData->dynamicRange == 4) {
|
||||
throw std::runtime_error("Skipping virtual hdf5 file since rx_roi is enabled and it is in 4 bit mode.");
|
||||
throw std::runtime_error(
|
||||
"Skipping virtual hdf5 file since rx_roi is enabled "
|
||||
"and it is in 4 bit mode.");
|
||||
}
|
||||
if (gotthard25um && (numPorts.x * numPorts.y) == 2) {
|
||||
throw std::runtime_error(
|
||||
@@ -1009,14 +1013,15 @@ void Implementation::StartMasterWriter() {
|
||||
"enabled and there are 2 Gotthard 25um modules.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::string virtualFileName;
|
||||
// create virtual hdf5 file (if multiple files)
|
||||
if (dataProcessor[0]->GetFilesInAcquisition() > 1 ||
|
||||
(numPorts.x * numPorts.y) > 1) {
|
||||
virtualFileName = dataProcessor[0]->CreateVirtualFile(
|
||||
filePath, fileName, fileIndex, overwriteEnable, silentMode,
|
||||
modulePos, numPorts.x, numPorts.y, &hdf5LibMutex, gotthard25um);
|
||||
modulePos, numPorts.x, numPorts.y, &hdf5LibMutex,
|
||||
gotthard25um);
|
||||
}
|
||||
// link file in master
|
||||
if (masterFileWriteEnable) {
|
||||
|
||||
@@ -155,7 +155,7 @@ void MasterAttributes::GetFinalBinaryAttributes(
|
||||
}
|
||||
|
||||
void MasterAttributes::GetBinaryRois(
|
||||
rapidjson::PrettyWriter<rapidjson::StringBuffer> *w) {
|
||||
rapidjson::PrettyWriter<rapidjson::StringBuffer> *w) {
|
||||
w->Key("Receiver Rois");
|
||||
w->StartArray();
|
||||
for (const slsDetectorDefs::ROI &roi : rois) {
|
||||
|
||||
@@ -78,8 +78,7 @@ class MasterAttributes {
|
||||
rapidjson::PrettyWriter<rapidjson::StringBuffer> *w);
|
||||
void GetFinalBinaryAttributes(
|
||||
rapidjson::PrettyWriter<rapidjson::StringBuffer> *w);
|
||||
void GetBinaryRois(
|
||||
rapidjson::PrettyWriter<rapidjson::StringBuffer> *w);
|
||||
void GetBinaryRois(rapidjson::PrettyWriter<rapidjson::StringBuffer> *w);
|
||||
#ifdef HDF5C
|
||||
void WriteCommonHDF5Attributes(H5::H5File *fd, H5::Group *group);
|
||||
void WriteFinalHDF5Attributes(H5::Group *group);
|
||||
|
||||
Reference in New Issue
Block a user