//
//  The version of the class should be changed every time
//  when any changes in the codes are done
//  Grigory Nigmatkulov: 2016/12/15
//
#ifndef StO97DstMaker_h
#define StO97DstMaker_h

#include "StO97Track.h"
#include "StO97Event.h"
#include "StMaker.h"
#include "TTree.h"
#include "TFile.h"
#include "TChain.h"
#include "TSystem.h"

//_________________
class StO97DstMaker : public StMaker {
  
 private:
  
  const Char_t *mOutFileName;
  const Char_t *mInFileName;
  TFile *mOutFile;
  FILE  *mInFile;
  TTree *mTree;
  Int_t  mCompression;
  
  Bool_t mStop;
  Int_t  mNBytes;
  Int_t  mNEvents;
  char   mBuf[128]; // buffer for general read purposes
  
  StO97Event *mEvent;

  Bool_t ReadEvent();
  Bool_t ReadTracks();
  
 public:
  
  StO97DstMaker(const Char_t *iFileName,
		const Char_t *oFileName);
  ~StO97DstMaker();

  void  Clear(Option_t *option = "") { StMaker::Clear(option); }
  Int_t Init();
  Int_t Make();
  Int_t Finish();

  Bool_t IsStop() { return mStop; }
  void SetCompressionlevel(Int_t comp);

  ClassDef(StO97DstMaker, 1)
};

#endif
