Changeset 14935 for trunk/Mars/mfileio
- Timestamp:
- 02/20/13 14:49:37 (12 years ago)
- Location:
- trunk/Mars/mfileio
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mfileio/MFitsArray.h
r14792 r14935 4 4 //#include "astroroot.h" 5 5 //#include "fitsio.h" 6 #include "../mcore/fits.h" 7 #include "../mcore/ofits.h" 6 #ifndef MARS_fits 7 #include "fits.h" 8 #endif 9 10 #ifndef MARS_ofits 11 #include "ofits.h" 12 #endif 8 13 9 14 class TClonesArray; 10 15 class MLog; 11 12 16 13 17 /////////////////////////////////////////////////////////////////////////////// … … 18 22 19 23 // the FITS table to which the data are written 20 std::ofits* fFitsTable;24 ofits* fFitsTable; 21 25 22 26 // number of elements in fClonesArray / MArrayX / TArrayX during … … 26 30 27 31 public: 28 std::ofits* GetFitsTable() {return fFitsTable;}32 ofits* GetFitsTable() {return fFitsTable;} 29 33 UInt_t * GetArraySizePtr() {return &fArraySize;} 30 34 -
trunk/Mars/mfileio/MTopFitsGroup.cc
r14869 r14935 8 8 // Note: This FITS group as well as the table must be open, before calling 9 9 // this method! 10 void MTopFitsGroup::Attach( std::ofits* table)10 void MTopFitsGroup::Attach(ofits* table) 11 11 { 12 12 // fTopGroup.SetChild(table); … … 19 19 // If table is an already open FITS table, then that table we be closed, 20 20 // before the new child is assigned to "table" 21 Bool_t MTopFitsGroup::GetNextChild( std::ofits* table)21 Bool_t MTopFitsGroup::GetNextChild(ofits* table) 22 22 { 23 23 // fTopGroup.SetChild(table); -
trunk/Mars/mfileio/MTopFitsGroup.h
r14792 r14935 1 1 #ifndef MARS_MTopFitsGroup 2 2 #define MARS_MTopFitsGroup 3 4 3 5 4 #include <sys/types.h> 6 5 #include <sys/stat.h> 7 6 8 #include "TString.h" 7 #ifndef ROOT_TString 8 #include <TString.h> 9 #endif 9 10 10 //#include "astroroot.h" 11 //#include "fitsio.h" 12 #include "../mcore/fits.h" 13 #include "../mcore/ofits.h" 11 #ifndef MARS_fits 12 #include "fits.h" 13 #endif 14 15 #ifndef MARS_ofits 16 #include "ofits.h" 17 #endif 14 18 15 19 /////////////////////////////////////////////////////////////////////////////// … … 40 44 41 45 // the top level group as AstroROOT-2 data structure 42 std::ofits* fTopGroup;46 ofits* fTopGroup; 43 47 44 48 // number of usage of this group by different MWriteFitsFile instances … … 46 50 47 51 public: 48 MTopFitsGroup(const char * fileName, std::ofits* file) : fFileName(fileName),52 MTopFitsGroup(const char * fileName, ofits* file) : fFileName(fileName), 49 53 fTopGroup(file), 50 54 fNumOpen(1) … … 55 59 Int_t GetNumUsage() {return fNumOpen;} 56 60 57 void Attach( std::ofits* table);58 Bool_t GetNextChild( std::ofits* table);61 void Attach(ofits* table); 62 Bool_t GetNextChild(ofits* table); 59 63 60 std::ofits* GetGroup() {return fTopGroup;}61 TString & GetFileName(){return fFileName;}64 ofits* GetGroup() {return fTopGroup;} 65 const TString &GetFileName() const {return fFileName;} 62 66 63 67 }; -
trunk/Mars/mfileio/MWriteFitsFile.cc
r14870 r14935 20 20 21 21 ClassImp(MWriteFitsFile); 22 //ClassImp(MArrayHelper);23 //ClassImp(MTopFitsGroup);24 22 25 23 using namespace std; 26 //ClassImp(std::ofits);27 28 24 29 25 map<MUniqueFileId, MTopFitsGroup> MWriteFitsFile::fTopFitsGroups; … … 98 94 MWriteFitsFile::~MWriteFitsFile() 99 95 { 100 for (std::map<TString, std::ofits*>::iterator it=fFitsTables.begin(); it!= fFitsTables.end();it++)96 for (std::map<TString, ofits*>::iterator it=fFitsTables.begin(); it!= fFitsTables.end();it++) 101 97 { 102 98 if (it->second != NULL) … … 332 328 Int_t MWriteFitsFile::PostProcess() 333 329 { 334 for (std::map<TString, std::ofits*>::iterator it=fFitsTables.begin(); it!= fFitsTables.end();it++)330 for (std::map<TString, ofits*>::iterator it=fFitsTables.begin(); it!= fFitsTables.end();it++) 335 331 { 336 332 it->second->close(); … … 479 475 const char* unit, 480 476 const char* comment, 481 std::ofits* outFile)477 ofits* outFile) 482 478 { 483 479 if (outFile == NULL) … … 1089 1085 // close the current files 1090 1086 CloseTopLevelGroup(); 1091 for (std::map<TString, std::ofits*>::iterator it=fFitsTables.begin(); it!=fFitsTables.end(); it++)1087 for (std::map<TString,ofits*>::iterator it=fFitsTables.begin(); it!=fFitsTables.end(); it++) 1092 1088 { 1093 1089 (it->second)->close(); -
trunk/Mars/mfileio/MWriteFitsFile.h
r14792 r14935 12 12 #endif 13 13 14 #ifndef MARS_MTopFitsGroup 14 15 #include "MTopFitsGroup.h" 16 #endif 17 18 #ifndef MARS_MFitsArray 15 19 #include "MFitsArray.h" 16 20 #endif 17 21 18 22 /////////////////////////////////////////////////////////////////////////////// … … 73 77 // TClonesArray are not in this map. 74 78 //ETIENNE ofits objects cannot be copied. So store pointers instead 75 std::map<TString, std::ofits*> fFitsTables;79 std::map<TString, ofits*> fFitsTables; 76 80 77 81 // all information needed to write data of TClonesArray to their … … 106 110 Bool_t InitColumns(const TString & tableName, 107 111 const TString & parentVarName, 108 std::ofits* fitsTable,112 ofits* fitsTable, 109 113 void * baseAdr, 110 114 TClass * classDef); … … 122 126 const char* unit=NULL, 123 127 const char* comment=NULL, 124 std::ofits* outFile=NULL);128 ofits* outFile=NULL); 125 129 126 130 // MWrite
Note:
See TracChangeset
for help on using the changeset viewer.