CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TH1AddDirectorySentry Class Reference

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

Public Member Functions

TH1AddDirectorySentryoperator= (const TH1AddDirectorySentry &)=delete
 
 TH1AddDirectorySentry ()
 
 TH1AddDirectorySentry (const TH1AddDirectorySentry &)=delete
 
 ~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() [1/2]

TH1AddDirectorySentry::TH1AddDirectorySentry ( )

Definition at line 31 of file TH1AddDirectorySentry.cc.

31 : status_(TH1::AddDirectoryStatus()) { TH1::AddDirectory(true); }

◆ ~TH1AddDirectorySentry()

TH1AddDirectorySentry::~TH1AddDirectorySentry ( )

Definition at line 33 of file TH1AddDirectorySentry.cc.

References status_.

33 { TH1::AddDirectory(status_); }

◆ TH1AddDirectorySentry() [2/2]

TH1AddDirectorySentry::TH1AddDirectorySentry ( const TH1AddDirectorySentry )
delete

Member Function Documentation

◆ operator=()

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

Member Data Documentation

◆ status_

bool TH1AddDirectorySentry::status_
private

Definition at line 33 of file TH1AddDirectorySentry.h.

Referenced by ~TH1AddDirectorySentry().