Loading Common/Servers/FitsWriter/include/File.h +3 −3 Original line number Diff line number Diff line Loading @@ -136,19 +136,19 @@ public: typedef typename std::list<_ref> TRefSequence; typedef typename TRefSequence::iterator TRefScroll; CHeaderEntry(const IRA::CString& key,const IRA::CString& desc,const long& table) : CEntry(key,desc,T::typeSpec,true,table) { vocabulary.empty(); vocabulary.clear(); vocabulary.push_back(T::defaultValue); } CHeaderEntry(const IRA::CString& key,const IRA::CString& desc,const long& table,const TSequence& val) : CEntry(key,desc,T::typeSpec,true,table) { vocabulary=val; } ~CHeaderEntry() { vocabulary.empty(); vocabulary.clear(); } CHeaderEntry& operator=(const TSequence& val) { TScroll it; vocabulary=val; ret.empty(); ret.clear(); for (it=vocabulary.begin();it!=vocabulary.end();it++) { // this is done to cope with the (const char *) conversion in the CString case ret.push_back((_ref)*it); } Loading Common/Servers/FitsWriter/src/File.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -35,8 +35,8 @@ bool CFile::write(CCfits::FITS * const fits,IRA::CString& lastError) begin(); while ((tt=getNextTEntry())!=NULL) { std::vector<string> name,form,unit; name.push_back("gino"); name.push_back("pino"); //name.push_back("gino"); //name.push_back("pino"); form.push_back("D"); form.push_back("D"); unit.push_back("Jy"); Loading Common/Servers/FitsWriter/src/TestSummary.cpp +3 −19 Original line number Diff line number Diff line Loading @@ -18,15 +18,15 @@ int main(int argc, char *argv[]) std::list<double> restFreq; restFreq.push_back(100.234); restFreq.push_back(70.12345); restFreq.push_back(90.1); restFreq.push_back(123.77); //restFreq.push_back(90.1); //restFreq.push_back(123.77); sumWriter.getFile().setKeyword("TELESCOP","MED"); //string single sumWriter.getFile().setKeyword("EXPTIME",10.34); //double single sumWriter.getFile().setKeyword("NUSEBANDS",10L); //long single sumWriter.getFile().setKeyword("RESTFREQ",restFreq); //double multi // sumWriter.getFile().setKeyword("test",2341.2213); //double single, table header keyword //sumWriter.getFile().setKeyword("test",2341.2213); //double single, table header keyword if (!sumWriter.write()) { Loading @@ -38,22 +38,6 @@ int main(int argc, char *argv[]) return 1; } sumWriter.setBasePath("./"); sumWriter.setFileName("summary2.fits"); if (!sumWriter.create()) { printf("Error: %s\n",(const char *)sumWriter.getLastError()); return 1; } if (!sumWriter.write()) { printf("Error: %s\n",(const char *)sumWriter.getLastError()); return 1; } if (!sumWriter.close()) { printf("Error: %s\n",(const char *)sumWriter.getLastError()); return 1; } }; Loading
Common/Servers/FitsWriter/include/File.h +3 −3 Original line number Diff line number Diff line Loading @@ -136,19 +136,19 @@ public: typedef typename std::list<_ref> TRefSequence; typedef typename TRefSequence::iterator TRefScroll; CHeaderEntry(const IRA::CString& key,const IRA::CString& desc,const long& table) : CEntry(key,desc,T::typeSpec,true,table) { vocabulary.empty(); vocabulary.clear(); vocabulary.push_back(T::defaultValue); } CHeaderEntry(const IRA::CString& key,const IRA::CString& desc,const long& table,const TSequence& val) : CEntry(key,desc,T::typeSpec,true,table) { vocabulary=val; } ~CHeaderEntry() { vocabulary.empty(); vocabulary.clear(); } CHeaderEntry& operator=(const TSequence& val) { TScroll it; vocabulary=val; ret.empty(); ret.clear(); for (it=vocabulary.begin();it!=vocabulary.end();it++) { // this is done to cope with the (const char *) conversion in the CString case ret.push_back((_ref)*it); } Loading
Common/Servers/FitsWriter/src/File.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -35,8 +35,8 @@ bool CFile::write(CCfits::FITS * const fits,IRA::CString& lastError) begin(); while ((tt=getNextTEntry())!=NULL) { std::vector<string> name,form,unit; name.push_back("gino"); name.push_back("pino"); //name.push_back("gino"); //name.push_back("pino"); form.push_back("D"); form.push_back("D"); unit.push_back("Jy"); Loading
Common/Servers/FitsWriter/src/TestSummary.cpp +3 −19 Original line number Diff line number Diff line Loading @@ -18,15 +18,15 @@ int main(int argc, char *argv[]) std::list<double> restFreq; restFreq.push_back(100.234); restFreq.push_back(70.12345); restFreq.push_back(90.1); restFreq.push_back(123.77); //restFreq.push_back(90.1); //restFreq.push_back(123.77); sumWriter.getFile().setKeyword("TELESCOP","MED"); //string single sumWriter.getFile().setKeyword("EXPTIME",10.34); //double single sumWriter.getFile().setKeyword("NUSEBANDS",10L); //long single sumWriter.getFile().setKeyword("RESTFREQ",restFreq); //double multi // sumWriter.getFile().setKeyword("test",2341.2213); //double single, table header keyword //sumWriter.getFile().setKeyword("test",2341.2213); //double single, table header keyword if (!sumWriter.write()) { Loading @@ -38,22 +38,6 @@ int main(int argc, char *argv[]) return 1; } sumWriter.setBasePath("./"); sumWriter.setFileName("summary2.fits"); if (!sumWriter.create()) { printf("Error: %s\n",(const char *)sumWriter.getLastError()); return 1; } if (!sumWriter.write()) { printf("Error: %s\n",(const char *)sumWriter.getLastError()); return 1; } if (!sumWriter.close()) { printf("Error: %s\n",(const char *)sumWriter.getLastError()); return 1; } };