// ArchTOIPipe (C) CEA/DAPNIA/SPP IN2P3/LAL // Eric Aubourg // Christophe Magneville // Reza Ansari // $Id: toi2toi_addsp.cc,v 1.4 2002-07-16 17:01:36 cmv Exp $ #include "machdefs.h" #include "toimanager.h" #include "pexceptions.h" #include "ctimer.h" #include "toi2toi_addsp.h" // La valeur "Pi" doit etre celle de smathconst.h a cause du test sur theta #include "smathconst.h" //////////////////////////////////////////////////////////////////////// Toi2toi_Addsp::Toi2toi_Addsp(int_4 ns) : nb_src(ns) { Fill_Info_scr(); SetEquinox(); SetCoorIn(); SetCoorMap(); SetTestFlag(); SetTestMin(); SetTestMax(); } Toi2toi_Addsp::~Toi2toi_Addsp() { } //////////////////////////////////////////////////////////////////////// void Toi2toi_Addsp::Print(::ostream & os) { } //////////////////////////////////////////////////////////////////////// void Toi2toi_Addsp::init() { cout << "Toi2toi_Addsp::init" << endl; declareInput("BoloIn"); declareInput("Coord1In"); declareInput("Coord2In"); declareInput("utc"); declareInput("lon"); declareInput("lat"); declareOutput("BoloOut"); } //////////////////////////////////////////////////////////////////////// void Toi2toi_Addsp::run() { long snb = getMinIn(); long sne = getMaxIn(); if(snb>sne) { cout<<"Toi2toi_Addsp::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); bolo_sp=bolo; putData(0,s,bolo_sp,fgbolo); } cout<<"Toi2toi_Addsp::run(): Fin de boucle sur les sampleNum"<