18#include <TFileCacheRead.h>
35 LOG(
error) <<
"Failed to open TF file for reading (mmap).";
42 madvise((
void*)
mFileMap.data(),
mFileMap.size(), MADV_HUGEPAGE | MADV_SEQUENTIAL | MADV_DONTDUMP);
78 LOGP(fatal,
"Requested buffer size {} exceeds max allowed {}",
s,
MaxBuffSize);
82 return const_cast<unsigned char*
>(
reinterpret_cast<const unsigned char*
>(
mFileMap.data() +
mFileOffset));
88 if (
len != lToIgnore) {
103 mFile.reset(TFile::Open(fmt::format(
"{}?filetype=raw",
name).c_str()));
105 LOGP(
error,
"Failed to open file {} for reading.",
name);
127 if (lToRead !=
len) {
137 LOGP(
debug,
"read_advance(fast) {} from {}", lToRead,
position());
139 std::memcpy(
ptr, lptr,
len);
142 LOGP(
debug,
"read_advance(slow) {} from {}", lToRead,
position());
143 if (
mFile->ReadBuffer(
reinterpret_cast<char*
>(
ptr), lToRead)) {
144 LOGP(
error,
"BinFileOpGrid: failed to read {} bytes from position {} of file {}, closing it", lToRead,
mFileOffset,
mFileName);
154 LOGP(fatal,
"Requested buffer size {} exceeds max allowed {}",
s,
MaxBuffSize);
169 LOGP(
error,
"BinFileOpGrid:bufferize failed to read {} bytes from position {} of file {}, closing it",
s,
mFileOffset,
mFileName);
179 if (
len != lToIgnore) {
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error s
char error[CURL_ERROR_SIZE]
bool ignore_nbytes(size_t len) override
std::vector< unsigned char > mBuffer
unsigned char * bufferize(size_t &s) override
std::unique_ptr< TFile > mFile
bool isGood() const override
bool read_advance(void *ptr, size_t len) override
void set_position(size_t pos) override
BinFileOpGrid(const std::string &name)
~BinFileOpLocal() override
bool read_advance(void *ptr, size_t len) override
bool ignore_nbytes(size_t len) override
boost::iostreams::mapped_file_source mFileMap
BinFileOpLocal(const std::string &name)
unsigned char * bufferize(size_t &s) override
static constexpr size_t MaxBuffSize
size_t distance_to_eof() const
static BinFileOp * open(const std::string &name)
virtual bool isGood() const =0
GLuint const GLchar * name
GLenum GLenum GLsizei len
static bool beginsWith(const std::string &s, const std::string &start)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"