The Gaudi Framework  master (37c0b60a)
ReadAlg.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 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 #ifndef GAUDIEXAMPLES_READALG_H
12 #define GAUDIEXAMPLES_READALG_H
13 
14 // Framework include files
15 #include <GaudiKernel/Algorithm.h> // Required for inheritance
16 #include <GaudiKernel/IIncidentListener.h> // Required for inheritance
17 
18 // Forward declarations
19 class IIncidentSvc;
20 
28 class ReadAlg : public Algorithm, virtual public IIncidentListener {
33  Gaudi::Property<std::string> m_incidentName{ this, "IncidentName", "", "incident name of records service" };
34 
35 public:
39  StatusCode initialize() override;
41  StatusCode finalize() override;
43  StatusCode execute() override;
45  void handle( const Incident& incident ) override;
46 };
47 
48 #endif // GAUDIEXAMPLES_READALG_H
ReadAlg::finalize
StatusCode finalize() override
Finalize.
Definition: ReadAlg.cpp:81
ReadAlg::initialize
StatusCode initialize() override
Initialize.
Algorithm
Alias for backward compatibility.
Definition: Algorithm.h:58
Algorithm.h
ReadAlg::execute
StatusCode execute() override
Event callback.
ReadAlg::m_incidentName
Gaudi::Property< std::string > m_incidentName
Definition: ReadAlg.h:33
ReadAlg::m_recordSvc
SmartIF< IDataProviderSvc > m_recordSvc
Reference to run records data service.
Definition: ReadAlg.h:30
IIncidentListener
Definition: IIncidentListener.h:25
StatusCode
Definition: StatusCode.h:65
SmartIF< IDataProviderSvc >
ReadAlg::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to incident service.
Definition: ReadAlg.h:32
ReadAlg::handle
void handle(const Incident &incident) override
IIncidentListener override: Inform that a new incident has occured.
Definition: ReadAlg.cpp:91
ReadAlg
Definition: ReadAlg.h:28
IIncidentListener.h
Gaudi::Algorithm::Algorithm
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
Definition: Algorithm.h:101
IIncidentSvc
Definition: IIncidentSvc.h:33
Incident
Definition: Incident.h:27
Gaudi::Property< std::string >