Changeset 2238 in Sophya for trunk/ArchTOIPipe


Ignore:
Timestamp:
Oct 30, 2002, 11:18:28 AM (23 years ago)
Author:
aubourg
Message:

generation xsl a jour

Location:
trunk/ArchTOIPipe/TestPipes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/TestPipes/mainxmlpipe.cc

    r2220 r2238  
    22// main genere automatiquement par xsl
    33// ne pas modifier
    4 // derniere mise a jour : VF le 22/10/2002
     4// derniere mise a jour : VF le 29/10/2002 -- derniere version
    55
    66// inclusions expat
     
    2525#endif
    2626
    27 #include "smoothtoi.h"
    28 #include "demopipe.h"
    2927#include "fitstoirdr.h"
    3028#include "fitstoiwtr.h"
     29#include "smoothtoi.h"
     30#include "toi2map.h"
     31#include "map2toi.h"
     32#include "flag2map.h"
     33#include "rztoi.h"
     34#include "rztoi.h"
     35#include "noisegen.h"
     36#include "noisegen.h"
     37#include "noisegen.h"
     38#include "meanvarestim.h"
     39#include "demopipe.h"
    3140
    3241// classe de gestion des balises en design patern object call-back
     
    163172  } else if (id == "") {                                            // si nouveau processeur
    164173
    165   if ((string)name == "smooth") {
    166     uint_4 lsm;
    167     uint_4 deg;
     174  if ((string)name == "fitsreader") {
     175    string fn;
    168176   
    169177       
     
    176184       
    177185        //initialisation des arguments par defaut si existants
    178        
    179 
    180         // mise a jour des arguments
    181        
    182         if ((string)atts[i] == "lsm") {
    183            lsm = atoi(atts[i+1]);
    184              
    185         }
    186        
    187         if ((string)atts[i] == "deg") {
    188            deg = atoi(atts[i+1]);
     186        fn = "test.fits";
     187           
     188
     189        // mise a jour des arguments
     190       
     191        if ((string)atts[i] == "fn") {
     192           fn = atts[i+1];
    189193             
    190194        }
     
    193197   
    194198    // creation du toiprocesseur
    195     toiProc[id] = new DataSmooth (lsm, deg);
    196   }
    197 
    198   if ((string)name == "demopipe") {
     199    toiProc[id] = new FITSTOIReader (fn);
     200  }
     201
     202  if ((string)name == "fitswriter") {
     203    string fn;
    199204   
    200205       
     
    211216        // mise a jour des arguments
    212217       
     218        if ((string)atts[i] == "fn") {
     219           fn = atts[i+1];
     220             
     221        }
     222       
    213223      }
    214224   
    215225    // creation du toiprocesseur
    216     toiProc[id] = new DemoPipe ();
    217   }
    218 
    219   if ((string)name == "fitsreader") {
    220     string fn;
     226    toiProc[id] = new FITSTOIWriter (fn);
     227  }
     228
     229  if ((string)name == "smooth") {
     230    uint_4 lsm;
     231    uint_4 deg;
    221232   
    222233       
     
    229240       
    230241        //initialisation des arguments par defaut si existants
    231         fn = "test.fits";
    232            
    233 
    234         // mise a jour des arguments
    235        
    236         if ((string)atts[i] == "fn") {
    237            fn = atts[i+1];
     242       
     243
     244        // mise a jour des arguments
     245       
     246        if ((string)atts[i] == "lsm") {
     247           lsm = atoi(atts[i+1]);
     248             
     249        }
     250       
     251        if ((string)atts[i] == "deg") {
     252           deg = atoi(atts[i+1]);
    238253             
    239254        }
     
    242257   
    243258    // creation du toiprocesseur
    244     toiProc[id] = new FITSTOIReader (fn);
    245   }
    246 
    247   if ((string)name == "fitswriter") {
    248     string fn;
     259    toiProc[id] = new DataSmooth (lsm, deg);
     260  }
     261
     262  if ((string)name == "toi2map") {
     263    string map;
     264    string wmap;
    249265   
    250266       
     
    257273       
    258274        //initialisation des arguments par defaut si existants
    259        
    260 
    261         // mise a jour des arguments
    262        
    263         if ((string)atts[i] == "fn") {
    264            fn = atts[i+1];
     275        wmap = "NULL";
     276           
     277
     278        // mise a jour des arguments
     279       
     280        if ((string)atts[i] == "map") {
     281           map = atts[i+1];
     282             
     283        }
     284       
     285        if ((string)atts[i] == "wmap") {
     286           wmap = atts[i+1];
    265287             
    266288        }
     
    269291   
    270292    // creation du toiprocesseur
    271     toiProc[id] = new FITSTOIWriter (fn);
     293    toiProc[id] = new TOI2Map (map, wmap);
     294  }
     295
     296  if ((string)name == "map2toi") {
     297    string sph;
     298   
     299       
     300    // gestion des arguments du constructeur
     301    for (i=0; atts[i]; i+=2) {
     302      // var pour instanciation
     303        if ((string)atts[i] == "id") {
     304            id=atts[i+1];
     305        }
     306       
     307        //initialisation des arguments par defaut si existants
     308       
     309
     310        // mise a jour des arguments
     311       
     312        if ((string)atts[i] == "sph") {
     313           sph = atts[i+1];
     314             
     315        }
     316       
     317      }
     318   
     319    // creation du toiprocesseur
     320    toiProc[id] = new Map2TOI (sph);
     321  }
     322
     323  if ((string)name == "flag2map") {
     324    string map;
     325    string wmap;
     326   
     327       
     328    // gestion des arguments du constructeur
     329    for (i=0; atts[i]; i+=2) {
     330      // var pour instanciation
     331        if ((string)atts[i] == "id") {
     332            id=atts[i+1];
     333        }
     334       
     335        //initialisation des arguments par defaut si existants
     336        wmap = "NULL";
     337           
     338
     339        // mise a jour des arguments
     340       
     341        if ((string)atts[i] == "map") {
     342           map = atts[i+1];
     343             
     344        }
     345       
     346        if ((string)atts[i] == "wmap") {
     347           wmap = atts[i+1];
     348             
     349        }
     350       
     351      }
     352   
     353    // creation du toiprocesseur
     354    toiProc[id] = new FLAG2Map (map, wmap);
     355  }
     356
     357  if ((string)name == "rztoiproc") {
     358    int w1;
     359    int w2;
     360    int nmax;
     361   
     362       
     363    // gestion des arguments du constructeur
     364    for (i=0; atts[i]; i+=2) {
     365      // var pour instanciation
     366        if ((string)atts[i] == "id") {
     367            id=atts[i+1];
     368        }
     369       
     370        //initialisation des arguments par defaut si existants
     371        w1 = 4096;
     372           w2 = 128;
     373           nmax = 20;
     374           
     375
     376        // mise a jour des arguments
     377       
     378        if ((string)atts[i] == "w1") {
     379           w1 = atoi(atts[i+1]);
     380             
     381        }
     382       
     383        if ((string)atts[i] == "w2") {
     384           w2 = atoi(atts[i+1]);
     385             
     386        }
     387       
     388        if ((string)atts[i] == "nmax") {
     389           nmax = atoi(atts[i+1]);
     390             
     391        }
     392       
     393      }
     394   
     395    // creation du toiprocesseur
     396    toiProc[id] = new RzTOIProc (w1, w2, nmax);
     397  }
     398
     399  if ((string)name == "rzsimpletoiproc") {
     400    int wsz;
     401    double fact;
     402   
     403       
     404    // gestion des arguments du constructeur
     405    for (i=0; atts[i]; i+=2) {
     406      // var pour instanciation
     407        if ((string)atts[i] == "id") {
     408            id=atts[i+1];
     409        }
     410       
     411        //initialisation des arguments par defaut si existants
     412        wsz = 1024;
     413           fact = 1.0;
     414           
     415
     416        // mise a jour des arguments
     417       
     418        if ((string)atts[i] == "wsz") {
     419           wsz = atoi(atts[i+1]);
     420             
     421        }
     422       
     423        if ((string)atts[i] == "fact") {
     424           fact = atof(atts[i+1]);
     425             
     426        }
     427       
     428      }
     429   
     430    // creation du toiprocesseur
     431    toiProc[id] = new RzSimpleTOIProc (wsz, fact);
     432  }
     433
     434  if ((string)name == "noisegen") {
     435   
     436       
     437    // gestion des arguments du constructeur
     438    for (i=0; atts[i]; i+=2) {
     439      // var pour instanciation
     440        if ((string)atts[i] == "id") {
     441            id=atts[i+1];
     442        }
     443       
     444        //initialisation des arguments par defaut si existants
     445       
     446
     447        // mise a jour des arguments
     448       
     449      }
     450   
     451    // creation du toiprocesseur
     452    toiProc[id] = new NoiseGen ();
     453  }
     454
     455  if ((string)name == "noisegengauss") {
     456    float sigma;
     457   
     458       
     459    // gestion des arguments du constructeur
     460    for (i=0; atts[i]; i+=2) {
     461      // var pour instanciation
     462        if ((string)atts[i] == "id") {
     463            id=atts[i+1];
     464        }
     465       
     466        //initialisation des arguments par defaut si existants
     467       
     468
     469        // mise a jour des arguments
     470       
     471        if ((string)atts[i] == "sigma") {
     472           sigma = atof(atts[i+1]);
     473             
     474        }
     475       
     476      }
     477   
     478    // creation du toiprocesseur
     479    toiProc[id] = new NoiseGenGauss (sigma);
     480  }
     481
     482  if ((string)name == "noisegen00F") {
     483    float fknee;
     484    float sigma;
     485   
     486       
     487    // gestion des arguments du constructeur
     488    for (i=0; atts[i]; i+=2) {
     489      // var pour instanciation
     490        if ((string)atts[i] == "id") {
     491            id=atts[i+1];
     492        }
     493       
     494        //initialisation des arguments par defaut si existants
     495       
     496
     497        // mise a jour des arguments
     498       
     499        if ((string)atts[i] == "fknee") {
     500           fknee = atof(atts[i+1]);
     501             
     502        }
     503       
     504        if ((string)atts[i] == "sigma") {
     505           sigma = atof(atts[i+1]);
     506             
     507        }
     508       
     509      }
     510   
     511    // creation du toiprocesseur
     512    toiProc[id] = new NoiseGenOOF (fknee, sigma);
     513  }
     514
     515  if ((string)name == "meanvarestimator") {
     516    int nsamp;
     517   
     518       
     519    // gestion des arguments du constructeur
     520    for (i=0; atts[i]; i+=2) {
     521      // var pour instanciation
     522        if ((string)atts[i] == "id") {
     523            id=atts[i+1];
     524        }
     525       
     526        //initialisation des arguments par defaut si existants
     527       
     528
     529        // mise a jour des arguments
     530       
     531        if ((string)atts[i] == "nsamp") {
     532           nsamp = atoi(atts[i+1]);
     533             
     534        }
     535       
     536      }
     537   
     538    // creation du toiprocesseur
     539    toiProc[id] = new MeanVarEstimator (nsamp);
     540  }
     541
     542  if ((string)name == "demopipe") {
     543   
     544       
     545    // gestion des arguments du constructeur
     546    for (i=0; atts[i]; i+=2) {
     547      // var pour instanciation
     548        if ((string)atts[i] == "id") {
     549            id=atts[i+1];
     550        }
     551       
     552        //initialisation des arguments par defaut si existants
     553       
     554
     555        // mise a jour des arguments
     556       
     557      }
     558   
     559    // creation du toiprocesseur
     560    toiProc[id] = new DemoPipe ();
    272561  }
    273562 
     
    276565    // gestion des methodes
    277566
     567  if (id == "fitsreader") {
     568   
     569  }
     570
     571  if (id == "fitswriter") {
     572   
     573  }
     574
    278575  if (id == "smooth") {
    279576   
     
    372669  }
    373670
     671  if (id == "toi2map") {
     672   
     673    if ((string)name == "SetEquinox") {
     674    double actualyear;
     675   
     676       
     677    // gestion des arguments de la methode
     678    for (i=0; atts[i]; i+=2) {     
     679        //initialisation des arguments par defaut si existants
     680        actualyear = 2000;
     681           
     682
     683        // mise a jour des arguments
     684       
     685        if ((string)atts[i] == "actualyear") {
     686           actualyear = atof(atts[i+1]);
     687           
     688        }
     689       
     690      }
     691   
     692    // appelle de la methode du processeur concerne
     693    ((TOI2Map*)toiProc[id])->SetEquinox (actualyear);
     694    }
     695   
     696    if ((string)name == "SetCoorIn") {
     697    long mfg;
     698   
     699       
     700    // gestion des arguments de la methode
     701    for (i=0; atts[i]; i+=2) {     
     702        //initialisation des arguments par defaut si existants
     703        mfg = TypCoordGalStd;
     704           
     705
     706        // mise a jour des arguments
     707       
     708        if ((string)atts[i] == "mfg") {
     709           mfg = atoi(atts[i+1]);
     710           
     711        }
     712       
     713      }
     714   
     715    // appelle de la methode du processeur concerne
     716    ((TOI2Map*)toiProc[id])->SetCoorIn (mfg);
     717    }
     718   
     719    if ((string)name == "SetCoorInChr") {
     720    char* ctype;
     721   
     722       
     723    // gestion des arguments de la methode
     724    for (i=0; atts[i]; i+=2) {     
     725        //initialisation des arguments par defaut si existants
     726       
     727
     728        // mise a jour des arguments
     729       
     730        if ((string)atts[i] == "ctype") {
     731           ctype = atts[i+1];
     732           
     733        }
     734       
     735      }
     736   
     737    // appelle de la methode du processeur concerne
     738    ((TOI2Map*)toiProc[id])->SetCoorIn (ctype);
     739    }
     740   
     741    if ((string)name == "SetCoorMap") {
     742    long mfg;
     743   
     744       
     745    // gestion des arguments de la methode
     746    for (i=0; atts[i]; i+=2) {     
     747        //initialisation des arguments par defaut si existants
     748        mfg = TypCoordGal;
     749           
     750
     751        // mise a jour des arguments
     752       
     753        if ((string)atts[i] == "mfg") {
     754           mfg = atoi(atts[i+1]);
     755           
     756        }
     757       
     758      }
     759   
     760    // appelle de la methode du processeur concerne
     761    ((TOI2Map*)toiProc[id])->SetCoorMap (mfg);
     762    }
     763   
     764    if ((string)name == "SetCoorMapChr") {
     765    char* ctype;
     766   
     767       
     768    // gestion des arguments de la methode
     769    for (i=0; atts[i]; i+=2) {     
     770        //initialisation des arguments par defaut si existants
     771       
     772
     773        // mise a jour des arguments
     774       
     775        if ((string)atts[i] == "ctype") {
     776           ctype = atts[i+1];
     777           
     778        }
     779       
     780      }
     781   
     782    // appelle de la methode du processeur concerne
     783    ((TOI2Map*)toiProc[id])->SetCoorMap (ctype);
     784    }
     785   
     786    if ((string)name == "SetCalibrationFactor") {
     787    double fac;
     788   
     789       
     790    // gestion des arguments de la methode
     791    for (i=0; atts[i]; i+=2) {     
     792        //initialisation des arguments par defaut si existants
     793        fac = 1.;
     794           
     795
     796        // mise a jour des arguments
     797       
     798        if ((string)atts[i] == "fac") {
     799           fac = atof(atts[i+1]);
     800           
     801        }
     802       
     803      }
     804   
     805    // appelle de la methode du processeur concerne
     806    ((TOI2Map*)toiProc[id])->SetCalibrationFactor (fac);
     807    }
     808   
     809    if ((string)name == "SetTestFlag") {
     810    bool tflg;
     811    long badflg;
     812   
     813       
     814    // gestion des arguments de la methode
     815    for (i=0; atts[i]; i+=2) {     
     816        //initialisation des arguments par defaut si existants
     817        tflg = "false";
     818           badflg = FlgToiAll;
     819           
     820
     821        // mise a jour des arguments
     822       
     823        if ((string)atts[i] == "tflg") {
     824           tflg = atts[i+1];
     825           
     826        }
     827       
     828        if ((string)atts[i] == "badflg") {
     829           badflg = atoi(atts[i+1]);
     830           
     831        }
     832       
     833      }
     834   
     835    // appelle de la methode du processeur concerne
     836    ((TOI2Map*)toiProc[id])->SetTestFlag (tflg, badflg);
     837    }
     838   
     839    if ((string)name == "SetTestMin") {
     840    bool tmin;
     841    double vmin;
     842   
     843       
     844    // gestion des arguments de la methode
     845    for (i=0; atts[i]; i+=2) {     
     846        //initialisation des arguments par defaut si existants
     847        tmin = "false";
     848           vmin = -1.e30;
     849           
     850
     851        // mise a jour des arguments
     852       
     853        if ((string)atts[i] == "tmin") {
     854           tmin = atts[i+1];
     855           
     856        }
     857       
     858        if ((string)atts[i] == "vmin") {
     859           vmin = atof(atts[i+1]);
     860           
     861        }
     862       
     863      }
     864   
     865    // appelle de la methode du processeur concerne
     866    ((TOI2Map*)toiProc[id])->SetTestMin (tmin, vmin);
     867    }
     868   
     869    if ((string)name == "SetTestMax") {
     870    bool tmax;
     871    double vmax;
     872   
     873       
     874    // gestion des arguments de la methode
     875    for (i=0; atts[i]; i+=2) {     
     876        //initialisation des arguments par defaut si existants
     877        tmax = "false";
     878           vmax = +1.e30;
     879           
     880
     881        // mise a jour des arguments
     882       
     883        if ((string)atts[i] == "tmax") {
     884           tmax = atts[i+1];
     885           
     886        }
     887       
     888        if ((string)atts[i] == "vmax") {
     889           vmax = atof(atts[i+1]);
     890           
     891        }
     892       
     893      }
     894   
     895    // appelle de la methode du processeur concerne
     896    ((TOI2Map*)toiProc[id])->SetTestMax (tmax, vmax);
     897    }
     898   
     899  }
     900
     901  if (id == "map2toi") {
     902   
     903    if ((string)name == "SetBad") {
     904    long flg;
     905   
     906       
     907    // gestion des arguments de la methode
     908    for (i=0; atts[i]; i+=2) {     
     909        //initialisation des arguments par defaut si existants
     910        flg = FlgToiOut;
     911           
     912
     913        // mise a jour des arguments
     914       
     915        if ((string)atts[i] == "flg") {
     916           flg = atoi(atts[i+1]);
     917           
     918        }
     919       
     920      }
     921   
     922    // appelle de la methode du processeur concerne
     923    ((Map2TOI*)toiProc[id])->SetBad (flg);
     924    }
     925   
     926    if ((string)name == "SetEquinox") {
     927    double actualyear;
     928   
     929       
     930    // gestion des arguments de la methode
     931    for (i=0; atts[i]; i+=2) {     
     932        //initialisation des arguments par defaut si existants
     933        actualyear = 2000;
     934           
     935
     936        // mise a jour des arguments
     937       
     938        if ((string)atts[i] == "actualyear") {
     939           actualyear = atof(atts[i+1]);
     940           
     941        }
     942       
     943      }
     944   
     945    // appelle de la methode du processeur concerne
     946    ((Map2TOI*)toiProc[id])->SetEquinox (actualyear);
     947    }
     948   
     949    if ((string)name == "SetCoorIn") {
     950    long mfg;
     951   
     952       
     953    // gestion des arguments de la methode
     954    for (i=0; atts[i]; i+=2) {     
     955        //initialisation des arguments par defaut si existants
     956        mfg = TypCoordGalStd;
     957           
     958
     959        // mise a jour des arguments
     960       
     961        if ((string)atts[i] == "mfg") {
     962           mfg = atoi(atts[i+1]);
     963           
     964        }
     965       
     966      }
     967   
     968    // appelle de la methode du processeur concerne
     969    ((Map2TOI*)toiProc[id])->SetCoorIn (mfg);
     970    }
     971   
     972    if ((string)name == "SetCoorInChr") {
     973    char* ctype;
     974   
     975       
     976    // gestion des arguments de la methode
     977    for (i=0; atts[i]; i+=2) {     
     978        //initialisation des arguments par defaut si existants
     979       
     980
     981        // mise a jour des arguments
     982       
     983        if ((string)atts[i] == "ctype") {
     984           ctype = atts[i+1];
     985           
     986        }
     987       
     988      }
     989   
     990    // appelle de la methode du processeur concerne
     991    ((Map2TOI*)toiProc[id])->SetCoorIn (ctype);
     992    }
     993   
     994    if ((string)name == "SetCoorMap") {
     995    long mfg;
     996   
     997       
     998    // gestion des arguments de la methode
     999    for (i=0; atts[i]; i+=2) {     
     1000        //initialisation des arguments par defaut si existants
     1001        mfg = TypCoordGal;
     1002           
     1003
     1004        // mise a jour des arguments
     1005       
     1006        if ((string)atts[i] == "mfg") {
     1007           mfg = atoi(atts[i+1]);
     1008           
     1009        }
     1010       
     1011      }
     1012   
     1013    // appelle de la methode du processeur concerne
     1014    ((Map2TOI*)toiProc[id])->SetCoorMap (mfg);
     1015    }
     1016   
     1017    if ((string)name == "SetCoorMapChr") {
     1018    char* ctype;
     1019   
     1020       
     1021    // gestion des arguments de la methode
     1022    for (i=0; atts[i]; i+=2) {     
     1023        //initialisation des arguments par defaut si existants
     1024       
     1025
     1026        // mise a jour des arguments
     1027       
     1028        if ((string)atts[i] == "ctype") {
     1029           ctype = atts[i+1];
     1030           
     1031        }
     1032       
     1033      }
     1034   
     1035    // appelle de la methode du processeur concerne
     1036    ((Map2TOI*)toiProc[id])->SetCoorMap (ctype);
     1037    }
     1038   
     1039  }
     1040
     1041  if (id == "flag2map") {
     1042   
     1043    if ((string)name == "SetEquinox") {
     1044    double actualyear;
     1045   
     1046       
     1047    // gestion des arguments de la methode
     1048    for (i=0; atts[i]; i+=2) {     
     1049        //initialisation des arguments par defaut si existants
     1050        actualyear = 2000;
     1051           
     1052
     1053        // mise a jour des arguments
     1054       
     1055        if ((string)atts[i] == "actualyear") {
     1056           actualyear = atof(atts[i+1]);
     1057           
     1058        }
     1059       
     1060      }
     1061   
     1062    // appelle de la methode du processeur concerne
     1063    ((FLAG2Map*)toiProc[id])->SetEquinox (actualyear);
     1064    }
     1065   
     1066    if ((string)name == "SetCoorIn") {
     1067    long mfg;
     1068   
     1069       
     1070    // gestion des arguments de la methode
     1071    for (i=0; atts[i]; i+=2) {     
     1072        //initialisation des arguments par defaut si existants
     1073        mfg = TypCoordGalStd;
     1074           
     1075
     1076        // mise a jour des arguments
     1077       
     1078        if ((string)atts[i] == "mfg") {
     1079           mfg = atoi(atts[i+1]);
     1080           
     1081        }
     1082       
     1083      }
     1084   
     1085    // appelle de la methode du processeur concerne
     1086    ((FLAG2Map*)toiProc[id])->SetCoorIn (mfg);
     1087    }
     1088   
     1089    if ((string)name == "SetCoorInChr") {
     1090    char* ctype;
     1091   
     1092       
     1093    // gestion des arguments de la methode
     1094    for (i=0; atts[i]; i+=2) {     
     1095        //initialisation des arguments par defaut si existants
     1096       
     1097
     1098        // mise a jour des arguments
     1099       
     1100        if ((string)atts[i] == "ctype") {
     1101           ctype = atts[i+1];
     1102           
     1103        }
     1104       
     1105      }
     1106   
     1107    // appelle de la methode du processeur concerne
     1108    ((FLAG2Map*)toiProc[id])->SetCoorIn (ctype);
     1109    }
     1110   
     1111    if ((string)name == "SetCoorMap") {
     1112    long mfg;
     1113   
     1114       
     1115    // gestion des arguments de la methode
     1116    for (i=0; atts[i]; i+=2) {     
     1117        //initialisation des arguments par defaut si existants
     1118        mfg = TypCoordGal;
     1119           
     1120
     1121        // mise a jour des arguments
     1122       
     1123        if ((string)atts[i] == "mfg") {
     1124           mfg = atoi(atts[i+1]);
     1125           
     1126        }
     1127       
     1128      }
     1129   
     1130    // appelle de la methode du processeur concerne
     1131    ((FLAG2Map*)toiProc[id])->SetCoorMap (mfg);
     1132    }
     1133   
     1134    if ((string)name == "SetCoorMapChr") {
     1135    char* ctype;
     1136   
     1137       
     1138    // gestion des arguments de la methode
     1139    for (i=0; atts[i]; i+=2) {     
     1140        //initialisation des arguments par defaut si existants
     1141       
     1142
     1143        // mise a jour des arguments
     1144       
     1145        if ((string)atts[i] == "ctype") {
     1146           ctype = atts[i+1];
     1147           
     1148        }
     1149       
     1150      }
     1151   
     1152    // appelle de la methode du processeur concerne
     1153    ((FLAG2Map*)toiProc[id])->SetCoorMap (ctype);
     1154    }
     1155   
     1156    if ((string)name == "SetCalibrationFactor") {
     1157    double fac;
     1158   
     1159       
     1160    // gestion des arguments de la methode
     1161    for (i=0; atts[i]; i+=2) {     
     1162        //initialisation des arguments par defaut si existants
     1163        fac = 1.;
     1164           
     1165
     1166        // mise a jour des arguments
     1167       
     1168        if ((string)atts[i] == "fac") {
     1169           fac = atof(atts[i+1]);
     1170           
     1171        }
     1172       
     1173      }
     1174   
     1175    // appelle de la methode du processeur concerne
     1176    ((FLAG2Map*)toiProc[id])->SetCalibrationFactor (fac);
     1177    }
     1178   
     1179    if ((string)name == "SetTestFlag") {
     1180    bool tflg;
     1181    long badflg;
     1182   
     1183       
     1184    // gestion des arguments de la methode
     1185    for (i=0; atts[i]; i+=2) {     
     1186        //initialisation des arguments par defaut si existants
     1187        tflg = "false";
     1188           badflg = FlgToiAll;
     1189           
     1190
     1191        // mise a jour des arguments
     1192       
     1193        if ((string)atts[i] == "tflg") {
     1194           tflg = atts[i+1];
     1195           
     1196        }
     1197       
     1198        if ((string)atts[i] == "badflg") {
     1199           badflg = atoi(atts[i+1]);
     1200           
     1201        }
     1202       
     1203      }
     1204   
     1205    // appelle de la methode du processeur concerne
     1206    ((FLAG2Map*)toiProc[id])->SetTestFlag (tflg, badflg);
     1207    }
     1208   
     1209    if ((string)name == "SetTestMin") {
     1210    bool tmin;
     1211    double vmin;
     1212   
     1213       
     1214    // gestion des arguments de la methode
     1215    for (i=0; atts[i]; i+=2) {     
     1216        //initialisation des arguments par defaut si existants
     1217        tmin = "false";
     1218           vmin = -1.e30;
     1219           
     1220
     1221        // mise a jour des arguments
     1222       
     1223        if ((string)atts[i] == "tmin") {
     1224           tmin = atts[i+1];
     1225           
     1226        }
     1227       
     1228        if ((string)atts[i] == "vmin") {
     1229           vmin = atof(atts[i+1]);
     1230           
     1231        }
     1232       
     1233      }
     1234   
     1235    // appelle de la methode du processeur concerne
     1236    ((FLAG2Map*)toiProc[id])->SetTestMin (tmin, vmin);
     1237    }
     1238   
     1239    if ((string)name == "SetTestMax") {
     1240    bool tmax;
     1241    double vmax;
     1242   
     1243       
     1244    // gestion des arguments de la methode
     1245    for (i=0; atts[i]; i+=2) {     
     1246        //initialisation des arguments par defaut si existants
     1247        tmax = "false";
     1248           vmax = +1.e30;
     1249           
     1250
     1251        // mise a jour des arguments
     1252       
     1253        if ((string)atts[i] == "tmax") {
     1254           tmax = atts[i+1];
     1255           
     1256        }
     1257       
     1258        if ((string)atts[i] == "vmax") {
     1259           vmax = atof(atts[i+1]);
     1260           
     1261        }
     1262       
     1263      }
     1264   
     1265    // appelle de la methode du processeur concerne
     1266    ((FLAG2Map*)toiProc[id])->SetTestMax (tmax, vmax);
     1267    }
     1268   
     1269  }
     1270
     1271  if (id == "rztoiproc") {
     1272   
     1273    if ((string)name == "SetOutPPF") {
     1274    string ppfname;
     1275   
     1276       
     1277    // gestion des arguments de la methode
     1278    for (i=0; atts[i]; i+=2) {     
     1279        //initialisation des arguments par defaut si existants
     1280       
     1281
     1282        // mise a jour des arguments
     1283       
     1284        if ((string)atts[i] == "ppfname") {
     1285           ppfname = atts[i+1];
     1286           
     1287        }
     1288       
     1289      }
     1290   
     1291    // appelle de la methode du processeur concerne
     1292    ((RzTOIProc*)toiProc[id])->SetOutPPF (ppfname);
     1293    }
     1294   
     1295  }
     1296
     1297  if (id == "rzsimpletoiproc") {
     1298   
     1299  }
     1300
     1301  if (id == "noisegen") {
     1302   
     1303  }
     1304
     1305  if (id == "noisegengauss") {
     1306   
     1307  }
     1308
     1309  if (id == "noisegen00F") {
     1310   
     1311  }
     1312
     1313  if (id == "meanvarestimator") {
     1314   
     1315    if ((string)name == "doNotLookAt") {
     1316    long flag;
     1317   
     1318       
     1319    // gestion des arguments de la methode
     1320    for (i=0; atts[i]; i+=2) {     
     1321        //initialisation des arguments par defaut si existants
     1322        flag = FlgToiAll;
     1323           
     1324
     1325        // mise a jour des arguments
     1326       
     1327        if ((string)atts[i] == "flag") {
     1328           flag = atoi(atts[i+1]);
     1329           
     1330        }
     1331       
     1332      }
     1333   
     1334    // appelle de la methode du processeur concerne
     1335    ((MeanVarEstimator*)toiProc[id])->doNotLookAt (flag);
     1336    }
     1337   
     1338  }
     1339
    3741340  if (id == "demopipe") {
    375    
    376   }
    377 
    378   if (id == "fitsreader") {
    379    
    380   }
    381 
    382   if (id == "fitswriter") {
    3831341   
    3841342  }
     
    3941352  // verification si une balise processeur est fermee pour la gestion des methodes d'initialisation
    3951353 
     1354  if ((string)name == "fitsreader") {
     1355    id="";
     1356  }
     1357 
     1358  if ((string)name == "fitswriter") {
     1359    id="";
     1360  }
     1361 
    3961362  if ((string)name == "smooth") {
    3971363    id="";
    3981364  }
    3991365 
     1366  if ((string)name == "toi2map") {
     1367    id="";
     1368  }
     1369 
     1370  if ((string)name == "map2toi") {
     1371    id="";
     1372  }
     1373 
     1374  if ((string)name == "flag2map") {
     1375    id="";
     1376  }
     1377 
     1378  if ((string)name == "rztoiproc") {
     1379    id="";
     1380  }
     1381 
     1382  if ((string)name == "rzsimpletoiproc") {
     1383    id="";
     1384  }
     1385 
     1386  if ((string)name == "noisegen") {
     1387    id="";
     1388  }
     1389 
     1390  if ((string)name == "noisegengauss") {
     1391    id="";
     1392  }
     1393 
     1394  if ((string)name == "noisegen00F") {
     1395    id="";
     1396  }
     1397 
     1398  if ((string)name == "meanvarestimator") {
     1399    id="";
     1400  }
     1401 
    4001402  if ((string)name == "demopipe") {
    401     id="";
    402   }
    403  
    404   if ((string)name == "fitsreader") {
    405     id="";
    406   }
    407  
    408   if ((string)name == "fitswriter") {
    4091403    id="";
    4101404  }
  • trunk/ArchTOIPipe/TestPipes/xsl/makeMainConnect.xsl

    r2220 r2238  
    1010// main genere automatiquement par xsl
    1111// ne pas modifier
    12 // derniere mise a jour : VF le 22/10/2002
     12// derniere mise a jour : VF le 29/10/2002 -- derniere version
    1313
    1414// inclusions expat
     
    205205           <xsl:value-of select="@name"/> = <xsl:value-of select="$defaut"/>;
    206206           </xsl:if>
    207            <xsl:if test="$typearg='string' or $typearg='char*' or $typearg='char'">
     207           <xsl:if test="$typearg='string' or $typearg='char*' or $typearg='char' or $typearg='bool'">
    208208           <xsl:value-of select="@name"/> = "<xsl:value-of select="$defaut"/>";
    209209           </xsl:if>
     
    223223           <xsl:value-of select="@name"/> = atof(atts[i+1]);
    224224           </xsl:if>
    225            <xsl:if test="$typearg='char' or $typearg='char*' or $typearg='string'">
     225           <xsl:if test="$typearg='char' or $typearg='char*' or $typearg='string' or $typearg='bool'">
    226226           <xsl:value-of select="@name"/> = atts[i+1];
    227227           </xsl:if> 
     
    268268           <xsl:value-of select="@name"/> = <xsl:value-of select="$defaut"/>;
    269269           </xsl:if>
    270            <xsl:if test="$typearg='string' or $typearg='char*' or $typearg='char'">
     270           <xsl:if test="$typearg='string' or $typearg='char*' or $typearg='char' or $typearg='bool'">
    271271           <xsl:value-of select="@name"/> = "<xsl:value-of select="$defaut"/>";
    272272           </xsl:if>
     
    286286           <xsl:value-of select="@name"/> = atof(atts[i+1]);
    287287           </xsl:if>
    288            <xsl:if test="$typearg='char' or $typearg='char*' or $typearg='string'">
     288           <xsl:if test="$typearg='char' or $typearg='char*' or $typearg='string' or $typearg='bool'">
    289289           <xsl:value-of select="@name"/> = atts[i+1];
    290290           </xsl:if>
  • trunk/ArchTOIPipe/TestPipes/xsl/processors.xml

    r2220 r2238  
    1 <!-- Vivien FEBVRE 26/09/2002 -->
    2 <!-- exemple de fichiers descriptif de processeurs -->
     1<!-- Vivien FEBVRE le 26/09/2002 -->
     2<!-- exemple de fichier descriptif de processeurs -->
    33
    44
     
    99
    1010
     11<processor name="fitsreader" class="FITSTOIReader" include="fitstoirdr.h">   
     12<init>
     13<param name="fn" type="string" default="test.fits"/>
     14</init>
     15<connection>
     16</connection>
     17</processor>
     18
     19<processor name="fitswriter" class="FITSTOIWriter" include="fitstoiwtr.h">   
     20<init>
     21<param name="fn" type="string"/>
     22</init>
     23<connection>
     24</connection>
     25</processor>
     26
    1127<processor name="smooth" class="DataSmooth" include="smoothtoi.h">   
    12 
    1328<init>
    1429<param name="lsm" type="uint_4"/>
    1530<param name="deg" type="uint_4"/>
    1631</init>
    17 
    1832<attribute name="DoNotLookAt" methode="DoNotLookAt">
    1933<param name="flag" type="uint_8" default="FlgToiAll"/>
     
    2842<param name="lsmin" type="uint_4" default="0"/>
    2943</attribute>
    30 
    3144<connection>
    3245<input name="DataIn"/>
    3346<output name="DataSmooth"/>
    3447</connection>
    35 
    36 </processor>
    37 
    38 
     48</processor>
     49
     50<processor name="toi2map" class="TOI2Map" include="toi2map.h">   
     51<init>
     52<param name="map" type="string"/>
     53<param name="wmap" type="string" default="NULL"/>
     54</init>
     55<attribute name="SetEquinox" methode="SetEquinox">
     56<param name="actualyear" type="double" default="2000"/>
     57</attribute>
     58<attribute name="SetCoorIn" methode= "SetCoorIn">
     59<param name="mfg" type="long" default="TypCoordGalStd"/>
     60</attribute>
     61<attribute name="SetCoorInChr" methode="SetCoorIn">
     62<param name="ctype" type="char*"/>
     63</attribute>
     64<attribute name="SetCoorMap" methode="SetCoorMap">
     65<param name="mfg" type="long" default="TypCoordGal"/>
     66</attribute>
     67<attribute name="SetCoorMapChr" methode="SetCoorMap">
     68<param name="ctype" type="char*"/>
     69</attribute>
     70<attribute name="SetCalibrationFactor" methode="SetCalibrationFactor">
     71<param name="fac" type="double" default="1."/>
     72</attribute>
     73<attribute name="SetTestFlag" methode="SetTestFlag">
     74<param name="tflg" type="bool" default="false"/>
     75<param name="badflg" type="long" default="FlgToiAll"/>
     76</attribute>
     77<attribute name="SetTestMin" methode="SetTestMin">
     78<param name="tmin" type="bool" default="false"/>
     79<param name="vmin" type="double" default="-1.e30"/>
     80</attribute>
     81<attribute name="SetTestMax" methode="SetTestMax">
     82<param name="tmax" type="bool" default="false"/>
     83<param name="vmax" type="double" default="+1.e30"/>
     84</attribute>
     85<connection>
     86<input name="Coord1In"/>
     87<input name="Coord2In"/>
     88<input name="BoloIn"/>
     89</connection>
     90</processor>
     91
     92<processor name="map2toi" class="Map2TOI" include="map2toi.h">   
     93<init>
     94<param name="sph" type="string"/>
     95</init>
     96<attribute name="SetBad" methode="SetBad">
     97<param name="flg" type="long" default="FlgToiOut"/>
     98</attribute>
     99<attribute name="SetEquinox" methode="SetEquinox">
     100<param name="actualyear" type="double" default="2000"/>
     101</attribute>
     102<attribute name="SetCoorIn" methode= "SetCoorIn">
     103<param name="mfg" type="long" default="TypCoordGalStd"/>
     104</attribute>
     105<attribute name="SetCoorInChr" methode="SetCoorIn">
     106<param name="ctype" type="char*"/>
     107</attribute>
     108<attribute name="SetCoorMap" methode="SetCoorMap">
     109<param name="mfg" type="long" default="TypCoordGal"/>
     110</attribute>
     111<attribute name="SetCoorMapChr" methode="SetCoorMap">
     112<param name="ctype" type="char*"/>
     113</attribute>
     114<connection>
     115<input name="Coord1In"/>
     116<input name="Coord2In"/>
     117<output name="Coord1Out"/>
     118<output name="Coord2Out"/>
     119<output name="BoloOut"/>
     120</connection>
     121</processor>
     122
     123<processor name="flag2map" class="FLAG2Map" include="flag2map.h">   
     124<init>
     125<param name="map" type="string"/>
     126<param name="wmap" type="string" default="NULL"/>
     127</init>
     128<attribute name="SetEquinox" methode="SetEquinox">
     129<param name="actualyear" type="double" default="2000"/>
     130</attribute>
     131<attribute name="SetCoorIn" methode= "SetCoorIn">
     132<param name="mfg" type="long" default="TypCoordGalStd"/>
     133</attribute>
     134<attribute name="SetCoorInChr" methode="SetCoorIn">
     135<param name="ctype" type="char*"/>
     136</attribute>
     137<attribute name="SetCoorMap" methode="SetCoorMap">
     138<param name="mfg" type="long" default="TypCoordGal"/>
     139</attribute>
     140<attribute name="SetCoorMapChr" methode="SetCoorMap">
     141<param name="ctype" type="char*"/>
     142</attribute>
     143<attribute name="SetCalibrationFactor" methode="SetCalibrationFactor">
     144<param name="fac" type="double" default="1."/>
     145</attribute>
     146<attribute name="SetTestFlag" methode="SetTestFlag">
     147<param name="tflg" type="bool" default="false"/>
     148<param name="badflg" type="long" default="FlgToiAll"/>
     149</attribute>
     150<attribute name="SetTestMin" methode="SetTestMin">
     151<param name="tmin" type="bool" default="false"/>
     152<param name="vmin" type="double" default="-1.e30"/>
     153</attribute>
     154<attribute name="SetTestMax" methode="SetTestMax">
     155<param name="tmax" type="bool" default="false"/>
     156<param name="vmax" type="double" default="+1.e30"/>
     157</attribute>
     158<connection>
     159<input name="Coord1In"/>
     160<input name="Coord2In"/>
     161<input name="BoloIn"/>
     162</connection>
     163</processor>
     164
     165<processor name="rztoiproc" class="RzTOIProc" include="rztoi.h">   
     166<init>
     167<param name="w1" type="int" default="4096"/>
     168<param name="w2" type="int" default="128"/>
     169<param name="nmax" type="int" default="20"/>
     170</init>
     171<attribute name="SetOutPPF" methode="SetOutPPF">
     172<param name="ppfname" type="string"/>
     173</attribute>
     174<connection>
     175<input name="in"/>
     176<output name="out"/>
     177</connection>
     178</processor>
     179
     180<processor name="rzsimpletoiproc" class="RzSimpleTOIProc" include="rztoi.h">   
     181<init>
     182<param name="wsz" type="int" default="1024"/>
     183<param name="fact" type="double" default="1.0"/>
     184</init>
     185<connection>
     186<input name="in"/>
     187<output name="out"/>
     188</connection>
     189</processor>
     190
     191<processor name="noisegen" class="NoiseGen" include="noisegen.h">   
     192<connection>
     193<output name="noise"/>
     194</connection>
     195</processor>
     196
     197<processor name="noisegengauss" class="NoiseGenGauss" include="noisegen.h">   
     198<init>
     199<param name="sigma" type="float"/>
     200</init>
     201<connection>
     202<output name="noise"/>
     203</connection>
     204</processor>
     205
     206<processor name="noisegen00F" class="NoiseGenOOF" include="noisegen.h">   
     207<init>
     208<param name="fknee" type="float"/>
     209<param name="sigma" type="float"/>
     210</init>
     211<connection>
     212<output name="noise"/>
     213</connection>
     214</processor>
     215
     216<processor name="meanvarestimator" class="MeanVarEstimator" include="meanvarestim.h">   
     217<init>
     218<param name="nsamp" type="int"/>
     219</init>
     220<attribute name="doNotLookAt" methode="doNotLookAt">
     221<param name="flag" type="long" default="FlgToiAll"/>
     222</attribute>
     223<connection>
     224<input name="signal"/>
     225<output name="mean"/>
     226<output name="variance"/>
     227</connection>
     228</processor>
     229
     230
     231
     232<!-- processeur fictif de demo -->
    39233<processor name="demopipe" class="DemoPipe" include="demopipe.h">   
    40234
     
    49243</processor>
    50244
    51 <processor name="fitsreader" class="FITSTOIReader" include="fitstoirdr.h">   
    52 <init>
    53 <param name="fn" type="string" default="test.fits"/>
    54 </init>
    55 
    56 <connection>
    57 </connection>
    58 
    59 </processor>
    60 
    61 <processor name="fitswriter" class="FITSTOIWriter" include="fitstoiwtr.h">   
    62 <init>
    63 <param name="fn" type="string"/>
    64 </init>
    65 
    66 <connection>
    67 </connection>
    68 
    69 </processor>
    70 
    71 
    72245</processors>
    73246
Note: See TracChangeset for help on using the changeset viewer.