--- yoda/techmodel/EventReader.h 2004/07/06 12:20:23 1.1.1.1 +++ yoda/techmodel/EventReader.h 2005/08/29 09:26:54 4.5 @@ -1,13 +1,14 @@ /** @file - * $Author: nagni $ - * $Date: 2004/03/16 10:18:28 $ - * $Revision: 1.6 $ + * $Author: kusanagi $ + * $Date: 2005/05/28 10:44:11 $ + * $Revision: 4.4 $ * * Header file for the algorithms used to read the techmodel data file. */ #include "TechmodelPamelaRun.h" #include "TechmodelAlgorithm.h" +#include "Exception.h" namespace pamela { namespace techmodel { @@ -34,14 +35,30 @@ * The Run that is processed. */ TechmodelPamelaRun *Run; //! - int UnpackPscuHeader(void) throw (std::exception); + void UnpackPscuHeader(void) throw (WrongCRCHeaderException, LengthException, BackwardCounterException); void UnpackPscuTrailer(void) throw (std::exception); - public: - EventReader(void); + + /** + maxPackets define the maximum number of packets + the user wants to get from the raw file. + By default is initialized to -1 (no limit) + */ + static unsigned int maxPackets; + + /** + prevPckCounter and prevPckOBT are used to check the + integrity of the raw file stream + */ + static unsigned int prevPckCounter; + static unsigned int prevPckOBT; + std::stringstream oss; + public: + //EventReader(void); + EventReader(int); virtual void Init(PamelaRun *); virtual void RunEvent(int); virtual std::string GetVersionInfo(void) const; - virtual int FindStart(void) throw (std::exception); + virtual bool FindStart(void) throw (std::exception); ClassDef(EventReader, 1) }; }