ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fileEventiterator.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file fileEventiterator.h
1 // -*- c++ -*-
2 #ifndef __FILEEVENTITERATOR_H__
3 #define __FILEEVENTITERATOR_H__
4 
5 #include <stdio.h>
6 
7 #include "Eventiterator.h"
8 #include "Event.h"
9 
10 #include "gzbuffer.h"
11 #include "oncsBuffer.h"
12 
18 #ifndef __CINT__
20 #else
21 class fileEventiterator : public Eventiterator {
22 #endif
23 public:
24 
25  virtual ~fileEventiterator();
26 
28  fileEventiterator(const char *filename);
29 
35  fileEventiterator(const char *filename, int &status);
36 
37  const char * getIdTag() const;
38 
39  virtual void identify(std::ostream& os = std::cout) const;
40 
41  virtual const char * getCurrentFileName() const;
42 
47  Event *getNextEvent();
48 
49  int setVerbosity(const int v)
50  {
51  verbosity=v;
52  return 0;
53  };
54 
55  int getVerbosity() const
56  {
57  return verbosity;
58  };
59 
60 
61 private:
62  int open_file(const char *filename);
63  int read_next_buffer();
64 
65  char *thefilename;
66  int fd;
67 
69  unsigned int allocatedsize;
70 
73  unsigned int buffer_size;
75 
77  int verbosity;
78  int _defunct;
79 };
80 
81 #endif /* __FILEEVENTITERATOR_H__ */
82