/** \file Reader for CONEX generated shower profiles \author Ralf Ulrich \version $Id: CONEXFile.h 16394 2010-05-05 13:59:38Z munger $ \date Thu Apr 7 16:46:28 CEST 2005 */ #ifndef _io_CONEXFile_h_ #define _io_CONEXFile_h_ static const char CVSId_io_CONEXFile[] = "$Id: CONEXFile.h 16394 2010-05-05 13:59:38Z munger $"; #include #include namespace evt { class Event; } // root forward-decl class TFile; class TTree; namespace io { class CONEXHeader; class CONEXShower; /** \class CONEXFile CONEXFile.h "io/CONEXFile.h" \brief Read profiles from CONEX \author Ralf Ulrich \date Thu Apr 7 16:47:01 CEST 2005 \ingroup conex */ class CONEXFile : public VEventFile { public: CONEXFile(); CONEXFile(const std::string& theFileName, const Mode theMode = eRead); virtual ~CONEXFile(); virtual void Open(const std::string& theFileName, const Mode theMode = eRead); virtual void Close(); virtual Status Read(evt::Event& theEvent); virtual void Write(const evt::Event& theEvent); virtual Status FindEvent(const unsigned int eventId); virtual Status GotoPosition(const unsigned int position); virtual int GetNEvents(); /// Get CONEXFileParticleIterator for testing //CONEXFileParticleIterator* //GetCONEXFileParticleIterator() const; private: void MapHeader(const float Version); void MapShower(const float Version); virtual int NextEntry(); TFile* fFile; TTree* fShowerTree; TTree* fHeaderTree; CONEXShower* fShower; CONEXHeader* fHeader; double fFirstGrammageBin; float fVersion; float fROOTVersion; //positionVector fPositionToRaw; // positionVector fPositionOfEventTrailer; //idToPositionMap fIdToPosition; unsigned int fCurrentPosition; //CONEXFileParticleIterator* fParticleIterator; }; } #endif // Configure (x)emacs for this file ... // Local Variables: // mode: c++ // compile-command: "make -C .. -k" // End: