forked from key4hep/k4ActsTracking
-
Notifications
You must be signed in to change notification settings - Fork 0
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
2 changed files
with
72 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#include "objectTEST.h" | ||
|
||
#include <iostream> | ||
#include <string> | ||
#include <filesystem> | ||
#include <unistd.h> | ||
#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<int> 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<MyTestVector *> (pObject); | ||
|
||
|
||
std::cout << "Object Test is alive!" << std::endl; | ||
return StatusCode::SUCCESS; | ||
} | ||
|
||
StatusCode objectTest::finalize() { return StatusCode::SUCCESS; } |
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,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: | ||
|
||
}; |