Back to the top page
Back to the upper page
Description
This class is a abstract base class for dealing with a data source.
Several methods such as TArtDataSource::Open, TArtDataSource::Close, TArtDataSource::Read andTArtDataSource::GetNextBlock shoud be implemented in each derived class.
The derived class itself might be a singleton.
Function members
protected
- TArtDataSource (int id = 0)
- TArtDataFormat *fFormat
- int fID
- ArtBlockStat_t fBlockStatus
- ArtFileStat_t fFileStatus
- ArtDataSource_t fDataSourceType
public
- static const int kMaxBufferSize = 128 * 1024 = 128kByte
- virtual ~TArtDataSource()
- virtual bool SMOpen(const int sid = 0)
- virtual bool FileOpen(const char* sourceName = 0)
- virtual int GetRunNumber() = 0
- virtual void Close() = 0
- virtual int Read ( char *buf, const int& size, const int &offset =0) = 0
- virtual int Seek ( long offset, int origin) = 0
- virtual int IsPrepared()
- virtual int Wait()
- void SetBlockStatus( ArtBlockStat_t estat)
- void SetFileStatus ( ArtFileStat_t estat)
- ArtBlockStat_t GetBlockStatus()
- ArtFileStat_t GetFileStatus()
- ArtDataSource_t GetDataSourceType()
private
Function documents
- TArtDataSource(int id)
Assign id to fID.
- virtual bool SMOpen(const int sid)
Return false.
- virtual bool FileOpen(const char* sourceName)
Return false.
- virtual int IsPrepared()
Mainly for shared memory data source to check data exists or not and lock semaphore.
Always return 1.
- virtual int Wait()
Mainly for shared memory data source to unlock semaphore.
Always return 1.
Last-modified: Sun, 28 Oct 2012 22:02:11 HADT (4363d)