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

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

- Search for |

- File List
- File Members

# GFALDataStreamTool.h

Go to the documentation of this file.

    00001 // $Id: GFALDataStreamTool.h,v 1.1.1.1 2007/01/15 12:22:56 hmd Exp $
    00002 #ifndef GAUDIGRIDSVC_GFALDATASTREAMTOOL_H
    00003 #define GAUDIGRIDSVC_GFALDATASTREAMTOOL_H 1
    00004
    00005 // Include files
    00006
    00007 #include <vector>
    00008
    00009 // Local
    00010 #include "GFALStageBlock.h"
    00011
    00012 // from Gaudi
    00013 #include "GaudiKernel/Service.h"
    00014 #include "GaudiKernel/IEvtSelector.h"
    00015 #include "GaudiKernel/EventSelectorDataStream.h"
    00016 #include "GaudiKernel/DataStreamTool.h"
    00017
    00018
    00019
    00032 //class DataStreamTool;
    00033
    00034 class GFALDataStreamTool : virtual public DataStreamTool {
    00035 public:
    00036
    00037   enum Status {UNKNOWN=0,STGING,DONE};
    00038
    00040   GFALDataStreamTool( const std::string& type,
    00041                       const std::string& name,
    00042                       const IInterface* parent);
    00043
    00044   virtual ~GFALDataStreamTool( );
    00045
    00046   virtual StatusCode initialize();
    00047
    00048   virtual StatusCode finalize();
    00049
    00050   virtual StatusCode addStreams(const StreamSpecs &);
    00051
    00052   virtual StatusCode getNextStream( const EventSelectorDataStream* &, size_type & );
    00053
    00054 protected:
    00055
    00056   StatusCode updateStreams( const std::string & , const std::string & );
    00057
    00058 private:
    00059
    00060   size_type m_turlCount;
    00061
    00062   StreamSpecs m_streamTurls;
    00063
    00064   StatusCode setBlocks();
    00065
    00066   StatusCode firstBlockStage();
    00067
    00068   StatusCode nextBlockStage();
    00069
    00070   StatusCode updateBlockStatus();
    00071
    00072   StatusCode updateBlockStatus(GFALStageBlock *);
    00073
    00074   StatusCode updateStreamTurls();
    00075
    00076   void addBlock(GFALStageBlock *);
    00077
    00078   std::vector<GFALStageBlock*> m_blocks ;
    00079
    00080   std::vector<GFALStageBlock*>::iterator m_blockitr;
    00081
    00082   long int m_pos;
    00083
    00084   size_t m_blockindex ;
    00086   size_t m_ntotblocks ;
    00088   size_t m_blocksize ;
    00090   size_t m_initstage ;
    00092   size_t m_readfile ;
    00094
    00095   int m_atblock ;
    00096
    00097   Status m_task;
    00098
    00099 };
    00100 #endif // GAUDIGRIDSVC_GFALDATASTREAMTOOL_H