- Timestamp:
- Sep 27, 1996, 12:28:58 AM (29 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/Makefile
r18 r21 9 9 # i.e. variables LIB, OBJ, EXE, INC 10 10 #--------------------------------------------------------------------------- 11 11 12 12 13 # define MACHEROS from uname … … 46 47 else 47 48 FFLAGS := -I${INC} -D${MACHEROSD} 48 CFLAGS := -g -O -Wall -Wpointer-arith \ 49 -Wmissing-prototypes -Wsynth -I$(INC) 50 CXXFLAGS := $(CFLAGS) -I$(CXI) 49 CPPFLAGS := -I${INC} -D${MACHEROSD} 51 50 endif 52 51 AR := /usr/bin/ar 53 52 ARFLAGS := -rcs 54 55 53 56 54 ifeq ($(CC), gcc) … … 81 79 #------------------------------------------------- End of Makefile.h ------- 82 80 83 all: $(LIB)libPI.a 84 $(LIB)libPI.a : $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapx.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pid rawwin.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pihisto.o $(OBJ)piimage.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o81 all: $(LIB)libPI.a 82 $(LIB)libPI.a : $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapx.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidemo.o $(OBJ)pidrawwin.o $(OBJ)pierrdisp.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pihisto.o $(OBJ)piimage.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piqualmon.o $(OBJ)piscdrawwdg.o $(OBJ)pistatmon.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)piup.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o 85 83 $(AR) $(ARFLAGS) $@ $? 86 84 … … 107 105 $(INC)exceptions.h \ 108 106 $(INC)defs.h \ 109 $(INC)fitsimage.h \ 110 $(INC)cimage.h \ 111 $(INC)rzimage.h \ 112 $(INC)rzvect.h \ 113 $(INC)machine.h \ 114 $(INC)datatypes.h \ 115 $(INC)fitsheader.h \ 116 $(INC)fitskeys.h pidemo.h \ 107 $(INC)peidainit.h \ 108 $(INC)ctimer.h \ 109 $(INC)peida.h \ 110 $(INC)utils.h \ 111 $(INC)machine.h \ 112 $(INC)fitsimage.h \ 113 $(INC)cimage.h \ 114 $(INC)rzimage.h \ 115 $(INC)rzvect.h \ 116 $(INC)imaginit.h \ 117 $(INC)datatypes.h \ 118 $(INC)fitsheader.h \ 119 $(INC)erosio.h \ 120 $(INC)fitskeys.h \ 121 $(INC)erostape.h \ 122 $(INC)strutil.h \ 123 $(INC)ptrarray.h \ 124 $(INC)voidptrarray.h \ 125 $(INC)basearray.h \ 126 $(INC)array.h \ 127 $(INC)lockfile.h \ 128 $(INC)erostarfile.h \ 129 $(INC)dates.h \ 130 $(INC)tarlib.h \ 131 $(INC)dynccd.h \ 132 $(INC)ppersist.h \ 133 $(INC)pclassids.h \ 134 $(CXI)strecinit.h \ 135 $(CXI)psf.h \ 136 $(CXI)star.h \ 137 $(CXI)starmacro.h \ 138 $(INC)generalfit.h \ 139 $(INC)matrix.h \ 140 $(INC)cvector.h \ 141 $(INC)nbmath.h \ 142 $(INC)pemath.h pidemo.h \ 117 143 pisysdep.h piapplx.h piapplgen.h pimsghandler.h picontainerx.h \ 118 144 picontainergen.h piwdgx.h piwdggen.h pimenubarx.h pimenubargen.h \ … … 122 148 pipixmapx.h pipixmapgen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \ 123 149 picmapgen.h pihisto.h piscdrawwdg.h \ 124 $(INC)histos.h \ 125 $(INC)peida.h \ 126 $(INC)utils.h pidrawwin.h \ 127 $(INC)piup.h 150 $(INC)histos.h pidrawwin.h \ 151 piup.h 128 152 $(OBJ)pidrawwin.o: ./pidrawwin.cc pidrawwin.h pisysdep.h piwindowx.h \ 129 153 piwindowgen.h picontainerx.h picontainergen.h piwdgx.h piwdggen.h \ 130 pimsghandler.h piscdrawwdg.h pibwdgx.h pibwdggen.h 154 pimsghandler.h piscdrawwdg.h pibwdgx.h pibwdggen.h pistdwdgx.h \ 155 pistdwdggen.h 156 $(OBJ)pierrdisp.o: ./pierrdisp.cc pierrdisp.h pisysdep.h pibwdgx.h \ 157 pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h pistdwdgx.h \ 158 pistdwdggen.h picontainerx.h picontainergen.h piperiodx.h \ 159 $(INC)periodic.h \ 160 $(INC)errorhandlerc.h \ 161 $(INC)utils.h \ 162 $(INC)defs.h 131 163 $(OBJ)pifilechogen.o: ./pifilechogen.cc pifilechogen.h pisysdep.h piwdgx.h \ 132 164 piwdggen.h pimsghandler.h … … 135 167 picontainerx.h picontainergen.h 136 168 $(OBJ)pihisto.o: ./pihisto.cc pihisto.h piscdrawwdg.h pisysdep.h pibwdgx.h \ 137 pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h \ 138 $(INC)histos.h \ 139 $(INC)peida.h \ 140 $(INC)defs.h \ 141 $(INC)utils.h \ 142 $(INC)machine.h \ 143 $(INC)perrors.h \ 144 $(INC)exceptions.h 169 pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h pistdwdgx.h \ 170 pistdwdggen.h $(INC)histos.h \ 171 $(INC)peida.h \ 172 $(INC)defs.h \ 173 $(INC)utils.h \ 174 $(INC)machine.h \ 175 $(INC)perrors.h \ 176 $(INC)exceptions.h \ 177 $(INC)peidainit.h 145 178 $(OBJ)piimage.o: ./piimage.cc piimage.h \ 146 179 $(INC)cimage.h \ … … 150 183 $(INC)defs.h \ 151 184 $(INC)exceptions.h \ 152 $(INC)perrors.h \ 185 $(INC)peidainit.h \ 186 $(INC)perrors.h \ 187 $(INC)imaginit.h \ 153 188 $(INC)datatypes.h \ 154 189 $(INC)lut.h pisysdep.h \ … … 159 194 $(INC)fitsimage.h \ 160 195 $(INC)fitsheader.h \ 161 $(INC)fitskeys.h 196 $(INC)erosio.h \ 197 $(INC)fitskeys.h \ 198 $(INC)erostape.h \ 199 $(INC)strutil.h \ 200 $(INC)ptrarray.h \ 201 $(INC)voidptrarray.h \ 202 $(INC)basearray.h \ 203 $(INC)peida.h \ 204 $(INC)utils.h \ 205 $(INC)array.h \ 206 $(INC)lockfile.h \ 207 $(INC)erostarfile.h \ 208 $(INC)dates.h \ 209 $(INC)tarlib.h 162 210 $(OBJ)pimenubargen.o: ./pimenubargen.cc pimenubargen.h pisysdep.h pimenux.h \ 163 211 pimenugen.h piwdgx.h piwdggen.h pimsghandler.h piapplx.h piapplgen.h \ … … 177 225 picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimsghandler.h \ 178 226 pimenux.h pimenugen.h pistdwdgx.h pistdwdggen.h 227 $(OBJ)piperiodx.o: ./piperiodx.cc piperiodx.h \ 228 $(INC)periodic.h 179 229 $(OBJ)pipixmapgen.o: ./pipixmapgen.cc pipixmapgen.h pisysdep.h pibwdgx.h \ 180 230 pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \ 181 231 picmapgen.h 182 $(OBJ)piperiodx.o: ./piperiodx.cc ./piperiodx.h $(INC)periodic.h183 232 $(OBJ)pipixmapx.o: ./pipixmapx.cc pipixmapx.h pipixmapgen.h pisysdep.h \ 184 233 pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \ 185 234 picmapx.h picmapgen.h 235 $(OBJ)piqualmon.o: ./piqualmon.cc piqualmon.h pisysdep.h piscdrawwdg.h \ 236 pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h pistdwdgx.h \ 237 pistdwdggen.h pioptmenux.h pioptmenugen.h picontainerx.h \ 238 picontainergen.h pimenux.h pimenugen.h piwindowx.h piwindowgen.h \ 239 $(CXI)qualite.h \ 240 $(INC)histos.h \ 241 $(INC)peida.h \ 242 $(INC)defs.h \ 243 $(INC)utils.h \ 244 $(INC)machine.h \ 245 $(INC)perrors.h \ 246 $(INC)exceptions.h \ 247 $(INC)peidainit.h \ 248 $(CXI)recostar.h \ 249 $(INC)cimage.h \ 250 $(INC)rzimage.h \ 251 $(INC)rzvect.h \ 252 $(INC)imaginit.h \ 253 $(INC)datatypes.h \ 254 $(CXI)stlist.h \ 255 $(INC)dynccd.h \ 256 $(INC)ppersist.h \ 257 $(INC)pclassids.h \ 258 $(CXI)star.h \ 259 $(CXI)strecinit.h \ 260 $(CXI)starmacro.h \ 261 $(CXI)psf.h \ 262 $(INC)generalfit.h \ 263 $(INC)matrix.h \ 264 $(INC)cvector.h \ 265 $(CXI)transfo.h \ 266 $(INC)poly.h \ 267 $(INC)erosfitsname.h \ 268 $(INC)dates.h \ 269 $(INC)fitsimage.h \ 270 $(INC)fitsheader.h \ 271 $(INC)erosio.h \ 272 $(INC)fitskeys.h \ 273 $(INC)erostape.h \ 274 $(INC)strutil.h \ 275 $(INC)ptrarray.h \ 276 $(INC)voidptrarray.h \ 277 $(INC)basearray.h \ 278 $(INC)array.h \ 279 $(INC)lockfile.h \ 280 $(INC)erostarfile.h \ 281 $(INC)tarlib.h 186 282 $(OBJ)piscdrawwdg.o: ./piscdrawwdg.cc piscdrawwdg.h pisysdep.h pibwdgx.h \ 187 pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h \ 283 pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h pistdwdgx.h \ 284 pistdwdggen.h \ 188 285 $(INC)generalfit.h \ 189 286 $(INC)exceptions.h \ 190 287 $(INC)defs.h \ 288 $(INC)peidainit.h \ 191 289 $(INC)matrix.h \ 192 290 $(INC)peida.h \ … … 197 295 $(INC)pclassids.h \ 198 296 $(INC)cvector.h 297 $(OBJ)pistatmon.o: ./pistatmon.cc pistatmon.h pisysdep.h piscdrawwdg.h \ 298 pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h pistdwdgx.h \ 299 pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \ 300 picontainergen.h \ 301 $(CXI)qualite.h \ 302 $(INC)histos.h \ 303 $(INC)peida.h \ 304 $(INC)defs.h \ 305 $(INC)utils.h \ 306 $(INC)machine.h \ 307 $(INC)perrors.h \ 308 $(INC)exceptions.h \ 309 $(INC)peidainit.h \ 310 $(CXI)recostar.h \ 311 $(INC)cimage.h \ 312 $(INC)rzimage.h \ 313 $(INC)rzvect.h \ 314 $(INC)imaginit.h \ 315 $(INC)datatypes.h \ 316 $(CXI)stlist.h \ 317 $(INC)dynccd.h \ 318 $(INC)ppersist.h \ 319 $(INC)pclassids.h \ 320 $(CXI)star.h \ 321 $(CXI)strecinit.h \ 322 $(CXI)starmacro.h \ 323 $(CXI)psf.h \ 324 $(INC)generalfit.h \ 325 $(INC)matrix.h \ 326 $(INC)cvector.h \ 327 $(CXI)transfo.h \ 328 $(INC)poly.h \ 329 $(INC)erosfitsname.h \ 330 $(INC)dates.h \ 331 $(INC)fitsimage.h \ 332 $(INC)fitsheader.h \ 333 $(INC)erosio.h \ 334 $(INC)fitskeys.h \ 335 $(INC)erostape.h \ 336 $(INC)strutil.h \ 337 $(INC)ptrarray.h \ 338 $(INC)voidptrarray.h \ 339 $(INC)basearray.h \ 340 $(INC)array.h \ 341 $(INC)lockfile.h \ 342 $(INC)erostarfile.h \ 343 $(INC)tarlib.h 199 344 $(OBJ)pistdwdggen.o: ./pistdwdggen.cc pistdwdggen.h pisysdep.h piwdgx.h \ 200 345 piwdggen.h pimsghandler.h 201 346 $(OBJ)pistdwdgx.o: ./pistdwdgx.cc pisysdep.h pistdwdgx.h pistdwdggen.h \ 202 347 piwdgx.h piwdggen.h pimsghandler.h 348 $(OBJ)piup.o: ./piup.cc \ 349 $(INC)ctimer.h \ 350 $(INC)peida.h \ 351 $(INC)defs.h \ 352 $(INC)utils.h \ 353 $(INC)machine.h \ 354 $(INC)perrors.h \ 355 $(INC)exceptions.h \ 356 $(INC)peidainit.h \ 357 $(INC)imageop.h \ 358 $(INC)cimage.h \ 359 $(INC)rzimage.h \ 360 $(INC)rzvect.h \ 361 $(INC)imaginit.h \ 362 $(INC)datatypes.h \ 363 $(INC)fitsimage.h \ 364 $(INC)fitsheader.h \ 365 $(INC)erosio.h \ 366 $(INC)fitskeys.h \ 367 $(INC)erostape.h \ 368 $(INC)strutil.h \ 369 $(INC)ptrarray.h \ 370 $(INC)voidptrarray.h \ 371 $(INC)basearray.h \ 372 $(INC)array.h \ 373 $(INC)lockfile.h \ 374 $(INC)erostarfile.h \ 375 $(INC)dates.h \ 376 $(INC)tarlib.h piup.h 203 377 $(OBJ)piwdggen.o: ./piwdggen.cc piwdggen.h pimsghandler.h picontainergen.h \ 204 378 pisysdep.h piwdgx.h -
trunk/SophyaPI/PI/mkmfPI
r8 r21 1 1 #!/bin/csh 2 # $Id: mkmfPI,v 1. 1 1996-03-01 16:53:25 erosExp $2 # $Id: mkmfPI,v 1.2 1996-09-26 22:28:53 aubourg Exp $ 3 3 4 4 set libf='$(LIB)libPI.a' … … 10 10 echo "CXX := g++" >> Makefile 11 11 12 cat ../ Mgr/Makefile.h >> Makefile12 cat ../CodeCxx/Mgr/Makefile.h >> Makefile 13 13 14 14 echo " " >> Makefile 15 echo 'all:' $libf $slbf >> Makefile16 15 17 set files = `ls -1*.cc | grep -v mac | grep -v pipp | grep -v attach | grep -v app.cc`18 echo $files 19 # Ca ne marche pas - Reza 1/3/96 10H00 20 # echo $libf ':' \ 21 # `echo $files | sed -e 's/\.cc/.o/g' | sed -e 's/^/$(OBJ)/'` >> Makefile 22 # echo $files | sed -e 's/\.cc/.o/g' | sed -e 's/^/$(OBJ)/'23 set lstlo = ( $libf ':' ) 24 foreach f ($files) 25 set lstlo = ( $lstlo \$\(OBJ\)$f:r.o ) 26 e nd27 echo $lstlo>> Makefile16 set files = `ls ./pi*.cc | grep -v mac | grep -v pipp | grep -v attach | grep -v app.cc` 17 set objfiles = 18 set apps = `ls *app.cc` 19 set appsm = `ls *app.cc | sed -e 's/.cc//g'` 20 21 #echo 'all:' $libf $slbf $apps >> Makefile 22 echo 'all:' $libf $appsm >> Makefile 23 24 25 echo $libf ':' \ 26 `echo $files | sed -e 's/\.cc/.o/g' | sed -e 's/\.\//$(OBJ)/g'` >> Makefile 28 27 echo ' ar -rs $@ $?' >> Makefile 29 30 28 31 29 echo " " >> Makefile … … 43 41 end 44 42 45 foreach f ( *app.cc)43 foreach f ( $apps ) 46 44 gcc -MM -I$inc -I$incxx $f \ 47 45 | sed -e 's/.*\.o/\$(OBJ)&/' \ … … 52 50 echo ' ' >> Makefile 53 51 54 echo '$(EXE)'$f:r ' : $(OBJ)'$f:r.o >> Makefile52 echo '$(EXE)'$f:r ' : $(OBJ)'$f:r.o $libf >> Makefile 55 53 echo ' g++ -o $(EXE)'$f:r' $(OBJ)'$f:r'.o -L$(LIB) -lPI -lImages -lOutils -lmath -lXm -lXt -lX11 -lm' >> Makefile 56 54 end -
trunk/SophyaPI/PI/pierrdisp.cc
r15 r21 56 56 ackButton = new PIButton(this, "OK", 5000, 40, 20, 155, 20); 57 57 updButton = new PIButton(this, "Upd", 5001, 40, 20, 155, 50); 58 Start(); 58 59 } 59 60 -
trunk/SophyaPI/PI/piqualmon.cc
r15 r21 11 11 :PIWindow(par, "Qualite Suivi", PIWK_normal, 660, 280, 160, 0) 12 12 { 13 ccd = 0;13 ccd = 100; 14 14 var1 = "FOND"; 15 var2 = " FOND";15 var2 = "SIGMA"; 16 16 monitoring1 = new PIQualiteMon(this, "Fond", 300, 200, 20, 40); 17 17 monitoring2 = new PIQualiteMon(this, "Fond", 300, 200, 340,40); 18 18 menuccd = new PIPUMenu(this, "CCD"); 19 menuccd->AppendItem("tous", 80000); 19 menuccd->AppendItem("tous", 80100); 20 menuccd->AppendItem("0", 80000); 20 21 menuccd->AppendItem("1", 80001); 21 22 menuccd->AppendItem("2", 80002); … … 25 26 menuccd->AppendItem("6", 80006); 26 27 menuccd->AppendItem("7", 80007); 27 menuccd->AppendItem("8", 80008);28 28 29 29 menudata[0] = new PIPUMenu(this, "Data"); 30 30 menudata[0]->AppendItem("FOND" , 90001); 31 menudata[0]->AppendItem("SIGFOND" , 90005); 31 32 menudata[0]->AppendItem("SIGMA", 90002); 32 33 menudata[0]->AppendItem("NSTAR", 90003); 34 menudata[0]->AppendItem("FOND/MIN", 90004); 33 35 34 36 menudata[1] = new PIPUMenu(this, "Data"); 35 37 menudata[1]->AppendItem("FOND" , 90011); 38 menudata[1]->AppendItem("SIGFOND" , 90015); 36 39 menudata[1]->AppendItem("SIGMA", 90012); 37 40 menudata[1]->AppendItem("NSTAR", 90013); 41 menudata[1]->AppendItem("FOND/MIN", 90014); 38 42 39 43 optMenuccd = new PIOptMenu (this, menuccd, 80, 20, 290, 15); 40 optMenudata[0] = new PIOptMenu (this, menudata[0], 80, 20, 130, 250); 41 optMenudata[1] = new PIOptMenu (this, menudata[1], 80, 20, 450, 250); 44 optMenudata[0] = new PIOptMenu (this, menudata[0], 100, 20, 120, 250); 45 optMenudata[1] = new PIOptMenu (this, menudata[1], 100, 20, 440, 250); 46 optMenudata[1]->SetValue(90012); 47 48 butupdate = new PIButton (this, "UPDATE", 5001, 80,20,560,15); 49 42 50 labccd = new PILabel (this, "CCD :", 50, 20, 240, 15); 43 51 labR = new PILabel (this, "Log R : ", 50, 20, 20, 3); … … 62 70 delete monitoring1; 63 71 delete monitoring2; 64 } 65 66 void PIQualiteWin::UpdateInfo(LImageInfo linfo, char color, string labflnm) 72 delete butupdate; 73 } 74 75 void 76 PIQualiteWin::UpdateInfo(LImageInfo linfor, LImageInfo linfob, 77 string labflnmr, string labflnmb) 67 78 { 68 if (color == 'r') { 69 linfoR = linfo; 70 labfileR->SetLabel(labflnm); 71 } 72 else if (color == 'b') { 73 linfoB = linfo; 74 labfileB->SetLabel(labflnm); 75 } 79 linfoR = linfor; 80 labfileR->SetLabel(labflnmr); 81 82 linfoB = linfob; 83 labfileB->SetLabel(labflnmb); 84 76 85 monitoring1->SetData(linfoR, linfoB, var1, ccd); 77 86 monitoring2->SetData(linfoR, linfoB, var2, ccd); 78 87 } 79 88 80 void PIQualiteWin::Process(long msg, PIMsgHandler *, void *) 89 void 90 PIQualiteWin::Process(long msg, PIMsgHandler *sender, void *data) 81 91 { 82 92 switch (msg) { 83 case 80 000:84 case 8000 1: case 80002: case 80003: case 80004:85 case 8000 5: case 80006: case 80007: case 80008:93 case 80100: 94 case 80000: case 80001: case 80002: case 80003: 95 case 80004: case 80005: case 80006: case 80007: 86 96 ccd = msg - 80000; 87 97 monitoring1->SetData(linfoR, linfoB, var1, ccd); … … 100 110 monitoring1->SetData(linfoR, linfoB, var1, ccd); 101 111 break; 112 case 90004: 113 var1 = "FOND/MIN"; 114 monitoring1->SetData(linfoR, linfoB, var1, ccd); 115 break; 116 case 90005: 117 var1 = "SIGFOND"; 118 monitoring1->SetData(linfoR, linfoB, var1, ccd); 119 break; 102 120 case 90011: 103 121 var2 = "FOND"; … … 112 130 monitoring2->SetData(linfoR, linfoB, var2, ccd); 113 131 break; 132 case 90014: 133 var2 = "FOND/MIN"; 134 monitoring2->SetData(linfoR, linfoB, var2, ccd); 135 break; 136 case 90015: 137 var2 = "SIGFOND"; 138 monitoring2->SetData(linfoR, linfoB, var2, ccd); 139 break; 114 140 115 141 default: 116 cout << "Message " << msg << " non interprete" << endl; 142 //cout << "Message " << msg << " non interprete" << endl; 143 ReSend(msg, sender, data); 117 144 } 118 145 } … … 125 152 { 126 153 SetAxesFlags(kBoxAxes | kTicks | kLabels); 127 ndataR = ndataB = 0;128 xR = xB = NULL;154 ndataR = ndataB = nsepR = nsepB = 0; 155 xR = xB = xsepR = xsepB = NULL; 129 156 y1R = y1B = NULL; 130 157 y2R = y2B = NULL; … … 141 168 } 142 169 143 void PIQualiteMon::SetData(LImageInfo linfoR, LImageInfo linfoB, string var, 170 void 171 PIQualiteMon::SetData(LImageInfo linfoR, LImageInfo linfoB, string var, 144 172 int ccd) 145 173 { 146 ndataR = (int)linfoR.size(); 147 ndataB = (int)linfoB.size(); 174 // mise a zero des donnees deja existantes 175 176 RAZData(linfoR, var, ndataR, nsepR, xR, y1R, y2R, xsepR); 177 RAZData(linfoB, var, ndataB, nsepB, xB, y1B, y2B, xsepB); 178 ndataR = ndataB = nsepR = nsepB = 0; 179 180 // remplissage avec nouvelles valeurs 181 182 float valmin=100000, valmax=0, heuremin=36, heuremax=-36; 183 FillData(linfoR, var, ccd, ndataR, nsepR, xR, y1R, y2R, xsepR, 184 heuremin, heuremax, valmin, valmax); 185 FillData(linfoB, var, ccd, ndataB, nsepB, xB, y1B, y2B, xsepB, 186 heuremin, heuremax, valmin, valmax); 187 float scaleh = heuremax-heuremin; 188 float scalev = valmax-valmin; 189 if (scaleh == 0) scaleh = 10; 190 if (scalev == 0) scalev = 10; 191 SetLimits(heuremin-scaleh/10, heuremax+scaleh/10, 192 valmin-scalev/10, valmax+scalev/10); 193 194 Refresh(); 195 } 196 197 void 198 PIQualiteMon::RAZData(LImageInfo linfo, string var, int& ndata, int& nsep, 199 double*& x, double*& y1, double*& y2, double*& xsep) 200 { 201 ndata = (int)linfo.size(); 202 nsep = (int)linfo.size(); 148 203 149 // mise a zero des donnees deja existantes 150 151 if (xR != NULL) { delete[] xR; xR = NULL; } 152 if (y1R != NULL) { delete[] y1R; y1R = NULL; } 153 if (y2R != NULL) { delete[] y2R; y2R = NULL; } 154 if (ndataR > 0) { 155 if((xR = new double[ndataR]) == NULL) { 156 printf("PIQualiteMon::SetData_Error memoire insuffisante pour xR\n"); 204 if (x != NULL) { delete[] x; x = NULL; } 205 if (y1 != NULL) { delete[] y1; y1 = NULL; } 206 if (y2 != NULL) { delete[] y2; y2 = NULL; } 207 if (xsep != NULL) { delete[] xsep; xsep = NULL; } 208 if (ndata > 0) { 209 if((x = new double[ndata]) == NULL) { 210 printf("PIQualiteMon::SetData_Error memoire insuffisante pour x\n"); 157 211 return; 158 212 } 159 if((y1 R = new double[ndataR]) == NULL) {160 printf("PIQualiteMon::SetData_Error memoire insuffisante pour y1 R\n");213 if((y1 = new double[ndata]) == NULL) { 214 printf("PIQualiteMon::SetData_Error memoire insuffisante pour y1\n"); 161 215 return; 162 216 } 163 if (var == "SIGMA") if((y2 R = new double[ndataR]) == NULL) {164 printf("PIQualiteMon::SetData_Error memoire insuffisante pour y2 R\n");217 if (var == "SIGMA") if((y2 = new double[ndata]) == NULL) { 218 printf("PIQualiteMon::SetData_Error memoire insuffisante pour y2\n"); 165 219 return; 166 220 } 221 if((xsep = new double[ndata]) == NULL) { 222 printf("PIQualiteMon::SetData_Error memoire insuffisante pour xsep\n"); 223 return; 224 } 167 225 } 168 169 if (xB != NULL) { delete[] xB; xB = NULL; } 170 if (y1B != NULL) { delete[] y1B; y1B = NULL; } 171 if (y2B != NULL) { delete[] y2B; y2B = NULL; } 172 if (ndataB >0) { 173 if((xB = new double[ndataB]) == NULL) { 174 printf("PIQualiteMon::SetData_Error memoire insuffisante pour xB\n"); 175 return; 176 } 177 if((y1B = new double[ndataB]) == NULL) { 178 printf("PIQualiteMon::SetData_Error memoire insuffisante pour y1B\n"); 179 return; 180 } 181 if (var == "SIGMA") if((y2B = new double[ndataB]) == NULL) { 182 printf("PIQualiteMon::SetData_Error memoire insuffisante pour y2B\n"); 183 return; 184 } 185 } 186 187 // remplissage avec nouvelles valeurs 188 189 ndataR = ndataB = 0; 190 float valmin=100000, valmax=0, heuremin=36, heuremax=-36; 226 } 227 228 void 229 PIQualiteMon::FillData(LImageInfo linfo, string var, int ccd, 230 int& ndata, int& nsep, double*& x, double*& y1, 231 double*& y2, double*& xsep, float& heuremin, 232 float& heuremax, float& valmin, float& valmax) 233 { 191 234 char time[10]; 192 235 float heure,min,sec; 193 for (LImageInfo::iterator i=linfoR.begin(); i!=linfoR.end(); i++) { 194 if ((*i).nomimg.ccd == ccd || ccd == 0) { 195 (*i).date.GetTimeStr(time); 236 int objet = 0; 237 for (LImageInfo::iterator i=linfo.begin(); i!=linfo.end(); i++) { 238 if (!(*i).goodCCD) continue; 239 if ((*i).nomimg.ccd == ccd || ccd == 100) { 240 (*i).nomimg.date.GetTimeStr(time); 196 241 sscanf(time, "%f:%f:%f", &heure, &min, &sec); 197 heure = heure + min/60 + sec/3600;242 heure = heure + min/60. + sec/3600.; 198 243 if (heure > 12) heure -= 24; 199 x R[ndataR] = heure;244 x[ndata] = heure; 200 245 if (heure > heuremax) heuremax = heure; 201 246 if (heure < heuremin) heuremin = heure; 247 if ((*i).nomimg.objet != objet) { 248 if (objet != 0) { 249 xsep[nsep] = heure; 250 nsep++; 251 } 252 objet = (*i).nomimg.objet; 253 } 202 254 if (var == "FOND") { 203 if((y1R[ndataR] = (*i).fond) == -1) continue; 255 if((y1[ndata] = (*i).fond) == -1) continue; 256 } 257 else if (var == "SIGFOND") { 258 if((y1[ndata] = (*i).sigFond) == -1) continue; 204 259 } 205 260 else if (var == "SIGMA") { 206 if((y1 R[ndataR] = (*i).sigmaX) == -1) continue;207 if((y2 R[ndataR] = (*i).sigmaY) == -1) continue;208 if (y2 R[ndataR] > valmax) valmax = y2R[ndataR];209 if (y2 R[ndataR] < valmin) valmin = y2R[ndataR] ;261 if((y1[ndata] = (*i).sigmaX) == -1) continue; 262 if((y2[ndata] = (*i).sigmaY) == -1) continue; 263 if (y2[ndata] > valmax) valmax = y2[ndata]; 264 if (y2[ndata] < valmin) valmin = y2[ndata] ; 210 265 } 211 266 else if (var == "NSTAR") { 212 if((y1R[ndataR] = (*i).nStars) == -1) continue; 213 } 214 if (y1R[ndataR] > valmax) valmax = y1R[ndataR]; 215 if (y1R[ndataR] < valmin) valmin = y1R[ndataR]; 216 ndataR++; 267 if((y1[ndata] = (*i).nStars) == -1) continue; 268 } 269 else if (var == "FOND/MIN") { 270 if(((*i).tpos == 0) || ((*i).fond == -1)) continue; 271 y1[ndata] = (*i).fond / (*i).tpos * 60; 272 } 273 if (y1[ndata] > valmax) valmax = y1[ndata]; 274 if (y1[ndata] < valmin) valmin = y1[ndata]; 275 ndata++; 217 276 } 218 277 } 219 for (LImageInfo::iterator i=linfoB.begin(); i!=linfoB.end(); i++) { 220 if ((*i).nomimg.ccd == ccd || ccd == 0) { 221 (*i).date.GetTimeStr(time); 222 sscanf(time, "%f:%f:%f", &heure, &min, &sec); 223 heure = heure + min/60 + sec/3600; 224 xB[ndataB] = heure; 225 if (heure > 12) heure -= 24; 226 if (heure > heuremax) heuremax = heure; 227 if (heure < heuremin) heuremin = heure; 228 if (var == "FOND") { 229 if((y1B[ndataB] = (*i).fond) == -1) continue; 230 } 231 else if (var == "SIGMA") { 232 if((y1B[ndataB] = (*i).sigmaX) == -1) continue; 233 if((y2B[ndataB] = (*i).sigmaY) == -1) continue; 234 if (y2B[ndataB] > valmax) valmax = y2B[ndataB]; 235 if (y2B[ndataB] < valmin) valmin = y2B[ndataB]; 236 } 237 else if (var == "NSTAR") { 238 if((y1B[ndataB] = (*i).nStars) == -1) continue; 239 } 240 if (y1B[ndataB] > valmax) valmax = y1B[ndataB]; 241 if (y1B[ndataB] < valmin) valmin = y1B[ndataB]; 242 ndataB++; 243 } 244 } 245 float scale = heuremax-heuremin; 246 if (scale == 0) scale = 10; 247 SetLimits(heuremin-scale/10, heuremax+scale/10, valmin*.9, valmax*1.1); 248 249 Refresh(); 250 } 251 252 void PIQualiteMon::DrawSelf() 253 { 278 } 279 280 void 281 PIQualiteMon::DrawSelf() 282 { 283 SelForeground(PI_Grey); 284 SelLine(PI_ThinLine); 285 for (int i=0;i<nsepR;i++) ScDrawLine(xsepR[i],-10000,xsepR[i],80000); 286 for (int i=0;i<nsepB;i++) ScDrawLine(xsepB[i],-10000,xsepB[i],80000); 254 287 SelMarker(5,PI_FCircleMarker); 255 288 SelForeground(PI_Red); 256 289 if(ndataR) for (int i=0;i<ndataR;i++) { 257 290 ScDrawMarker(xR[i],y1R[i]); 258 if(y2R != NULL) ScDrawFCircle(xR[i],y2R[i],0.2); 291 if(y2R != NULL) { 292 SelMarker(5,PI_CrossMarker); 293 ScDrawMarker(xR[i],y2R[i]); 294 SelMarker(5,PI_FCircleMarker); 295 } 259 296 } 260 297 SelMarker(5,PI_FCircleMarker); … … 262 299 if(ndataB) for (int i=0;i<ndataB;i++) { 263 300 ScDrawMarker(xB[i],y1B[i]); 264 if(y2B != NULL) ScDrawFCircle(xB[i],y2B[i],0.2); 301 if(y2B != NULL) { 302 SelMarker(5,PI_CrossMarker); 303 ScDrawMarker(xB[i],y2B[i]); 304 SelMarker(5,PI_FCircleMarker); 305 } 265 306 } 266 307 267 308 SelForeground(PI_Black); 268 } 309 DrawString(235,194,"HEURE"); 310 } 311 312 313 314 315 316 317 -
trunk/SophyaPI/PI/piqualmon.h
r15 r21 21 21 PIQualiteWin(PIMsgHandler* par); 22 22 virtual ~PIQualiteWin(); 23 virtual void UpdateInfo(LImageInfo linfo, char color, string labflnm); 23 virtual void UpdateInfo(LImageInfo linfor, LImageInfo linfob, 24 string labflnmr, string labflnmb); 24 25 virtual void Process(long msg, PIMsgHandler *sender, void *data); 25 26 … … 31 32 PIOptMenu* optMenudata[2]; 32 33 PIPUMenu* menudata[2]; 34 PIButton* butupdate; 33 35 PILabel* labccd; 34 36 PILabel* labR; … … 38 40 LImageInfo linfoR; 39 41 LImageInfo linfoB; 40 int ccd; // 0 pour tous42 int ccd; // 100 pour tous 41 43 string var1; 42 44 string var2; … … 52 54 void SetData(LImageInfo linfoR, LImageInfo linfoB, string var, 53 55 int ccd); 56 void RAZData(LImageInfo linfo, string var, int& ndata, int& nsep, 57 double*& x, double *&y1, double*& y2, double*& xsep); 58 void FillData(LImageInfo linfo, string var, int ccd, 59 int& ndata, int& nsep, double*& x, double*& y1, 60 double*& y2, double*& xsep, float& heuremin, 61 float& heuremax, float& valmin, float& valmax); 54 62 55 63 protected: 56 64 int ndataR; 57 65 int ndataB; 66 int nsepR; 67 int nsepB; 58 68 double* xR; 59 69 double* xB; … … 62 72 double* y1B; 63 73 double* y2B; 74 double* xsepR; 75 double* xsepB; 64 76 }; 65 77 -
trunk/SophyaPI/PI/pistatmon.cc
r15 r21 15 15 monitoring2 = new PIStatMon (this, "Sat", 235, 160, 255, 30); 16 16 butquit = new PIButton (this, "QUIT", 1010, 45,20,10,5); 17 string Nom = nom; 17 string Nom = nom; // c'est le titre de la fenetre 18 18 if (Nom.substr(Nom.rfind(" ")+1,3) == "pix") { 19 19 label1 = new PILabel (this, "Pix. nuls (%)", 235,20,10,5); … … 89 89 { 90 90 SetAxesFlags(kBoxAxes | kTicks | kLabels); 91 for (int i=0;i<8;i++) { 91 for (int i=0;i<8;i++) { // pour tous les CCD 92 92 ndataR[i] = ndataB[i] = 0; 93 93 yR[i] = yB[i] = NULL; … … 139 139 ndataB[ccd]++; 140 140 } 141 SetLimits(0, 15, valmin*.9, valmax*1.1);142 141 break; 143 142 case 12: … … 156 155 ndataB[ccd]++; 157 156 } 158 SetLimits(0, 15, valmin*.9, valmax*1.1);159 157 break; 160 158 case 101: … … 173 171 ndataB[ccd]++; 174 172 } 175 SetLimits(0, 15, valmin*.9, valmax*1.1);176 173 break; 177 174 case 102: … … 190 187 ndataB[ccd]++; 191 188 } 192 SetLimits(0, 15, valmin*.9, valmax*1.1);193 189 break; 194 190 case 103: … … 207 203 ndataB[ccd]++; 208 204 } 209 SetLimits(0, 15, valmin*.9, valmax*1.1);210 205 break; 211 206 case 104: … … 225 220 ndataB[ccd]++; 226 221 } 227 SetLimits(0, 15, valmin*.9, valmax*1.1);228 222 break; 229 223 … … 231 225 cout << "Choix " << choix << " non interprete" << endl; 232 226 } 227 if ((valmin == 0) && (valmax == 0)) SetLimits(0, 15, -1, 1); 228 else SetLimits(0, 15, valmin*.9, valmax*1.1); 233 229 } 234 230
Note:
See TracChangeset
for help on using the changeset viewer.