// ---------------------------------------------------------------------------- // $Id: LCDreadRootFile.h,v 1.3 2001/06/19 16:55:36 toshi Exp $ // ---------------------------------------------------------------------------- // // $Log: LCDreadRootFile.h,v $ // Revision 1.3 2001/06/19 16:55:36 toshi // Just add $ID: $ in the top of this file. // // Revision 1.2 2001/05/07 23:23:11 toshi // Bug fix. // GetEvent(LCDEvent* event) was wrong. Initialize it as // GetEvent(LCDEvent* event=0). // // Adapted from similar file in Gismo 2 // // define the HEPEVT commom // #ifndef LCDREADROOTFILE_H #define LCDREADROOTFILE_H //#include #include "TFile.h" #include "TTree.h" #include "LCDEventSource.h" class LCDreadRootFile : public LCDEventSource { public: LCDreadRootFile(Char_t* rootFileName, LCDEvent* event=0); // constructor ~LCDreadRootFile(); Int_t GetEvent(LCDEvent* event=0); // creates structure with next event Int_t GetEvent(Int_t ievt, LCDEvent* event=0); // creates structure with given event # Int_t GetEventNumber() { return m_nEvent; } void SetEventNumber(Int_t a) { m_nEvent = a; } private: Char_t* m_rootFileName; // input Root filename TFile* m_rootFile; // Root TFile TTree* T; // Root TTree Bool_t m_ownevent; Int_t m_nEvent; // current event number in file public: ClassDef(LCDreadRootFile,0) }; #endif