// ArchTOIPipe (C) CEA/DAPNIA/SPP IN2P3/LAL // Eric Aubourg // Christophe Magneville // Reza Ansari // $Id: toi2toi_addsp.cc,v 1.1 2002-07-16 08:48:06 cecile Exp $ #include "machdefs.h" #include "toimanager.h" #include "pexceptions.h" #include "ctimer.h" #include "toi2map.h" // La valeur "Pi" doit etre celle de smathconst.h a cause du test sur theta #include "smathconst.h" //////////////////////////////////////////////////////////////////////// TOI2Map::TOI2Map() : totnscount(0) { SetEquinox(); SetCoorIn(); SetCoorMap(); SetTestFlag(); SetTestMin(); SetTestMax(); } TOI2Map::~TOI2Map() { } //////////////////////////////////////////////////////////////////////// void TOI2Map::Print(::ostream & os) { } //////////////////////////////////////////////////////////////////////// void TOI2Map::init() { cout << "TOI2Map::init" << endl; declareInput("Coord1In"); declareInput("Coord2In"); declareInput("BoloIn"); declareInput("utc"); declareInput("lon"); declareInput("lat"); declareOutput("BoloOut"); } //////////////////////////////////////////////////////////////////////// // define SANS_BUFFER void TOI2Map::run() { long snb = getMinIn(); long sne = getMaxIn(); if(snb>sne) { cout<<"TOI2Map::run() - Bad sample interval"<mValMax) continue; // sphere phi entre [0,2*Pi] en radians // sphere theta entre [0,Pi] en radians double phi=-1.; CoordConvertToStd(mTypCoorIn,&coord1,&coord2); if(mTypCoorIn&TypCoordEq && mTypCoorMap&TypCoordGal) { // Eq -> Gal EqtoGal(mjd,coord1,coord2,&coord1,&coord2); phi = coord1 * Pi/180.; } else if(mTypCoorIn&TypCoordGal && mTypCoorMap&TypCoordEq) { // Gal -> Eq GaltoEq(mjd,coord1,coord2,&coord1,&coord2); phi = coord1 * Pi/12.; } else if(mTypCoorMap&TypCoordGal) { // Gal -> Gal phi = coord1 * Pi/180.; } else if(mTypCoorMap&TypCoordEq) { // Eq -> Eq phi = coord1 * Pi/12.; } ToCoLat(&coord2,TypUniteD); putData(0,s,bolo_sp,fgbolo); } cout<<"TOI2Map::run(): Fin de boucle sur les sampleNum"<