Skip to content
Snippets Groups Projects
Commit e05a9637 authored by scott snyder's avatar scott snyder Committed by scott snyder
Browse files

OutputStreamAthenaPool: Add IAthenaOutputTool::preStream()

Add abstract method IAthenaOutputTool::preStream().
To be called just before streaming objects.
parent d59e46ed
No related branches found
No related tags found
No related merge requests found
...@@ -23,13 +23,10 @@ ...@@ -23,13 +23,10 @@
//___________________________________________________________________________ //___________________________________________________________________________
MakeEventStreamInfo::MakeEventStreamInfo(const std::string& type, MakeEventStreamInfo::MakeEventStreamInfo(const std::string& type,
const std::string& name, const std::string& name,
const IInterface* parent) : ::AthAlgTool(type, name, parent), const IInterface* parent) : base_class(type, name, parent),
m_metaDataSvc("MetaDataSvc", name), m_metaDataSvc("MetaDataSvc", name),
m_eventStore("StoreGateSvc", name) m_eventStore("StoreGateSvc", name)
{ {
// Declare IAthenaOutputStreamTool interface
declareInterface<IAthenaOutputTool>(this);
// Declare the properties // Declare the properties
declareProperty("Key", m_key = ""); declareProperty("Key", m_key = "");
declareProperty("EventInfoKey", m_eventInfoKey = "EventInfo"); declareProperty("EventInfoKey", m_eventInfoKey = "EventInfo");
...@@ -68,6 +65,10 @@ StatusCode MakeEventStreamInfo::preExecute() { ...@@ -68,6 +65,10 @@ StatusCode MakeEventStreamInfo::preExecute() {
return(StatusCode::SUCCESS); return(StatusCode::SUCCESS);
} }
//___________________________________________________________________________ //___________________________________________________________________________
StatusCode MakeEventStreamInfo::preStream() {
return(StatusCode::SUCCESS);
}
//___________________________________________________________________________
StatusCode MakeEventStreamInfo::postExecute() { StatusCode MakeEventStreamInfo::postExecute() {
const IAlgorithm* parentAlg = dynamic_cast<const IAlgorithm*>(this->parent()); const IAlgorithm* parentAlg = dynamic_cast<const IAlgorithm*>(this->parent());
if (parentAlg == nullptr) { if (parentAlg == nullptr) {
......
...@@ -24,7 +24,7 @@ namespace xAODMaker { class IEventInfoCnvTool; } ...@@ -24,7 +24,7 @@ namespace xAODMaker { class IEventInfoCnvTool; }
/** @class MakeEventStreamInfo /** @class MakeEventStreamInfo
* @brief This class provides an algorithm to make the EventStreamInfo object and update it. * @brief This class provides an algorithm to make the EventStreamInfo object and update it.
**/ **/
class MakeEventStreamInfo : public ::AthAlgTool, virtual public IAthenaOutputTool { class MakeEventStreamInfo : public extends<::AthAlgTool, IAthenaOutputTool> {
public: public:
/// Standard AlgTool Constructor /// Standard AlgTool Constructor
MakeEventStreamInfo(const std::string& type, const std::string& name, const IInterface* parent); MakeEventStreamInfo(const std::string& type, const std::string& name, const IInterface* parent);
...@@ -32,17 +32,19 @@ public: ...@@ -32,17 +32,19 @@ public:
virtual ~MakeEventStreamInfo(); virtual ~MakeEventStreamInfo();
/// Required of all IAthenaOutputTools: /// Required of all IAthenaOutputTools:
/// Called by AthenaOutputStream::initialize() (via ToolSvc retrieve()). /// Called by AthenaOutputStream::initialize() (via ToolSvc retrieve()).
StatusCode initialize(); virtual StatusCode initialize() override;
/// Called at the end of AthenaOutputStream::initialize(). /// Called at the end of AthenaOutputStream::initialize().
StatusCode postInitialize(); virtual StatusCode postInitialize() override;
/// Called at the beginning of AthenaOutputStream::execute(). /// Called at the beginning of AthenaOutputStream::execute().
StatusCode preExecute(); virtual StatusCode preExecute() override;
/// Called before actually streaming objects.
virtual StatusCode preStream() override;
/// Called at the end of AthenaOutputStream::execute(). /// Called at the end of AthenaOutputStream::execute().
StatusCode postExecute(); virtual StatusCode postExecute() override;
/// Called at the beginning of AthenaOutputStream::finalize(). /// Called at the beginning of AthenaOutputStream::finalize().
StatusCode preFinalize(); virtual StatusCode preFinalize() override;
/// Called at the end of AthenaOutputStream::finalize() (via release()). /// Called at the end of AthenaOutputStream::finalize() (via release()).
StatusCode finalize(); virtual StatusCode finalize() override;
private: private:
/// Key, the StoreGate key for the EventStreamInfo object. /// Key, the StoreGate key for the EventStreamInfo object.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment