File indexing completed on 2025-08-03 08:20:45
0001
0002 #ifndef __FILEEVENTITERATOR_H__
0003 #define __FILEEVENTITERATOR_H__
0004
0005 #include <stdio.h>
0006
0007 #include "Eventiterator.h"
0008 #include "Event.h"
0009
0010 #include "gzbuffer.h"
0011 #include "oncsBuffer.h"
0012
0013
0014
0015
0016
0017
0018 #ifndef __CINT__
0019 class WINDOWSEXPORT fileEventiterator : public Eventiterator {
0020 #else
0021 class fileEventiterator : public Eventiterator {
0022 #endif
0023 public:
0024
0025 virtual ~fileEventiterator();
0026
0027
0028 fileEventiterator(const char *filename);
0029
0030
0031
0032
0033
0034
0035 fileEventiterator(const char *filename, int &status);
0036
0037 const char * getIdTag() const;
0038
0039 virtual void identify(std::ostream& os = std::cout) const;
0040
0041 virtual const char * getCurrentFileName() const;
0042
0043
0044
0045
0046
0047 Event *getNextEvent();
0048
0049 int setVerbosity(const int v)
0050 {
0051 verbosity=v;
0052 return 0;
0053 };
0054
0055 int getVerbosity() const
0056 {
0057 return verbosity;
0058 };
0059
0060
0061 private:
0062 int open_file(const char *filename);
0063 int read_next_buffer();
0064
0065 char *thefilename;
0066 int fd;
0067
0068 PHDWORD *bp;
0069 unsigned int allocatedsize;
0070
0071 int current_index;
0072 int last_read_status;
0073 unsigned int buffer_size;
0074 buffer *bptr;
0075
0076 int events_so_far;
0077 int verbosity;
0078 int _defunct;
0079 };
0080
0081 #endif
0082