Nemo  2.4.0b
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
GenotyperFH Class Reference

#include <servicenotifiers.h>

+ Inheritance diagram for GenotyperFH:
+ Collaboration diagram for GenotyperFH:

Public Member Functions

 GenotyperFH (LCE_FileServicesNotifier *event)
 
virtual ~GenotyperFH ()
 
virtual void FHwrite ()
 
virtual void FHread (string &filename)
 
void setTraits (vector< trait_t > &traits)
 
void setFormat (string format)
 
void setLogtime (string logtime)
 
- Public Member Functions inherited from EventFileHandler< LCE_FileServicesNotifier >
 EventFileHandler (LCE_FileServicesNotifier *event, const char *ext)
 
virtual ~EventFileHandler ()
 
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 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 ~Handler ()
 

Private Attributes

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

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

◆ GenotyperFH()

GenotyperFH::GenotyperFH ( LCE_FileServicesNotifier event)
inline
113  :
114  EventFileHandler(event, ""), _ntrait(0) {}
EventFileHandler(LCE_FileServicesNotifier *event, const char *ext)
Definition: filehandler.h:268
unsigned int _ntrait
Definition: servicenotifiers.h:107

◆ ~GenotyperFH()

virtual GenotyperFH::~GenotyperFH ( )
inlinevirtual
116 {}

Member Function Documentation

◆ FHread()

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

Implements FileHandler.

119 {}

◆ FHwrite()

void GenotyperFH::FHwrite ( )
virtual

Implements EventFileHandler< LCE_FileServicesNotifier >.

200 {
201 
202 }

◆ setFormat()

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

References _format.

◆ setLogtime()

void GenotyperFH::setLogtime ( string  logtime)
inline
125 {_logtime = logtime;}
string _logtime
Definition: servicenotifiers.h:110

References _logtime.

◆ setTraits()

void GenotyperFH::setTraits ( vector< trait_t > &  traits)
176 {
177  _traits.assign(traits.begin(), traits.end());
178 
179  unsigned int nlocus;
180  unsigned int* pos_table;
181  int index;
182 
183  for(unsigned int i = 0; i < _traits.size(); ++i)
184  {
185  //get the trait's index
186 // index = _pop->getTraitIndex(traits[i]);
187 // _map_index.push_back(index);
188  //nlocus =
189  //get the loci positions
190 
191  //add to the locus-trait map
192 
193  }
194 
195  // build locus-pos-trat mapping
196 
197 
198 }
vector< trait_t > _traits
Definition: servicenotifiers.h:103

References _traits.

Referenced by LCE_FileServicesNotifier::loadFileServices().

Member Data Documentation

◆ _format

string GenotyperFH::_format
private

Referenced by setFormat().

◆ _locposition_map

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

◆ _logtime

string GenotyperFH::_logtime
private

Referenced by setLogtime().

◆ _map_index

vector< unsigned int> GenotyperFH::_map_index
private

◆ _ntrait

unsigned int GenotyperFH::_ntrait
private

◆ _traits

vector< trait_t > GenotyperFH::_traits
private

Referenced by setTraits().


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

Generated for Nemo v2.4.0b by  doxygen 1.9.1 -- Nemo is hosted on  Download Nemo

Locations of visitors to this page
Catalogued on GSR