evio  6.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
evio::FileCloserV4 Class Reference

Class used to close files, each in its own thread, to avoid slowing down while file splitting. More...

#include <EventWriterV4.h>

Public Member Functions

 FileCloserV4 (int poolSize)
 Constructor. More...
 
void close ()
 Close this object by ending all threads in pool. More...
 
void closeAsyncFile (std::shared_ptr< std::fstream > &afc, std::shared_ptr< std::future< void >> future)
 Close file given by filestream after pending write is finished. More...
 

Detailed Description

Class used to close files, each in its own thread, to avoid slowing down while file splitting.

Constructor & Destructor Documentation

◆ FileCloserV4()

evio::FileCloserV4::FileCloserV4 ( int  poolSize)
inline

Constructor.

Parameters
poolSizesize of pool of threads to close files.

Member Function Documentation

◆ close()

void evio::FileCloserV4::close ( )
inline

Close this object by ending all threads in pool.

◆ closeAsyncFile()

void evio::FileCloserV4::closeAsyncFile ( std::shared_ptr< std::fstream > &  afc,
std::shared_ptr< std::future< void >>  future 
)
inline

Close file given by filestream after pending write is finished.

Parameters
afcfile stream to close.
futureobject representing a write that is in progress.

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