Changeset 14935 for trunk/Mars/mfileio


Ignore:
Timestamp:
02/20/13 14:49:37 (12 years ago)
Author:
tbretz
Message:
Add changes necessary to remove fits completely from namespace std in MARS.
Location:
trunk/Mars/mfileio
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mfileio/MFitsArray.h

    r14792 r14935  
    44//#include "astroroot.h"
    55//#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
    813
    914class TClonesArray;
    1015class MLog;
    11 
    1216
    1317///////////////////////////////////////////////////////////////////////////////
     
    1822
    1923   // the FITS table to which the data are written                     
    20    std::ofits*     fFitsTable;
     24   ofits*     fFitsTable;
    2125   
    2226   // number of elements in fClonesArray / MArrayX / TArrayX  during
     
    2630
    2731public:
    28    std::ofits* GetFitsTable()     {return fFitsTable;}
     32   ofits* GetFitsTable()     {return fFitsTable;}
    2933   UInt_t *      GetArraySizePtr()  {return &fArraySize;}
    3034
  • trunk/Mars/mfileio/MTopFitsGroup.cc

    r14869 r14935  
    88// Note: This FITS group as well as the table must be open, before calling     
    99//       this method!                                                         
    10 void MTopFitsGroup::Attach(std::ofits* table)
     10void MTopFitsGroup::Attach(ofits* table)
    1111{
    1212//   fTopGroup.SetChild(table);
     
    1919// If table is an already open FITS table, then that table we be closed,       
    2020// before the new child is assigned to "table"                                 
    21 Bool_t MTopFitsGroup::GetNextChild(std::ofits* table)
     21Bool_t MTopFitsGroup::GetNextChild(ofits* table)
    2222{
    2323//   fTopGroup.SetChild(table);
  • trunk/Mars/mfileio/MTopFitsGroup.h

    r14792 r14935  
    11#ifndef MARS_MTopFitsGroup
    22#define MARS_MTopFitsGroup
    3 
    43
    54#include <sys/types.h>
    65#include <sys/stat.h>
    76
    8 #include "TString.h"
     7#ifndef ROOT_TString
     8#include <TString.h>
     9#endif
    910
    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
    1418
    1519///////////////////////////////////////////////////////////////////////////////
     
    4044
    4145   // the top level group as AstroROOT-2 data structure                   
    42    std::ofits*    fTopGroup;
     46   ofits*    fTopGroup;
    4347
    4448   // number of usage of this group by different MWriteFitsFile instances
     
    4650
    4751public:
    48    MTopFitsGroup(const char * fileName, std::ofits* file) : fFileName(fileName),
     52   MTopFitsGroup(const char * fileName, ofits* file) : fFileName(fileName),
    4953                                          fTopGroup(file),
    5054                                          fNumOpen(1)
     
    5559   Int_t  GetNumUsage()                 {return fNumOpen;}
    5660
    57    void   Attach(std::ofits* table);
    58    Bool_t GetNextChild(std::ofits* table);
     61   void   Attach(ofits* table);
     62   Bool_t GetNextChild(ofits* table);
    5963
    60    std::ofits*  GetGroup()        {return fTopGroup;}
    61    TString        &  GetFileName()    {return fFileName;}
     64   ofits*  GetGroup()        {return fTopGroup;}
     65   const TString &GetFileName() const {return fFileName;}
    6266
    6367};
  • trunk/Mars/mfileio/MWriteFitsFile.cc

    r14870 r14935  
    2020
    2121ClassImp(MWriteFitsFile);
    22 //ClassImp(MArrayHelper);
    23 //ClassImp(MTopFitsGroup);
    2422
    2523using namespace std;
    26 //ClassImp(std::ofits);
    27 
    2824
    2925map<MUniqueFileId, MTopFitsGroup> MWriteFitsFile::fTopFitsGroups;
     
    9894MWriteFitsFile::~MWriteFitsFile()
    9995{
    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++)
    10197    {
    10298        if (it->second != NULL)
     
    332328Int_t MWriteFitsFile::PostProcess()
    333329{
    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++)
    335331    {
    336332        it->second->close();
     
    479475                              const char* unit,
    480476                              const char* comment,
    481                               std::ofits* outFile)
     477                              ofits* outFile)
    482478{
    483479    if (outFile == NULL)
     
    10891085   // close the current files
    10901086   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++)
    10921088   {
    10931089       (it->second)->close();
  • trunk/Mars/mfileio/MWriteFitsFile.h

    r14792 r14935  
    1212#endif
    1313
     14#ifndef MARS_MTopFitsGroup
    1415#include "MTopFitsGroup.h"
     16#endif
     17
     18#ifndef MARS_MFitsArray
    1519#include "MFitsArray.h"
    16 
     20#endif
    1721
    1822///////////////////////////////////////////////////////////////////////////////
     
    7377   // TClonesArray are not in this map.
    7478   //ETIENNE ofits objects cannot be copied. So store pointers instead
    75    std::map<TString, std::ofits*>                       fFitsTables;
     79   std::map<TString, ofits*>                       fFitsTables;
    7680
    7781   // all information needed to write data of TClonesArray to their     
     
    106110   Bool_t InitColumns(const TString & tableName,
    107111                      const TString & parentVarName,
    108                       std::ofits* fitsTable,
     112                      ofits* fitsTable,
    109113                      void * baseAdr,
    110114                      TClass * classDef);
     
    122126                 const char* unit=NULL,
    123127                 const char* comment=NULL,
    124                  std::ofits* outFile=NULL);
     128                 ofits* outFile=NULL);
    125129
    126130   // MWrite
Note: See TracChangeset for help on using the changeset viewer.