Changeset 2864 in Sophya for trunk/SophyaExt


Ignore:
Timestamp:
Jan 2, 2006, 2:47:44 PM (20 years ago)
Author:
ansari
Message:

1/ Ajout methode CheckReadability() , retour int pour CheckHandling() ds l'interface FitsHandler et propagation vers handler TArray et DataTable
2/ Correction dans FitsManager et ajout initialiseur de module FitsIOServer (fiosinit.h .cc)
3/ FitsSwapper complete - corrige - full template (suppression de fitsswapper.cc)
4/ MAJ Makefile et objlist.list suite ajout fiosinit.cc et swfitsdtable

Reza , 2 Jan 2006

Location:
trunk/SophyaExt/FitsIOServer
Files:
2 added
1 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/FitsIOServer/Makefile

    r2834 r2864  
    44 
    55clean:
    6          rm -f $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitsswapper.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o
     6         rm -f $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o $(SOPHYAOBJP)swfitsdtable.o
    77        rm -f $(SOPHYALIBP)libFitsIOServer.a
    88 
    9 $(SOPHYALIBP)libFitsIOServer.a : $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitsswapper.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o
     9$(SOPHYALIBP)libFitsIOServer.a : $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o $(SOPHYAOBJP)swfitsdtable.o
    1010        $(AR) $(ARFLAGS) $@ $?
    1111        touch $(SOPHYAINCP)/SophyaConfInfo/libextsophya.objlist
    1212 
    13 $(SOPHYAOBJP)datacirclefits.o: datacirclefits.cc \
    14   $(SOPHYAINCP)sopnamsp.h datacirclefits.h \
    15   $(SOPHYAINCP)datacirclebase.h \
    16   $(SOPHYAINCP)circle.h \
    17   $(SOPHYAINCP)vector3d.h \
     13$(SOPHYAOBJP)datacirclefits.o: datacirclefits.cc $(SOPHYAINCP)sopnamsp.h \
     14  datacirclefits.h $(SOPHYAINCP)datacirclebase.h \
     15  $(SOPHYAINCP)circle.h $(SOPHYAINCP)vector3d.h \
    1816  $(SOPHYAINCP)longlat.h \
    1917  $(SOPHYAINCP)machdefs.h \
     18  $(SOPHYAINCP)osx_values.h \
    2019  $(SOPHYAINCP)utilgeom.h \
    2120  $(SOPHYAINCP)unitvector.h \
     
    2524        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  datacirclefits.cc
    2625 
    27 $(SOPHYAOBJP)fabtcolread.o: fabtcolread.cc \
    28   $(SOPHYAINCP)sopnamsp.h \
    29   $(SOPHYAINCP)machdefs.h \
     26$(SOPHYAOBJP)fabtcolread.o: fabtcolread.cc $(SOPHYAINCP)sopnamsp.h \
     27  $(SOPHYAINCP)machdefs.h \
     28  $(SOPHYAINCP)osx_values.h \
    3029  $(SOPHYAINCP)pexceptions.h fabtcolread.h \
    3130  $(SOPHYAINCP)anydataobj.h \
    32   $(SOPHYAINCP)tvector.h \
    33   $(SOPHYAINCP)tmatrix.h \
    34   $(SOPHYAINCP)tarray.h \
    35   $(SOPHYAINCP)basarr.h \
    36   $(SOPHYAINCP)mutyv.h \
    37   $(SOPHYAINCP)timestamp.h \
    38   $(SOPHYAINCP)objfio.h \
    39   $(SOPHYAINCP)ppersist.h \
     31  $(SOPHYAINCP)tvector.h $(SOPHYAINCP)tmatrix.h \
     32  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)basarr.h \
     33  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
     34  $(SOPHYAINCP)objfio.h $(SOPHYAINCP)ppersist.h \
    4035  $(SOPHYAINCP)gnumd5.h \
    4136  $(SOPHYAINCP)ppfbinstream.h \
     
    4944        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fabtcolread.cc
    5045 
    51 $(SOPHYAOBJP)fabtwriter.o: fabtwriter.cc \
    52   $(SOPHYAINCP)sopnamsp.h \
    53   $(SOPHYAINCP)machdefs.h \
     46$(SOPHYAOBJP)fabtwriter.o: fabtwriter.cc $(SOPHYAINCP)sopnamsp.h \
     47  $(SOPHYAINCP)machdefs.h \
     48  $(SOPHYAINCP)osx_values.h \
    5449  $(SOPHYAINCP)pexceptions.h fabtwriter.h \
    5550  $(SOPHYAINCP)anydataobj.h \
    56   $(SOPHYAINCP)tvector.h \
    57   $(SOPHYAINCP)tmatrix.h \
    58   $(SOPHYAINCP)tarray.h \
    59   $(SOPHYAINCP)basarr.h \
    60   $(SOPHYAINCP)mutyv.h \
    61   $(SOPHYAINCP)timestamp.h \
    62   $(SOPHYAINCP)objfio.h \
    63   $(SOPHYAINCP)ppersist.h \
     51  $(SOPHYAINCP)tvector.h $(SOPHYAINCP)tmatrix.h \
     52  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)basarr.h \
     53  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
     54  $(SOPHYAINCP)objfio.h $(SOPHYAINCP)ppersist.h \
    6455  $(SOPHYAINCP)gnumd5.h \
    6556  $(SOPHYAINCP)ppfbinstream.h \
     
    7364        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fabtwriter.cc
    7465 
    75 $(SOPHYAOBJP)fboloread.o: fboloread.cc \
    76   $(SOPHYAINCP)sopnamsp.h \
    77   $(SOPHYAINCP)machdefs.h \
     66$(SOPHYAOBJP)fboloread.o: fboloread.cc $(SOPHYAINCP)sopnamsp.h \
     67  $(SOPHYAINCP)machdefs.h \
     68  $(SOPHYAINCP)osx_values.h \
    7869  $(SOPHYAINCP)pexceptions.h fboloread.h \
    7970  $(SOPHYAINCP)anydataobj.h \
    80   $(SOPHYAINCP)tvector.h \
    81   $(SOPHYAINCP)tmatrix.h \
    82   $(SOPHYAINCP)tarray.h \
    83   $(SOPHYAINCP)basarr.h \
    84   $(SOPHYAINCP)mutyv.h \
    85   $(SOPHYAINCP)timestamp.h \
    86   $(SOPHYAINCP)objfio.h \
    87   $(SOPHYAINCP)ppersist.h \
     71  $(SOPHYAINCP)tvector.h $(SOPHYAINCP)tmatrix.h \
     72  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)basarr.h \
     73  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
     74  $(SOPHYAINCP)objfio.h $(SOPHYAINCP)ppersist.h \
    8875  $(SOPHYAINCP)gnumd5.h \
    8976  $(SOPHYAINCP)ppfbinstream.h \
     
    9784        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fboloread.cc
    9885 
    99 $(SOPHYAOBJP)fbtntintf.o: fbtntintf.cc \
    100   $(SOPHYAINCP)sopnamsp.h \
    101   $(SOPHYAINCP)machdefs.h \
     86$(SOPHYAOBJP)fbtntintf.o: fbtntintf.cc $(SOPHYAINCP)sopnamsp.h \
     87  $(SOPHYAINCP)machdefs.h \
     88  $(SOPHYAINCP)osx_values.h \
    10289  $(SOPHYAINCP)pexceptions.h fbtntintf.h \
    10390  $(SOPHYAINCP)anydataobj.h \
     
    10794        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fbtntintf.cc
    10895 
    109 $(SOPHYAOBJP)fitsautoreader.o: fitsautoreader.cc \
    110   $(SOPHYAINCP)sopnamsp.h \
    111   $(SOPHYAINCP)pexceptions.h \
    112   $(SOPHYAINCP)machdefs.h fitsautoreader.h \
     96$(SOPHYAOBJP)fiosinit.o: fiosinit.cc $(SOPHYAINCP)sopnamsp.h \
     97  $(SOPHYAINCP)machdefs.h \
     98  $(SOPHYAINCP)osx_values.h fiosinit.h \
     99  $(SOPHYAINCP)sophyainit.h fitsmanager.h fitsinoutfile.h \
     100  $(SOPHYAINCP)pexceptions.h \
     101  $(SOPHYAINCP)dvlist.h $(SOPHYAINCP)objfio.h \
     102  $(SOPHYAINCP)anydataobj.h \
     103  $(SOPHYAINCP)ppersist.h $(SOPHYAINCP)gnumd5.h \
     104  $(SOPHYAINCP)ppfbinstream.h \
     105  $(SOPHYAINCP)rawstream.h \
     106  $(SOPHYAINCP)ppfnametag.h \
     107  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
     108  $(SOPHYAINCP)FitsIO/fitsio.h \
     109  $(SOPHYAINCP)FitsIO/longnam.h fitshdtable.h \
     110  $(SOPHYAINCP)datatable.h \
     111  $(SOPHYAINCP)basedtable.h \
     112  $(SOPHYAINCP)ntupintf.h \
     113  $(SOPHYAINCP)segdatablock.h \
     114  $(SOPHYAINCP)tvector.h $(SOPHYAINCP)tmatrix.h \
     115  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)basarr.h \
     116  $(SOPHYAINCP)ndatablock.h \
     117  $(SOPHYAINCP)utilarr.h fitshandler.h fitsarrhand.h \
     118  fitsblkrw.h
     119        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fiosinit.cc
     120 
     121$(SOPHYAOBJP)fitsautoreader.o: fitsautoreader.cc $(SOPHYAINCP)sopnamsp.h \
     122  $(SOPHYAINCP)pexceptions.h \
     123  $(SOPHYAINCP)machdefs.h \
     124  $(SOPHYAINCP)osx_values.h fitsautoreader.h \
    113125  $(SOPHYAINCP)anydataobj.h fitsfile.h \
    114126  $(SOPHYAINCP)ndatablock.h \
    115   $(SOPHYAINCP)dvlist.h \
    116   $(SOPHYAINCP)objfio.h \
    117   $(SOPHYAINCP)ppersist.h \
    118   $(SOPHYAINCP)gnumd5.h \
    119   $(SOPHYAINCP)ppfbinstream.h \
    120   $(SOPHYAINCP)rawstream.h \
    121   $(SOPHYAINCP)ppfnametag.h \
    122   $(SOPHYAINCP)mutyv.h \
    123   $(SOPHYAINCP)timestamp.h \
    124   $(SOPHYAINCP)FitsIO/fitsio.h \
     127  $(SOPHYAINCP)dvlist.h $(SOPHYAINCP)objfio.h \
     128  $(SOPHYAINCP)ppersist.h $(SOPHYAINCP)gnumd5.h \
     129  $(SOPHYAINCP)ppfbinstream.h \
     130  $(SOPHYAINCP)rawstream.h \
     131  $(SOPHYAINCP)ppfnametag.h \
     132  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
     133  fitsinoutfile.h $(SOPHYAINCP)FitsIO/fitsio.h \
    125134  $(SOPHYAINCP)FitsIO/longnam.h fitstarray.h \
    126   $(SOPHYAINCP)tarray.h \
    127   $(SOPHYAINCP)basarr.h \
     135  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)basarr.h \
    128136  $(SOPHYAINCP)utilarr.h fitsspherehealpix.h \
    129137  $(SOPHYAINCP)spherehealpix.h \
     
    136144  $(SOPHYAINCP)longlat.h \
    137145  $(SOPHYAINCP)utilgeom.h \
    138   $(SOPHYAINCP)tvector.h \
    139   $(SOPHYAINCP)tmatrix.h \
     146  $(SOPHYAINCP)tvector.h $(SOPHYAINCP)tmatrix.h \
    140147  $(SOPHYAINCP)HEALPixUtils.h fitsntuple.h \
    141   $(SOPHYAINCP)ntuple.h \
    142   $(SOPHYAINCP)ntupintf.h fitsxntuple.h \
    143   $(SOPHYAINCP)xntuple.h fitslocalmap.h \
     148  $(SOPHYAINCP)ntuple.h $(SOPHYAINCP)ntupintf.h \
     149  fitsxntuple.h $(SOPHYAINCP)xntuple.h fitslocalmap.h \
    144150  $(SOPHYAINCP)localmap.h fbtntintf.h
    145151        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsautoreader.cc
     
    148154  $(SOPHYAINCP)sopnamsp.h \
    149155  $(SOPHYAINCP)pexceptions.h \
    150   $(SOPHYAINCP)machdefs.h fitsbntbllineRW.h \
    151   $(SOPHYAINCP)dvlist.h \
    152   $(SOPHYAINCP)objfio.h \
    153   $(SOPHYAINCP)anydataobj.h \
    154   $(SOPHYAINCP)ppersist.h \
    155   $(SOPHYAINCP)gnumd5.h \
    156   $(SOPHYAINCP)ppfbinstream.h \
    157   $(SOPHYAINCP)rawstream.h \
    158   $(SOPHYAINCP)ppfnametag.h \
    159   $(SOPHYAINCP)mutyv.h \
    160   $(SOPHYAINCP)timestamp.h fitsfile.h \
    161   $(SOPHYAINCP)ndatablock.h \
     156  $(SOPHYAINCP)machdefs.h \
     157  $(SOPHYAINCP)osx_values.h fitsbntbllineRW.h \
     158  $(SOPHYAINCP)dvlist.h $(SOPHYAINCP)objfio.h \
     159  $(SOPHYAINCP)anydataobj.h \
     160  $(SOPHYAINCP)ppersist.h $(SOPHYAINCP)gnumd5.h \
     161  $(SOPHYAINCP)ppfbinstream.h \
     162  $(SOPHYAINCP)rawstream.h \
     163  $(SOPHYAINCP)ppfnametag.h \
     164  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
     165  fitsfile.h $(SOPHYAINCP)ndatablock.h fitsinoutfile.h \
    162166  $(SOPHYAINCP)FitsIO/fitsio.h \
    163167  $(SOPHYAINCP)FitsIO/longnam.h \
     
    165169        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsbntbllineRW.cc
    166170 
    167 $(SOPHYAOBJP)fitsfile.o: fitsfile.cc \
    168   $(SOPHYAINCP)sopnamsp.h \
    169   $(SOPHYAINCP)machdefs.h fitsfile.h \
    170   $(SOPHYAINCP)ndatablock.h \
    171   $(SOPHYAINCP)anydataobj.h \
    172   $(SOPHYAINCP)dvlist.h \
    173   $(SOPHYAINCP)objfio.h \
     171$(SOPHYAOBJP)fitsfile.o: fitsfile.cc $(SOPHYAINCP)sopnamsp.h \
     172  $(SOPHYAINCP)machdefs.h \
     173  $(SOPHYAINCP)osx_values.h fitsfile.h \
     174  $(SOPHYAINCP)ndatablock.h \
     175  $(SOPHYAINCP)anydataobj.h \
     176  $(SOPHYAINCP)dvlist.h $(SOPHYAINCP)objfio.h \
    174177  $(SOPHYAINCP)ppersist.h \
    175178  $(SOPHYAINCP)pexceptions.h \
     
    178181  $(SOPHYAINCP)rawstream.h \
    179182  $(SOPHYAINCP)ppfnametag.h \
    180   $(SOPHYAINCP)mutyv.h \
    181   $(SOPHYAINCP)timestamp.h \
    182   $(SOPHYAINCP)FitsIO/fitsio.h \
     183  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
     184  fitsinoutfile.h $(SOPHYAINCP)FitsIO/fitsio.h \
    183185  $(SOPHYAINCP)FitsIO/longnam.h \
    184   $(SOPHYAINCP)strutil.h fitsspherehealpix.h \
    185   $(SOPHYAINCP)spherehealpix.h \
    186   $(SOPHYAINCP)sphericalmap.h \
    187   $(SOPHYAINCP)smathconst.h \
    188   $(SOPHYAINCP)pixelmap.h \
    189   $(SOPHYAINCP)spherepos.h \
    190   $(SOPHYAINCP)unitvector.h \
    191   $(SOPHYAINCP)vector3d.h \
    192   $(SOPHYAINCP)longlat.h \
    193   $(SOPHYAINCP)utilgeom.h \
    194   $(SOPHYAINCP)tvector.h \
    195   $(SOPHYAINCP)tmatrix.h \
    196   $(SOPHYAINCP)tarray.h \
    197   $(SOPHYAINCP)basarr.h \
    198   $(SOPHYAINCP)utilarr.h \
    199   $(SOPHYAINCP)HEALPixUtils.h
     186  $(SOPHYAINCP)strutil.h
    200187        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsfile.cc
    201188 
    202 $(SOPHYAOBJP)fitshdtable.o: fitshdtable.cc \
    203   $(SOPHYAINCP)machdefs.h \
     189$(SOPHYAOBJP)fitshdtable.o: fitshdtable.cc $(SOPHYAINCP)machdefs.h \
     190  $(SOPHYAINCP)osx_values.h \
    204191  $(SOPHYAINCP)sopnamsp.h \
    205192  $(SOPHYAINCP)datatable.h \
    206193  $(SOPHYAINCP)basedtable.h \
    207   $(SOPHYAINCP)ntupintf.h \
    208   $(SOPHYAINCP)dvlist.h \
     194  $(SOPHYAINCP)ntupintf.h $(SOPHYAINCP)dvlist.h \
    209195  $(SOPHYAINCP)objfio.h \
    210196  $(SOPHYAINCP)anydataobj.h \
     
    215201  $(SOPHYAINCP)rawstream.h \
    216202  $(SOPHYAINCP)ppfnametag.h \
    217   $(SOPHYAINCP)mutyv.h \
    218   $(SOPHYAINCP)timestamp.h \
     203  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
    219204  $(SOPHYAINCP)segdatablock.h \
    220   $(SOPHYAINCP)tvector.h \
    221   $(SOPHYAINCP)tmatrix.h \
    222   $(SOPHYAINCP)tarray.h \
    223   $(SOPHYAINCP)basarr.h \
    224   $(SOPHYAINCP)ndatablock.h \
    225   $(SOPHYAINCP)utilarr.h fitsblkrw.h \
    226   fitsinoutfile.h \
     205  $(SOPHYAINCP)tvector.h $(SOPHYAINCP)tmatrix.h \
     206  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)basarr.h \
     207  $(SOPHYAINCP)ndatablock.h \
     208  $(SOPHYAINCP)utilarr.h fitsblkrw.h fitsinoutfile.h \
    227209  $(SOPHYAINCP)FitsIO/fitsio.h \
    228210  $(SOPHYAINCP)FitsIO/longnam.h fitshandler.h
    229211        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitshdtable.cc
    230212 
    231 $(SOPHYAOBJP)fitsinoutfile.o: fitsinoutfile.cc \
    232   $(SOPHYAINCP)sopnamsp.h \
    233   $(SOPHYAINCP)machdefs.h \
     213$(SOPHYAOBJP)fitsinoutfile.o: fitsinoutfile.cc $(SOPHYAINCP)sopnamsp.h \
     214  $(SOPHYAINCP)machdefs.h \
     215  $(SOPHYAINCP)osx_values.h \
    234216  $(SOPHYAINCP)segdatablock.h \
    235217  $(SOPHYAINCP)anydataobj.h fitsinoutfile.h \
    236218  $(SOPHYAINCP)pexceptions.h \
    237   $(SOPHYAINCP)dvlist.h \
    238   $(SOPHYAINCP)objfio.h \
    239   $(SOPHYAINCP)ppersist.h \
    240   $(SOPHYAINCP)gnumd5.h \
    241   $(SOPHYAINCP)ppfbinstream.h \
    242   $(SOPHYAINCP)rawstream.h \
    243   $(SOPHYAINCP)ppfnametag.h \
    244   $(SOPHYAINCP)mutyv.h \
    245   $(SOPHYAINCP)timestamp.h \
     219  $(SOPHYAINCP)dvlist.h $(SOPHYAINCP)objfio.h \
     220  $(SOPHYAINCP)ppersist.h $(SOPHYAINCP)gnumd5.h \
     221  $(SOPHYAINCP)ppfbinstream.h \
     222  $(SOPHYAINCP)rawstream.h \
     223  $(SOPHYAINCP)ppfnametag.h \
     224  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
    246225  $(SOPHYAINCP)FitsIO/fitsio.h \
    247226  $(SOPHYAINCP)FitsIO/longnam.h
    248227        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsinoutfile.cc
    249228 
    250 $(SOPHYAOBJP)fitslocalmap.o: fitslocalmap.cc \
    251   $(SOPHYAINCP)sopnamsp.h \
    252   $(SOPHYAINCP)machdefs.h fitslocalmap.h \
     229$(SOPHYAOBJP)fitslocalmap.o: fitslocalmap.cc $(SOPHYAINCP)sopnamsp.h \
     230  $(SOPHYAINCP)machdefs.h \
     231  $(SOPHYAINCP)osx_values.h fitslocalmap.h \
    253232  $(SOPHYAINCP)pexceptions.h \
    254233  $(SOPHYAINCP)localmap.h \
    255234  $(SOPHYAINCP)pixelmap.h \
    256   $(SOPHYAINCP)ppersist.h \
    257   $(SOPHYAINCP)gnumd5.h \
    258   $(SOPHYAINCP)ppfbinstream.h \
    259   $(SOPHYAINCP)rawstream.h \
    260   $(SOPHYAINCP)ppfnametag.h \
    261   $(SOPHYAINCP)dvlist.h \
    262   $(SOPHYAINCP)objfio.h \
    263   $(SOPHYAINCP)anydataobj.h \
    264   $(SOPHYAINCP)mutyv.h \
    265   $(SOPHYAINCP)timestamp.h \
     235  $(SOPHYAINCP)ppersist.h $(SOPHYAINCP)gnumd5.h \
     236  $(SOPHYAINCP)ppfbinstream.h \
     237  $(SOPHYAINCP)rawstream.h \
     238  $(SOPHYAINCP)ppfnametag.h \
     239  $(SOPHYAINCP)dvlist.h $(SOPHYAINCP)objfio.h \
     240  $(SOPHYAINCP)anydataobj.h \
     241  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
    266242  $(SOPHYAINCP)spherepos.h \
    267243  $(SOPHYAINCP)unitvector.h \
     
    271247  $(SOPHYAINCP)sphericalmap.h \
    272248  $(SOPHYAINCP)smathconst.h \
    273   $(SOPHYAINCP)tvector.h \
    274   $(SOPHYAINCP)tmatrix.h \
    275   $(SOPHYAINCP)tarray.h \
    276   $(SOPHYAINCP)basarr.h \
    277   $(SOPHYAINCP)ndatablock.h \
    278   $(SOPHYAINCP)utilarr.h fitsfile.h \
     249  $(SOPHYAINCP)tvector.h $(SOPHYAINCP)tmatrix.h \
     250  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)basarr.h \
     251  $(SOPHYAINCP)ndatablock.h \
     252  $(SOPHYAINCP)utilarr.h fitsfile.h fitsinoutfile.h \
    279253  $(SOPHYAINCP)FitsIO/fitsio.h \
    280254  $(SOPHYAINCP)FitsIO/longnam.h
    281255        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitslocalmap.cc
    282256 
    283 $(SOPHYAOBJP)fitsmanager.o: fitsmanager.cc \
    284   $(SOPHYAINCP)machdefs.h \
    285   $(SOPHYAINCP)sopnamsp.h fitsmanager.h \
    286   fitsinoutfile.h $(SOPHYAINCP)pexceptions.h \
    287   $(SOPHYAINCP)dvlist.h \
    288   $(SOPHYAINCP)objfio.h \
    289   $(SOPHYAINCP)anydataobj.h \
    290   $(SOPHYAINCP)ppersist.h \
    291   $(SOPHYAINCP)gnumd5.h \
    292   $(SOPHYAINCP)ppfbinstream.h \
    293   $(SOPHYAINCP)rawstream.h \
    294   $(SOPHYAINCP)ppfnametag.h \
    295   $(SOPHYAINCP)mutyv.h \
    296   $(SOPHYAINCP)timestamp.h \
     257$(SOPHYAOBJP)fitsmanager.o: fitsmanager.cc $(SOPHYAINCP)machdefs.h \
     258  $(SOPHYAINCP)osx_values.h \
     259  $(SOPHYAINCP)sopnamsp.h fitsmanager.h fitsinoutfile.h \
     260  $(SOPHYAINCP)pexceptions.h \
     261  $(SOPHYAINCP)dvlist.h $(SOPHYAINCP)objfio.h \
     262  $(SOPHYAINCP)anydataobj.h \
     263  $(SOPHYAINCP)ppersist.h $(SOPHYAINCP)gnumd5.h \
     264  $(SOPHYAINCP)ppfbinstream.h \
     265  $(SOPHYAINCP)rawstream.h \
     266  $(SOPHYAINCP)ppfnametag.h \
     267  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
    297268  $(SOPHYAINCP)FitsIO/fitsio.h \
    298269  $(SOPHYAINCP)FitsIO/longnam.h fitshandler.h
    299270        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsmanager.cc
    300271 
    301 $(SOPHYAOBJP)fitsntuple.o: fitsntuple.cc \
    302   $(SOPHYAINCP)sopnamsp.h \
    303   $(SOPHYAINCP)pexceptions.h \
    304   $(SOPHYAINCP)machdefs.h fitsntuple.h \
    305   $(SOPHYAINCP)ntuple.h \
    306   $(SOPHYAINCP)objfio.h \
    307   $(SOPHYAINCP)anydataobj.h \
    308   $(SOPHYAINCP)ppersist.h \
    309   $(SOPHYAINCP)gnumd5.h \
    310   $(SOPHYAINCP)ppfbinstream.h \
    311   $(SOPHYAINCP)rawstream.h \
    312   $(SOPHYAINCP)ppfnametag.h \
    313   $(SOPHYAINCP)ntupintf.h \
    314   $(SOPHYAINCP)dvlist.h \
    315   $(SOPHYAINCP)mutyv.h \
    316   $(SOPHYAINCP)timestamp.h fitsfile.h \
    317   $(SOPHYAINCP)ndatablock.h \
     272$(SOPHYAOBJP)fitsntuple.o: fitsntuple.cc $(SOPHYAINCP)sopnamsp.h \
     273  $(SOPHYAINCP)pexceptions.h \
     274  $(SOPHYAINCP)machdefs.h \
     275  $(SOPHYAINCP)osx_values.h fitsntuple.h \
     276  $(SOPHYAINCP)ntuple.h $(SOPHYAINCP)objfio.h \
     277  $(SOPHYAINCP)anydataobj.h \
     278  $(SOPHYAINCP)ppersist.h $(SOPHYAINCP)gnumd5.h \
     279  $(SOPHYAINCP)ppfbinstream.h \
     280  $(SOPHYAINCP)rawstream.h \
     281  $(SOPHYAINCP)ppfnametag.h \
     282  $(SOPHYAINCP)ntupintf.h $(SOPHYAINCP)dvlist.h \
     283  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
     284  fitsfile.h $(SOPHYAINCP)ndatablock.h fitsinoutfile.h \
    318285  $(SOPHYAINCP)FitsIO/fitsio.h \
    319286  $(SOPHYAINCP)FitsIO/longnam.h
     
    323290  $(SOPHYAINCP)sopnamsp.h \
    324291  $(SOPHYAINCP)pexceptions.h \
    325   $(SOPHYAINCP)machdefs.h fitsspherehealpix.h \
     292  $(SOPHYAINCP)machdefs.h \
     293  $(SOPHYAINCP)osx_values.h fitsspherehealpix.h \
    326294  $(SOPHYAINCP)spherehealpix.h \
    327295  $(SOPHYAINCP)sphericalmap.h \
    328296  $(SOPHYAINCP)smathconst.h \
    329297  $(SOPHYAINCP)pixelmap.h \
    330   $(SOPHYAINCP)ppersist.h \
    331   $(SOPHYAINCP)gnumd5.h \
    332   $(SOPHYAINCP)ppfbinstream.h \
    333   $(SOPHYAINCP)rawstream.h \
    334   $(SOPHYAINCP)ppfnametag.h \
    335   $(SOPHYAINCP)dvlist.h \
    336   $(SOPHYAINCP)objfio.h \
    337   $(SOPHYAINCP)anydataobj.h \
    338   $(SOPHYAINCP)mutyv.h \
    339   $(SOPHYAINCP)timestamp.h \
     298  $(SOPHYAINCP)ppersist.h $(SOPHYAINCP)gnumd5.h \
     299  $(SOPHYAINCP)ppfbinstream.h \
     300  $(SOPHYAINCP)rawstream.h \
     301  $(SOPHYAINCP)ppfnametag.h \
     302  $(SOPHYAINCP)dvlist.h $(SOPHYAINCP)objfio.h \
     303  $(SOPHYAINCP)anydataobj.h \
     304  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
    340305  $(SOPHYAINCP)spherepos.h \
    341306  $(SOPHYAINCP)unitvector.h \
     
    343308  $(SOPHYAINCP)longlat.h \
    344309  $(SOPHYAINCP)utilgeom.h \
    345   $(SOPHYAINCP)tvector.h \
    346   $(SOPHYAINCP)tmatrix.h \
    347   $(SOPHYAINCP)tarray.h \
    348   $(SOPHYAINCP)basarr.h \
     310  $(SOPHYAINCP)tvector.h $(SOPHYAINCP)tmatrix.h \
     311  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)basarr.h \
    349312  $(SOPHYAINCP)ndatablock.h \
    350313  $(SOPHYAINCP)utilarr.h \
    351   $(SOPHYAINCP)HEALPixUtils.h fitsfile.h \
     314  $(SOPHYAINCP)HEALPixUtils.h fitsfile.h fitsinoutfile.h \
    352315  $(SOPHYAINCP)FitsIO/fitsio.h \
    353316  $(SOPHYAINCP)FitsIO/longnam.h fitstarray.h
     
    358321  $(SOPHYAINCP)pexceptions.h \
    359322  $(SOPHYAINCP)machdefs.h \
    360   fitsspherethetaphi.h \
     323  $(SOPHYAINCP)osx_values.h fitsspherethetaphi.h \
    361324  $(SOPHYAINCP)spherethetaphi.h \
    362325  $(SOPHYAINCP)sphericalmap.h \
    363326  $(SOPHYAINCP)smathconst.h \
    364327  $(SOPHYAINCP)pixelmap.h \
    365   $(SOPHYAINCP)ppersist.h \
    366   $(SOPHYAINCP)gnumd5.h \
    367   $(SOPHYAINCP)ppfbinstream.h \
    368   $(SOPHYAINCP)rawstream.h \
    369   $(SOPHYAINCP)ppfnametag.h \
    370   $(SOPHYAINCP)dvlist.h \
    371   $(SOPHYAINCP)objfio.h \
    372   $(SOPHYAINCP)anydataobj.h \
    373   $(SOPHYAINCP)mutyv.h \
    374   $(SOPHYAINCP)timestamp.h \
     328  $(SOPHYAINCP)ppersist.h $(SOPHYAINCP)gnumd5.h \
     329  $(SOPHYAINCP)ppfbinstream.h \
     330  $(SOPHYAINCP)rawstream.h \
     331  $(SOPHYAINCP)ppfnametag.h \
     332  $(SOPHYAINCP)dvlist.h $(SOPHYAINCP)objfio.h \
     333  $(SOPHYAINCP)anydataobj.h \
     334  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
    375335  $(SOPHYAINCP)spherepos.h \
    376336  $(SOPHYAINCP)unitvector.h \
     
    378338  $(SOPHYAINCP)longlat.h \
    379339  $(SOPHYAINCP)utilgeom.h \
    380   $(SOPHYAINCP)tvector.h \
    381   $(SOPHYAINCP)tmatrix.h \
    382   $(SOPHYAINCP)tarray.h \
    383   $(SOPHYAINCP)basarr.h \
    384   $(SOPHYAINCP)ndatablock.h \
    385   $(SOPHYAINCP)utilarr.h fitsfile.h \
     340  $(SOPHYAINCP)tvector.h $(SOPHYAINCP)tmatrix.h \
     341  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)basarr.h \
     342  $(SOPHYAINCP)ndatablock.h \
     343  $(SOPHYAINCP)utilarr.h fitsfile.h fitsinoutfile.h \
    386344  $(SOPHYAINCP)FitsIO/fitsio.h \
    387345  $(SOPHYAINCP)FitsIO/longnam.h fitstarray.h
    388346        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsspherethetaphi.cc
    389347 
    390 $(SOPHYAOBJP)fitsswapper.o: fitsswapper.cc fitsswapper.h \
    391   $(SOPHYAINCP)machdefs.h \
    392   $(SOPHYAINCP)swsegdb.h \
    393   $(SOPHYAINCP)segdatablock.h \
    394   $(SOPHYAINCP)anydataobj.h \
    395   $(SOPHYAINCP)pexceptions.h \
    396   $(SOPHYAINCP)FitsIO/fitsio.h \
    397   $(SOPHYAINCP)FitsIO/longnam.h \
    398   $(SOPHYAINCP)sopnamsp.h
    399         $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsswapper.cc
    400  
    401 $(SOPHYAOBJP)fitstarray.o: fitstarray.cc \
    402   $(SOPHYAINCP)sopnamsp.h \
    403   $(SOPHYAINCP)machdefs.h \
     348$(SOPHYAOBJP)fitstarray.o: fitstarray.cc $(SOPHYAINCP)sopnamsp.h \
     349  $(SOPHYAINCP)machdefs.h \
     350  $(SOPHYAINCP)osx_values.h \
    404351  $(SOPHYAINCP)pexceptions.h fitstarray.h \
    405   $(SOPHYAINCP)tarray.h \
    406   $(SOPHYAINCP)basarr.h \
    407   $(SOPHYAINCP)anydataobj.h \
    408   $(SOPHYAINCP)mutyv.h \
    409   $(SOPHYAINCP)timestamp.h \
    410   $(SOPHYAINCP)objfio.h \
    411   $(SOPHYAINCP)ppersist.h \
     352  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)basarr.h \
     353  $(SOPHYAINCP)anydataobj.h \
     354  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
     355  $(SOPHYAINCP)objfio.h $(SOPHYAINCP)ppersist.h \
    412356  $(SOPHYAINCP)gnumd5.h \
    413357  $(SOPHYAINCP)ppfbinstream.h \
     
    416360  $(SOPHYAINCP)dvlist.h \
    417361  $(SOPHYAINCP)ndatablock.h \
    418   $(SOPHYAINCP)utilarr.h fitsfile.h \
     362  $(SOPHYAINCP)utilarr.h fitsfile.h fitsinoutfile.h \
    419363  $(SOPHYAINCP)FitsIO/fitsio.h \
    420364  $(SOPHYAINCP)FitsIO/longnam.h
    421365        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitstarray.cc
    422366 
    423 $(SOPHYAOBJP)fitsxntuple.o: fitsxntuple.cc \
    424   $(SOPHYAINCP)sopnamsp.h \
    425   $(SOPHYAINCP)pexceptions.h \
    426   $(SOPHYAINCP)machdefs.h fitsxntuple.h \
     367$(SOPHYAOBJP)fitsxntuple.o: fitsxntuple.cc $(SOPHYAINCP)sopnamsp.h \
     368  $(SOPHYAINCP)pexceptions.h \
     369  $(SOPHYAINCP)machdefs.h \
     370  $(SOPHYAINCP)osx_values.h fitsxntuple.h \
    427371  $(SOPHYAINCP)xntuple.h \
    428372  $(SOPHYAINCP)ntupintf.h \
     373  $(SOPHYAINCP)ppersist.h $(SOPHYAINCP)gnumd5.h \
     374  $(SOPHYAINCP)ppfbinstream.h \
     375  $(SOPHYAINCP)rawstream.h \
     376  $(SOPHYAINCP)ppfnametag.h \
     377  $(SOPHYAINCP)dvlist.h $(SOPHYAINCP)objfio.h \
     378  $(SOPHYAINCP)anydataobj.h \
     379  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
     380  fitsfile.h $(SOPHYAINCP)ndatablock.h fitsinoutfile.h \
     381  $(SOPHYAINCP)FitsIO/fitsio.h \
     382  $(SOPHYAINCP)FitsIO/longnam.h
     383        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsxntuple.cc
     384 
     385$(SOPHYAOBJP)swfitsdtable.o: swfitsdtable.cc swfitsdtable.h \
     386  $(SOPHYAINCP)basedtable.h \
     387  $(SOPHYAINCP)machdefs.h \
     388  $(SOPHYAINCP)osx_values.h \
     389  $(SOPHYAINCP)ntupintf.h $(SOPHYAINCP)dvlist.h \
     390  $(SOPHYAINCP)objfio.h \
     391  $(SOPHYAINCP)anydataobj.h \
    429392  $(SOPHYAINCP)ppersist.h \
    430   $(SOPHYAINCP)gnumd5.h \
    431   $(SOPHYAINCP)ppfbinstream.h \
    432   $(SOPHYAINCP)rawstream.h \
    433   $(SOPHYAINCP)ppfnametag.h \
    434   $(SOPHYAINCP)dvlist.h \
    435   $(SOPHYAINCP)objfio.h \
    436   $(SOPHYAINCP)anydataobj.h \
    437   $(SOPHYAINCP)mutyv.h \
    438   $(SOPHYAINCP)timestamp.h fitsfile.h \
    439   $(SOPHYAINCP)ndatablock.h \
    440   $(SOPHYAINCP)FitsIO/fitsio.h \
    441   $(SOPHYAINCP)FitsIO/longnam.h
    442         $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsxntuple.cc
    443  
     393  $(SOPHYAINCP)pexceptions.h \
     394  $(SOPHYAINCP)gnumd5.h \
     395  $(SOPHYAINCP)ppfbinstream.h \
     396  $(SOPHYAINCP)rawstream.h \
     397  $(SOPHYAINCP)ppfnametag.h \
     398  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)timestamp.h \
     399  $(SOPHYAINCP)segdatablock.h \
     400  $(SOPHYAINCP)tvector.h $(SOPHYAINCP)tmatrix.h \
     401  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)basarr.h \
     402  $(SOPHYAINCP)ndatablock.h \
     403  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)swsegdb.h \
     404  fitsswapper.h fitsinoutfile.h $(SOPHYAINCP)FitsIO/fitsio.h \
     405  $(SOPHYAINCP)FitsIO/longnam.h fitsblkrw.h \
     406  $(SOPHYAINCP)sopnamsp.h
     407        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  swfitsdtable.cc
     408 
  • trunk/SophyaExt/FitsIOServer/fitsarrhand.h

    r2844 r2864  
    55#include <string>
    66#include "tarray.h"
     7#include "tvector.h"
    78
    89#include "fitshandler.h"
     10#include "fitsblkrw.h"
    911
    1012namespace SOPHYA {
     
    2325  virtual   AnyDataObj* DataObj() { return(dobj); }
    2426
    25   virtual   bool        CheckHandling(AnyDataObj & o)
     27  virtual   int         CheckHandling(AnyDataObj & o)
    2628  { 
     29    if ( (typeid(o) == typeid(TArray<T>)) ||
     30         (typeid(o) == typeid(TMatrix<T>)) ||
     31         (typeid(o) == typeid(TVector<T>)) )  return 2;
    2732    TArray<T> * po = dynamic_cast< TArray<T> * >(& o);
    28     if (po == NULL) return false;
    29     else return true;
     33    if (po == NULL) return 0;
     34    else return 1;
    3035  }
     36
    3137  virtual   void        SetDataObj(AnyDataObj & o)
    3238  { 
     
    3844    }
    3945    if (ownobj && dobj) delete dobj;  dobj = po; ownobj = false;
     46  }
     47
     48  virtual int         CheckReadability(FitsInOutFile& is)
     49  {
     50    if (is.CurrentHDUType() != IMAGE_HDU)  return 0;
     51    T x = 0;
     52    long naxes[BASEARRAY_MAXNDIMS];
     53    int naxis=BASEARRAY_MAXNDIMS;
     54    if (FitsTypes::ImageType(x) == is.GetImageHDUInfo(naxis, naxes))
     55      return 2;
     56    else return 1;
    4057  }
    4158
     
    5673      os.CreateImageHDU(FitsTypes::ImageType(x), dobj->NbDimensions(), naxes);
    5774      os.WriteHeaderRecords(dobj->Info());
     75      MuTyV mtv;
     76      mtv = "SOPHYA::TArray<T>";
     77      os.WriteKey("SOPCLSNM",mtv," Object class name ");
    5878      FitsBlockRW<T>::WriteImageData(os, dobj->Data(), dobj->Size());
    5979    }
     
    6282  virtual void     Read(FitsInOutFile& is)
    6383    {
    64       if ( dobj == NULL)
    65         throw NullPtrError("FitsArrayHandler<T>::Read() dobj=NULL ");
    6684      long naxes[BASEARRAY_MAXNDIMS];
    6785      int naxis=BASEARRAY_MAXNDIMS;
    6886      is.GetImageHDUInfo(naxis, naxes);
     87      if ( dobj == NULL) {
     88        if (naxis == 1) dobj = new TVector<T>;
     89        else if (naxis == 1) dobj = new TMatrix<T>;
     90        else dobj = new TArray<T>;
     91        ownobj = true;
     92      }
    6993      sa_size_t sz[BASEARRAY_MAXNDIMS];
    7094      if (naxis > BASEARRAY_MAXNDIMS) naxis = BASEARRAY_MAXNDIMS;
  • trunk/SophyaExt/FitsIOServer/fitshandler.h

    r2820 r2864  
    44#include "machdefs.h"
    55#include <string>
     6#include <typeinfo>
    67#include "fitsinoutfile.h"
    78
     
    1920  //! Return the real data object
    2021  virtual AnyDataObj* DataObj() = 0;       // Retourne l'objet reel
    21   //! Return true if I/O for object \b o can be handled
    22   virtual bool        CheckHandling(AnyDataObj & o) = 0;
     22  //! Return a positive value if I/O for object \b o can be handled
     23  virtual int         CheckHandling(AnyDataObj & o) = 0;
    2324  //! Read/write operation will use the object o
    2425  virtual void        SetDataObj(AnyDataObj & o) = 0;
    2526
     27  //! Return a positive value if current HDU can be read by the handler
     28  virtual int         CheckReadability(FitsInOutFile& is) = 0;
     29 
    2630  //! Clone (duplicate) the handler class
    2731  virtual FitsHandlerInterface* Clone() = 0;
     
    4650
    4751  virtual   AnyDataObj* DataObj() { return(dobj); }
    48   virtual   bool        CheckHandling(AnyDataObj & o)
     52  virtual   int         CheckHandling(AnyDataObj & o)
    4953  { 
     54    if (typeid(o) == typeid(T)) return 2;
    5055    T * po = dynamic_cast< T * >(& o);
    51     if (po == NULL) return false;
    52     else return true;
     56    if (po == NULL) return 0;
     57    else return 1;
    5358  }
    5459  virtual   void        SetDataObj(AnyDataObj & o)
     
    6267    if (ownobj && dobj) delete dobj;  dobj = po; ownobj = false;
    6368  }
     69
     70  virtual int         CheckReadability(FitsInOutFile& is);
    6471   
    6572  virtual FitsHandlerInterface* Clone()
  • trunk/SophyaExt/FitsIOServer/fitshdtable.cc

    r2846 r2864  
    1212
    1313// #include "fitshdtable.h"
     14
     15DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
     16int FitsHandler<BaseDataTable>::CheckReadability(FitsInOutFile& is)
     17{
     18  if (is.CurrentHDUType() == IMAGE_HDU ) return 0;
     19  string key = "SOPCLSNM";
     20  if (is.KeyValue(key) == "SOPHYA::DataTable")  return 2;
     21  else return 1;
     22}
    1423
    1524DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
  • trunk/SophyaExt/FitsIOServer/fitshdtable.h

    r2820 r2864  
    1 #ifndef FITSARRHAND_H
    2 #define FITSARRHAND_H
     1#ifndef FITSDTABLEHAND_H
     2#define FITSDTABLEHAND_H
    33
    44#include "machdefs.h"
  • trunk/SophyaExt/FitsIOServer/fitsinoutfile.cc

    r2860 r2864  
    101101{
    102102  fptr_ = NULL;
     103  mode_ = Fits_RO;
    103104  SetDef_BinTable();
    104105  SetDef_StrColWidth();
     
    130131
    131132/*! \brief Copy constructor
    132   The fits file pointer is owned by the original object and should not be closed
    133   as long as the new object is being used.
     133  \warning The fits file pointer is owned by the original FitsInOutFile object and
     134  should not be closed as long as the new object is being used.
    134135*/
    135136FitsInOutFile::FitsInOutFile(FitsInOutFile const& fios)
     
    227228}
    228229
     230/*! \brief Closes the current fits file and uses \b fios file for subsequent operations.
     231  \warning The fits file pointer is owned by the original FitsInOutFile object and
     232  should not be closed as long as the current object (this) is being used.
     233*/
     234
     235void FitsInOutFile::ShareFitsPtr(FitsInOutFile const& fios)
     236{
     237  Close();
     238  fptr_ = fios.fptr_;
     239  fname_ = fios.fname_;
     240  mode_ = fios.mode_;
     241  ownfptr = false;
     242}
    229243
    230244/*-- Methode --*/
  • trunk/SophyaExt/FitsIOServer/fitsinoutfile.h

    r2860 r2864  
    8787
    8888 void              Open(const char* name, FitsIOMode mode);
    89   void             Close();
    90 
     89 void              Close();
     90
     91 void              ShareFitsPtr(FitsInOutFile const& fios);
     92 
    9193 inline fitsfile*  FitsPtr() const { return fptr_; }
    9294 static float      cfitsioVersion();
    9395 //! Return the SOPHYA FitsIOServer version
    9496 static float      Version() { return 2.0; }
     97
     98 //! Return the file name as specified in the constructor (or Open)
     99 inline string     FileName() { return fname_; }
    95100
    96101 //---- Header manipulation methods
  • trunk/SophyaExt/FitsIOServer/fitsmanager.cc

    r2843 r2864  
    2424}
    2525
    26 int FitsManager::RegisterHandler(FitsHandlerInterface * fhi, string & clname)
     26int FitsManager::RegisterHandler(FitsHandlerInterface * fhi, string clname)
    2727{
     28  ChkHLP();
    2829  if (fhi == NULL)
    2930    throw NullPtrError("FitsManager::RegisterHandler() fhi=NULL ");
     
    4243int FitsManager::ListHandlers()
    4344{
     45  ChkHLP();
    4446  int kk=0;
    4547  cout << "---- FitsManager::ListHandlers()  NbHandlers= " << hlistp->size()
     
    5658FitsHandlerInterface* FitsManager::FindHandler(AnyDataObj & o)
    5759{
     60  ChkHLP();
    5861  FitsHandlerInterface * fhi = NULL;
    5962  HandlerList::iterator it;
    60   for(it = hlistp->begin(); it != hlistp->end(); it++)
    61     if ( (*it).fhi->CheckHandling(o) ) {
    62       fhi = (*it).fhi; break;
     63  int hfg = 0;
     64  int bhfg = 0;
     65  for(it = hlistp->begin(); it != hlistp->end(); it++) {
     66    hfg = (*it).fhi->CheckHandling(o);
     67    if ( hfg > bhfg ) {
     68      fhi = (*it).fhi;  bhfg = hfg;
    6369    }
     70  }
    6471  if (fhi == NULL) {
    6572    string msg = "FitsManager::FindHandler() Handler not found for ";
     
    7885}
    7986
    80 void FitsManager::Read(FitsInOutFile& os, AnyDataObj & o)
     87void FitsManager::Read(FitsInOutFile& is, AnyDataObj & o)
    8188{
    8289  FitsHandlerInterface * fhi2 = FindHandler(o)->Clone();
    8390  fhi2->SetDataObj(o);
    84   fhi2->Read(os);
     91  fhi2->Read(is);
     92  delete fhi2;
    8593  return;
    8694}
     95
     96FitsHandlerInterface * FitsManager::FindReader(FitsInOutFile& is)
     97{
     98  ChkHLP();
     99  FitsHandlerInterface * fhi = NULL;
     100  HandlerList::iterator it;
     101  int hfg = 0;
     102  int bhfg = 0;
     103  for(it = hlistp->begin(); it != hlistp->end(); it++) {
     104    hfg = (*it).fhi->CheckReadability(is);
     105    if ( hfg > bhfg ) {
     106      fhi = (*it).fhi;  bhfg = hfg;
     107    }
     108  }
     109  if (fhi == NULL) {
     110    string msg = "FitsManager::FindReader() Reader/Handler not found  ";
     111    msg += is.FileName();
     112    char buff[64];
     113    sprintf(buff, " HDU= %d Type= %d", (int)(is.CurrentHDU()),
     114            (int)(is.CurrentHDUType()) );
     115    msg += buff;
     116    throw NotFoundExc(msg);
     117  }
     118  else return fhi;
     119}
     120
     121FitsHandlerInterface * FitsManager::Read(FitsInOutFile& is)
     122{
     123  FitsHandlerInterface * fhi2 = FindReader(is)->Clone();
     124  fhi2->Read(is);
     125  return fhi2;
     126}
  • trunk/SophyaExt/FitsIOServer/fitsmanager.h

    r2820 r2864  
    1616class FitsManager {
    1717 public:
    18   static int  RegisterHandler(FitsHandlerInterface * fhi, string & clname);
     18  //! Called once for each handler during init phase.
     19  static int  RegisterHandler(FitsHandlerInterface * fhi, string clname="");
     20  //! Print list of handlers on cout
    1921  static int  ListHandlers();
     22  //! Finds the appropriate handler and writes the object \b o to fits file \b os
    2023  static void Write(FitsInOutFile& os, AnyDataObj & o);
    21   static void Read(FitsInOutFile& os, AnyDataObj & o);
    22   //  static FitsHandlerInterface * Read(FitsInOutFile& os);
     24  //! Finds the appropriate handler and reads the object \b o from fits file \b is
     25  static void Read(FitsInOutFile& is, AnyDataObj & o);
     26  //! Finds the appropriate reader for the current HDU and reads the data form \b is
     27  static FitsHandlerInterface * Read(FitsInOutFile& is);
    2328 protected:
     29  //! Finds the appropriate handler for the object \b o in the list of registered handlers.
    2430  static FitsHandlerInterface* FindHandler(AnyDataObj & o);
     31  //! Finds the appropriate reader for the current HDU in the list of registered handlers.
     32  static FitsHandlerInterface* FindReader(FitsInOutFile& is);
    2533};
    2634
  • trunk/SophyaExt/FitsIOServer/fitsswapper.h

    r2857 r2864  
    2424public:
    2525  FITSDataSwapper()
     26    : fcol(0) , rowos(1)
    2627  {
    27     SetInOutStream(NULL, 0);
    2828  }
    29   FITSDataSwapper(FitsInOutFile * ios, int col)
     29  FITSDataSwapper(FitsInOutFile & ios, int col)
     30    : fios(ios) , fcol(col), rowos(1)
    3031  {
    31     SetInOutStream(ios, col);
    3232  }
    3333
    34   inline FitsInOutFile * InOutStream() { return fios; }
    35   void SetInOutStream(FitsInOutFile * ios, int col)
     34  inline FitsInOutFile & InOutStream() { return fios; }
     35  void SetInOutStream(FitsInOutFile & ios, int col)
    3636  {
    3737    fios = ios;
    3838    fcol = col;
    3939    rowos = 1;
     40    /*  On ne fait pas de check sur type HDU - Reza , 30/12/2005
    4041    if ( fios != NULL) {
    4142      fhdu = fios->CurrentHDU();
    4243      if (fios->CurrentHDUType() != BINARY_TBL)
    4344        throw FitsIOException("FITSDataSwapper<T>::SetInOutStream() CurrHDU not a BINARY_TBL");
    44     }
     45    }    */
    4546  }
    4647
     
    5152    fcol = a.fcol;
    5253    rowos = a.rowos;
    53     fhdu = a.fhdu;
    5454  }
    5555
    5656  virtual int_8 WriteToSwap(const T * d, size_t sz, int_8 idx, int_8 oswp=0, bool osw=false)
    5757  {
    58     if (fios == NULL)
    59       FitsIOException("FITSDataSwapper<T>::ReadFromSwap() null InOutFile pointer");
    60     fios->MoveAbsToHDU(fhdu);
     58    /* fios->MoveAbsToHDU(fhdu);  On suppose qu'on est sur le bon HDU - Reza 30/12/2005 */
    6159    long row = rowos;
    6260    if (osw)  row = oswp;
    63     FitsBlockRW<T>::WriteColumnData(*fios, fcol, row, 1, d, sz);
     61    FitsBlockRW<T>::WriteColumnData(fios, fcol, row, 1, d, sz);
    6462    if (!osw) rowos += sz;
    6563    return row;
     
    6866  virtual void  ReadFromSwap(int_8 idx, int_8 swp, T* d, size_t sz)
    6967  {
    70     if (fios == NULL)
    71       FitsIOException("FITSDataSwapper<T>::ReadFromSwap() null InOutFile pointer");
    72     FitsBlockRW<T>::ReadColumnData(*fios, fcol, swp, 1, d, sz);
     68    FitsBlockRW<T>::ReadColumnData(fios, fcol, swp, 1, d, sz);
     69  }
     70
     71  virtual DataSwapperInterface<T>* Clone()
     72  {
     73    FITSDataSwapper<T> * rsw = new FITSDataSwapper<T>(fios, fcol) ;
     74    return rsw;
    7375  }
    7476
    7577protected:
    76   FitsInOutFile * fios;
    77   int fcol, fhdu;
     78  FitsInOutFile fios;
     79  int fcol;
    7880  long rowos;
    7981};
  • trunk/SophyaExt/FitsIOServer/objlist.list

    r2824 r2864  
    44fboloread.o
    55fbtntintf.o
     6fiosinit.o
    67fitsautoreader.o
    78fitsbntbllineRW.o
     
    1415fitsspherehealpix.o
    1516fitsspherethetaphi.o
    16 fitsswapper.o
    1717fitstarray.o
    1818fitsxntuple.o
     19swfitsdtable.o
Note: See TracChangeset for help on using the changeset viewer.