ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
xAOD::TDirectoryReset Class Reference

Helper class for making sure the current directory is preserved. More...

#include <TDirectoryReset.h>

Collaboration diagram for xAOD::TDirectoryReset:

Public Member Functions

 TDirectoryReset (::TDirectory *dir=gDirectory)
 Constructor with the current directory. More...
 
 ~TDirectoryReset ()
 Destructor. More...
 

Private Attributes

::TDirectory * m_dir
 The directory that we need to return to. More...
 

Detailed Description

Helper class for making sure the current directory is preserved.

This class is used in the code to make sure that whenever a function call returns to the user, the current directory (gDirectory) would be the same as it was before the function call. Otherwise the user can have a few surprises...

Author
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
Revision
597264
Date
2014-05-15 17:52:37 +0200 (Thu, 15 May 2014)

Definition at line 28 of file TDirectoryReset.h.

Constructor & Destructor Documentation

◆ TDirectoryReset()

xAOD::TDirectoryReset::TDirectoryReset ( ::TDirectory *  dir = gDirectory)
inline

Constructor with the current directory.

Definition at line 32 of file TDirectoryReset.h.

32 : m_dir( dir ) {}

◆ ~TDirectoryReset()

xAOD::TDirectoryReset::~TDirectoryReset ( )
inline

Destructor.

Definition at line 34 of file TDirectoryReset.h.

34 { if( m_dir ) m_dir->cd(); }

Member Data Documentation

◆ m_dir

::TDirectory* xAOD::TDirectoryReset::m_dir
private

The directory that we need to return to.

Definition at line 38 of file TDirectoryReset.h.


The documentation for this class was generated from the following file:
beamspotman.dir
string dir
Definition: beamspotman.py:623
xAOD::TDirectoryReset::m_dir
::TDirectory * m_dir
The directory that we need to return to.
Definition: TDirectoryReset.h:38