ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaExamples
AthExHive
src
HiveExSvc.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
9
10
11
#ifndef HIVEEXSVC_H
12
#define HIVEEXSVC_H 1
13
14
#include "
AthExHive/IHiveExSvc.h
"
15
#include "GaudiKernel/ContextSpecificPtr.h"
16
#include "
AthenaBaseComps/AthService.h
"
17
18
#include <string>
19
#include <vector>
20
#include <list>
21
#include <mutex>
22
#include <memory>
23
24
class
HiveExSvc
:
public
extends<AthService,IHiveExSvc> {
25
26
public
:
27
HiveExSvc
(
const
std::string& name, ISvcLocator* svc);
28
virtual
~HiveExSvc
();
29
30
virtual
StatusCode
initialize
()
override
;
31
virtual
StatusCode
finalize
()
override
;
32
33
virtual
void
add
(
const
EventContext&,
const
std::string&,
const
unsigned
int
&)
override
;
34
35
private
:
36
37
// data structure to hold timing info
38
struct
tDat
{
39
tDat
(
const
std::string& n,
const
unsigned
int
& t):
algName
(n),
sleep_time
(t){};
40
std::string
algName
{
""
};
41
unsigned
int
sleep_time
{0};
42
};
43
44
// vector of time data, one entry per event slot
45
std::vector< std::list<tDat> >
m_times
;
46
47
// can't use a simple vector of mutexes, as the aren't copy/move
48
// contructible
49
std::vector< std::unique_ptr<std::mutex> >
m_locks
;
50
51
};
52
53
#endif
AthService.h
IHiveExSvc.h
Abstract Interface class for HiveExSvc, that accumualtes Algorithm run times by name.
HiveExSvc::~HiveExSvc
virtual ~HiveExSvc()
HiveExSvc::add
virtual void add(const EventContext &, const std::string &, const unsigned int &) override
Definition
HiveExSvc.cxx:77
HiveExSvc::m_locks
std::vector< std::unique_ptr< std::mutex > > m_locks
Definition
HiveExSvc.h:49
HiveExSvc::m_times
std::vector< std::list< tDat > > m_times
Definition
HiveExSvc.h:45
HiveExSvc::HiveExSvc
HiveExSvc(const std::string &name, ISvcLocator *svc)
Definition
HiveExSvc.cxx:14
HiveExSvc::finalize
virtual StatusCode finalize() override
Definition
HiveExSvc.cxx:46
HiveExSvc::initialize
virtual StatusCode initialize() override
Definition
HiveExSvc.cxx:24
HiveExSvc::tDat::tDat
tDat(const std::string &n, const unsigned int &t)
Definition
HiveExSvc.h:39
HiveExSvc::tDat::sleep_time
unsigned int sleep_time
Definition
HiveExSvc.h:41
HiveExSvc::tDat::algName
std::string algName
Definition
HiveExSvc.h:40
Generated on
for ATLAS Offline Software by
1.17.0