-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
|
||
# Automatically set plugin name the same as the directory name Don't forget | ||
# string(REPLACE " " "_" PLUGIN_NAME ${PLUGIN_NAME}) if this dir has spaces in | ||
# its name | ||
get_filename_component(PLUGIN_NAME ${CMAKE_CURRENT_LIST_DIR} NAME) | ||
|
||
# Function creates ${PLUGIN_NAME}_plugin and ${PLUGIN_NAME}_library targets | ||
# Setting default includes, libraries and installation paths | ||
plugin_add(${PLUGIN_NAME} WITH_STATIC_LIBRARY) | ||
|
||
# The macro grabs sources as *.cc *.cpp *.c and headers as *.h *.hh *.hpp Then | ||
# correctly sets sources for ${_name}_plugin and ${_name}_library targets Adds | ||
# headers to the correct installation directory | ||
plugin_glob_all(${PLUGIN_NAME}) | ||
|
||
# Find dependencies | ||
plugin_add_nopayloadclient(${PLUGIN_NAME}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// SPDX-License-Identifier: LGPL-3.0-or-later | ||
// Copyright (C) 2024 Wouter Deconinck | ||
|
||
#include "Payload_service.h" | ||
|
||
#include <JANA/JException.h> | ||
#include <nlohmann/json.hpp> | ||
#include <nopayloadclient/nopayloadclient.hpp> | ||
|
||
Payload_service::Payload_service(JApplication *app) | ||
: m_client("EICrecon") { | ||
m_application = app; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-License-Identifier: LGPL-3.0-or-later | ||
// Copyright (C) 2024 Wouter Deconinck | ||
|
||
#pragma once | ||
|
||
#include <JANA/JApplication.h> | ||
#include <JANA/Services/JServiceLocator.h> | ||
#include <nlohmann/json.hpp> | ||
#include <nopayloadclient/nopayloadclient.hpp> | ||
#include <string> | ||
|
||
class Payload_service : public JService | ||
{ | ||
public: | ||
explicit Payload_service(JApplication *app); | ||
~Payload_service() { }; | ||
|
||
private: | ||
|
||
Payload_service() = default; | ||
|
||
nopayloadclient::NoPayloadClient m_client; | ||
|
||
JApplication* m_application; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2022, David Lawrence | ||
// Subject to the terms in the LICENSE file found in the top-level directory. | ||
// | ||
// | ||
|
||
#include <JANA/JApplication.h> | ||
#include <memory> | ||
|
||
#include "Log_service.h" | ||
|
||
|
||
extern "C" { | ||
void InitPlugin(JApplication *app) { | ||
InitJANAPlugin(app); | ||
app->ProvideService(std::make_shared<Log_service>(app) ); | ||
} | ||
} |