FACT++  1.0
bool zofits::WriteBufferToDisk ( const WriteTarget target)
inlineprotected

Write one compressed tile to disk. This is the method executed by the writing thread

Parameters
targetthe struct hosting the write parameters

Definition at line 732 of file zofits.h.

References zofits::WriteTarget::data, zofits::WriteTarget::size, and zofits::WriteTarget::tile_num.

733  {
734  //is this the tile we're supposed to write ?
735  if (target.tile_num != (uint32_t)(fLatestWrittenTile+1))
736  return false;
737 
739 
740 #ifdef __EXCEPTIONS
741  try
742  {
743 #endif
744  //could not write the data to disk
745  if (!writeCompressedDataToDisk(target.data.get(), target.size))
746  fErrno = errno;
747 #ifdef __EXCEPTIONS
748  }
749  catch (...)
750  {
751  fThreadsException = std::current_exception();
752  if (fNumQueues == 0)
753  std::rethrow_exception(fThreadsException);
754  }
755 #endif
756  return true;
757  }
int32_t fNumQueues
Current number of threads that will be used by this object.
Definition: zofits.h:969
int fErrno
propagate errno to main thread
Definition: zofits.h:1011
std::exception_ptr fThreadsException
exception pointer to store exceptions coming from the threads
Definition: zofits.h:1010
bool writeCompressedDataToDisk(char *src, const uint32_t sizeToWrite)
Definition: zofits.h:656
int32_t fLatestWrittenTile
Index of the last tile written to disk (for correct ordering while using several threads) ...
Definition: zofits.h:971