Nemo  2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
FileMergerFH Class Reference

#include <servicenotifiers.h>

+ Inheritance diagram for FileMergerFH:
+ Collaboration diagram for FileMergerFH:

Public Member Functions

 FileMergerFH (LCE_FileServicesNotifier *event)
 
virtual ~FileMergerFH ()
 
virtual void FHwrite ()
 
virtual void FHread (string &filename)
 
void setTraits (vector< trait_t > &traits)
 
void setFormat (string format)
 
- Public Member Functions inherited from EventFileHandler< LCE_FileServicesNotifier >
 EventFileHandler (LCE_FileServicesNotifier *event, const char *ext)
 
virtual ~EventFileHandler ()
 
virtual void FHwrite ()=0
 
virtual void FHread (string &filename)=0
 
virtual void set (bool rpl_per, bool gen_per, int rpl_occ, int gen_occ, int rank, string path, LCE_FileServicesNotifier *event)
 
- Public Member Functions inherited from FileHandler
 FileHandler (const char *ext)
 
virtual ~FileHandler ()
 
virtual void init ()
 Called by notifier during simulation setup, performs file checking. More...
 
virtual vector< string > ifExist ()
 Checks if any file associated with the current file name already exists on disk. More...
 
virtual void set (bool rpl_per, bool gen_per, int rpl_occ, int gen_occ, int rank, string path)
 Sets the hanlder parameters. More...
 
virtual void set_multi (bool rpl_per, bool gen_per, int rpl_occ, TMatrix *Occ, string path)
 
virtual void FHwrite ()=0
 Default behavior of the class, called by Handler::update(). More...
 
virtual void FHread (string &filename)=0
 Default input function. More...
 
virtual void update ()
 Updates the inner replicate and generation counters and calls FHwrite if needed by the the periodicity of the file. More...
 
Metapopget_pop_ptr ()
 Returns the pointer to the current metapop through the FileServices interface. More...
 
void set_pop_ptr (Metapop *pop_ptr)
 
FileServicesget_service ()
 Returns pointer to the FileServices. More...
 
void set_service (FileServices *srv)
 
std::string & get_path ()
 
void set_path ()
 
std::string & get_extension ()
 
void set_extension (const char *ext)
 
std::string & get_filename ()
 Builds and returns the current file name depending on the periodicity of the file. More...
 
bool get_isInputHandler ()
 
void set_isInputHandler (bool val)
 
bool get_isReplicatePeriodic ()
 
void set_isReplicatePeriodic (bool val)
 
unsigned int get_ReplicateOccurrence ()
 
void set_ReplicateOccurrence (unsigned int val)
 
bool get_isGenerationPeriodic ()
 
void set_isGenerationPeriodic (bool val)
 
unsigned int get_GenerationOccurrence ()
 
void set_GenerationOccurrence (unsigned int val)
 
unsigned int get_ExecRank ()
 unused yet... More...
 
void set_ExecRank (int val)
 
TMatrixget_OccMatrix ()
 
void set_OccMatrix (TMatrix *occ)
 
bool get_isMasterExec ()
 
void set_isMasterExec (bool is)
 
- Public Member Functions inherited from Handler
virtual void init ()=0
 Inits state. More...
 
virtual void update ()=0
 Updates the handler state. More...
 
virtual ~Handler ()
 

Private Attributes

vector< trait_t_traits
 
vector< unsigned int_map_index
 
multimap< unsigned int, TraitPrototype * > _locposition_map
 
unsigned int _ntrait
 
string _format
 

Additional Inherited Members

- Protected Attributes inherited from EventFileHandler< LCE_FileServicesNotifier >
LCE_FileServicesNotifier_FHLinkedEvent
 
- Protected Attributes inherited from FileHandler
Metapop_pop
 Pointer to the current metapop, set during initialization within the init function. More...
 

Constructor & Destructor Documentation

◆ FileMergerFH()

FileMergerFH::FileMergerFH ( LCE_FileServicesNotifier event)
inline
112 :
113 EventFileHandler(event, ""), _ntrait(0) {}
Template class for the LCEs StatHandler classes.
Definition: filehandler.h:247
unsigned int _ntrait
Definition: servicenotifiers.h:107

◆ ~FileMergerFH()

virtual FileMergerFH::~FileMergerFH ( )
inlinevirtual
115{}

Member Function Documentation

◆ FHread()

virtual void FileMergerFH::FHread ( string &  filename)
inlinevirtual

Implements FileHandler.

118{}

◆ FHwrite()

void FileMergerFH::FHwrite ( )
virtual

◆ setFormat()

void FileMergerFH::setFormat ( string  format)
inline
122{_format = format;}
string _format
Definition: servicenotifiers.h:109

References _format.

◆ setTraits()

void FileMergerFH::setTraits ( vector< trait_t > &  traits)
166{
167 _traits.assign(traits.begin(), traits.end());
168
169 unsigned int nlocus;
170 unsigned int* pos_table;
171 int index;
172
173 for(unsigned int i = 0; i < _traits.size(); ++i)
174 {
175 //get the trait's index
176// index = _pop->getTraitIndex(traits[i]);
177// _map_index.push_back(index);
178 //nlocus =
179 //get the loci positions
180
181 //add to the locus-trait map
182
183 }
184
185 // build locus-pos-trat mapping
186
187
188}
vector< trait_t > _traits
Definition: servicenotifiers.h:103

References _traits.

Referenced by LCE_FileServicesNotifier::loadFileServices().

+ Here is the caller graph for this function:

Member Data Documentation

◆ _format

string FileMergerFH::_format
private

Referenced by setFormat().

◆ _locposition_map

multimap< unsigned int, TraitPrototype* > FileMergerFH::_locposition_map
private

◆ _map_index

vector< unsigned int> FileMergerFH::_map_index
private

◆ _ntrait

unsigned int FileMergerFH::_ntrait
private

◆ _traits

vector< trait_t > FileMergerFH::_traits
private

Referenced by setTraits().


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

Generated for Nemo v2.3.56 by  doxygen 1.9.0 -- Nemo is hosted on  Download Nemo

Locations of visitors to this page
Catalogued on GSR