//#define TOISEQBUFFERED #include #include #include #include "toi.h" #include "toiprocessor.h" #include "fitstoirdr.h" #include "fitstoiwtr.h" #include "toimanager.h" #ifdef TOISEQBUFFERED #include "toiseqbuff.h" #else #include "toisegment.h" #endif #include "fitslocalmap.h" #include "sambainit.h" #include "toi2map.h" #include "localmap.h" #include "timing.h" #include void usage(void); void usage(void) { cout<<"tsttoi2map [-h] [-p lp] [-s samplemin,samplemax] [-c xcenter,ycenter]"<= vmin"<=sdeb) mgr->setRequestedSample(sdeb,sfin); //else {cout<<"Bad sample interval "<=narg) {usage(); exit(3);} char * fitsin_point = arg[optind]; char * fitsin_bolo = arg[optind+1]; string const fitlmapout = arg[optind+2]; if(optind+3>>> tsttoi2map:"<* map; PixelMap* wmap; LocalMap* lmap = new LocalMap(nbin,nbin); lmap->SetSize(size,size); lmap->SetOrigin(xcenter,ycenter); cout<<"LocalMap: Type de map : "<TypeOfMap()<NbPixels()<SizeIndex()<(*lmap); // TOI Processor TOI2Map toi2m(map,wmap); cout<<"TOI2Map created"<>>> Using TOISeqBuffered"<>>> Using TOISegmented"<setDebugLevel(1); rfitsp.addOutput(label_coord1,toicoord1in); toi2m.addInput("Coord1In",toicoord1in); #ifdef TOISEQBUFFERED TOISeqBuffered * toicoord2in = new TOISeqBuffered("toi_coord2_in",width); #else TOISegmented * toicoord2in = new TOISegmented("toi_coord2_in",width); #endif // toicoord2in->setDebugLevel(1); rfitsp.addOutput(label_coord2,toicoord2in); toi2m.addInput("Coord2In",toicoord2in); #ifdef TOISEQBUFFERED TOISeqBuffered * toibolin = new TOISeqBuffered("toi_bolo_in",width); #else TOISegmented * toibolin = new TOISegmented("toi_bolo_in",width); #endif // toibolin->setDebugLevel(1); rfitsb.addOutput(label_bolomuv,toibolin); toi2m.addInput("BoloIn",toibolin); // Run cout<<"----- FITSReaderTOI::PrintStatus() : -----"<1) // for(int jjjj=0;jjjj<5;jjjj++) { // cout<<*toicoord1in; // cout<<*toibolin; // sleep(2); // } // Affichage de l'avancement des TOIProcessors ProcSampleCounter stats(toi2m); stats.InfoMessage() = "tsttoi2map/Info"; stats.PrintStats(); // Fin des traitements des TOIProcessors mgr->joinAll(); PrtTim("End threads"); // Ecriture de la lmapere Healpix sur fits { FitsOutFile sfits(fitlmapout,FitsFile::clear); cout<<"tsttoi2map: Creating lmapere fits file "<*)map; } // Ecriture de la lmapere Healpix sur fits if(wmap) { FitsOutFile swfits(fitlmapwout,FitsFile::clear); cout<<"tsttoi2map: Creating lmapere weight fits file "<*)wmap; } // Nettoyage cout << "tsttoi2map: cleanup " << endl; delete lmap; if(wmap) delete wmap; cout << "tsttoi2map: ----------- End of job -------------- " << endl; //-------------------------------------------------------------------- } catch (PThrowable & exc) { cout<<"\ntsttoi2map: Catched Exception \n"<<(string)typeid(exc).name() <<" - Msg= "<