Changeset 14935


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
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mcore/DrsCalib.h

    r14865 r14935  
    55#include <errno.h>  // errno
    66
     7#ifndef MARS_fits
    78#include "fits.h"
     9#endif
     10
     11#ifndef MARS_ofits
    812#include "ofits.h"
     13#endif
    914
    1015#ifdef __MARS__
     
    929934    std::string ReadFitsImp(const std::string &str, std::vector<float> &vec)
    930935    {
     936#ifndef __MARS__
    931937        std::fits file(str);
     938#else
     939        fits file(str);
     940#endif
    932941        if (!file)
    933942        {
     
    10541063        const size_t n = 1440*1024*4 + 1440*fRoi*2 + fNumTm*fRoi*2 + 3;
    10551064
     1065#ifndef __MARS__
    10561066        std::ofits file(filename.c_str());
     1067#else
     1068        ofits file(filename.c_str());
     1069#endif
    10571070        if (!file)
    10581071        {
  • trunk/Mars/mcore/fits.h

    r14933 r14935  
    5757namespace std
    5858{
     59#else
     60using namespace std;
    5961#endif
    6062
  • trunk/Mars/mcore/ofits.h

    r14933 r14935  
    2121namespace std
    2222{
     23#else
     24using namespace std;
    2325#endif
    2426
     
    803805};
    804806
    805 #ifdef __MARS__
     807#ifndef __MARS__
    806808};
    807809#endif
  • 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
  • trunk/Mars/mjobs/Makefile

    r14910 r14935  
    2525           -I../mhvstime -I../mtrigger -I../mmuon -I../mmc -I../mmovie \
    2626           -I../mextralgo -I../mhflux -I../msql -I../mreport -I../mcorsika \
    27            -I../msim -I../msimreflector -I../msimcamera -I../melectronics
     27           -I../msim -I../msimreflector -I../msimcamera -I../melectronics \
     28           -I../mcore
    2829
    2930SRCFILES = MSequence.cc \
  • trunk/Mars/mreport/MReport.h

    r12776 r14935  
    99#endif
    1010
    11 namespace std
    12 {
    13     class fits;
    14 }
     11class fits;
     12
    1513class MTime;
    1614class MParList;
     
    3735
    3836    virtual Bool_t SetupReading(MParList &plist);
    39     virtual Bool_t SetupReadingFits(std::fits &fits) { return kTRUE; }
     37    virtual Bool_t SetupReadingFits(fits &) { return kTRUE; }
    4038    virtual Int_t  InterpreteBody(TString &str, Int_t ver);
    4139
    4240    Int_t  Interprete(TString &str, const MTime &start, const MTime &stop, const Int_t ver);
    43     virtual Int_t  InterpreteFits(const std::fits &fits) { return kTRUE; }
     41    virtual Int_t  InterpreteFits(const fits &) { return kTRUE; }
    4442    Bool_t CheckIdentifier(TString &str) const
    4543    {
  • trunk/Mars/mreport/MReportCC.cc

    r12773 r14935  
    255255}
    256256
    257 Bool_t MReportWeather::SetupReadingFits(std::fits &file)
     257Bool_t MReportWeather::SetupReadingFits(fits &file)
    258258{
    259259    return
  • trunk/Mars/mreport/MReportCC.h

    r12773 r14935  
    1919    Float_t fSolarRadiation;  // [W/m^2] IR-Radiation
    2020
    21     Bool_t SetupReadingFits(std::fits &fits);
     21    Bool_t SetupReadingFits(fits &fits);
    2222
    2323public:
  • trunk/Mars/mreport/MReportDrive.cc

    r14861 r14935  
    8888}
    8989
    90 Bool_t MReportDrive::SetupReadingFits(std::fits &file)
     90Bool_t MReportDrive::SetupReadingFits(fits &file)
    9191{
    9292    return
     
    100100}
    101101
    102 Int_t MReportDrive::InterpreteFits(const std::fits &fits)
     102Int_t MReportDrive::InterpreteFits(const fits &fits)
    103103{
    104104    fCurrentZd = fNominalZd - fErrorZd;
  • trunk/Mars/mreport/MReportDrive.h

    r12734 r14935  
    2323    Double_t fErrorAz;    // [deg] sistem error in the azimuth angle axis
    2424
    25     Bool_t SetupReadingFits(std::fits &fits);
    26     Int_t  InterpreteFits(const std::fits &fits);
     25    Bool_t SetupReadingFits(fits &fits);
     26    Int_t  InterpreteFits(const fits &fits);
    2727    Int_t  InterpreteBody(TString &str, Int_t ver);
    2828
  • trunk/Mars/mreport/MReportFitsRead.h

    r14483 r14935  
    1717#include <map>
    1818
    19 namespace std
    20 {
    21     class fits;
    22 }
     19class fits;
    2320class THashTable;
    2421
     
    5249
    5350protected:
    54     std::fits *fIn;         //! buffered input stream (file to read from)
     51    fits *fIn;         //! buffered input stream (file to read from)
    5552
    5653public:
  • trunk/Mars/mreport/MReportHumidity.cc

    r12861 r14935  
    5151}
    5252
    53 Bool_t MReportHumidity::SetupReadingFits(std::fits &file)
     53Bool_t MReportHumidity::SetupReadingFits(fits &file)
    5454{
    5555    return
     
    5858}
    5959
    60 Int_t MReportHumidity::InterpreteFits(const std::fits &fits)
     60Int_t MReportHumidity::InterpreteFits(const fits &fits)
    6161{
    6262    return kTRUE;
  • trunk/Mars/mreport/MReportHumidity.h

    r12861 r14935  
    1212    Float_t fHumidity[4]; // H[%] Humidity sensors readout
    1313
    14     Bool_t SetupReadingFits(std::fits &fits);
    15     Int_t  InterpreteFits(const std::fits &fits);
     14    Bool_t SetupReadingFits(fits &fits);
     15    Int_t  InterpreteFits(const fits &fits);
    1616
    1717public:
  • trunk/Mars/mreport/MReportRates.cc

    r12862 r14935  
    5353}
    5454
    55 Bool_t MReportRates::SetupReadingFits(std::fits &file)
     55Bool_t MReportRates::SetupReadingFits(fits &file)
    5656{
    5757    return
     
    6666}
    6767
    68 Int_t MReportRates::InterpreteFits(const std::fits &fits)
     68Int_t MReportRates::InterpreteFits(const fits &fits)
    6969{
    7070    if (fElapsedTime>0 || fElapsedOnTime>0)
  • trunk/Mars/mreport/MReportRates.h

    r12860 r14935  
    1818    Float_t   fElapsedOnTime;   // [s]  On-time elapsed since previous report
    1919
    20     Bool_t SetupReadingFits(std::fits &fits);
    21     Int_t  InterpreteFits(const std::fits &fits);
     20    Bool_t SetupReadingFits(fits &fits);
     21    Int_t  InterpreteFits(const fits &fits);
    2222
    2323public:
  • trunk/Mars/mreport/MReportTemperatures.cc

    r12861 r14935  
    5656}
    5757
    58 Bool_t MReportTemperatures::SetupReadingFits(std::fits &file)
     58Bool_t MReportTemperatures::SetupReadingFits(fits &file)
    5959{
    6060    return
     
    6868}
    6969
    70 Int_t MReportTemperatures::InterpreteFits(const std::fits &fits)
     70Int_t MReportTemperatures::InterpreteFits(const fits &fits)
    7171{
    7272    return kTRUE;
  • trunk/Mars/mreport/MReportTemperatures.h

    r12861 r14935  
    1717    Float_t fTempEthernet[4];  // [deg C] Ethernet switches temperatures top (front/back), bottom (front/back)
    1818
    19     Bool_t SetupReadingFits(std::fits &fits);
    20     Int_t  InterpreteFits(const std::fits &fits);
     19    Bool_t SetupReadingFits(fits &fits);
     20    Int_t  InterpreteFits(const fits &fits);
    2121
    2222public:
Note: See TracChangeset for help on using the changeset viewer.