Moench rewrite (#597)

* copied jungfrau server to moench and adapted

* fixed image size and num packets

* read n rows allows 16

* commneted out configure_asic_timer at server startup. To be removed later the ASIC_CTRL_REG and storage cell options

* moench:removing the decrement (which was in jf)  in read n rows to register

* removed lblsamples from gui
This commit is contained in:
Dhanya Thattil
2022-12-15 09:16:51 +01:00
committed by GitHub
parent 7ab3b25f87
commit 39b1f5bbf2
58 changed files with 4309 additions and 5499 deletions

View File

@ -16,6 +16,9 @@ void MasterAttributes::GetBinaryAttributes(
case slsDetectorDefs::JUNGFRAU:
GetJungfrauBinaryAttributes(w);
break;
case slsDetectorDefs::MOENCH:
GetMoenchBinaryAttributes(w);
break;
case slsDetectorDefs::EIGER:
GetEigerBinaryAttributes(w);
break;
@ -25,9 +28,6 @@ void MasterAttributes::GetBinaryAttributes(
case slsDetectorDefs::GOTTHARD2:
GetGotthard2BinaryAttributes(w);
break;
case slsDetectorDefs::MOENCH:
GetMoenchBinaryAttributes(w);
break;
case slsDetectorDefs::CHIPTESTBOARD:
GetCtbBinaryAttributes(w);
break;
@ -48,6 +48,9 @@ void MasterAttributes::WriteHDF5Attributes(H5::H5File *fd, H5::Group *group) {
case slsDetectorDefs::JUNGFRAU:
WriteJungfrauHDF5Attributes(fd, group);
break;
case slsDetectorDefs::MOENCH:
WriteMoenchHDF5Attributes(fd, group);
break;
case slsDetectorDefs::EIGER:
WriteEigerHDF5Attributes(fd, group);
break;
@ -57,9 +60,6 @@ void MasterAttributes::WriteHDF5Attributes(H5::H5File *fd, H5::Group *group) {
case slsDetectorDefs::GOTTHARD2:
WriteGotthard2HDF5Attributes(fd, group);
break;
case slsDetectorDefs::MOENCH:
WriteMoenchHDF5Attributes(fd, group);
break;
case slsDetectorDefs::CHIPTESTBOARD:
WriteCtbHDF5Attributes(fd, group);
break;
@ -622,6 +622,28 @@ void MasterAttributes::WriteJungfrauHDF5Attributes(H5::H5File *fd,
}
#endif
void MasterAttributes::GetMoenchBinaryAttributes(
rapidjson::PrettyWriter<rapidjson::StringBuffer> *w) {
w->Key("Exptime");
w->String(ToString(exptime).c_str());
w->Key("Period");
w->String(ToString(period).c_str());
w->Key("Number of UDP Interfaces");
w->Uint(numUDPInterfaces);
w->Key("Number of rows");
w->Uint(readNRows);
}
#ifdef HDF5C
void MasterAttributes::WriteMoenchuHDF5Attributes(H5::H5File *fd,
H5::Group *group) {
MasterAttributes::WriteHDF5Exptime(fd, group);
MasterAttributes::WriteHDF5Period(fd, group);
MasterAttributes::WriteHDF5NumUDPInterfaces(fd, group);
MasterAttributes::WriteHDF5ReadNRows(fd, group);
}
#endif
void MasterAttributes::GetEigerBinaryAttributes(
rapidjson::PrettyWriter<rapidjson::StringBuffer> *w) {
w->Key("Dynamic Range");
@ -719,31 +741,6 @@ void MasterAttributes::WriteGotthard2HDF5Attributes(H5::H5File *fd,
}
#endif
void MasterAttributes::GetMoenchBinaryAttributes(
rapidjson::PrettyWriter<rapidjson::StringBuffer> *w) {
w->Key("Exptime");
w->String(ToString(exptime).c_str());
w->Key("Period");
w->String(ToString(period).c_str());
w->Key("Ten Giga");
w->Uint(tenGiga);
w->Key("ADC Mask");
w->String(ToStringHex(adcmask).c_str());
w->Key("Analog Samples");
w->Uint(analogSamples);
}
#ifdef HDF5C
void MasterAttributes::WriteMoenchHDF5Attributes(H5::H5File *fd,
H5::Group *group) {
MasterAttributes::WriteHDF5Exptime(fd, group);
MasterAttributes::WriteHDF5Period(fd, group);
MasterAttributes::WriteHDF5TenGiga(fd, group);
MasterAttributes::WriteHDF5AdcMask(fd, group);
MasterAttributes::WriteHDF5AnalogSamples(fd, group);
}
#endif
void MasterAttributes::GetCtbBinaryAttributes(
rapidjson::PrettyWriter<rapidjson::StringBuffer> *w) {
w->Key("Exptime");