ATLAS Offline Software
Loading...
Searching...
No Matches
CurrentEventStore.icc
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4/**
5 * @file SGTools/CurrentEventStore.icc
6 * @author scott snyder <snyder@bnl.gov>
7 * @date Apr, 2015
8 * @brief Hold a pointer to the current event store.
9 */
10
11
12namespace SG {
13/**
14 * @brief Fetch the current store.
15 */
16inline
17IProxyDict* CurrentEventStore::store()
18{
19 return m_curStore;
20}
21
22
23/**
24 * @brief Temporarily change the current event store.
25 */
26inline
27CurrentEventStore::Push::Push (IProxyDict* store)
28 : m_oldStore (setStore (store))
29{
30 // Only need up update the context if we're actually changing the store.
31 if (m_oldStore != store) {
32 storeToCtx (store);
33 }
34}
35
36
37/**
38 * @brief Restore the current event store.
39 */
40inline
41CurrentEventStore::Push::~Push()
42{
43 // Only need up update the context if we're actually changing the store.
44 if (m_oldStore != m_curStore) {
45 storeToCtx (m_oldStore);
46 }
47 setStore (m_oldStore);
48}
49
50
51} // namespace SG