File indexing completed on 2025-07-15 09:15:56
0001
0002
0003
0004
0005 #include <memory>
0006
0007 #include <JANA/JApplication.h>
0008 #include <JANA/JFactoryGenerator.h>
0009
0010 #include "JTestParser.h"
0011 #include "JTestPlotter.h"
0012 #include "JTestPlotterLegacy.h"
0013 #include "JTestDisentangler.h"
0014 #include "JTestTracker.h"
0015
0016
0017 extern "C"{
0018 void InitPlugin(JApplication *app){
0019
0020 InitJANAPlugin(app);
0021 app->Add(new JTestParser);
0022 app->Add(new JFactoryGeneratorT<JTestDisentangler>());
0023 app->Add(new JFactoryGeneratorT<JTestTracker>());
0024
0025 bool use_legacy_plotter = app->RegisterParameter("jtest:use_legacy_plotter", false);
0026 if (use_legacy_plotter) {
0027 app->Add(new JTestPlotterLegacy);
0028 }
0029 else {
0030 app->Add(new JTestPlotter);
0031 }
0032
0033 bool except_on_loading = app->RegisterParameter("jtest:except_on_loading", false);
0034 if (except_on_loading) {
0035 throw JException("Planned exception on loading!");
0036 }
0037
0038
0039 app->ProvideService(std::make_shared<JTestCalibrationService>());
0040
0041 }
0042 }
0043