Logo Search packages:      
Sourcecode: 3depict version File versions  Download package

RangeFile Class Reference

#include <APTClasses.h>

List of all members.


Detailed Description

Data storage and retrieval class for .rng files.

Definition at line 252 of file APTClasses.h.


Public Member Functions

unsigned int atomicNumberFromIonID (unsigned int ionID) const
 Get atomic number from ion ID.
unsigned int atomicNumberFromRange (unsigned int range) const
 Return the atomic number of the element from either the long or short version of the atomic name.
RGB getColour (unsigned int) const
 Retrieve a given colour from the ion ID.
unsigned int getIonID (const char *name) const
 Get the ion ID from its short name.
unsigned int getIonID (unsigned int range) const
 Get the ion ID from a given range ID.
unsigned int getIonID (float mass) const
 Retrieve the colour from a given ion ID.
std::string getName (const IonHit &ion, bool shortName) const
std::string getName (unsigned int ionID, bool shortName=true) const
 Get the short name or long name of a speicifed ionID.
unsigned int getNumIons () const
 Get the number of unique ions.
unsigned int getNumRanges (unsigned int ionID) const
 Get the number of ranges for a given ion ID.
unsigned int getNumRanges () const
 Get the number of unique ranges.
std::pair< float, float > getRange (unsigned int) const
 Retrieve the start and end of a given range as a pair(start,end).
unsigned int getRangeID (float mass) const
 Get a range ID from mass to charge.
bool isRanged (std::string shortName, bool caseSensitive=true)
 Check to see if an atom is ranged.
bool isRanged (const IonHit &) const
 Returns true if an ion is ranged.
bool isRanged (float mass) const
 returns true if a specified mass is ranged
bool moveRange (unsigned int range, bool limit, float newMass)
 Move a range's mass to a new location.
unsigned int open (const char *rangeFile, unsigned int format=RANGE_FORMAT_ORNL)
 Open a specified range file.
void printErr (std::ostream &strm)
 Print the error associated with the current range file state.
bool range (std::vector< IonHit > &ionHits, std::string shortIonName)
 Clips out ions that dont match the specified ion name.
void range (std::vector< IonHit > &ionHits)
 Clips out ions that are not inside the range.
bool rangeByID (std::vector< IonHit > &ionHits, unsigned int range)
 Clips out ions that dont lie in the specified range number.
void setColour (unsigned int, const RGB &r)
 Set the colour using the ion ID.
void setIonID (unsigned int range, unsigned int newIonId)
 Set the ion ID for a given range.
void setIonLongName (unsigned int ionID, const std::string &newName)
 Set the long name for a given ion.
void setIonShortName (unsigned int ionID, const std::string &newName)
 set the short name for a given ion
void swap (RangeFile &rng)
 Swap a range file with this one.
unsigned int write (const char *datafile) const
unsigned int write (std::ostream &o) const
 Write the stream to a file.

Private Member Functions

bool isSelfConsistent () const
 Performs limited checks for self consistency.

Private Attributes

std::vector< RGBcolours
unsigned int errState
std::vector< unsigned int > ionIDs
std::vector< std::pair
< std::string, std::string > > 
ionNames
std::vector< std::pair< float,
float > > 
ranges

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

Generated by  Doxygen 1.6.0   Back to index