SFrame 3.6
core/include/SCycleController.h
Go to the documentation of this file.
00001 // Dear emacs, this is -*- c++ -*-
00002 // $Id: SCycleController.h 331 2012-11-20 17:12:44Z 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_SCycleController_H
00015 #define SFRAME_CORE_SCycleController_H
00016 
00017 // STL include(s):
00018 #include <vector>
00019 
00020 // ROOT include(s):
00021 #include "TString.h"
00022 
00023 // Local include(s):
00024 #include "SLogger.h"
00025 #include "SError.h"
00026 
00027 // Forward declaration(s):
00028 class TProof;
00029 class ISCycleBase;
00030 
00045 class SCycleController {
00046 
00047 public:
00049    SCycleController( const TString& xmlConfigFile );
00051    virtual ~SCycleController();
00052 
00054    virtual void Initialize() throw( SError );
00056    virtual void ExecuteAllCycles() throw( SError );
00058    virtual void ExecuteNextCycle() throw( SError );
00060 
00065    virtual void SetConfig( const TString& xmlConfigFile ) { m_xmlConfigFile = xmlConfigFile; }
00066 
00068    void AddAnalysisCycle( ISCycleBase* cycleAlg );
00069 
00071    UInt_t GetCurCycle() { return m_curCycle; }
00072 
00073 private:
00075    void DeleteAllAnalysisCycles();
00076    void InitProof( const TString& server, const Int_t& nodes);
00077    void ShutDownProof();
00078    void WriteCycleOutput( TList* olist, const TString& filename,
00079                           const TString& config,
00080                           Bool_t update ) const;
00081 
00083    std::vector< ISCycleBase* > m_analysisCycles;
00085    std::vector< TString > m_parPackages;
00086 
00087    UInt_t  m_curCycle;
00088    Bool_t  m_isInitialized;
00089    TString m_xmlConfigFile;
00090 
00091    TProof* m_proof;
00092 
00093    mutable SLogger m_logger;
00094 
00095 }; // class SCycleController
00096 
00097 #endif // SFRAME_CORE_SCycleController_H