The Gaudi Framework
master (37c0b60a)
IncidentAsyncTestSvc.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_INCIDENTASYNCTESTSVC_H_
12
#define GAUDIEXAMPLES_INCIDENTASYNCTESTSVC_H_
13
14
#include "
IIncidentAsyncTestSvc.h
"
15
#include <
Gaudi/Property.h
>
16
#include <
GaudiKernel/EventContextHash.h
>
17
#include <
GaudiKernel/IIncidentListener.h
>
18
#include <
GaudiKernel/Service.h
>
19
#include <
GaudiKernel/SmartIF.h
>
20
#include <mutex>
21
#include <tbb/concurrent_unordered_map.h>
22
class
ISvcLocator
;
23
class
IMessageSvc
;
24
class
IIncidentSvc
;
25
29
class
IncidentAsyncTestSvc
final :
public
extends
<Service, IIncidentListener, IIncidentAsyncTestSvc> {
30
31
public
:
33
using
extends::extends;
34
35
StatusCode
initialize
()
override
;
36
StatusCode
finalize
()
override
;
37
39
void
handle
(
const
Incident
& incident )
override
;
40
void
getData
( uint64_t* data,
EventContext
*
ctx
= 0 )
const override
;
41
42
private
:
43
Gaudi::Property<uint64_t>
m_fileOffset
{
this
,
"FileOffset"
, 100000000 };
44
Gaudi::Property<uint64_t>
m_eventMultiplier
{
this
,
"EventMultiplier"
, 1000 };
45
Gaudi::Property<std::vector<std::string>
>
m_incidentNames
{
this
,
"IncidentNames"
};
46
Gaudi::Property<long>
m_prio
{
this
,
"Priority"
, 0 };
47
SmartIF<IMessageSvc>
m_msgSvc
;
48
SmartIF<IIncidentSvc>
m_incSvc
;
49
tbb::concurrent_unordered_map<EventContext, uint64_t, EventContextHash, EventContextHash>
m_ctxData
;
50
std::mutex
m_eraseMutex
;
51
};
52
53
#endif
/*GAUDIEXAMPLES_INCIDENREGISTRYTESTLISTENER_H_*/
IncidentAsyncTestSvc::m_prio
Gaudi::Property< long > m_prio
Definition:
IncidentAsyncTestSvc.h:46
IMessageSvc
Definition:
IMessageSvc.h:47
ISvcLocator
Definition:
ISvcLocator.h:46
IncidentAsyncTestSvc::m_incSvc
SmartIF< IIncidentSvc > m_incSvc
Definition:
IncidentAsyncTestSvc.h:48
IncidentAsyncTestSvc::m_msgSvc
SmartIF< IMessageSvc > m_msgSvc
Definition:
IncidentAsyncTestSvc.h:47
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:65
IncidentAsyncTestSvc::m_ctxData
tbb::concurrent_unordered_map< EventContext, uint64_t, EventContextHash, EventContextHash > m_ctxData
Definition:
IncidentAsyncTestSvc.h:49
IncidentAsyncTestSvc::m_fileOffset
Gaudi::Property< uint64_t > m_fileOffset
Definition:
IncidentAsyncTestSvc.h:43
IncidentAsyncTestSvc::m_incidentNames
Gaudi::Property< std::vector< std::string > > m_incidentNames
Definition:
IncidentAsyncTestSvc.h:45
IncidentAsyncTestSvc::getData
void getData(uint64_t *data, EventContext *ctx=0) const override
Definition:
IncidentAsyncTestSvc.cpp:75
SmartIF< IMessageSvc >
IncidentAsyncTestSvc
Definition:
IncidentAsyncTestSvc.h:29
extends
Base class used to extend a class implementing other interfaces.
Definition:
extends.h:20
IncidentAsyncTestSvc::m_eventMultiplier
Gaudi::Property< uint64_t > m_eventMultiplier
Definition:
IncidentAsyncTestSvc.h:44
Service.h
IncidentAsyncTestSvc::m_eraseMutex
std::mutex m_eraseMutex
Definition:
IncidentAsyncTestSvc.h:50
IIncidentListener.h
IncidentAsyncTestSvc::finalize
StatusCode finalize() override
Definition:
IncidentAsyncTestSvc.cpp:50
EventContext
Definition:
EventContext.h:34
std::mutex
STL class.
IIncidentSvc
Definition:
IIncidentSvc.h:33
Incident
Definition:
Incident.h:27
Gaudi::Property< uint64_t >
IncidentAsyncTestSvc::handle
void handle(const Incident &incident) override
Reimplements from IIncidentListener.
Definition:
IncidentAsyncTestSvc.cpp:53
Property.h
GaudiTestSuite
src
IncidentSvc
IncidentAsyncTestSvc.h
Generated on Thu Dec 19 2024 15:35:07 for The Gaudi Framework by
1.8.18