14 extern int rfio_fread(
void*,
size_t,
size_t,
void*);
31 char* chaux =
new char[strlen(path)+1];
33 char*
prefix = strtok(chaux,
":");
37 if (strlen(prefix)<strlen(path)) filename = strtok(0,
":");
40 if (strcmp(prefix,
"rfio")==0)
rfioFlag =
true;
41 if (strcmp(prefix,
"castor")==0)
rfioFlag =
true;
51 cout <<
"RawFile: the input file '" << filename <<
"' is not present" << endl;
53 cout <<
"RawFile: DAQ file '" << filename <<
"' was succesfully opened" << endl;
bool ok()
It is OK (i.e. file was correctly opened)
int rfio_fread(void *, size_t, size_t, void *)
long rfio_ftell(FILE *fp)
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 rfio_fclose(FILE *fd)
bool isRFIO()
Castor flag.
int close()
Close file if necessary.
int seek(long offset, int whence)
Go somewhere.
unsigned int offset(bool)
FILE * rfio_fopen(char *path, char *mode)
int eof()
Check end of file.
int ignore(long offset)
Ignore some bytes.
char data[epos_bytes_allocation]
int rfio_fseek(FILE *fp, long offset, int whence)
RawFile()
Default constructor.