// This may look like C code, but it is really -*- C++ -*- // ArchTOIPipe (C) CEA/DAPNIA/SPP IN2P3/LAL // Eric Aubourg // Christophe Magneville // Reza Ansari // $Id: map2toi.h,v 1.8 2002-05-31 15:44:55 ansari Exp $ #ifndef MAP2TOI_H #define MAP2TOI_H #include "toiprocessor.h" #include "spherehealpix.h" #include "flagtoidef.h" #include "xastropack.h" //-- Un generateur de TOI a partir d'une sphere et de 2 TOIs coordin1,coordin2 // Lecture de 2 TOI coord1,coord2 et d'une Sphere Healpix // Sortie de 3 TOI coord1,coord2,boloMuV // // Structure generale : // Sphere ---- | // | // ----------- // toi CoordIn1 ---> | | ---> toi CoordOut1 // | Map2TOI | ---> toi CoordOut2 // toi CoordIn2 ---> | | ---> toi BoloOut // ----------- // Gestion du type de coordonnees : // Coord1In,Coord2In : soit Equatoriales (Alpha,Delta) // soit Galactiques (GLong,GLat) // La sphere peut avoir des coordonnees differentes des CoordIn // Si les CoordIn et les CoordSphere sont equatoriales -> meme equinoxe! // La sortie CoordOut aura les MEMES coordonnees que les CoordIn class Map2TOI : public TOIProcessor { public: Map2TOI(SphereHEALPix& sph); virtual ~Map2TOI(); virtual void init(void); virtual void run(void); // Flag pour les mauvais samples inline void SetBad(unsigned long long flg=FlgToiOut) {mBadFlag = flg;} // Pour definir la partie astrometrie inline void SetEquinox(double actualyear=2000.) {mActualYear = actualyear;} inline void SetCoorIn(unsigned long mfg=TypCoordGalStd) {mTypCoorIn = mfg;} inline void SetCoorIn(char const *ctype) {mTypCoorIn = DecodeTypAstro(ctype);} inline void SetCoorMap(unsigned long mfg=TypCoordGal) {mTypCoorMap = mfg;} inline void SetCoorMap(char const *ctype) {mTypCoorMap = DecodeTypAstro(ctype);} // Print void Print(::ostream & os); inline int_8 ProcessedSampleCount() const { return totnscount; } protected: SphereHEALPix& mSph; unsigned long mTypCoorIn,mTypCoorMap; unsigned long long mBadFlag; double mActualYear; int_8 totnscount; // Nombre total d'echantillon processe }; #endif