Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General code cleanup #351

Merged
merged 7 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/examples/TimesliceExample/MyClusterFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#pragma once

#include <DatamodelGlue.h>
#include <JANA/Omni/JOmniFactory.h>
#include <JANA/Components/JOmniFactory.h>


struct MyClusterFactory : public JOmniFactory<MyClusterFactory> {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/TimesliceExample/MyProtoclusterFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#pragma once

#include <DatamodelGlue.h>
#include <JANA/Omni/JOmniFactory.h>
#include <JANA/Components/JOmniFactory.h>


struct MyProtoclusterFactory : public JOmniFactory<MyProtoclusterFactory> {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/TimesliceExample/TimesliceExample.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "MyProtoclusterFactory.h"
#include "MyClusterFactory.h"

#include <JANA/Omni/JOmniFactoryGeneratorT.h>
#include <JANA/Components/JOmniFactoryGeneratorT.h>

#include <JANA/JApplication.h>

Expand Down
92 changes: 5 additions & 87 deletions src/libraries/JANA/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,133 +4,53 @@
set(JANA2_SOURCES

JApplication.cc
JApplication.h
JEvent.h
JEventProcessor.h
JEventSource.h
JEventSourceGenerator.h
JEventSourceGeneratorT.h
JException.h
JFactory.h
JFactory.cc
JFactoryGenerator.h
JFactorySet.cc
JFactorySet.h
JFactoryT.h
JObject.h
JLogger.h
JMultifactory.cc
JMultifactory.h
JService.cc
JVersion.cc

Engine/JArrowProcessingController.cc
Engine/JArrowProcessingController.h
Engine/JScheduler.cc
Engine/JScheduler.h
Engine/JWorker.h
Engine/JWorker.cc
Engine/JWorkerMetrics.h
Engine/JPerfMetrics.cc
Engine/JPerfMetrics.h
Engine/JPerfSummary.cc
Engine/JPerfSummary.h

Topology/JArrow.h
Topology/JArrowMetrics.h
Topology/JEventProcessorArrow.cc
Topology/JEventProcessorArrow.h
Topology/JEventSourceArrow.cc
Topology/JEventSourceArrow.h
Topology/JEventMapArrow.h
Topology/JEventMapArrow.cc
Topology/JPool.h
Topology/JMailbox.h
Topology/JSubeventArrow.h
Topology/JTopologyBuilder.h
Topology/JTopologyBuilder.cc

Services/JComponentManager.cc
Services/JComponentManager.h
Services/JGlobalRootLock.h
Services/JLoggingService.h
Services/JLoggingService.cc
Services/JParameterManager.cc
Services/JParameterManager.h
Services/JPluginLoader.cc
Services/JPluginLoader.h
Services/JServiceLocator.h
Services/JEventGroupTracker.h

Status/JComponentSummary.h
Status/JComponentSummary.cc

Streaming/JDiscreteJoin.h
Streaming/JEventBuilder.h
Streaming/JMessage.h
Streaming/JStreamingEventSource.h
Streaming/JTransport.h
Streaming/JTrigger.h
Streaming/JWindow.h

Utils/JBacktrace.h
Utils/JEventPool.h

Components/JComponentSummary.cc

Utils/JCpuInfo.cc
Utils/JCpuInfo.h
Utils/JTypeInfo.h
Utils/JResourcePool.h
Utils/JResettable.h
Utils/JProcessorMapping.h
Utils/JProcessorMapping.cc
Utils/JPerfUtils.cc
Utils/JPerfUtils.h
Utils/JStringification.cc
Utils/JStringification.h
Utils/JAutoActivator.cc
Utils/JAutoActivator.h
Utils/JAny.h
Utils/JTablePrinter.cc
Utils/JTablePrinter.h
Utils/JCallGraphRecorder.h
Utils/JCallGraphRecorder.cc
Utils/JCallGraphEntryMaker.h
Utils/JInspector.cc
Utils/JInspector.h
Utils/JApplicationInspector.cc
Utils/JApplicationInspector.h

Calibrations/JCalibration.cc
Calibrations/JCalibration.h
Calibrations/JCalibrationCCDB.h
Calibrations/JCalibrationFile.cc
Calibrations/JCalibrationFile.h
Calibrations/JCalibrationGenerator.h
Calibrations/JCalibrationGeneratorCCDB.h
Calibrations/JLargeCalibration.cc
Calibrations/JLargeCalibration.h

CLI/JBenchmarker.cc
CLI/JBenchmarker.h
CLI/JSignalHandler.cc
CLI/JSignalHandler.h
CLI/JMain.cc
CLI/JMain.h

Compatibility/JStreamLog.cc
Compatibility/JStreamLog.h
Compatibility/JStreamLogBuffer.cc
Compatibility/JStreamLogBuffer.h
Compatibility/JStatusBits.h
Compatibility/jerror.h
Compatibility/JGeometry.h
Compatibility/JGeometryManager.cc
Compatibility/JGeometryManager.h
Compatibility/JGeometryXML.cc
Compatibility/JGeometryXML.h
Compatibility/md5.c
Compatibility/md5.h
Compatibility/JLockService.h
Compatibility/JGetObjectsFactory.h
)

if (${USE_PODIO})
Expand Down Expand Up @@ -199,26 +119,24 @@ endif()
file(GLOB jana_headers "*.h*")
file(GLOB jana_engine_headers "Engine/*.h*")
file(GLOB jana_services_headers "Services/*.h*")
file(GLOB jana_status_headers "Status/*.h*")
file(GLOB jana_streaming_headers "Streaming/*.h*")
file(GLOB jana_utils_headers "Utils/*.h*")
file(GLOB jana_calibs_headers "Calibrations/*.h*")
file(GLOB jana_cli_headers "CLI/*.h*")
file(GLOB jana_compat_headers "Compatibility/*.h*")
file(GLOB jana_podio_headers "Podio/*.h*")
file(GLOB jana_omni_headers "Omni/*.h*")
file(GLOB jana_component_headers "Components/*.h*")
file(GLOB jana_topology_headers "Topology/*.h*")

install(FILES ${jana_headers} DESTINATION include/JANA)
install(FILES ${jana_engine_headers} DESTINATION include/JANA/Engine)
install(FILES ${jana_services_headers} DESTINATION include/JANA/Services)
install(FILES ${jana_status_headers} DESTINATION include/JANA/Status)
install(FILES ${jana_streaming_headers} DESTINATION include/JANA/Streaming)
install(FILES ${jana_utils_headers} DESTINATION include/JANA/Utils)
install(FILES ${jana_calibs_headers} DESTINATION include/JANA/Calibrations)
install(FILES ${jana_cli_headers} DESTINATION include/JANA/CLI)
install(FILES ${jana_compat_headers} DESTINATION include/JANA/Compatibility)
install(FILES ${jana_omni_headers} DESTINATION include/JANA/Omni)
install(FILES ${jana_component_headers} DESTINATION include/JANA/Components)
install(FILES ${jana_topology_headers} DESTINATION include/JANA/Topology)

if (${USE_PODIO})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@

#pragma once
#include <JANA/JApplication.h>
#include <JANA/Omni/JComponentFwd.h>
#include <JANA/Components/JComponentFwd.h>
#include <JANA/Utils/JTypeInfo.h>

namespace jana {
namespace omni {
namespace jana::components {

template <typename T>
class JComponent::ParameterRef : public JComponent::ParameterBase {
Expand Down Expand Up @@ -150,7 +149,6 @@ inline void JComponent::CallWithJExceptionWrapper(std::string func_name, F func)
}


} // namespace omni
} // namespace jana
} // namespace jana::components


Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ class JParameterManager;
#include <JANA/Utils/JEventLevel.h>
#include <JANA/JLogger.h>
#include <JANA/JException.h>
#include <JANA/Status/JComponentSummary.h>
#include <JANA/Components/JComponentSummary.h>

#include <vector>
#include <mutex>

namespace jana {
namespace omni {
namespace jana::components {


struct JComponent {
Expand Down Expand Up @@ -139,14 +138,9 @@ struct JComponent {
parameter->Configure(fields);
}
}


//
};



} // namespace omni
} // namespace jana
} // namespace jana::components


Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <JANA/Utils/JTablePrinter.h>
#include "JComponentSummary.h"

namespace jana::components {


void JComponentSummary::Add(JComponentSummary::Component* component) {
Expand Down Expand Up @@ -210,5 +211,5 @@ std::ostream& operator<<(std::ostream& os, const JComponentSummary::Component& c
return os;
}


} // namespace jana::components

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <vector>
#include <map>


// Keeping this around for backwards compatibility only
struct JFactorySummary {
JEventLevel level;
Expand All @@ -20,6 +19,8 @@ struct JFactorySummary {
};


namespace jana::components {

class JComponentSummary {
public:

Expand Down Expand Up @@ -170,3 +171,5 @@ inline bool operator==(const JComponentSummary::Collection& lhs, const JComponen

inline bool operator!=(const JComponentSummary::Collection& lhs, const JComponentSummary::Collection& rhs) { return !(lhs == rhs); }

} // namespace jana::components
using jana::components::JComponentSummary;
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
#pragma once
#include <JANA/JEvent.h>

namespace jana {
namespace omni {

namespace jana::components {

struct JHasInputs {
protected:
Expand Down Expand Up @@ -236,6 +235,5 @@ struct JHasInputs {
#endif
};

} // namespace omni
} // namespace jana
} // namespace jana::components

Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include <JANA/JEvent.h>

namespace jana {
namespace omni {
namespace jana::components {



struct JHasOutputs {
Expand Down Expand Up @@ -115,6 +115,4 @@ struct JHasOutputs {
};



} // namespace omni
} // namespace jana
} // namespace jana::components
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include <JANA/JEvent.h>

namespace jana {
namespace omni {
namespace jana::components {


class JHasRunCallbacks {

Expand Down Expand Up @@ -60,6 +60,5 @@ class JHasRunCallbacks {

};

} // namespace omni
} // namespace jana

} // namespace jana::components
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@
#include <JANA/JEvent.h>
#include <JANA/JMultifactory.h>
#include <JANA/JVersion.h>
#include <JANA/Omni/JHasInputs.h>
#include <JANA/Components/JHasInputs.h>

#include <JANA/JLogger.h>
#include <JANA/Services/JLoggingService.h>

#include <string>
#include <vector>

namespace jana::components {

struct EmptyConfig {};

template <typename AlgoT, typename ConfigT=EmptyConfig>
class JOmniFactory : public JMultifactory, public jana::omni::JHasInputs {
class JOmniFactory : public JMultifactory, public jana::components::JHasInputs {
public:

/// =========================
Expand Down Expand Up @@ -346,3 +347,9 @@ class JOmniFactory : public JMultifactory, public jana::omni::JHasInputs {
}

};

} // namespace jana::components

using jana::components::JOmniFactory;


Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <JANA/JFactoryGenerator.h>
#include <vector>

namespace jana::components {

template<class FactoryT>
class JOmniFactoryGeneratorT : public JFactoryGenerator {
public:
Expand Down Expand Up @@ -118,3 +120,6 @@ class JOmniFactoryGeneratorT : public JFactoryGenerator {
private:
std::vector<TypedWiring> m_typed_wirings;
};

} // namespace jana::components
using jana::components::JOmniFactoryGeneratorT;
Loading
Loading