Repository navigation
CHG: MAssembly fixes: #251, #252, #253, #254 - #294
Conversation
| Usage<<" -m --multithreading:"<<endl; | ||
| Usage<<" 0: false (default), else: true"<<endl; | ||
| Usage<<" 0: false, else: true (default)"<<endl; |
There was a problem hiding this comment.
What's the default number of threads used? Worth mentioning here?
There was a problem hiding this comment.
One thread per module, more for paralleizable slow ones.
I will update the comment
| if (Verbosity < c_Quiet || Verbosity > c_Info) { | ||
| cout<<"ERROR: Command-line parser: Option "<<Option<<" needs an argument between "<<c_Quiet<<" and "<<c_Info<<", not \""<<Value<<"\"!"<<endl; | ||
| cout<<Usage.str()<<endl; | ||
| return 1; | ||
| } |
There was a problem hiding this comment.
Repeating comment from #191 (comment):
Currently, we flush the terminal output with c_Info statements that are being printed for every Event, e.g. in AnalyzeEvent of the energy calibration. We might want to think about adding also MEGAlib c_Chatty option here, and always avoid having anything that's not c_Chatty in AnalyzeEvents or loop iterating through all Events or (strip) hits.
But this doesn't have to be in this PR.
There was a problem hiding this comment.
✅ I checked that this addresses the issues:
- MAssembly: crash when -v/--verbosity or -C/--change-configuration is given without an argument #251: Include
-Cand-cin theSingle Argumentchecks - MAssembly: a failed -c or -C does not stop nuclearizer #252: Failing arguments for
-C,-cand-vnow return1instead of crashing. - MAssembly: nuclearizer always returns exit code 0, even if the analysis fails #253: not always return
0inmain, by introducing new return types-1,0and1here. - MAssembly: usage text does not match the default configuration file and multithreading setting #254 Update the defaults in
Usageto reflect the current defaults
| vector<MString> XmlTags = { "XmlTagLoaderSimulations", "XmlTagMeasurementLoaderROA", "XmlTagMeasurementLoaderTRA", "XmlTagMeasurementLoaderHDF", | ||
| "XmlTagMeasurementLoaderFITS", "XmlTagMeasurementLoaderL0", "XmlTagDEESMEX", "XmlTagEventFilter", | ||
| "XmlTagEnergyCalibration", "XmlTagStripPairingMultiRoundChiSquare", "XmlTagStripPairingChiSquare", | ||
| "XmlTagDepthCalibration", "XmlTagTrappingCorrection", "XmlTagEventSaver", "XmlTagSaverMeasurementsL0", | ||
| "XmlTagTransmitterRealta", "XmlTagResponseGenerator", "XmlTagRevan", "XmlTagTACCalibration", | ||
| "XmlTagDiagnostics", "XmlTagDiagnosticsEnergyPerStrip" }; |
There was a problem hiding this comment.
Is there a way to generate this from code rather that having a hard-coded list here, for when we add more modules to nuclearizer (e.g. the lollipop backscatter module in #246)?
There was a problem hiding this comment.
Then it would not be an independent test anymore...
There was a problem hiding this comment.
I see: as long as the unit tests send some sort of reminder (which seems to be the case by comparing the number of listed modules), this should be fine :)
| CallParseCommandLine(A, { "-c", Empty, "-m", "1", "-t" }, Output); | ||
| Passed = EvaluateTrue("ParseCommandLine()", "-m 1", "-m 1 enables multithreading", Output.Contains("Command-line parser: Using multithreading: yes")) && Passed; | ||
| CallParseCommandLine(A, { "-c", Empty, "-m", "2", "-t" }, Output); | ||
| Passed = EvaluateTrue("ParseCommandLine()", "-m 2", "Any non-zero value enables multithreading", Output.Contains("Command-line parser: Using multithreading: yes")) && Passed; | ||
| CallParseCommandLine(A, { "-c", Empty, "--multithreading", "0", "-t" }, Output); | ||
| Passed = EvaluateTrue("ParseCommandLine()", "--multithreading 0", "--multithreading 0 disables multithreading", Output.Contains("Command-line parser: Using multithreading: no")) && Passed; |
There was a problem hiding this comment.
Also check that the default multithreading is true?
There was a problem hiding this comment.
I am missing a Get'er in MSupervisor...
There was a problem hiding this comment.
Did it - new you have to update MEGAlib
This commit is just command line parsing and error handling - nothing critical in the analysis path