10 #include <XrdPosix/XrdPosixExtern.hh> 24 char* chaux =
new char[strlen(path)+1];
26 char*
prefix = strtok(chaux,
":");
30 if (strlen(prefix)<strlen(path)) filename = strtok(
nullptr,
":");
33 if (strcmp(prefix,
"root")==0)
xrootdFlag =
true;
43 cout <<
"RawFile: the input file '" << path <<
"' is not present" << endl;
45 cout <<
"RawFile: DAQ file '" << path <<
"' was succesfully opened" << endl;
77 return XrdPosix_Fread(data,nbytes,1,
inputFile);
85 return XrdPosix_Fseek(
inputFile, offset, whence);
bool ok()
It is OK (i.e. file was correctly opened)
RawFile * open(const char *path)
Open file.
virtual ~RawFile()
Destructor.
int read(void *data, size_t nbytes)
Read from file.
long tell()
Tell instruction.
FILE * GetPointer()
Get file pointer.
int close()
Close file if necessary.
int seek(long offset, int whence)
Go somewhere.
int eof()
Check end of file.
int ignore(long offset)
Ignore some bytes.
char data[epos_bytes_allocation]
RawFile()
Default constructor.
bool isXROOTD()
XROOTD flag.