Classes | Public Member Functions | List of all members
OFstreamCollator Class Reference

Threaded file writer. More...

Public Member Functions

 TypeName ("OFstreamCollator")
 
 OFstreamCollator (const off_t maxBufferSize)
 Construct from buffer size. 0 = do not use thread. More...
 
 OFstreamCollator (const off_t maxBufferSize, const label comm)
 Construct from buffer size (0 = do not use thread) and local. More...
 
virtual ~OFstreamCollator ()
 Destructor. More...
 
bool write (const word &typeName, const fileName &, const string &data, IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, const bool append, const bool useThread=true)
 Write file with contents. Blocks until writethread has space. More...
 
void waitAll ()
 Wait for all thread actions to have finished. More...
 

Detailed Description

Threaded file writer.

Collects all data from all processors and writes as single 'decomposedBlockData' file. The operation is determined by the buffer size (maxThreadFileBufferSize setting):

Operation determine

Source files

Definition at line 69 of file OFstreamCollator.H.

Constructor & Destructor Documentation

◆ OFstreamCollator() [1/2]

OFstreamCollator ( const off_t  maxBufferSize)

Construct from buffer size. 0 = do not use thread.

Definition at line 294 of file OFstreamCollator.C.

◆ OFstreamCollator() [2/2]

OFstreamCollator ( const off_t  maxBufferSize,
const label  comm 
)

Construct from buffer size (0 = do not use thread) and local.

thread

Definition at line 311 of file OFstreamCollator.C.

◆ ~OFstreamCollator()

~OFstreamCollator ( )
virtual

Destructor.

Definition at line 332 of file OFstreamCollator.C.

References autoPtr< T >::clear(), Foam::endl(), UPstream::freeCommunicator(), Foam::Pout, autoPtr< T >::valid(), and OFstreamCollator::write().

Here is the call graph for this function:

Member Function Documentation

◆ TypeName()

TypeName ( "OFstreamCollator"  )

◆ write()

bool write ( const word typeName,
const fileName fName,
const string data,
IOstream::streamFormat  fmt,
IOstream::versionNumber  ver,
IOstream::compressionType  cmp,
const bool  append,
const bool  useThread = true 
)

◆ waitAll()

void waitAll ( )

Wait for all thread actions to have finished.

Definition at line 597 of file OFstreamCollator.C.

References Foam::endl(), UPstream::master(), and Foam::Pout.

Here is the call graph for this function:

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