The algorithm itself is kept in AnalysisService/src/${NAME}Algorithm.cpp and it's associated header. In order to make substantial changes (adding or changing a variable), you need to change the TestResult, which is defined in SCTData/src/${NAME}TestResult.cpp.
The TestResult contains the analysis results of the test, and is stored in IS, or in the archive using a streamer which is defined in SCTData/src/IO/${NAME}TestResultStreamer?_vn.cpp, where n is the version of the schema. A new streamer version can be created using the update_streamer.csh script in the same directory.
After updating the TestResult and streamer, the next stage is to write the Algorithm to use the new variable.
Finally, it may be useful to modify the appropriate DataDisplayer, usually SctDataDisplayer?/src/${NAME}Displayer.cpp, to visualize the changes.
May also want to change the Summary Writer in SummaryWriter?/src/.
Something else which you may want to change is how the occupancy histograms are fitted before being passed to the analysis: HowToAddANewFit?.
Adding Analysis for RxScan2DTest
The following files were added:
SCTData/src/RxScan2DTestResult.cpp SCTData/src/RxScan2DTestResult.h SCTData/src/IO/RxScan2DTestResultStreamer_v1.cpp SCTData/src/IO/RxScan2DTestResultStreamer_v1.h AnalysisService/src/RxScan2DAlgorithm.cpp AnalysisService/src/RxScan2DAlgorithm.h SummaryWriter/RxScan2DSummaryWriter.cpp SummaryWriter/RxScan2DSummaryWriter.h SctDataDisplay/src/RxScan2DDisplayer.cpp SctDataDisplay/src/RxScan2DDisplayer.h SystemTests/AnalysisTests/RxScan2DTest/Makefile SystemTests/AnalysisTests/RxScan2DTest/RetrieveRaws.bsh SystemTests/AnalysisTests/RxScan2DTest/setup.sh SystemTests/AnalysisTests/RxScan2DTest/teardown.sh ISSctData/src/ISRxScan2DTestResultWriter.cpp ISSctData/src/ISRxScan2DTestResultWriter.h
The following files were changed:
CalibrationController/src/scripts/RxScan2DTest.h sctGUI/DisplayGUI/ISInterface.java sctGUI/DisplayGUI/TestSelection.java sctGUI/DisplayGUI/TestDataInfo.java sctGUI/SummaryReader/TestResult.java ISSctData/schema/ISTestResult.schema.xml