The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
IncidentAsyncTestSvc.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
14#include <Gaudi/Property.h>
17#include <GaudiKernel/Service.h>
18#include <GaudiKernel/SmartIF.h>
19#include <mutex>
20#include <tbb/concurrent_unordered_map.h>
21class ISvcLocator;
22class IMessageSvc;
23class IIncidentSvc;
24
28class IncidentAsyncTestSvc final : public extends<Service, IIncidentListener, IIncidentAsyncTestSvc> {
29
30public:
32 using extends::extends;
33
34 StatusCode initialize() override;
35 StatusCode finalize() override;
36
38 void handle( const Incident& incident ) override;
39 void getData( uint64_t* data, EventContext* ctx = 0 ) const override;
40
41private:
42 Gaudi::Property<uint64_t> m_fileOffset{ this, "FileOffset", 100000000 };
43 Gaudi::Property<uint64_t> m_eventMultiplier{ this, "EventMultiplier", 1000 };
45 Gaudi::Property<long> m_prio{ this, "Priority", 0 };
48 tbb::concurrent_unordered_map<EventContext, uint64_t, EventContextHash, EventContextHash> m_ctxData;
49 std::mutex m_eraseMutex;
50};
This class represents an entry point to all the event specific data.
Implementation of property with value of concrete type.
Definition PropertyFwd.h:27
The interface implemented by the IncidentSvc service.
The IMessage is the interface implemented by the message service.
Definition IMessageSvc.h:34
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition ISvcLocator.h:42
Gaudi::Property< long > m_prio
SmartIF< IIncidentSvc > m_incSvc
Gaudi::Property< uint64_t > m_fileOffset
StatusCode finalize() override
tbb::concurrent_unordered_map< EventContext, uint64_t, EventContextHash, EventContextHash > m_ctxData
Gaudi::Property< std::vector< std::string > > m_incidentNames
void getData(uint64_t *data, EventContext *ctx=0) const override
Gaudi::Property< uint64_t > m_eventMultiplier
void handle(const Incident &incident) override
Reimplements from IIncidentListener.
StatusCode initialize() override
SmartIF< IMessageSvc > m_msgSvc
Base class for all Incidents (computing events).
Definition Incident.h:24
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
Base class used to extend a class implementing other interfaces.
Definition extends.h:19