ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaKernel
src
SlotSpecificObj.cxx
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
3
*/
4
// $Id$
11
12
13
#include "
AthenaKernel/SlotSpecificObj.h
"
14
#include "
CxxUtils/checker_macros.h
"
15
#include "GaudiKernel/IHiveWhiteBoard.h"
16
#include "GaudiKernel/ServiceHandle.h"
17
18
19
20
namespace
{
21
// Name of the service to use to find the number of slots.
22
std::string getNSlots_hiveMgrName
ATLAS_THREAD_SAFE
=
"EventDataSvc"
;
23
}
// anonymous namespace
24
25
26
27
namespace
SG
{
28
29
35
void
setNSlotsHiveMgrName
ATLAS_NOT_THREAD_SAFE
(
const
std::string& s)
36
{
37
getNSlots_hiveMgrName = s;
38
}
39
40
46
size_t
getNSlots_once
()
47
{
48
ServiceHandle<IInterface>
svc (getNSlots_hiveMgrName,
"getNSlots_once"
);
49
if
(!svc.retrieve().isSuccess())
50
return
1;
51
IHiveWhiteBoard* hivesvc =
dynamic_cast<
IHiveWhiteBoard*
>
(svc.get());
52
if
(!hivesvc)
return
1;
53
unsigned
int
nslots = hivesvc->getNumberOfStores();
54
if
(nslots < 1)
return
1;
55
return
nslots;
56
}
57
58
64
size_t
getNSlots
()
65
{
66
const
static
size_t
nslots =
getNSlots_once
();
67
return
nslots;
68
}
69
70
71
}
// namespace SG
SlotSpecificObj.h
Maintain a set of objects, one per slot.
checker_macros.h
Define macros for attributes used to control the static checker.
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition
checker_macros.h:212
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition
checker_macros.h:211
ServiceHandle
Definition
ClusterMakerTool.h:36
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
SG::getNSlots_once
size_t getNSlots_once()
Return the number of event slots.
Definition
SlotSpecificObj.cxx:46
SG::getNSlots
size_t getNSlots()
Return the number of event slots.
Definition
SlotSpecificObj.cxx:64
Generated on
for ATLAS Offline Software by
1.17.0