ATLAS Offline Software
Loading...
Searching...
No Matches
CurrentEventStore.icc
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// $Id$
6/**
7 * @file SGTools/CurrentEventStore.icc
8 * @author scott snyder <snyder@bnl.gov>
9 * @date Apr, 2015
10 * @brief Hold a pointer to the current event store.
11 */
12
13
14namespace SG {
15/**
16 * @brief Fetch the current store.
17 */
18inline
19IProxyDict* CurrentEventStore::store()
20{
21 // Accessing a thread-local here is in some cases triggering
22 // an internal error in cling (as of root 6.06.06).
23 // Have cling call an out-of-line function for thread-local access
24 // rather than inlining it.
25#ifdef __CLING__
26 return storeOol();
27#else
28 return m_curStore;
29#endif
30}
31
32
33/**
34 * @brief Temporarily change the current event store.
35 */
36inline
37CurrentEventStore::Push::Push (IProxyDict* store)
38 : m_oldStore (setStore (store))
39{
40}
41
42
43/**
44 * @brief Restore the current event store.
45 */
46inline
47CurrentEventStore::Push::~Push()
48{
49 setStore (m_oldStore);
50}
51
52
53} // namespace SG