mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 19:30:03 +02:00
added reorder to documentation, added flag to master binary and hdf5 file
Some checks failed
CMake / Configure and build using cmake (push) Failing after 11s
Some checks failed
CMake / Configure and build using cmake (push) Failing after 11s
This commit is contained in:
parent
c54b1cb6af
commit
b7e17d1320
@ -359,6 +359,7 @@ Chip Test Board
|
||||
"Digital Flag": 0,
|
||||
"Digital Samples": 1000,
|
||||
"Dbit Offset": 0,
|
||||
"Dbit Reorder": 1,
|
||||
"Dbit Bitset": 0,
|
||||
"Transceiver Mask": "0x3",
|
||||
"Transceiver Flag": 0,
|
||||
|
@ -345,6 +345,9 @@ Chip Test Board
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Dbit Offset | Digital offset of valid data in bytes |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Dbit Reorder | Group bits of all samples together to have them |
|
||||
| | contiguous in the file |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Dbit Bitset | Digital 64 bit mask of bits enabled in receiver |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Transceiver Mask | Mask of channels enabled in Transceiver |
|
||||
|
@ -1807,7 +1807,7 @@ int ClientInterface::set_dbit_reorder(Interface &socket) {
|
||||
throw RuntimeError("Invalid dbit reorder: " + std::to_string(arg));
|
||||
}
|
||||
verifyIdle(socket);
|
||||
LOG(logDEBUG1) << "Setting Dbit offset: " << arg;
|
||||
LOG(logDEBUG1) << "Setting Dbit reorder: " << arg;
|
||||
impl()->setDbitReorder(arg);
|
||||
return socket.Send(OK);
|
||||
}
|
||||
|
@ -992,7 +992,9 @@ void Implementation::StartMasterWriter() {
|
||||
: 0;
|
||||
masterAttributes.digitalSamples = generalData->nDigitalSamples;
|
||||
masterAttributes.dbitoffset = ctbDbitOffset;
|
||||
masterAttributes.dbitreorder = ctbDbitReorder;
|
||||
masterAttributes.dbitlist = 0;
|
||||
|
||||
for (auto &i : ctbDbitList) {
|
||||
masterAttributes.dbitlist |= (static_cast<uint64_t>(1) << i);
|
||||
}
|
||||
|
@ -551,6 +551,13 @@ void MasterAttributes::WriteHDF5DbitOffset(H5::H5File *fd, H5::Group *group) {
|
||||
dataset.write(&dbitoffset, H5::PredType::NATIVE_INT);
|
||||
}
|
||||
|
||||
void MasterAttributes::WriteHDF5DbitReorder(H5::H5File *fd, H5::Group *group) {
|
||||
H5::DataSpace dataspace = H5::DataSpace(H5S_SCALAR);
|
||||
H5::DataSet dataset = group->createDataSet(
|
||||
"Dbit Reorder", H5::PredType::NATIVE_INT, dataspace);
|
||||
dataset.write(&dbitreorder, H5::PredType::NATIVE_INT);
|
||||
}
|
||||
|
||||
void MasterAttributes::WriteHDF5DbitList(H5::H5File *fd, H5::Group *group) {
|
||||
H5::DataSpace dataspace = H5::DataSpace(H5S_SCALAR);
|
||||
H5::DataSet dataset = group->createDataSet(
|
||||
@ -744,6 +751,8 @@ void MasterAttributes::GetCtbBinaryAttributes(
|
||||
w->Uint(digitalSamples);
|
||||
w->Key("Dbit Offset");
|
||||
w->Uint(dbitoffset);
|
||||
w->Key("Dbit Reorder");
|
||||
w->Uint(dbitreorder);
|
||||
w->Key("Dbit Bitset");
|
||||
w->Uint64(dbitlist);
|
||||
w->Key("Transceiver Mask");
|
||||
@ -766,6 +775,7 @@ void MasterAttributes::WriteCtbHDF5Attributes(H5::H5File *fd,
|
||||
MasterAttributes::WriteHDF5DigitalFlag(fd, group);
|
||||
MasterAttributes::WriteHDF5DigitalSamples(fd, group);
|
||||
MasterAttributes::WriteHDF5DbitOffset(fd, group);
|
||||
MasterAttributes::WriteHDF5DbitReorder(fd, group);
|
||||
MasterAttributes::WriteHDF5DbitList(fd, group);
|
||||
MasterAttributes::WriteHDF5TransceiverMask(fd, group);
|
||||
MasterAttributes::WriteHDF5TransceiverFlag(fd, group);
|
||||
@ -791,6 +801,8 @@ void MasterAttributes::GetXilinxCtbBinaryAttributes(
|
||||
w->Uint(digitalSamples);
|
||||
w->Key("Dbit Offset");
|
||||
w->Uint(dbitoffset);
|
||||
w->Key("Dbit Reorder");
|
||||
w->Uint(dbitreorder);
|
||||
w->Key("Dbit Bitset");
|
||||
w->Uint64(dbitlist);
|
||||
w->Key("Transceiver Mask");
|
||||
@ -812,6 +824,7 @@ void MasterAttributes::WriteXilinxCtbHDF5Attributes(H5::H5File *fd,
|
||||
MasterAttributes::WriteHDF5DigitalFlag(fd, group);
|
||||
MasterAttributes::WriteHDF5DigitalSamples(fd, group);
|
||||
MasterAttributes::WriteHDF5DbitOffset(fd, group);
|
||||
MasterAttributes::WriteHDF5DbitReorder(fd, group);
|
||||
MasterAttributes::WriteHDF5DbitList(fd, group);
|
||||
MasterAttributes::WriteHDF5TransceiverMask(fd, group);
|
||||
MasterAttributes::WriteHDF5TransceiverFlag(fd, group);
|
||||
|
@ -51,6 +51,7 @@ class MasterAttributes {
|
||||
uint32_t analogSamples{0};
|
||||
uint32_t digital{0};
|
||||
uint32_t digitalSamples{0};
|
||||
uint32_t dbitreorder{1};
|
||||
uint32_t dbitoffset{0};
|
||||
uint64_t dbitlist{0};
|
||||
uint32_t transceiverMask{0};
|
||||
@ -104,6 +105,7 @@ class MasterAttributes {
|
||||
void WriteHDF5DigitalSamples(H5::H5File *fd, H5::Group *group);
|
||||
void WriteHDF5DbitOffset(H5::H5File *fd, H5::Group *group);
|
||||
void WriteHDF5DbitList(H5::H5File *fd, H5::Group *group);
|
||||
void WriteHDF5DbitReorder(H5::H5File *fd, H5::Group *group);
|
||||
void WriteHDF5TransceiverMask(H5::H5File *fd, H5::Group *group);
|
||||
void WriteHDF5TransceiverFlag(H5::H5File *fd, H5::Group *group);
|
||||
void WriteHDF5TransceiverSamples(H5::H5File *fd, H5::Group *group);
|
||||
|
@ -19,8 +19,8 @@ namespace sls {
|
||||
// files
|
||||
|
||||
// versions
|
||||
#define HDF5_WRITER_VERSION (6.6) // 1 decimal places
|
||||
#define BINARY_WRITER_VERSION (7.2) // 1 decimal places
|
||||
#define HDF5_WRITER_VERSION (6.7) // 1 decimal places
|
||||
#define BINARY_WRITER_VERSION (7.3) // 1 decimal places
|
||||
|
||||
#define MAX_FRAMES_PER_FILE 20000
|
||||
#define SHORT_MAX_FRAMES_PER_FILE 100000
|
||||
|
Loading…
x
Reference in New Issue
Block a user