117 const DbProfile &prof,
const int &elements = 0) {
118 LoadCSV csv(csvBase, conf, prof);
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 " +
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.
Definition: Module.h:126
void History(HiHistory &history) const
Definition: LoadCSV.cpp:221
Definition: HiCalTypes.h:43
File name manipulation and expansion.
Definition: FileName.h:116
int _fmtWidth
Default field with of double.
Definition: Module.h:168
virtual void printOn(std::ostream &o) const
Default printing of data in module.
Definition: Module.h:198
HiVector _data
Data vector.
Definition: Module.h:166
PvlKeyword makekey(const QString &name="History") const
Definition: HiCalTypes.h:80
virtual void Process(const HiVector &v)
Default processing behavior makes a reference copy of data array.
Definition: Module.h:96
HiHistory _history
Hierarchial component history.
Definition: Module.h:167
HiVector loadCsv(const QString &csvBase, const HiCalConf &conf, const DbProfile &prof, const int &elements=0)
Provide generic loading of CSV file for all modules.
Definition: Module.h:116
double operator()(int index) const
Return individual element of the data vector.
Definition: Module.h:128
virtual void Process(const Module &c)
Invokes the process method on the Module vector.
Definition: Module.h:91
virtual ~Module()
Destructor.
Definition: Module.h:81
QString filename() const
Definition: LoadCSV.cpp:191
QString _csvFile
Fully expanded name of CSV file if present.
Definition: Module.h:165
A DbProfile is a container for access parameters to a database.
Definition: DbProfile.h:65
Module()
Definition: Module.h:63
const HiHistory & History() const
Return recorded history of events.
Definition: Module.h:131
QString formatDbl(const double &value) const
Properly format values that could be special pixels.
Definition: Module.h:184
void Dump(const QString &fname) const
Dumps the component to a specified file.
Definition: Module.h:146
QString name() const
Returns name of component.
Definition: Module.h:84
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
Module(const QString &name, const Module &c)
Definition: Module.h:71
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:40
Module manages HiRISE calibration vectors from various sources.
Definition: Module.h:54
A type of error that could only have occurred due to a mistake on the user's part (e...
Definition: IException.h:142
friend std::ostream & operator<<(std::ostream &o, const Module &c)
Definition: Module.h:56
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:212
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:212
Provides generalized access to HiRISE calibration CSV files.
Definition: LoadCSV.h:66
QString _name
Name of component.
Definition: Module.h:164
int _fmtPrecision
Default field with of double.
Definition: Module.h:169
virtual void record(PvlGroup &pvl, const QString keyname="ModuleHistory") const
Record history in Pvl group object.
Definition: Module.h:134
QString PixelToString(double d)
Takes a double pixel value and returns the name of the pixel type as a string.
Definition: SpecialPixel.h:386
Isis exception class.
Definition: IException.h:107
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
QString getcsvFile() const
Returns expanded name of last CSV file loaded by loadCsv.
Definition: Module.h:86
Module(const Module &c)
Definition: Module.h:74
bool validateSize(const int &expected, const bool &throw_on_error=false) const
Definition: LoadCSV.cpp:199
HiVector getVector() const
Definition: LoadCSV.cpp:211
Module(const QString &name, const HiHistory &history)
Definition: Module.h:68
int size() const
Returns the size (number of elements) of data array.
Definition: Module.h:88
Module(const QString &name)
Definition: Module.h:65
TNT::Array1D< double > HiVector
1-D Buffer
Definition: HiCalTypes.h:40