00001 // -*- C++ -*- 00002 // 00003 // Package: UtilAlgos 00004 // Class : TH1AddDirectorySentry 00005 // 00006 // Implementation: 00007 // <Notes on implementation> 00008 // 00009 // Original Author: Chris Jones 00010 // Created: Thu Nov 8 12:16:02 EST 2007 00011 // $Id: TH1AddDirectorySentry.cc,v 1.1 2010/01/05 14:21:14 hegner Exp $ 00012 // 00013 00014 // system include files 00015 #include "TH1.h" 00016 00017 // user include files 00018 #include "CommonTools/Utils/interface/TH1AddDirectorySentry.h" 00019 00020 00021 // 00022 // constants, enums and typedefs 00023 // 00024 00025 // 00026 // static data member definitions 00027 // 00028 00029 // 00030 // constructors and destructor 00031 // 00032 TH1AddDirectorySentry::TH1AddDirectorySentry(): 00033 status_(TH1::AddDirectoryStatus()) 00034 { 00035 TH1::AddDirectory(true); 00036 } 00037 00038 TH1AddDirectorySentry::~TH1AddDirectorySentry() 00039 { 00040 TH1::AddDirectory(status_); 00041 } 00042