test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
TH1AddDirectorySentry Class Reference

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

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.

32  :
33  status_(TH1::AddDirectoryStatus())
34 {
35  TH1::AddDirectory(true);
36 }
TH1AddDirectorySentry::~TH1AddDirectorySentry ( )

Definition at line 38 of file TH1AddDirectorySentry.cc.

References status_.

39 {
40  TH1::AddDirectory(status_);
41 }
TH1AddDirectorySentry::TH1AddDirectorySentry ( const TH1AddDirectorySentry )
private

Member Function Documentation

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

Member Data Documentation

bool TH1AddDirectorySentry::status_
private

Definition at line 35 of file TH1AddDirectorySentry.h.

Referenced by ~TH1AddDirectorySentry().