FACT++  1.0
CompressionTarget zofits::InitNextCompression ( )
inline

Setup the environment to compress yet another tile of data

Parameters
targetthe struct where to host the produced parameters

Definition at line 393 of file zofits.h.

References zofits::WriteTarget::data, zofits::CompressionTarget::num_rows, zofits::WriteTarget::size, zofits::CompressionTarget::src, zofits::CompressionTarget::target, zofits::WriteTarget::tile_num, and zofits::CompressionTarget::transposed_src.

394  {
395  CompressionTarget target(AddOneCatalogRow());
396 
397  //fill up compression target
398  target.src = fSmartBuffer;
399  target.transposed_src = fMemPool.malloc();
400  target.num_rows = fTable.num_rows;
401 
402  //fill up write to disk target
403  WriteTarget &write_target = target.target;
404  write_target.tile_num = (fTable.num_rows-1)/fNumRowsPerTile;
405  write_target.size = 0;
406  write_target.data = fMemPool.malloc();
407 
408  //get a new buffer to host the incoming data
410 
411  return target;
412  }
std::shared_ptr< char > malloc(bool block=true)
MemoryManager fMemPool
Actual memory manager, providing memory for the compression buffers.
Definition: zofits.h:968
uint32_t fNumRowsPerTile
Number of rows per tile.
Definition: zofits.h:980
CatalogRow & AddOneCatalogRow()
Definition: zofits.h:292
Table fTable
Definition: ofits.h:327
size_t num_rows
Definition: ofits.h:307
std::shared_ptr< char > fSmartBuffer
Smart pointer to the buffer where the incoming rows are written.
Definition: zofits.h:1007