mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-04 17:10:42 +02:00
Added roi to master file
This commit is contained in:
parent
9ebff9c8a8
commit
11c1fb0e11
@ -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) <<
|
||||
|
@ -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 );
|
||||
|
@ -71,4 +71,6 @@ struct masterAttributes {
|
||||
uint32_t adcmask;
|
||||
uint32_t dbitoffset;
|
||||
uint64_t dbitlist;
|
||||
uint32_t roiXmin;
|
||||
uint32_t roiXmax;
|
||||
};
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user