Changeset 4066 in Sophya


Ignore:
Timestamp:
Apr 27, 2012, 12:54:12 AM (13 years ago)
Author:
ansari
Message:

Ajout gestion de niveau d'impression globale pour les cartes du module SkyMap ds pixelmap.h et prise en compte du niveau pour les prints ds Resize des SphericalMaps (fait en janv 2012 ?), Reza 27/04/2012

Location:
trunk/SophyaLib/SkyMap
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SkyMap/pixelmap.h

    r2978 r4066  
    2727\endverbatim
    2828*/
     29
     30//! Set global print level for all pixel maps
     31void PixelMap_SetGlobalPrintLevel(int_4 lev=0);
     32//! Get global print level for all pixel maps
     33int_4 PixelMap_GetGlobalPrintLevel();
    2934
    3035template<class T>
  • trunk/SophyaLib/SkyMap/skymapinit.cc

    r3865 r4066  
    2828//   V=1.62 , Aou 2007: correction ds LocalMap::PixToSphereC()
    2929//   V=1.7  , Aou 2010
    30 #define MOD_VERS   1.70
     30//   V=1.72 , Avr 2012
     31#define MOD_VERS   1.72
    3132
    3233SkyMapInitiator::SkyMapInitiator()
  • trunk/SophyaLib/SkyMap/sphereecp.cc

    r3836 r4066  
    312312void  SphereECP<T>::Resize(int_4 m)
    313313{
    314   if ( (m <= 0) || ( m == _pixels.SizeY()) ) {
    315     cout << " SphereECP<T>::Resize(int_4 " << m << ") m<0 ou m=NTheta - Ne fait rien " << endl;
     314  if ( (m <= 0) || ( m == _pixels.SizeY()) ) {
     315    if (PixelMap_GetGlobalPrintLevel()>0) 
     316      cout << " SphereECP<T>::Resize(int_4 " << m << ") m<0 ou m=NTheta - Ne fait rien " << endl;
    316317    return;
    317318  }
    318319  int mphi = m;
    319320  if (_pixels.Size() > 0)  mphi = m*_pixels.SizeX()/_pixels.SizeY();
    320   cout << " SphereECP<T>::Resize(" << m
    321        << ") -> _pixels.Resize(" << mphi << "," << m << ")" << endl;
     321  if (PixelMap_GetGlobalPrintLevel()>0)
     322    cout << " SphereECP<T>::Resize(" << m
     323         << ") -> _pixels.Resize(" << mphi << "," << m << ")" << endl;
    322324  sa_size_t sz[5] = {0,0,0,0,0};
    323325  sz[0] = mphi;  sz[1] = m;
  • trunk/SophyaLib/SkyMap/spherehealpix.cc

    r3836 r4066  
    208208{
    209209  if ((m <= 0 && nSide_ > 0))  {
    210     cout << "SphereHEALPix<T>::Resize(m) with m<=0, NOT resized" << endl;
     210    if (PixelMap_GetGlobalPrintLevel()>0)
     211      cout << "SphereHEALPix<T>::Resize(m) with m<=0, NOT resized" << endl;
    211212    return;
    212213  }
  • trunk/SophyaLib/SkyMap/spherethetaphi.cc

    r3836 r4066  
    88#include "spherethetaphi.h"
    99
     10//----- global print level for spherical maps -----
     11static int_4  pixel_map_prt_lev_ = 0;
     12// Set global print level
     13void SOPHYA::PixelMap_SetGlobalPrintLevel(int_4 lev)
     14{ pixel_map_prt_lev_=lev; }
     15// Get global print level
     16int_4 SOPHYA::PixelMap_GetGlobalPrintLevel()
     17{ return pixel_map_prt_lev_; }
     18//----------------------------------------------------
    1019
    1120/*!
     
    124133{
    125134  if ((m <= 0) && (NTheta_ > 0) ) {
    126     cout << "SphereThetaPhi<T>::Resize(m) with m<=0 - NOT resized" << endl;
     135    if (PixelMap_GetGlobalPrintLevel()>0)
     136      cout << "SphereThetaPhi<T>::Resize(m) with m<=0 - NOT resized" << endl;
    127137    return;
    128138  }
  • trunk/SophyaLib/SkyMap/sphericalmap.h

    r2990 r4066  
    3333 
    3434public :
    35 
    3635SphericalMap() {};
    3736virtual  ~SphericalMap() {};
     
    6463*/
    6564virtual T*   GetThetaSliceDataPtr(int_4 sliceIndex) { return NULL; }
     65
     66protected:
     67  static int_4 prt_lev_;  //!< Print level
    6668};
    6769
Note: See TracChangeset for help on using the changeset viewer.