Skip to content

Commit

Permalink
add EmptyAlg
Browse files Browse the repository at this point in the history
  • Loading branch information
vvolkl committed Sep 29, 2020
1 parent bd6d524 commit 198a94a
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 4 deletions.
8 changes: 4 additions & 4 deletions TestFWCore/CMakeLists.txt → K4TestFWCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ find_package(EDM4HEP)
find_package(podio)


gaudi_subdir(TestFWCore v1r0)
gaudi_subdir(K4TestFWCore v1r0)

gaudi_depends_on_subdirs(GaudiAlg GaudiKernel FWCore)


gaudi_add_module(TestFWCorePlugins
gaudi_add_module(K4TestFWCorePlugins
src/components/*.cpp
INCLUDE_DIRS FWCore EDM4HEP::edm4hep
LINK_LIBRARIES GaudiKernel FWCore EDM4HEP::edm4hep)
Expand All @@ -21,9 +21,9 @@ include(CTest)

gaudi_add_test(CreateExampleEventData
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMAND gaudirun.py TestFWCore/options/createExampleEventData.py)
COMMAND gaudirun.py K4TestFWCore/options/createExampleEventData.py)

gaudi_add_test(ReadExampleEventData
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMAND gaudirun.py TestFWCore/options/readExampleEventData.py)
COMMAND gaudirun.py K4TestFWCore/options/readExampleEventData.py)

18 changes: 18 additions & 0 deletions K4TestFWCore/options/eventcounter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from Gaudi.Configuration import *

from Configurables import K4DataSvc
podioevent = K4DataSvc("EventDataSvc")

from Configurables import EventCounterExample
eventcounter = EventCounterExample()


from Configurables import ApplicationMgr
ApplicationMgr( TopAlg=[eventcounter],
EvtSel="NONE",
EvtMax=100,
ExtSvc=[podioevent],
OutputLevel=DEBUG,
)


File renamed without changes.
20 changes: 20 additions & 0 deletions K4TestFWCore/src/components/EmptyAlg.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "EmptyAlg.h"

DECLARE_COMPONENT(EmptyAlg)

EmptyAlg::EmptyAlg(const std::string& aName, ISvcLocator* aSvcLoc) : GaudiAlgorithm(aName, aSvcLoc) {
}

EmptyAlg::~EmptyAlg() {}

StatusCode EmptyAlg::initialize() {
return StatusCode::SUCCESS;
}

StatusCode EmptyAlg::execute() {
return StatusCode::SUCCESS;
}

StatusCode EmptyAlg::finalize() {
return StatusCode::SUCCESS;
}
28 changes: 28 additions & 0 deletions K4TestFWCore/src/components/EmptyAlg.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#pragma once

// GAUDI
#include "GaudiAlg/GaudiAlgorithm.h"
#include "GaudiKernel/Property.h"


class EmptyAlg : public GaudiAlgorithm {
public:
explicit EmptyAlg(const std::string&, ISvcLocator*);
virtual ~EmptyAlg();
/** Initialize.
* @return status code
*/
virtual StatusCode initialize() final;
/** Execute.
* @return status code
*/
virtual StatusCode execute() final;
/** Finalize.
* @return status code
*/
virtual StatusCode finalize() final;

private:
// member variable
int m_member = 0;
};

0 comments on commit 198a94a

Please sign in to comment.