#ifndef MRAWFILEREAD_H
#define MRAWFILEREAD_H

#ifndef MTASK_H
#include "MTask.h"
#endif

class ifstream;

class MTime;
class MParList;
class MRawRunHeader;
class MRawEvtHeader;
class MRawEvtData;
class MRawCrateArray;

class MRawFileRead : public MTask
{
private:
    MRawRunHeader  *fRawRunHeader;  // run header information container to fill from file
    MRawEvtHeader  *fRawEvtHeader;  // event header information container to fill from file
    MRawEvtData    *fRawEvtData;    // raw evt header infomation container to fill from file
    MRawCrateArray *fRawCrateArray; // crate information array container to fill from file
    MTime          *fRawEvtTime;    // raw evt time information container to fill from file

    ifstream       *fIn;            //! buffered input stream (file to read from)

public:
    MRawFileRead(const char *filename, const char *name=NULL, const char *title=NULL);
    ~MRawFileRead();

    Bool_t PreProcess(MParList *pList);
    Bool_t Process();

    ClassDef(MRawFileRead, 0)	// Task to read the raw data binary file
};

#endif
