CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RawFile.h
Go to the documentation of this file.
1 #ifndef DaqSource_RawFile_h
2 #define DaqSource_RawFile_h
3 
11 #include <iostream>
12 //#include <boost/cstdint.hpp>
13 
14 class RawFile {
15  public:
17  RawFile();
18 
20  RawFile(const char* path);
21 
23  RawFile* open(const char* path);
24 
26  int close();
27 
29  virtual ~RawFile();
30 
32  FILE* GetPointer();
33 
35  bool ok();
36 
38  bool fail();
39 
41  bool isRFIO();
42 
44  int read(void* data, size_t nbytes);
45 
47  int seek(long offset, int whence);
48 
50  int ignore(long offset);
51 
53  int eof();
54 
56  long tell();
57 
58  private:
59 
60  FILE* inputFile;
61  bool rfioFlag;
62 
63 };
64 #endif
65 
66 
67 
bool ok()
It is OK (i.e. file was correctly opened)
Definition: RawFile.cc:76
RawFile * open(const char *path)
Open file.
Definition: RawFile.cc:27
virtual ~RawFile()
Destructor.
Definition: RawFile.cc:72
bool fail()
It is not OK.
Definition: RawFile.cc:78
int read(void *data, size_t nbytes)
Read from file.
Definition: RawFile.cc:82
long tell()
Tell instruction.
Definition: RawFile.cc:108
FILE * GetPointer()
Get file pointer.
Definition: RawFile.cc:74
bool rfioFlag
Definition: RawFile.h:61
list path
Definition: scaleCards.py:51
bool isRFIO()
Castor flag.
Definition: RawFile.cc:80
int close()
Close file if necessary.
Definition: RawFile.cc:60
int seek(long offset, int whence)
Go somewhere.
Definition: RawFile.cc:90
unsigned int offset(bool)
int eof()
Check end of file.
Definition: RawFile.cc:100
int ignore(long offset)
Ignore some bytes.
Definition: RawFile.cc:98
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
FILE * inputFile
Definition: RawFile.h:60
RawFile()
Default constructor.
Definition: RawFile.cc:21