[2864] | 1 | // Classe d'initialisation du module FitsIOServer
|
---|
| 2 |
|
---|
| 3 | #include "sopnamsp.h"
|
---|
| 4 | #include "machdefs.h"
|
---|
| 5 | #include "fiosinit.h"
|
---|
| 6 | #include "fitsmanager.h"
|
---|
| 7 | #include "fitshdtable.h"
|
---|
| 8 | #include "fitsarrhand.h"
|
---|
| 9 |
|
---|
[2897] | 10 | #include "fitsntuple.h"
|
---|
| 11 | #include "fitsspherehealpix.h"
|
---|
| 12 | #include "fitsspherethetaphi.h"
|
---|
| 13 | #include "fitslocalmap.h"
|
---|
[3049] | 14 | #include "fitshistos.h"
|
---|
[3063] | 15 | #include "fitsgenedata.h"
|
---|
[2897] | 16 |
|
---|
| 17 |
|
---|
[2864] | 18 | #include <iostream>
|
---|
| 19 |
|
---|
| 20 | /*!
|
---|
| 21 | \class SOPHYA::FitsIOServerInitiator
|
---|
| 22 | \ingroup FitsIOServer
|
---|
| 23 | Perform registration of fits handlers.
|
---|
| 24 | \sa SOPHYA::FitsManager
|
---|
| 25 | */
|
---|
| 26 | int FitsIOServerInitiator::FgInit = 0;
|
---|
| 27 |
|
---|
[3493] | 28 | // ---> Reporter ce numero de version ds fitsinoutfile.h (methode Version())
|
---|
[3023] | 29 | // Module version number - 2.0 , Jul 2006
|
---|
[3171] | 30 | // Module version number - 2.1 , Fev 2007 (version ll (LONGLONG) de cfitsio)
|
---|
[3493] | 31 | // Module version number - 2.12 , Avr 2008 (Lecture-ecriture tableaux avec offset)
|
---|
[3864] | 32 | // Module version number - 2.2 , Aout 2010
|
---|
[3023] | 33 |
|
---|
[3864] | 34 | #define MOD_VERS 2.2
|
---|
[3493] | 35 |
|
---|
[2864] | 36 | FitsIOServerInitiator::FitsIOServerInitiator()
|
---|
| 37 | : SophyaInitiator()
|
---|
| 38 | {
|
---|
| 39 | FitsIOServerInitiator::FgInit++;
|
---|
| 40 | if (FitsIOServerInitiator::FgInit > 1) return;
|
---|
| 41 |
|
---|
| 42 | // Enregistrement des classes FitsHandler
|
---|
[2898] | 43 | //DBG cout << " ---- FitsIOServerInitiator / DEBUG ---- debut RegisterHandler " << endl;
|
---|
[2932] | 44 | FitsManager::RegisterHandler(new FitsArrayHandler<int_2> , 1, "TArray<int_2>");
|
---|
[2895] | 45 | FitsManager::RegisterHandler(new FitsArrayHandler<int_4> , 1, "TArray<int_4> ");
|
---|
[3452] | 46 | // Si c-fitsio supporte les HDU_IMAGE avec data de type int_8 (BITPIX=64)
|
---|
| 47 | #ifdef LONGLONG_IMG
|
---|
[3447] | 48 | FitsManager::RegisterHandler(new FitsArrayHandler<int_8> , 1, "TArray<int_8> ");
|
---|
| 49 | #endif
|
---|
[2895] | 50 | FitsManager::RegisterHandler(new FitsArrayHandler<r_4> , 1, "TArray<r_4>");
|
---|
| 51 | FitsManager::RegisterHandler(new FitsArrayHandler< r_8 > , 1, "TArray<r_8>");
|
---|
[2864] | 52 |
|
---|
[2895] | 53 | FitsManager::RegisterHandler(new FitsHandler<BaseDataTable>, 1, "DataTable");
|
---|
[2864] | 54 |
|
---|
[2897] | 55 | // Enregistrement des classes heritant de FitsIOHandler
|
---|
| 56 | FitsManager::RegisterHandler(new FITS_NTuple, 0, "NTuple");
|
---|
[3049] | 57 | FitsManager::RegisterHandler(new FitsHandler<Histo>, 0, "Histo");
|
---|
| 58 | FitsManager::RegisterHandler(new FitsHandler<Histo2D>, 0, "Histo2D");
|
---|
[3063] | 59 | FitsManager::RegisterHandler(new FitsHandler<GeneralFitData>, 0, "GeneralFitData");
|
---|
[2897] | 60 |
|
---|
| 61 | FitsManager::RegisterHandler(new FITS_SphereHEALPix<r_4> , 0, "SphereHEALPix<r_4>");
|
---|
| 62 | FitsManager::RegisterHandler(new FITS_SphereHEALPix<r_8> , 0, "SphereHEALPix<r_8>");
|
---|
| 63 | FitsManager::RegisterHandler(new FITS_SphereHEALPix<int_4> , 0, "SphereHEALPix<int_4>");
|
---|
| 64 |
|
---|
| 65 | FitsManager::RegisterHandler(new FITS_SphereThetaPhi<r_4> , 0, "SphereThetaPhi<r_4>");
|
---|
| 66 | FitsManager::RegisterHandler(new FITS_SphereThetaPhi<r_8> , 0, "SphereThetaPhi<r_8>");
|
---|
| 67 | FitsManager::RegisterHandler(new FITS_SphereThetaPhi<int_4> , 0, "SphereThetaPhi<int_4>");
|
---|
| 68 |
|
---|
| 69 | FitsManager::RegisterHandler(new FITS_LocalMap<r_4> , 0, "LocalMap<r_4>");
|
---|
| 70 | FitsManager::RegisterHandler(new FITS_LocalMap<r_8> , 0, "LocalMap<r_8>");
|
---|
| 71 | FitsManager::RegisterHandler(new FITS_LocalMap<int_4> , 0, "LocalMap<int_4>");
|
---|
| 72 |
|
---|
[2898] | 73 | //DBG cout << " ---- FitsIOServerInitiator / DEBUG ---- ListHandlers() : " << endl;
|
---|
| 74 | //DBG FitsManager::ListHandlers();
|
---|
[3023] | 75 |
|
---|
| 76 | SophyaInitiator::RegisterModule("FitsIOServer", MOD_VERS); // Module name and version number registration
|
---|
[2864] | 77 | }
|
---|
| 78 |
|
---|
| 79 | FitsIOServerInitiator::~FitsIOServerInitiator()
|
---|
| 80 | {
|
---|
| 81 | FitsIOServerInitiator::FgInit--;
|
---|
| 82 | }
|
---|
| 83 |
|
---|
| 84 |
|
---|
| 85 | // On met un objet initiator en statique, pour les loaders qui savent
|
---|
| 86 | // appeler le constructeur des objets statiques
|
---|
[3038] | 87 | // #if !defined(Darwin)
|
---|
| 88 | // Probleme rencontre de nouveau en Juillet 2006 sur MacOS :
|
---|
| 89 | // La presence de l'objet statique fait planter les progs linkes libextsophya.dylib
|
---|
| 90 | // static FitsIOServerInitiator s_fios_init_;
|
---|
| 91 | // #endif
|
---|
[2864] | 92 |
|
---|