CMS 3D CMS Logo

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  bool isXROOTD();
45 
47  int read(void* data, size_t nbytes);
48 
50  int seek(long offset, int whence);
51 
53  int ignore(long offset);
54 
56  int eof();
57 
59  long tell();
60 
61 private:
62  FILE* inputFile;
63  bool xrootdFlag;
64 };
65 #endif
RawFile::xrootdFlag
bool xrootdFlag
Definition: RawFile.h:63
RawFile::isRFIO
bool isRFIO()
Castor flag.
RawFile::inputFile
FILE * inputFile
Definition: RawFile.h:62
RawFile::GetPointer
FILE * GetPointer()
Get file pointer.
Definition: RawFile.cc:68
RawFile::eof
int eof()
Check end of file.
Definition: RawFile.cc:94
RawFile::isXROOTD
bool isXROOTD()
XROOTD flag.
Definition: RawFile.cc:74
RawFile::RawFile
RawFile()
Default constructor.
Definition: RawFile.cc:15
RawFile::tell
long tell()
Tell instruction.
Definition: RawFile.cc:98
RawFile::ignore
int ignore(long offset)
Ignore some bytes.
Definition: RawFile.cc:92
RawFile::open
RawFile * open(const char *path)
Open file.
Definition: RawFile.cc:19
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
RawFile::~RawFile
virtual ~RawFile()
Destructor.
Definition: RawFile.cc:66
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
RawFile::ok
bool ok()
It is OK (i.e. file was correctly opened)
Definition: RawFile.cc:70
RawFile::read
int read(void *data, size_t nbytes)
Read from file.
Definition: RawFile.cc:76
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:78
RawFile::seek
int seek(long offset, int whence)
Go somewhere.
Definition: RawFile.cc:84
RawFile::fail
bool fail()
It is not OK.
Definition: RawFile.cc:72
RawFile::close
int close()
Close file if necessary.
Definition: RawFile.cc:52
RawFile
Definition: RawFile.h:14