Skip to content

Commit

Permalink
Remove the remaining default destructors and fix includes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell authored and tmadlener committed Dec 10, 2024
1 parent 81c9fdc commit be38a79
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 41 deletions.
2 changes: 0 additions & 2 deletions k4MarlinWrapper/k4MarlinWrapper/LCEventWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ class LCEventWrapper : public DataObject {
public:
LCEventWrapper(std::unique_ptr<EVENT::LCEvent>&& theEvent) : m_event(std::move(theEvent)) {}

~LCEventWrapper() = default;

EVENT::LCEvent* getEvent() const { return m_event.get(); }

private:
Expand Down
14 changes: 6 additions & 8 deletions k4MarlinWrapper/k4MarlinWrapper/LcioEventAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,17 @@
*/

#include <Gaudi/Algorithm.h>
#include <GaudiKernel/IEventProcessor.h>
#include <Gaudi/Property.h>

#include <EVENT/LCIO.h>
#include <MT/LCReader.h>

#include "k4MarlinWrapper/LCEventWrapper.h"
namespace MT {
class LCReader;
}

class LcioEvent : public Gaudi::Algorithm {
public:
explicit LcioEvent(const std::string& name, ISvcLocator* pSL);
virtual ~LcioEvent() = default;
virtual StatusCode initialize() override final;
virtual StatusCode execute(const EventContext&) const override;
StatusCode initialize() override final;
StatusCode execute(const EventContext&) const override;

private:
Gaudi::Property<std::vector<std::string>> m_fileNames{this, "Files", {}};
Expand Down
18 changes: 10 additions & 8 deletions k4MarlinWrapper/k4MarlinWrapper/LcioEventOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,27 @@
// LCEventOutput: Write out LCIO events using MT writer from LCIO
////////////////////////////////////////////

#include <iostream>

#include <Gaudi/Algorithm.h>
#include <Gaudi/Property.h>

#include <EVENT/LCIO.h>
#include <IMPL/LCCollectionVec.h>
#include <IMPL/LCEventImpl.h>
#include <MT/LCWriter.h>
#include <lcio.h>

#include "k4MarlinWrapper/LCEventWrapper.h"
#include <string>
#include <vector>

namespace MT {
class LCWriter;
}

class LcioEventOutput : public Gaudi::Algorithm {
public:
explicit LcioEventOutput(const std::string& name, ISvcLocator* pSL);
virtual ~LcioEventOutput() = default;
virtual StatusCode initialize() override final;
virtual StatusCode execute(const EventContext&) const final;
virtual StatusCode finalize() override final;
StatusCode initialize() override final;
StatusCode execute(const EventContext&) const final;
StatusCode finalize() override final;

private:
MT::LCWriter* m_writer = nullptr;
Expand Down
13 changes: 3 additions & 10 deletions k4MarlinWrapper/k4MarlinWrapper/MarlinProcessorWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,27 @@
#ifndef K4MARLINWRAPPER_MARLINPROCESSORWRAPPER_H
#define K4MARLINWRAPPER_MARLINPROCESSORWRAPPER_H

// std
#include <stack>
#include <string>

// Gaudi
#include <Gaudi/Algorithm.h>
#include <GaudiKernel/IEventProcessor.h>
#include <GaudiKernel/IRndmEngine.h>
#include <GaudiKernel/MsgStream.h>
#include <GaudiKernel/ToolHandle.h>

// LCIO
#include <EVENT/LCEvent.h>
#include <EVENT/LCRunHeader.h>

// Marlin
#include <marlin/EventModifier.h>
#include <marlin/Exceptions.h>
#include <marlin/Global.h>
#include <marlin/ProcessorEventSeeder.h>
#include <marlin/ProcessorMgr.h>
#include <marlin/StringParameters.h>

// ROOT
#include <TSystem.h>

// k4MarlinWrapper
#include "k4MarlinWrapper/converters/IEDMConverter.h"

namespace marlin {
Expand All @@ -56,10 +50,9 @@ namespace marlin {
class MarlinProcessorWrapper : public Gaudi::Algorithm {
public:
explicit MarlinProcessorWrapper(const std::string& name, ISvcLocator* pSL);
virtual ~MarlinProcessorWrapper() = default;
virtual StatusCode execute(const EventContext&) const override final;
virtual StatusCode finalize() override final;
virtual StatusCode initialize() override final;
StatusCode execute(const EventContext&) const override final;
StatusCode finalize() override final;
StatusCode initialize() override final;

private:
std::string m_verbosity = "ERROR";
Expand Down
5 changes: 1 addition & 4 deletions k4MarlinWrapper/k4MarlinWrapper/TrackingCellIDEncodingSvc.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@
#ifndef CELLIDSVC_H
#define CELLIDSVC_H

#include <Gaudi/Property.h>
#include <GaudiKernel/Service.h>

//LCIO Includes
#include <UTIL/LCTrackerConf.h>

#include <string>

class IGeoSvc;
Expand All @@ -32,7 +30,6 @@ class TrackingCellIDEncodingSvc : public extends<Service, IService> {
public:
TrackingCellIDEncodingSvc(const std::string& name, ISvcLocator* svc);

~TrackingCellIDEncodingSvc();
StatusCode initialize() final;
StatusCode finalize() final;

Expand Down
5 changes: 2 additions & 3 deletions k4MarlinWrapper/k4MarlinWrapper/converters/EDM4hep2Lcio.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

#include "k4MarlinWrapper/converters/IEDMConverter.h"

#include <k4FWCore/PodioDataSvc.h>

#include "k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.h"

#include <Gaudi/Property.h>
Expand All @@ -32,6 +30,8 @@
#include <string>
#include <vector>

class PodioDataSvc;

template <typename K, typename V> using ObjMapT = k4EDM4hep2LcioConv::VecMapT<K, V>;

using TrackMap = ObjMapT<lcio::TrackImpl*, edm4hep::Track>;
Expand All @@ -53,7 +53,6 @@ struct CollectionPairMappings;
class EDM4hep2LcioTool : public AlgTool, virtual public IEDMConverter {
public:
EDM4hep2LcioTool(const std::string& type, const std::string& name, const IInterface* parent);
~EDM4hep2LcioTool() override = default;
StatusCode initialize() override;
StatusCode finalize() override;

Expand Down
1 change: 1 addition & 0 deletions k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include "k4FWCore/DataHandle.h"
#include "k4FWCore/MetaDataHandle.h"
#include "k4FWCore/PodioDataSvc.h"

#include "GaudiKernel/AnyDataWrapper.h"

Expand Down
14 changes: 12 additions & 2 deletions k4MarlinWrapper/src/components/LcioEventAlgo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,19 @@
* limitations under the License.
*/

#include "k4MarlinWrapper/LcioEventAlgo.h"
#include <GaudiKernel/IEventProcessor.h>

#include "k4MarlinWrapper/LCEventWrapper.h"
#include "k4MarlinWrapper/util/k4MarlinWrapperUtil.h"
#include "k4MarlinWrapper/LcioEventAlgo.h"

#include "marlin/Global.h"
#include "marlin/StringParameters.h"

#include <EVENT/LCIO.h>
#include <MT/LCReader.h>

#include <memory>
#include <string>

DECLARE_COMPONENT(LcioEvent)

Expand Down
6 changes: 6 additions & 0 deletions k4MarlinWrapper/src/components/LcioEventOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@
* limitations under the License.
*/

#include <MT/LCWriter.h>

#include "k4MarlinWrapper/LCEventWrapper.h"
#include "k4MarlinWrapper/LcioEventOutput.h"

#include <string>
#include <vector>

DECLARE_COMPONENT(LcioEventOutput)

LcioEventOutput::LcioEventOutput(const std::string& name, ISvcLocator* pSL) : Gaudi::Algorithm(name, pSL) {}
Expand Down
4 changes: 4 additions & 0 deletions k4MarlinWrapper/src/components/MarlinProcessorWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
#include "k4MarlinWrapper/LCEventWrapper.h"
#include "k4MarlinWrapper/util/k4MarlinWrapperUtil.h"

#include <map>
#include <string>
#include <vector>

DECLARE_COMPONENT(MarlinProcessorWrapper)

MarlinProcessorWrapper::MarlinProcessorWrapper(const std::string& name, ISvcLocator* pSL)
Expand Down
6 changes: 3 additions & 3 deletions k4MarlinWrapper/src/components/TrackingCellIDEncodingSvc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include <UTIL/LCTrackerConf.h>

#include "k4MarlinWrapper/TrackingCellIDEncodingSvc.h"

// k4fwcore
#include <k4Interface/IGeoSvc.h>

#include <GaudiKernel/MsgStream.h>
Expand All @@ -28,8 +30,6 @@ DECLARE_COMPONENT(TrackingCellIDEncodingSvc);
TrackingCellIDEncodingSvc::TrackingCellIDEncodingSvc(const std::string& name, ISvcLocator* svc)
: base_class(name, svc) {}

TrackingCellIDEncodingSvc::~TrackingCellIDEncodingSvc() {}

StatusCode TrackingCellIDEncodingSvc::initialize() {
try {
info() << "Looking for GeoSvc with the name" << m_geoSvcName.value() << endmsg;
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ add_test( event_header_conversion bash -c "k4run ${CMAKE_CURRENT_SOURCE_DIR}/gau
ExternalData_Add_Target(marlinwrapper_tests)

get_property(test_names DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY TESTS)
set_tests_properties(${test_names} PROPERTIES ENVIRONMENT
set_tests_properties(${test_names} PROPERTIES ENVIRONMENT
"TEST_DIR=${CMAKE_CURRENT_SOURCE_DIR};LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib64:$ENV{LD_LIBRARY_PATH};PYTHONPATH=${CMAKE_INSTALL_PREFIX}/python:$ENV{PYTHONPATH};EXAMPLE_DIR=${PROJECT_SOURCE_DIR}/k4MarlinWrapper/examples;MARLIN_DLL=$ENV{MARLIN_DLL}:${CMAKE_CURRENT_BINARY_DIR}/libMarlinTestProcessors.so"
)

Expand Down

0 comments on commit be38a79

Please sign in to comment.