1 #ifndef _io_Corsika_RawFile_h_
2 #define _io_Corsika_RawFile_h_
4 #include <io/CorsikaBlock.h>
66 RawFile(
const std::string& name);
68 bool Open(
const std::string& name,
const bool noException =
false);
PositionType fCurrentBlockNumber
static const unsigned int kBlocksInDiskBlock
Padding bytes at the beginning of a raw block.
void Close()
Close file (no-op for closed file).
ThinnedDiskBlock fDiskThinnBlockBuffer
BlockUnthinned fBlock[kBlocksInDiskBlock]
initial padding - works also for size 0
bool GetNextBlock(Block &block)
Read one block and advance.
unsigned int fIndexInDiskBlock
bool IsOpen() const
Check if the file is open.
Block fBlock[kBlocksInDiskBlock]
initial padding - works also for size 0
bool GetNextBlockUnthinned(BlockUnthinned &block)
Read one block and advance.
void SeekTo(const PositionType position, const bool reset=false)
Seek to a given block, the next block will be thePosition.
std::ifstream fDiskStream
bool ReadDiskBlock(const bool thinned)
Read the block at the current position from disk.
PositionType GetNextPosition() const
Number of the block read by the next call to GetNextBlock.
bool Open(const std::string &name, const bool noException=false)
UnthinnedDiskBlock fDiskUnthinnBlockBuffer
unsigned long int PositionType