File indexing completed on 2025-10-16 09:15:27
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 order_output = app->RegisterParameter("jtest:order_output", false);
0026
0027 bool use_legacy_plotter = app->RegisterParameter("jtest:use_legacy_plotter", false);
0028 if (use_legacy_plotter) {
0029 app->Add(new JTestPlotterLegacy);
0030 }
0031 else {
0032 app->Add(new JTestPlotter {order_output});
0033 }
0034
0035 bool except_on_loading = app->RegisterParameter("jtest:except_on_loading", false);
0036 if (except_on_loading) {
0037 throw JException("Planned exception on loading!");
0038 }
0039
0040
0041 app->ProvideService(std::make_shared<JTestCalibrationService>());
0042
0043 }
0044 }
0045