CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

TH1AddDirectorySentry Class Reference

#include <CommonTools/UtilAlgos/interface/TH1AddDirectorySentry.h>

List of all members.

Public Member Functions

 TH1AddDirectorySentry ()
 ~TH1AddDirectorySentry ()

Private Member Functions

TH1AddDirectorySentryoperator= (const TH1AddDirectorySentry &)
 TH1AddDirectorySentry (const TH1AddDirectorySentry &)

Private Attributes

bool status_

Detailed Description

Description: Manages the status of the ROOT directory

Usage: Construct an instance of this object in a routine in which you expect a ROOT histogram to be automatically added to the current directory in a file. The destructor will be sure to reset ROOT to its previous setting.

Definition at line 24 of file TH1AddDirectorySentry.h.


Constructor & Destructor Documentation

TH1AddDirectorySentry::TH1AddDirectorySentry ( )

Definition at line 32 of file TH1AddDirectorySentry.cc.

                                            :
   status_(TH1::AddDirectoryStatus())
{
   TH1::AddDirectory(true);
}
TH1AddDirectorySentry::~TH1AddDirectorySentry ( )

Definition at line 38 of file TH1AddDirectorySentry.cc.

References status_.

{
   TH1::AddDirectory(status_);
}
TH1AddDirectorySentry::TH1AddDirectorySentry ( const TH1AddDirectorySentry ) [private]

Member Function Documentation

TH1AddDirectorySentry& TH1AddDirectorySentry::operator= ( const TH1AddDirectorySentry ) [private]

Member Data Documentation

Definition at line 35 of file TH1AddDirectorySentry.h.

Referenced by ~TH1AddDirectorySentry().