The Gaudi Framework  master (37c0b60a)
ReplayOutputStream.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #pragma once
12 
13 #include <GaudiKernel/Algorithm.h>
14 #include <GaudiKernel/HashMap.h>
15 #include <GaudiKernel/SmartIF.h>
17 
18 class IAlgManager;
19 struct IDataManagerSvc;
20 
27 class ReplayOutputStream : public Algorithm {
28 public:
31 
32  StatusCode initialize() override;
33  StatusCode start() override;
34  StatusCode execute() override;
35  StatusCode stop() override;
36  StatusCode finalize() override;
37 
40 
41 private:
43  void i_addOutputStream( const Gaudi::Utils::TypeNameString& outStream );
44 
47  public:
49  inline void operator()( const Gaudi::Utils::TypeNameString& outStream ) { m_ptr->i_addOutputStream( outStream ); }
50 
51  private:
53  };
54 
57  template <Gaudi::StateMachine::Transition TR>
59 
61  this, "OutputStreams", {}, "OutputStream instances that can be called." };
62 
65 
68 };
ReplayOutputStream::execute
StatusCode execute() override
Algorithm execution.
Definition: ReplayOutputStream.cpp:124
ReplayOutputStream::OutStreamsMapType
GaudiUtils::HashMap< std::string, SmartIF< IAlgorithm > > OutStreamsMapType
Class used to hold the OutputStream instances.
Definition: ReplayOutputStream.h:39
IDataManagerSvc
Definition: IDataManagerSvc.h:55
ReplayOutputStream::i_outStreamTransition
StatusCode i_outStreamTransition()
Helper function to call the transition on the contained OutputStreams.
Definition: ReplayOutputStream.cpp:80
Algorithm
Alias for backward compatibility.
Definition: Algorithm.h:58
ReplayOutputStream::OutStreamAdder
Helper class to fill the internal map of OutputStreams.
Definition: ReplayOutputStream.h:46
Algorithm.h
ReplayOutputStream::start
StatusCode start() override
Algorithm initialization.
Definition: ReplayOutputStream.cpp:112
ReplayOutputStream::OutStreamAdder::operator()
void operator()(const Gaudi::Utils::TypeNameString &outStream)
Definition: ReplayOutputStream.h:49
ReplayOutputStream
Definition: ReplayOutputStream.h:27
HashMap.h
ReplayOutputStream::i_addOutputStream
void i_addOutputStream(const Gaudi::Utils::TypeNameString &outStream)
Add a new algorithm to the list of OutputStreams.
Definition: ReplayOutputStream.cpp:181
IAlgManager
Definition: IAlgManager.h:37
SmartIF.h
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:20
StatusCode
Definition: StatusCode.h:65
ReplayOutputStream::m_outputStreams
OutStreamsMapType m_outputStreams
Internal storage for the OutputStreams to call.
Definition: ReplayOutputStream.h:64
ReplayOutputStream::m_outputStreamNames
Gaudi::Property< std::vector< std::string > > m_outputStreamNames
Definition: ReplayOutputStream.h:60
ReplayOutputStream::OutStreamAdder::m_ptr
ReplayOutputStream * m_ptr
Definition: ReplayOutputStream.h:52
SmartIF< IAlgManager >
ReplayOutputStream::m_algMgr
SmartIF< IAlgManager > m_algMgr
Definition: ReplayOutputStream.h:66
ReplayOutputStream::stop
StatusCode stop() override
Algorithm finalization.
Definition: ReplayOutputStream.cpp:171
ReplayOutputStream::OutStreamAdder::OutStreamAdder
OutStreamAdder(ReplayOutputStream *ptr)
Definition: ReplayOutputStream.h:48
ThreadLocalContext.h
ReplayOutputStream::finalize
StatusCode finalize() override
Algorithm finalization.
Definition: ReplayOutputStream.cpp:156
ReplayOutputStream::initialize
StatusCode initialize() override
Algorithm initialization.
Definition: ReplayOutputStream.cpp:89
GaudiUtils::HashMap
Definition: HashMap.h:83
Gaudi::Algorithm::Algorithm
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
Definition: Algorithm.h:101
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:37
ReplayOutputStream::m_evtMgr
SmartIF< IDataManagerSvc > m_evtMgr
Definition: ReplayOutputStream.h:67