TH1AddDirectorySentry

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
#ifndef CommonTools_Utils_TH1AddDirectorySentry_h
#define CommonTools_Utils_TH1AddDirectorySentry_h
// -*- C++ -*-
//
// Package:     UtilAlgos
// Class  :     TH1AddDirectorySentry
//
/**\class TH1AddDirectorySentry TH1AddDirectorySentry.h CommonTools/UtilAlgos/interface/TH1AddDirectorySentry.h

 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.

*/
//
// Original Author:  Chris Jones
//         Created:  Thu Nov  8 12:16:13 EST 2007
// $Id: TH1AddDirectorySentry.h,v 1.1 2009/03/03 13:07:28 llista Exp $
//

class TH1AddDirectorySentry {
public:
  TH1AddDirectorySentry();
  ~TH1AddDirectorySentry();

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

private:
  bool status_;
};

#endif