The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
ReadAlg.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 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// Framework include files
14#include <GaudiKernel/Algorithm.h> // Required for inheritance
15#include <GaudiKernel/IIncidentListener.h> // Required for inheritance
16
17// Forward declarations
18#include <mutex>
19
20class IIncidentSvc;
21
28
29class ReadAlg : public Algorithm, virtual public IIncidentListener {
34 Gaudi::Property<std::string> m_incidentName{ this, "IncidentName", "", "incident name of records service" };
36 std::mutex m_mutex;
37
38public:
42 StatusCode initialize() override;
44 StatusCode finalize() override;
46 StatusCode execute() override;
48 void handle( const Incident& incident ) override;
49};
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
Definition Algorithm.h:98
Implementation of property with value of concrete type.
Definition PropertyFwd.h:27
The interface implemented by any class wanting to listen to Incidents.
The interface implemented by the IncidentSvc service.
Base class for all Incidents (computing events).
Definition Incident.h:24
ReadAlg class for the RootIOExample.
Definition ReadAlg.h:29
StatusCode execute() override
Event callback.
Definition ReadAlg.cpp:121
SmartIF< IIncidentSvc > m_incidentSvc
Reference to incident service.
Definition ReadAlg.h:33
SmartIF< IDataProviderSvc > m_recordSvc
Reference to run records data service.
Definition ReadAlg.h:31
std::mutex m_mutex
protection for thread safe usage
Definition ReadAlg.h:36
Gaudi::Property< std::string > m_incidentName
Definition ReadAlg.h:34
StatusCode finalize() override
Finalize.
Definition ReadAlg.cpp:87
void handle(const Incident &incident) override
IIncidentListener override: Inform that a new incident has occured.
Definition ReadAlg.cpp:97
StatusCode initialize() override
Initialize.
Definition ReadAlg.cpp:50
Small smart pointer class with automatic reference counting for IInterface.
Definition SmartIF.h:28
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64