56 friend std::ostream &operator<<(std::ostream &o,
const Module &c) {
117 const DbProfile &prof,
const int &elements = 0) {
118 LoadCSV csv(csvBase, conf, prof);
120 if (elements != 0) csv.validateSize(elements,
true);
122 return (csv.getVector());
135 const QString keyname =
"ModuleHistory")
146 void Dump(
const QString &fname)
const {
148 QString dumpcFile = dumpc.
expanded();
149 std::ofstream ofile(dumpcFile.toLatin1().data(), std::ios::out);
151 QString mess =
"Unable to open/create module dump file " +
162 enum { DefaultWidth = 10, DefaultPrecision = 6};
185 std::ostringstream ostr;
188 return (QString(ostr.str().c_str()));
193 return (QString(ostr.str().c_str()));
199 o <<
"# History = " <<
_history << std::endl;
200 o <<
"# Count = " <<
_data.dim() << std::endl;
201 for (
int i = 0 ; i <
_data.dim() ; i++) {
const HiVector & ref() const
Return data via a const reference.
File name manipulation and expansion.
int _fmtWidth
Default field with of double.
virtual void printOn(std::ostream &o) const
Default printing of data in module.
HiVector _data
Data vector.
virtual void Process(const HiVector &v)
Default processing behavior makes a reference copy of data array.
HiHistory _history
Hierarchial component history.
HiVector loadCsv(const QString &csvBase, const HiCalConf &conf, const DbProfile &prof, const int &elements=0)
Provide generic loading of CSV file for all modules.
double operator()(int index) const
Return individual element of the data vector.
virtual void Process(const Module &c)
Invokes the process method on the Module vector.
virtual ~Module()
Destructor.
QString _csvFile
Fully expanded name of CSV file if present.
A DbProfile is a container for access parameters to a database.
const HiHistory & History() const
Return recorded history of events.
QString formatDbl(const double &value) const
Properly format values that could be special pixels.
void Dump(const QString &fname) const
Dumps the component to a specified file.
QString name() const
Returns name of component.
Contains multiple PvlContainers.
#define _FILEINFO_
Macro for the filename and line number.
Module manages HiRISE calibration vectors from various sources.
A type of error that could only have occurred due to a mistake on the user's part (e...
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
bool IsSpecial(const double d)
Returns if the input pixel is special.
Provides generalized access to HiRISE calibration CSV files.
QString _name
Name of component.
int _fmtPrecision
Default field with of double.
virtual void record(PvlGroup &pvl, const QString keyname="ModuleHistory") const
Record history in Pvl group object.
QString PixelToString(double d)
Takes a double pixel value and returns the name of the pixel type as a string.
Namespace for ISIS/Bullet specific routines.
QString getcsvFile() const
Returns expanded name of last CSV file loaded by loadCsv.
int size() const
Returns the size (number of elements) of data array.
TNT::Array1D< double > HiVector
1-D Buffer