File indexing completed on 2024-04-06 12:19:14
0001 #ifndef DaqSource_RawFile_h
0002 #define DaqSource_RawFile_h
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <iostream>
0012
0013
0014 class RawFile {
0015 public:
0016
0017 RawFile();
0018
0019
0020 RawFile(const char* path);
0021
0022
0023 RawFile* open(const char* path);
0024
0025
0026 int close();
0027
0028
0029 virtual ~RawFile();
0030
0031
0032 FILE* GetPointer();
0033
0034
0035 bool ok();
0036
0037
0038 bool fail();
0039
0040
0041 bool isRFIO();
0042
0043
0044 bool isXROOTD();
0045
0046
0047 int read(void* data, size_t nbytes);
0048
0049
0050 int seek(long offset, int whence);
0051
0052
0053 int ignore(long offset);
0054
0055
0056 int eof();
0057
0058
0059 long tell();
0060
0061 private:
0062 FILE* inputFile;
0063 bool xrootdFlag;
0064 };
0065 #endif