The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
AbortEventAlg.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// Include files
13// from Gaudi
15
16class IIncidentSvc;
17
25class AbortEventAlg : public Algorithm {
26public:
29
30 StatusCode initialize() override;
31 StatusCode execute() override;
32 StatusCode finalize() override;
33
34private:
35 Gaudi::Property<long> m_count{ this, "AbortedEventNumber", 3, "At which event to trigger an abort" };
36
40 long m_counter = 0;
41};
Small algorithm that after a given number of events triggers an AbortEvent.
StatusCode initialize() override
Algorithm initialization.
Gaudi::Property< long > m_count
StatusCode execute() override
Algorithm execution.
long m_counter
Counter of events.
StatusCode finalize() override
Algorithm finalization.
SmartIF< IIncidentSvc > m_incidentSvc
Pointer to the incident service.
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 the IncidentSvc service.
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