The Gaudi Framework  master (37c0b60a)
RootUtils.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIROOTCNV_ROOTUTILS_H
12 #define GAUDIROOTCNV_ROOTUTILS_H
13 
14 // Framework include files
15 // #include "GaudiKernel/DataObject.h"
16 
17 // Forward declarations
18 class DataObject;
19 
20 // Functions imported from GaudiKernel
21 namespace GaudiRoot {
22  void popCurrentDataObject();
23  void pushCurrentDataObject( DataObject** pobjAddr );
24 } // namespace GaudiRoot
25 
26 namespace {
27 
37  struct DataObjectPush {
39  DataObject* m_p;
41  DataObjectPush( DataObject* p ) : m_p( p ) { GaudiRoot::pushCurrentDataObject( &m_p ); }
43  ~DataObjectPush() { GaudiRoot::popCurrentDataObject(); }
44  };
45 } // namespace
46 
47 #endif // GAUDIROOTCNV_ROOTUTILS_H
GaudiRoot
Definition: RootCnvSvc.cpp:49
GaudiRoot::popCurrentDataObject
void popCurrentDataObject()
Definition: RootIOHandler.cpp:48
GaudiRoot::pushCurrentDataObject
void pushCurrentDataObject(DataObject **pobjAddr)
Definition: RootIOHandler.cpp:44
DataObject
Definition: DataObject.h:36