diff --git a/k4ActsTracking/src/components/objectTEST.cpp b/k4ActsTracking/src/components/objectTEST.cpp new file mode 100644 index 0000000..de83e45 --- /dev/null +++ b/k4ActsTracking/src/components/objectTEST.cpp @@ -0,0 +1,44 @@ +#include "objectTEST.h" + +#include +#include +#include +#include +#include "PropagatorAlg.h" + +//using std::filesystem::current_path; + + +DECLARE_COMPONENT(objectTest) + +objectTest::objectTest(const std::string& aName, ISvcLocator* aSvcLoc) : GaudiAlgorithm(aName, aSvcLoc) {} + +objectTest::~objectTest() {} + +StatusCode objectTest::initialize() {return StatusCode::SUCCESS; } + +StatusCode objectTest::execute() { + + typedef std::vector MyTestVector; + DataObject *pObject; + //std::string objectPath = "./testDir"; + + StatusCode sc = eventSvc()->registerObject(".", pObject); + + if( sc.isFailure() ) { + std::cout << "CANNOT initialize sc" << std::endl; + return StatusCode::FAILURE; + } + else{ + std::cout << "CAN initialize sc" << std::endl; + } + + MyTestVector *tv = 0; + tv = dynamic_cast (pObject); + + + std::cout << "Object Test is alive!" << std::endl; + return StatusCode::SUCCESS; +} + +StatusCode objectTest::finalize() { return StatusCode::SUCCESS; } diff --git a/k4ActsTracking/src/components/objectTEST.h b/k4ActsTracking/src/components/objectTEST.h new file mode 100644 index 0000000..b913040 --- /dev/null +++ b/k4ActsTracking/src/components/objectTEST.h @@ -0,0 +1,28 @@ +#pragma once + +// GAUDI +#include "Gaudi/Property.h" +#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/IDataProviderSvc.h" +//#include "GaudiKernel/RegistryEntry.h" + +class objectTest : public GaudiAlgorithm { +public: + explicit objectTest(const std::string&, ISvcLocator*); + virtual ~objectTest(); + /** 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: + +};