11 #include <XrdPosix/XrdPosixExtern.hh> 22 std::unique_ptr<char[]> chaux{
new char[strlen(
path) + 1]};
23 strcpy(chaux.get(),
path);
25 char*
prefix = strtok_r(chaux.get(),
":", &saveptr);
30 filename = strtok_r(
nullptr,
":", &saveptr);
33 if (strcmp(
prefix,
"root") == 0)
44 cout <<
"RawFile: the input file '" <<
path <<
"' is not present" << endl;
46 cout <<
"RawFile: DAQ file '" <<
path <<
"' was succesfully opened" << endl;
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.