Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  master (01b473db)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
13 #include "IIncidentAsyncTestSvc.h"
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>
21 class ISvcLocator;
22 class IMessageSvc;
23 class IIncidentSvc;
24 
28 class IncidentAsyncTestSvc final : public extends<Service, IIncidentListener, IIncidentAsyncTestSvc> {
29 
30 public:
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 
41 private:
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 };
IncidentAsyncTestSvc::m_prio
Gaudi::Property< long > m_prio
Definition: IncidentAsyncTestSvc.h:45
IMessageSvc
Definition: IMessageSvc.h:34
ISvcLocator
Definition: ISvcLocator.h:42
IncidentAsyncTestSvc::m_incSvc
SmartIF< IIncidentSvc > m_incSvc
Definition: IncidentAsyncTestSvc.h:47
IncidentAsyncTestSvc::m_msgSvc
SmartIF< IMessageSvc > m_msgSvc
Definition: IncidentAsyncTestSvc.h:46
EventContextHash.h
IncidentAsyncTestSvc::initialize
StatusCode initialize() override
Definition: IncidentAsyncTestSvc.cpp:33
IIncidentAsyncTestSvc.h
SmartIF.h
GaudiPython.Pythonizations.ctx
ctx
Definition: Pythonizations.py:578
StatusCode
Definition: StatusCode.h:64
IncidentAsyncTestSvc::m_ctxData
tbb::concurrent_unordered_map< EventContext, uint64_t, EventContextHash, EventContextHash > m_ctxData
Definition: IncidentAsyncTestSvc.h:48
IncidentAsyncTestSvc::m_fileOffset
Gaudi::Property< uint64_t > m_fileOffset
Definition: IncidentAsyncTestSvc.h:42
IncidentAsyncTestSvc::m_incidentNames
Gaudi::Property< std::vector< std::string > > m_incidentNames
Definition: IncidentAsyncTestSvc.h:44
IncidentAsyncTestSvc::getData
void getData(uint64_t *data, EventContext *ctx=0) const override
Definition: IncidentAsyncTestSvc.cpp:75
SmartIF< IMessageSvc >
IncidentAsyncTestSvc
Definition: IncidentAsyncTestSvc.h:28
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:19
IncidentAsyncTestSvc::m_eventMultiplier
Gaudi::Property< uint64_t > m_eventMultiplier
Definition: IncidentAsyncTestSvc.h:43
Service.h
IncidentAsyncTestSvc::m_eraseMutex
std::mutex m_eraseMutex
Definition: IncidentAsyncTestSvc.h:49
IIncidentListener.h
IncidentAsyncTestSvc::finalize
StatusCode finalize() override
Definition: IncidentAsyncTestSvc.cpp:50
EventContext
Definition: EventContext.h:34
IIncidentSvc
Definition: IIncidentSvc.h:30
Incident
Definition: Incident.h:24
Gaudi::Property< uint64_t >
IncidentAsyncTestSvc::handle
void handle(const Incident &incident) override
Reimplements from IIncidentListener.
Definition: IncidentAsyncTestSvc.cpp:53
Property.h