SFrame 3.6
|
00001 // Dear emacs, this is -*- c++ -*- 00002 // $Id: SCycleOutput.h 191 2010-08-04 08:00:45Z krasznaa $ 00003 /*************************************************************************** 00004 * @Project: SFrame - ROOT-based analysis framework for ATLAS 00005 * @Package: Core 00006 * 00007 * @author Stefan Ask <Stefan.Ask@cern.ch> - Manchester 00008 * @author David Berge <David.Berge@cern.ch> - CERN 00009 * @author Johannes Haller <Johannes.Haller@cern.ch> - Hamburg 00010 * @author A. Krasznahorkay <Attila.Krasznahorkay@cern.ch> - CERN/Debrecen 00011 * 00012 ***************************************************************************/ 00013 00014 #ifndef SFRAME_CORE_SCycleOutput_H 00015 #define SFRAME_CORE_SCycleOutput_H 00016 00017 // ROOT include(s): 00018 #include <TNamed.h> 00019 #include <TString.h> 00020 00021 // Local include(s): 00022 #include "SError.h" 00023 #include "SLogger.h" 00024 00025 // Forward declaration(s): 00026 class TCollection; 00027 class TDirectory; 00028 00043 class SCycleOutput : public TNamed { 00044 00045 public: 00047 SCycleOutput( TObject* object = 0, const char* name = "", 00048 const char* path = "" ); 00050 virtual ~SCycleOutput(); 00051 00053 TObject* GetObject() const; 00055 void SetObject( TObject* object ); 00056 00058 const TString& GetPath() const; 00060 void SetPath( const TString& path ); 00061 00063 Int_t Merge( TCollection* list ); 00065 virtual Int_t Write( const char* name = 0, Int_t option = 0, 00066 Int_t bufsize = 0 ) const; 00068 virtual Int_t Write( const char* name = 0, Int_t option = 0, 00069 Int_t bufsize = 0 ); 00070 00071 private: 00073 TDirectory* MakeDirectory( const TString& path ) const throw( SError ); 00074 00076 TObject* m_object; 00078 TString m_path; 00079 00081 mutable SLogger m_logger; 00082 00083 #ifndef DOXYGEN_IGNORE 00084 ClassDef( SCycleOutput, 1 ); 00085 #endif // DOXYGEN_IGNORE 00086 00087 }; // class SCycleOutput 00088 00089 #endif // SFRAME_CORE_SCycleOutput_H