Project
Loading...
Searching...
No Matches
o2::framework::TTreeDeferredReadOutputStream Class Reference

Inherits arrow::io::OutputStream.

Public Member Functions

 TTreeDeferredReadOutputStream (std::vector< ReadOps > &ops, const std::shared_ptr< arrow::ResizableBuffer > &buffer)
 
 ~TTreeDeferredReadOutputStream () override=default
 
arrow::Status Close () override
 Close the stream, preserving the buffer (retrieve it with Finish()).
 
bool closed () const override
 
arrow::Result< int64_t > Tell () const override
 
arrow::Status Write (const void *data, int64_t nbytes) override
 
arrow::Result< std::shared_ptr< arrow::Buffer > > Finish ()
 Close the stream and return the buffer.
 
arrow::Status Reset (std::vector< ReadOps > ops, int64_t initial_capacity, arrow::MemoryPool *pool)
 Initialize state of OutputStream with newly allocated memory and set position to 0.
 
int64_t capacity () const
 

Static Public Member Functions

static arrow::Result< std::shared_ptr< TTreeDeferredReadOutputStream > > Create (std::vector< ReadOps > &ops, int64_t initial_capacity=4096, arrow::MemoryPool *pool=arrow::default_memory_pool())
 Create in-memory output stream with indicated capacity using a memory pool.
 

Detailed Description

An OutputStream which does the reading of the input buffers directly on writing, if needed. Each deferred operation is encoded in the source buffer by an incremental number which can be used to lookup in the ops vector the operation to perform.

Definition at line 69 of file TTreePlugin.cxx.

Constructor & Destructor Documentation

◆ TTreeDeferredReadOutputStream()

o2::framework::TTreeDeferredReadOutputStream::TTreeDeferredReadOutputStream ( std::vector< ReadOps > &  ops,
const std::shared_ptr< arrow::ResizableBuffer > &  buffer 
)
explicit

Definition at line 135 of file TTreePlugin.cxx.

◆ ~TTreeDeferredReadOutputStream()

o2::framework::TTreeDeferredReadOutputStream::~TTreeDeferredReadOutputStream ( )
overridedefault

Member Function Documentation

◆ capacity()

int64_t o2::framework::TTreeDeferredReadOutputStream::capacity ( ) const
inline

Definition at line 114 of file TTreePlugin.cxx.

◆ Close()

arrow::Status o2::framework::TTreeDeferredReadOutputStream::Close ( )
override

Close the stream, preserving the buffer (retrieve it with Finish()).

Definition at line 166 of file TTreePlugin.cxx.

◆ closed()

bool o2::framework::TTreeDeferredReadOutputStream::closed ( ) const
override

Definition at line 177 of file TTreePlugin.cxx.

◆ Create()

arrow::Result< std::shared_ptr< TTreeDeferredReadOutputStream > > o2::framework::TTreeDeferredReadOutputStream::Create ( std::vector< ReadOps > &  ops,
int64_t  initial_capacity = 4096,
arrow::MemoryPool *  pool = arrow::default_memory_pool() 
)
static

Create in-memory output stream with indicated capacity using a memory pool.

Parameters
[in]initial_capacitythe initial allocated internal capacity of the OutputStream
[in,out]poola MemoryPool to use for allocations
Returns
the created stream

Definition at line 144 of file TTreePlugin.cxx.

◆ Finish()

arrow::Result< std::shared_ptr< arrow::Buffer > > o2::framework::TTreeDeferredReadOutputStream::Finish ( )

Close the stream and return the buffer.

Definition at line 179 of file TTreePlugin.cxx.

◆ Reset()

arrow::Status o2::framework::TTreeDeferredReadOutputStream::Reset ( std::vector< ReadOps ops,
int64_t  initial_capacity,
arrow::MemoryPool *  pool 
)

Initialize state of OutputStream with newly allocated memory and set position to 0.

Parameters
[in]initial_capacitythe starting allocated capacity
[in,out]poolthe memory pool to use for allocations
Returns
Status

Definition at line 154 of file TTreePlugin.cxx.

◆ Tell()

arrow::Result< int64_t > o2::framework::TTreeDeferredReadOutputStream::Tell ( ) const
override

Definition at line 187 of file TTreePlugin.cxx.

◆ Write()

arrow::Status o2::framework::TTreeDeferredReadOutputStream::Write ( const void data,
int64_t  nbytes 
)
override

Definition at line 244 of file TTreePlugin.cxx.


The documentation for this class was generated from the following file: