ATLAS Offline Software
Loading...
Searching...
No Matches
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
15#include "GaudiKernel/IHiveWhiteBoard.h"
16#include "GaudiKernel/ServiceHandle.h"
17
18
19
20namespace {
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
27namespace SG {
28
29
35void setNSlotsHiveMgrName ATLAS_NOT_THREAD_SAFE (const std::string& s)
36{
37 getNSlots_hiveMgrName = s;
38}
39
40
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
64size_t getNSlots()
65{
66 const static size_t nslots = getNSlots_once();
67 return nslots;
68}
69
70
71} // namespace SG
Maintain a set of objects, one per slot.
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
#define ATLAS_THREAD_SAFE
Forward declaration.
size_t getNSlots_once()
Return the number of event slots.
size_t getNSlots()
Return the number of event slots.