CountProcessorDump< span > Class Template Reference

#include <CountProcessorDump.hpp>

Inheritance diagram for CountProcessorDump< span >:
Inheritance graph

Public Types

typedef Kmer< span >::Count Count
- Public Types inherited from CountProcessorAbstract< span >
typedef Kmer< span >::Type Type
- Public Types inherited from ICountProcessor< span >
typedef kmer::impl::Kmer< span >::Type Type

Public Member Functions

 CountProcessorDump (tools::storage::impl::Group &group, size_t kmerSize, system::ISynchronizer *synchronizer=0, tools::storage::impl::Partition< Count > *solidCounts=0, size_t nbPartsPerPass=0)
virtual ~CountProcessorDump ()
void begin (const Configuration &config)
CountProcessorAbstract< span > * clone ()
void finishClones (std::vector< ICountProcessor< span > * > &clones)
void beginPart (size_t passId, size_t partId, size_t cacheSize, const char *name)
void endPart (size_t passId, size_t partId)
bool process (size_t partId, const Type &kmer, const CountVector &count, CountNumber sum)
tools::misc::impl::Properties getProperties () const
tools::storage::impl::Partition< Count > * getSolidCounts ()
u_int64_t getNbItems ()
- Public Member Functions inherited from CountProcessorAbstract< span >
 CountProcessorAbstract (const std::string &name="processor")
virtual ~CountProcessorAbstract ()
virtual void end ()
virtual void beginPass (size_t passId)
virtual void endPass (size_t passId)
virtual std::string getName () const
virtual void setName (const std::string &name)
virtual std::vector< ICountProcessor< span > * > getInstances () const
- Public Member Functions inherited from ICountProcessor< span >
template<typename T >
T * get () const
- Public Member Functions inherited from SmartPointer
void use ()
void forget ()
- Public Member Functions inherited from ISmartPointer
virtual ~ISmartPointer ()

Additional Inherited Members

- Protected Member Functions inherited from SmartPointer
 SmartPointer ()
virtual ~SmartPointer ()

Detailed Description

template<size_t span = KMER_DEFAULT_SPAN>
class gatb::core::kmer::impl::CountProcessorDump< span >

The CountProcessorDump implementation dumps kmers on file system through a Partition object.

The number of partitions is not known at creation and is received through a call to the 'begin' method; there, the number of partitions is used to configure the Partition object.

A clone instance is dedicated to one partition, which is configured when the method 'beginPart' is called on a cloned instance.

The CountProcessorDump implementation is likely to be used in a CountProcessorChain, like this : solidity -> dump. It allows to dump on file system only solid kmers.

Member Typedef Documentation

typedef Kmer<span>::Count Count


Constructor & Destructor Documentation

CountProcessorDump ( tools::storage::impl::Group group,
size_t  kmerSize,
system::ISynchronizer synchronizer = 0,
tools::storage::impl::Partition< Count > *  solidCounts = 0,
size_t  nbPartsPerPass = 0 


virtual ~CountProcessorDump ( )


Member Function Documentation

void begin ( const Configuration &  config)

Called just before the mainloop of SortingCountAlgorithm.

[in]config: configuration of the SortingCountAlgorithm.

Reimplemented from CountProcessorAbstract< span >.

void beginPart ( size_t  passId,
size_t  partId,
size_t  cacheSize,
const char *  name 

Called at the beginning of a new kmers partition processing.

[in]passId: index of the current pass in the SortingCountAlgorithm.
[in]passId: index of the current kmers partition in the SortingCountAlgorithm.
[in]cacheSize: memory size used for the current kmers partition
[in]name: class name of the child PartitionsCommand class.

Reimplemented from CountProcessorAbstract< span >.

CountProcessorAbstract<span>* clone ( )
void endPart ( size_t  passId,
size_t  partId 

Called at the end of a new kmers partition processing.

[in]passId: index of the current pass in the SortingCountAlgorithm.
[in]passId: index of the current kmers partition in the SortingCountAlgorithm.

Reimplemented from CountProcessorAbstract< span >.

void finishClones ( std::vector< ICountProcessor< span > * > &  clones)

Called when N partitions have been processed through N clones. This should be the last time these clones are available before being deleted. It can be the opportunity to the prototype instance to gather information from the clones.

[in]clones: the N cloned instances

Reimplemented from CountProcessorAbstract< span >.

u_int64_t getNbItems ( )

Get the number of items.

the total number of items in the partition.
tools::misc::impl::Properties getProperties ( ) const

Get some properties about the count processor.


Reimplemented from CountProcessorAbstract< span >.

tools::storage::impl::Partition<Count>* getSolidCounts ( )

Get the partition of counts.

the Partition<Count> instance
bool process ( size_t  partId,
const Type kmer,
const CountVector count,
CountNumber  sum 

Notification that a [kmer,counts] is available and can be handled by the count processor.

[in]partId: index of the current partition
[in]kmer: kmer for which we are receiving counts
[in]count: vector of counts of the kmer, one count per bank
[in]sum: sum of the occurrences for all bank.

Reimplemented from CountProcessorAbstract< span >.

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