Dev/document json ctb file format (#1029)

* docs receiver formats rewrite

* added documentation for all the receiver files, updated release notes, udpated help in commands help for timing, fixed by throwing exception for aa dividy by 0 error caused by not freeing memory (detsize) when switching between 1d and 2d detectors, removed unnecessary 'recevier up' printout, fixed dbit list 64 bit mask error in master json file (was not 64 bit before), fixed bug in reading gotthard1 data (needs to be tested)

* generating commands help and formatting, also fix help for trimen command line

* added ctb frame format documentation, added some links to some commands, added documentation about adding expat-devel in installation for rhel8 gui, fixed some indentation issues that screwed up command line help documentation

* added ctb frame format documentation

* updated documentation about zeromq-devel for <8.0.0 versions
This commit is contained in:
2024-11-18 09:52:24 +01:00
committed by GitHub
parent e1497f9cb9
commit 7b21ce34d6
21 changed files with 1362 additions and 270 deletions

View File

@ -1673,7 +1673,8 @@ std::string Caller::clkdiv(int action) {
// print help
if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([n_clock] [n_divider]
[Gotthard2][Mythen3] Clock Divider of clock n_clock. Must be greater than 1.n [Gotthard2] Clock index range: 0-5
[Gotthard2][Mythen3] Clock Divider of clock n_clock. Must be greater than 1.
[Gotthard2] Clock index range: 0-5
[Mythen3] Clock index range: 0 )V0G0N"
<< std::endl;
return os.str();
@ -9006,8 +9007,7 @@ std::string Caller::pedestalmode(int action) {
#frames is overwritten and #triggers = 1,
else #triggers is overwritten and #frames = 1.
One cannot set #frames, #triggers or timing mode in pedestal mode (exception thrown).
pedestalmode [0]
pedestalmode [0]
[Jungfrau] Disable pedestal mode.
Disabling pedestal mode will set back the normal mode values of #frames and #triggers. )V0G0N"
<< std::endl;
@ -10844,7 +10844,8 @@ std::string Caller::rx_clearroi(int action) {
std::ostringstream os;
// print help
if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N(Resets Region of interest in receiver. Default is all channels/pixels enabled. )V0G0N"
os << R"V0G0N(
Resets Region of interest in receiver. Default is all channels/pixels enabled. )V0G0N"
<< std::endl;
return os.str();
}
@ -14676,7 +14677,7 @@ std::string Caller::timing(int action) {
std::ostringstream os;
// print help
if (action == slsDetectorDefs::HELP_ACTION) {
os << R"V0G0N([auto|trigger|gating|burst_trigger]
os << R"V0G0N([auto|trigger|gating|burst_trigger|trigger_gating]
Timing Mode of detector.
[Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]
[Mythen3] [auto|trigger|gating|trigger_gating]

View File

@ -250,8 +250,7 @@ void Caller::EmptyDataCallBack(detectorData *data, uint64_t frameIndex,
std::string Caller::acquire(int action) {
std::ostringstream os;
if (action == defs::HELP_ACTION) {
os << cmd
<< "\n\tAcquire the number of frames set up.\n\tBlocking command, "
os << "\n\tAcquire the number of frames set up.\n\tBlocking command, "
"where control server is blocked and cannot accept other "
"commands until acquisition is done. \n\t- sets acquiring "
"flag\n\t- starts the receiver listener (if enabled)\n\t- starts "
@ -371,7 +370,8 @@ std::string Caller::threshold(int action) {
if (cmd == "thresholdnotb") {
os << "Trimbits are not loaded.";
}
os << "\n\nthreshold [eV1] [eV2] [eV3] [(optional settings)]"
os << "\n\t" << cmd
<< " [eV1] [eV2] [eV3] [(optional settings)]"
"\n\t[Mythen3] Threshold in eV for each counter. It loads trim "
"files from settingspath. An energy of -1 will pick up values "
" from detector.";
@ -447,10 +447,9 @@ std::string Caller::trimen(int action) {
std::ostringstream os;
if (action == defs::HELP_ACTION) {
os << "[trim_ev1] [trim_Ev2 (optional)] [trim_ev3 (optional)] "
"...\n\t[Eiger][Mythen3] Number of trim energies and list of "
"trim "
"energies, where corresponding default trim files exist in "
"corresponding trim folders."
"...\n\t[Eiger][Mythen3] list of trim energies, where "
"corresponding default trim files exist in corresponding trim "
"folders."
<< '\n';
} else if (action == defs::GET_ACTION) {
if (!args.empty()) {

View File

@ -277,7 +277,19 @@ void DetectorImpl::updateDetectorSize() {
if (detSizeX > 1 && detSizeX <= maxChanX) {
maxChanX = detSizeX;
}
if (maxChanX < modSize.x) {
std::stringstream os;
os << "The max det size in x dim (" << maxChanX
<< ") is less than the module size in x dim (" << modSize.x
<< "). Probably using shared memory of a different detector "
"type. Please free and try again.";
throw RuntimeError(os.str());
}
nModx = maxChanX / modSize.x;
if (nModx == 0) {
throw RuntimeError(
"number of modules in x dimension is 0. Unable to proceed.");
}
nMody = size() / nModx;
if ((maxChanX % modSize.x) > 0) {
++nMody;
@ -291,7 +303,18 @@ void DetectorImpl::updateDetectorSize() {
if (detSizeY > 1 && detSizeY <= maxChanY) {
maxChanY = detSizeY;
}
if (maxChanY < modSize.y) {
std::stringstream os;
os << "The max det size in y dim (" << maxChanY
<< ") is less than the module size in y dim (" << modSize.y
<< "). Probably using shared memory of a different detector "
"type. Please free and try again.";
throw RuntimeError(os.str());
}
nMody = maxChanY / modSize.y;
if (nMody == 0)
throw RuntimeError(
"number of modules in y dimension is 0. Unable to proceed.");
nModx = size() / nMody;
if ((maxChanY % modSize.y) > 0) {
++nModx;

View File

@ -2385,7 +2385,6 @@ void Module::setNumberOfAnalogSamples(int value) {
// update #nchan, as it depends on #samples, adcmask
updateNumberOfChannels();
if (shm()->useReceiverFlag) {
LOG(logINFORED) << "receiver up!";
sendToReceiver(F_RECEIVER_SET_NUM_ANALOG_SAMPLES, value, nullptr);
}
}