PSXtcInput/include/Index.h

Go to the documentation of this file.
00001 #ifndef PSXTCINPUT_INDEX_H
00002 #define PSXTCINPUT_INDEX_H
00003 
00004 #include <boost/cstdint.hpp>
00005 #include <vector>
00006 #include <queue>
00007 
00008 #include "psana/Index.h"
00009 #include "psana/Configurable.h"
00010 #include "PSXtcInput/DgramPieces.h"
00011 
00012 namespace PSXtcInput {
00013 
00014 /// @addtogroup PSXtcInput
00015 
00016 /**
00017  *  @ingroup PSXtcInput
00018  *
00019  *  @brief Interface to allow XTC file random access.
00020  *
00021  *  @version $Id: Index.h 7696 2014-02-27 00:40:59Z cpo@SLAC.STANFORD.EDU $
00022  *
00023  *  @author Christopher O'Grady
00024  */
00025 
00026 class IndexRun;
00027 class RunMap;
00028 
00029 class Index : public psana::Index, public psana::Configurable {
00030 public:
00031   Index(const std::string& name, std::queue<DgramPieces>& queue);
00032   ~Index();
00033   int jump(psana::EventTime t);
00034   void setrun(int run);
00035   void allowCorruptEpics();
00036   unsigned nsteps();
00037   void end();
00038   void times(psana::Index::EventTimeIter& begin, psana::Index::EventTimeIter& end);
00039   void times(unsigned nstep, psana::Index::EventTimeIter& begin, psana::Index::EventTimeIter& end);
00040   const std::vector<unsigned>& runs();
00041 private:
00042   std::vector<std::string> _fileNames;
00043   std::queue<DgramPieces>& _queue;
00044   IndexRun*                _idxrun;
00045   RunMap*                  _rmap;
00046   int                      _run;
00047   bool                     _allowCorruptEpics;
00048 };
00049 
00050 }
00051 
00052 #endif // PSXTCINPUT_INDEX_H

Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7