Added roi to master file

This commit is contained in:
maliakal_d 2019-08-20 13:42:26 +02:00
parent 9ebff9c8a8
commit 11c1fb0e11
4 changed files with 15 additions and 0 deletions

View File

@ -140,6 +140,7 @@ class BinaryFileStatic {
"ADC Mask : %d\n"
"Dbit Offset : %d\n"
"Dbit Bitset : %lld\n"
"Roi (xmin, xmax) : %d %d\n"
"Timestamp : %s\n\n"
"#Frame Header\n"
@ -179,6 +180,8 @@ class BinaryFileStatic {
attr.adcmask,
attr.dbitoffset,
(long long int)attr.dbitlist,
attr.roiXmin,
attr.roiXmax,
ctime(&t));
if (strlen(message) > MAX_MASTER_FILE_LENGTH) {
FILE_LOG(logERROR) << "Master File Size " << strlen(message) <<

View File

@ -431,6 +431,14 @@ public:
dataset = group5.createDataSet ( "dbit bitset list", PredType::STD_U64LE, dataspace );
dataset.write ( &(attr.periodNs), PredType::STD_U64LE);
// Roi xmin
dataset = group5.createDataSet ( "roi xmin", PredType::NATIVE_INT, dataspace );
dataset.write ( &(attr.roiXmin), PredType::NATIVE_INT);
// Roi xmax
dataset = group5.createDataSet ( "roi xmax", PredType::NATIVE_INT, dataspace );
dataset.write ( &(attr.roiXmax), PredType::NATIVE_INT);
//Timestamp
time_t t = time(0);
dataset = group5.createDataSet ( "timestamp", strdatatype, dataspace );

View File

@ -71,4 +71,6 @@ struct masterAttributes {
uint32_t adcmask;
uint32_t dbitoffset;
uint64_t dbitlist;
uint32_t roiXmin;
uint32_t roiXmax;
};

View File

@ -1659,6 +1659,8 @@ int slsReceiverImplementation::SetupWriter() {
attr.adcmask = adcEnableMask;
attr.dbitoffset = ctbDbitOffset;
attr.dbitlist = 0;
attr.roiXmin = roi.xmin;
attr.roiXmax = roi.xmax;
for (auto &i : ctbDbitList) {
attr.dbitlist |= (1 << i);
}