| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Search for |

- File List
- File Members

# GFALStageBlock.h

Go to the documentation of this file.

    00001 // $Id: GFALStageBlock.h,v 1.1.1.1 2007/01/15 12:22:56 hmd Exp $
    00002 #ifndef GAUDIGRIDSVC_GFALSTAGEBLOCK_H
    00003 #define GAUDIGRIDSVC_GFALSTAGEBLOCK_H 1
    00004
    00005 // Include files
    00006 #include <string>
    00007 #include <vector>
    00008 #include <iterator>
    00009
    00010 #include "GFALStageFile.h"
    00011
    00024 class GFALStageBlock {
    00025 public:
    00026
    00027   enum Status {UNKNOWN=0,STGING,STGED,FAILED} ;
    00028   enum FillStatus {EMPTY=0,FREE,FULL} ;
    00029
    00031   GFALStageBlock( );
    00032
    00033   virtual ~GFALStageBlock( );
    00034
    00035   GFALStageBlock(size_t nmaxfiles,IMessageSvc* ms) ;
    00036
    00037   StatusCode Stage() ;
    00038
    00039   StatusCode stageInitialize() ;
    00040
    00041   StatusCode stageFinalize() ;
    00042
    00043   StatusCode addFile(GFALStageFile *) ;
    00044
    00045   void updateStatus() ;
    00046
    00047   Status getStatus() const;
    00048
    00049   FillStatus getFillStatus() const ;
    00050
    00051   const std::string name() const { return std::string("StageBlock") ; }
    00052
    00053   IMessageSvc* msgSvc() const { return m_MS ; }
    00054
    00055   std::vector<GFALStageFile*> m_files ;
    00056
    00057
    00058 protected:
    00059
    00060 private:
    00061
    00062   void updateFillStatus() ;
    00063
    00064   size_t m_nfiles ;
    00065   size_t m_nmaxfiles;
    00066   int m_nprotocols;
    00067
    00068   std::vector<std::string> m_surls;
    00069   std::vector<std::string> m_protocols;
    00070
    00071   std::vector<int> m_failedAt;
    00072
    00073   //gfal srm_getx arguments:
    00074
    00075   char *ptr_surls[10000];
    00076   char *ptr_protocols[100];
    00077   char **m_tokens;
    00078   int m_reqid;
    00079   char *m_errbuf;
    00080   int m_errbufsz;
    00081   int m_timeout;
    00082
    00083   struct srm_filestatus *m_filestatuses;
    00084
    00085   Status m_status ;
    00086
    00087   FillStatus m_fillstatus ;
    00088
    00089   mutable IMessageSvc* m_MS ;
    00090
    00091
    00092 };
    00093 #endif // GAUDIGRIDSVC_GFALSTAGEBLOCK_H