Changeset 665
- Timestamp:
- 03/02/01 12:09:07 (24 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r654 r665 1 1 -*-*- END -*-*- 2 2000/03/01: Thomas Bretz 3 4 * manalysis/Makefile, mdatacheck/Makefile, meventdisp/Makefile, 5 mgui/Makefile: 6 new 7 8 * mdatacheck/MFillAdcSpect.[h,cc]: 9 changed high and low to hi and lo 10 11 * mdatacheck/MGDisplayAdc.[h,cc]: 12 added some new member functions to make code more clear 13 14 * mdatacheck/MHistosAdc.h: 15 changed high and low to hi and lo 16 2 17 3 18 2000/03/01: Thomas Bretz -
trunk/MagicSoft/Mars/manalysis/Makefile
r654 r665 6 6 # 7 7 ################################################################## 8 # @maintitle9 10 # @code11 12 #13 # please change all system depend values in the14 # config.mk.${OSTYPE} file15 #16 #17 8 include ../Makefile.conf.$(OSTYPE) 18 9 include ../Makefile.conf.general 19 10 20 # @endcode 11 # 12 # Handling name of the Root Dictionary Files 13 # 14 CINT = Analysis 21 15 16 # 17 # Library name to creatre 18 # 19 LIB = manalysis.a 20 21 # 22 # connect the include files defined in the config.mk file 23 # 22 24 INCLUDES = -I. -I../mbase -I../mgui 23 24 # @code25 26 CINT = Analysis27 LIB = manalysis.a28 25 29 26 #------------------------------------------------------------------------------ … … 31 28 .SUFFIXES: .c .cc .cxx .h .hxx .o 32 29 33 SRCFILES = MC erPhotEvt.cc \34 MC erPhotPix.cc \35 MC T1Pedestals.cc \36 MC T1ReadAscii.cc30 SRCFILES = MCT1Pedestals.cc \ 31 MCT1ReadAscii.cc \ 32 MCerPhotEvt.cc \ 33 MCerPhotPix.cc 37 34 38 35 SRCS = $(SRCFILES) … … 46 43 include ../Makefile.rules 47 44 48 clean: rmlib rmcint rmobjs rmcore 45 clean: rmlib rmcint rmobjs rmcore rmbin 49 46 50 47 mrproper: clean rmbak -
trunk/MagicSoft/Mars/mdatacheck/MFillAdcSpect.cc
r531 r665 25 25 // connect the raw data with this task 26 26 27 fHistos = (MHistosAdc*)pList->FindObject("MHistosAdc"); 28 if (!fHistos) 29 { 30 cout << "MRawFileRead::PreProcess - WARNING: MHistosAdc not found... creating." << endl; 31 fHistos = new MHistosAdc; 32 pList->AddToList(fHistos); 33 } 34 27 35 fRawEvtData = (MRawEvtData*)pList->FindObject("MRawEvtData"); 28 29 36 if (!fRawEvtData) 30 37 { 31 cout << "MRawFileRead::PreProcess - WARNING: MRawEvtData not found... creating." << endl;32 return kFALSE ;38 cout << "MRawFileRead::PreProcess - WARNING: MRawEvtData not found... exit." << endl; 39 return kFALSE; 33 40 } 34 41 35 42 fPixelIter = new MRawEvtPixelIter( fRawEvtData ); 36 37 fHistos = (MHistosAdc*)pList->FindObject("MHistosAdc");38 39 if (!fHistos)40 {41 cout << "MRawFileRead::PreProcess - WARNING: MHistosAdc not found... exit..." << endl;42 return kFALSE ;43 }44 45 43 46 44 return kTRUE ; … … 55 53 fPixelIter->Reset() ; 56 54 57 Int_t iHighSamples = fRawEvtData->GetNumHiGainSamples() ;58 Int_t iLowSamples = fRawEvtData->GetNumLoGainSamples() ;55 const Int_t nhisamples = fRawEvtData->GetNumHiGainSamples() ; 56 const Int_t nlosamples = fRawEvtData->GetNumLoGainSamples() ; 59 57 60 58 // cout << "HighSamples " << iHighSamples ; … … 62 60 while ( fPixelIter->Next() ) 63 61 { 64 for (Int_t i=0 ; i< iHighSamples ; i++ )62 for (Int_t i=0 ; i<nhisamples ; i++ ) 65 63 { 66 fHistos->FillAdcHistHi gh( fPixelIter->GetPixelId(),64 fHistos->FillAdcHistHi ( fPixelIter->GetPixelId(), 67 65 fPixelIter->GetHiGainFadcSamples()[i] ); 68 66 } 69 67 70 for (Int_t i=0 ; i< iLowSamples ; i++ )68 for (Int_t i=0 ; i<nlosamples ; i++ ) 71 69 { 72 fHistos->FillAdcHistLo w( fPixelIter->GetPixelId(),70 fHistos->FillAdcHistLo ( fPixelIter->GetPixelId(), 73 71 fPixelIter->GetLoGainFadcSamples()[i] ); 74 72 } -
trunk/MagicSoft/Mars/mdatacheck/MGDisplayAdc.cc
r466 r665 1 1 #include "MGDisplayAdc.h" 2 2 3 #include <TGListBox.h> // TGListBox4 3 #include <TGButton.h> // TGTextButton 5 #include <TGSlider.h> // TGVSlider6 4 #include <TCanvas.h> // TCanvas.h 7 5 #include <TGMsgBox.h> // TGMsgBox 8 6 #include <TRootEmbeddedCanvas.h> // TRootEmbeddedCanvas 9 10 #include "MHistosAdc.h"11 7 12 8 enum ComIdentDisplayAdc { … … 163 159 164 160 fHistoList->Select(1, kTRUE); 165 fHists->GetHighList()->At( fHistoList->GetSelected()-1)->Draw() ;166 fHistoList->SetTopEntry(fHistoList->GetSelected());161 DrawSelectedHi() ; 162 SetSelectedTopEntry(); 167 163 fCanv->Modified() ; 168 169 fVslider1->SetPosition( fHistoList->GetSelected()-1);164 fCanv->Update() ; 165 SetSelectedPos(); 170 166 171 172 167 MapWindow(); 173 168 SetWMSizeHints(550, 550, 1000, 1000, 1, 1); … … 207 202 delete fFrameLow ; 208 203 delete fFrameTop ; 209 210 211 204 } 212 205 … … 233 226 234 227 Bool_t MGDisplayAdc::BuildHistoList(Int_t type ) 235 { 236 // looks in the container of the AdcSpectra and reads in the 237 // Histogramms in there. 238 // 239 // In the class MHistosAdc are in fact two lists. One for the high and 240 // one for the low gain. Here we will use only the high gain list!!! 241 // With some special options (settings in the gui) we will also be able 242 // to plot the low gain 243 // 244 for ( Int_t i=0 ; i < fHists->GetHighEntries(); i++ ) { 245 fHistoList->AddEntry(fHists->GetHighList()->At(i)->GetName(), i+1) ; 246 247 } 248 249 fHistoList->MapSubwindows() ; 250 fHistoList->Layout() ; 251 return (kTRUE) ; 228 { 229 // 230 // looks in the container of the AdcSpectra and reads in the 231 // Histogramms in there. 232 // 233 // In the class MHistosAdc are in fact two lists. One for the high and 234 // one for the low gain. Here we will use only the high gain list!!! 235 // With some special options (settings in the gui) we will also be able 236 // to plot the low gain 237 // 238 239 const Int_t nhi = fHists->GetHiEntries(); 240 for ( Int_t i=0 ; i < nhi; i++ ) { 241 fHistoList->AddEntry(fHists->GetHistHi(i)->GetName(), i+1) ; 242 } 243 244 fHistoList->MapSubwindows() ; 245 fHistoList->Layout() ; 246 return kTRUE ; 252 247 } 253 248 … … 257 252 Bool_t MGDisplayAdc::ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) 258 253 { 259 260 // Process events generated by the buttons in the frame. 261 // 262 Int_t buttons = 4, retval = 0 ; 263 //Char_t wort[100] ; 264 //Char_t extens[5] ; 265 //Char_t command[110] ; 266 267 //TGFileItem *item ; // to process items in the file view container 268 //void *np = NULL ; // null pointer 269 270 switch (GET_MSG(msg)) 271 { 272 case kC_COMMAND: 273 switch (GET_SUBMSG(msg)) 274 { 275 case kCM_BUTTON: 276 277 switch (parm1) 278 { 254 // 255 // Process events generated by the buttons in the frame. 256 // 257 Int_t buttons = 4, retval = 0 ; 258 //Char_t wort[100] ; 259 //Char_t extens[5] ; 260 //Char_t command[110] ; 261 262 //TGFileItem *item ; // to process items in the file view container 263 //void *np = NULL ; // null pointer 264 265 switch (GET_MSG(msg)) 266 { 267 case kC_COMMAND: 268 switch (GET_SUBMSG(msg)) 269 { 270 case kCM_BUTTON: 271 272 switch (parm1) 273 { 274 case M_BUTTON_SAVE: 275 new TGMsgBox(fClient->GetRoot(), this, 276 "WARNING!", 277 "Not implemented yet.", 278 kMBIconExclamation, buttons, &retval); 279 break ; 280 281 case M_BUTTON_PRINT: 282 break; 283 284 case M_BUTTON_RESET: 285 new TGMsgBox(fClient->GetRoot(), this, 286 "WARNING!", 287 "Not implemented yet.", 288 kMBIconExclamation, buttons, &retval); 289 break; 290 291 case M_BUTTON_CLOSE: 292 CloseWindow() ; 293 break ; 294 295 // The selection for "Next Histogram". 296 // There is also a link for the sicronisation with the slider 297 // 298 case M_BUTTON_PREV: 299 if (GetSelected()-1 != 0) 300 { 301 if (fHistoLock == kTRUE ) 302 { 303 fCanvas->cd(1); 304 SelectSelected(); 305 DrawSelectedHi() ; 306 fCanvas->cd(2); 307 DrawSelectedLo() ; 308 } 309 else 310 { 311 fCanv->cd(); 312 SelectSelected(); 313 DrawSelectedHi() ; 314 } 315 316 SetSelectedTopEntry(); 317 fCanv->Modified() ; 318 fCanv->Update() ; 319 SetSelectedPos(); 320 } 321 if (fRadio[1]->GetState() != kButtonDown) 322 break; 323 324 fRadio[0]->SetState(kButtonDown); 325 fRadio[1]->SetState(kButtonUp); 326 327 break; 328 329 //The same as above, but for next histogram 330 case M_BUTTON_NEXT: 331 if (GetSelected()-1 != 576) 332 { 333 if (fHistoLock == kTRUE ) 334 { 335 fCanvas->cd(1); 336 SelectSelected(); 337 DrawSelectedHi() ; 338 fCanvas->cd(2); 339 DrawSelectedLo() ; 340 } 341 else 342 { 343 fCanv->cd(); 344 SelectSelected(); 345 DrawSelectedHi() ; 346 347 } 348 SetSelectedTopEntry(); 349 fCanv->Modified() ; 350 fCanv->Update() ; 351 SetSelectedPos(); 352 353 } 354 if (fRadio[1]->GetState() != kButtonDown) 355 break; 356 357 fRadio[0]->SetState(kButtonDown); 358 fRadio[1]->SetState(kButtonUp); 359 360 break; 361 362 default: 363 break ; 364 } 365 break; 366 367 case kCM_RADIOBUTTON: 368 369 switch(parm1) 370 { 371 case M_RADIO_HIGH: 372 fRadio[1]->SetState(kButtonUp); 373 fRadio[2]->SetState(kButtonUp); 374 fHistoLock = kFALSE; 375 fHistoType=1; 376 fCanv->cd(); 377 SelectSelected(); 378 DrawSelectedHi() ; 379 SetSelectedTopEntry(); 380 fCanv->Modified() ; 381 fCanv->Update() ; 382 SetSelectedPos(); 383 break; 279 384 280 case M_BUTTON_SAVE: 281 new TGMsgBox(fClient->GetRoot(), this, 282 "WARNING!", 283 "Not implemented yet.", 284 kMBIconExclamation, buttons, &retval); 285 286 break ; 287 288 case M_BUTTON_PRINT: 289 break; 290 291 case M_BUTTON_RESET: 292 new TGMsgBox(fClient->GetRoot(), this, 293 "WARNING!", 294 "Not implemented yet.", 295 kMBIconExclamation, buttons, &retval); 296 297 break; 298 299 300 case M_BUTTON_CLOSE: 301 CloseWindow() ; 302 break ; 303 304 // The selection for "Next Histogram". 305 // There is also a link for the sicronisation with the slider 306 // 307 case M_BUTTON_PREV: 308 309 if (!( fHistoList->GetSelected()-1 ) == 0) 310 { 311 if (fHistoLock == kTRUE ) 312 { 313 fCanvas->cd(1); 314 fHistoList->Select(fHistoList->GetSelected()-1, kTRUE); 315 fHists->GetHighList()->At( fHistoList->GetSelected()-1)->Draw() ; 316 fCanvas->cd(2); 317 fHists->GetLowList()->At( fHistoList->GetSelected()-1)->Draw() ; 318 } 319 else 320 { 321 fCanv->cd(); 322 fHistoList->Select(fHistoList->GetSelected()-1, kTRUE); 323 fHists->GetHighList()->At( fHistoList->GetSelected()-1)->Draw() ; 324 } 325 326 fHistoList->SetTopEntry(fHistoList->GetSelected()); 327 fCanv->Modified() ; 328 fCanv->Update() ; 329 fVslider1->SetPosition( fHistoList->GetSelected()-1); 330 } 331 if ((fRadio[1]->GetState()) == kButtonDown) 332 { 333 fRadio[0]->SetState(kButtonDown); 334 fRadio[1]->SetState(kButtonUp); 335 } 336 337 338 break; 339 340 //The same as above, but for next histogram 341 342 case M_BUTTON_NEXT: 343 344 if (!((fHistoList->GetSelected()-1)==576)) 345 346 { 347 if (fHistoLock == kTRUE ) 348 { 349 fCanvas->cd(1); 350 fHistoList->Select(fHistoList->GetSelected()+1, kTRUE); 351 fHists->GetHighList()->At( fHistoList->GetSelected()-1)->Draw() ; 352 fCanvas->cd(2); 353 fHists->GetLowList()->At( fHistoList->GetSelected()-1)->Draw() ; 354 } 355 else 356 { 357 fCanv->cd(); 358 fHistoList->Select(fHistoList->GetSelected()+1, kTRUE); 359 fHists->GetHighList()->At( fHistoList->GetSelected()-1)->Draw() ; 360 361 } 362 fHistoList->SetTopEntry(fHistoList->GetSelected()); 363 fCanv->Modified() ; 364 fCanv->Update() ; 365 fVslider1->SetPosition( fHistoList->GetSelected()-1); 366 367 } 368 if ((fRadio[1]->GetState()) == kButtonDown) 369 { 370 fRadio[0]->SetState(kButtonDown); 371 fRadio[1]->SetState(kButtonUp); 372 } 373 break; 374 default: 375 break ; 376 } 377 378 case kCM_MENU: 379 switch (parm1) 380 { 381 } 382 break ; 383 384 default: 385 break ; 385 case M_RADIO_LOW: 386 fRadio[0]->SetState(kButtonUp); 387 fRadio[2]->SetState(kButtonUp); 388 fCanv->cd(); 389 fHistoLock = kFALSE; 390 fHistoType = 2; 391 392 SelectSelected(); 393 DrawSelectedLo() ; 394 SetSelectedTopEntry(); 395 396 fCanv->Modified() ; 397 fCanv->Update() ; 398 SetSelectedPos(); 399 break; 400 401 case M_RADIO_LH: 402 fRadio[0]->SetState(kButtonUp); 403 fRadio[1]->SetState(kButtonUp); 404 405 if (fHistoLock == kFALSE) 406 { 407 fCanvas = fECanv->GetCanvas(); 408 fCanvas->Divide(1,2, 0, 0 ,0); 409 410 fCanv->Modified() ; 411 fCanv->Update() ; 412 fHistoLock = kTRUE; 413 fHistoType = 3; 414 } 415 416 fCanvas->cd(1); 417 418 SelectSelected(); 419 DrawSelectedHi() ; 420 SetSelectedTopEntry(); 421 422 fCanvas->cd(2); 423 SelectSelected(); 424 DrawSelectedLo() ; 425 SetSelectedTopEntry(); 426 427 fCanv->Modified() ; 428 fCanv->Update(); 429 430 default: 431 break; 432 } 433 break; 434 } 386 435 387 388 389 case kCM_RADIOBUTTON: 390 391 switch(parm1) 392 { 393 case M_RADIO_HIGH: 394 fRadio[1]->SetState(kButtonUp); 395 fRadio[2]->SetState(kButtonUp); 396 fHistoLock = kFALSE; 397 fHistoType=1; 398 fCanv->cd(); 399 fHistoList->Select(fHistoList->GetSelected(), kTRUE); 400 fHists->GetHighList()->At( fHistoList->GetSelected()-1)->Draw() ; 401 fHistoList->SetTopEntry(fHistoList->GetSelected()); 402 fCanv->Modified() ; 403 fCanv->Update() ; 404 fVslider1->SetPosition( fHistoList->GetSelected()-1); 405 406 407 break; 408 409 case M_RADIO_LOW: 410 fRadio[0]->SetState(kButtonUp); 411 fRadio[2]->SetState(kButtonUp); 412 fCanv->cd(); 413 fHistoLock = kFALSE; 414 fHistoType = 2; 415 416 fHistoList->Select(fHistoList->GetSelected(), kTRUE); 417 fHists->GetLowList()->At( fHistoList->GetSelected()-1)->Draw() ; 418 fHistoList->SetTopEntry(fHistoList->GetSelected()); 419 420 fCanv->Modified() ; 421 fCanv->Update() ; 422 fVslider1->SetPosition( fHistoList->GetSelected()-1); 423 424 break; 425 case M_RADIO_LH: 426 fRadio[0]->SetState(kButtonUp); 427 fRadio[1]->SetState(kButtonUp); 428 429 if (fHistoLock == kFALSE) 430 { 431 fCanvas = fECanv->GetCanvas(); 432 fCanvas->Divide(1,2, 0, 0 ,0); 433 434 fCanv->Modified() ; 435 fCanv->Update() ; 436 fHistoLock = kTRUE; 437 fHistoType = 3; 438 439 } 440 441 fCanvas->cd(1); 442 443 fHistoList->Select(fHistoList->GetSelected(), kTRUE); 444 fHists->GetHighList()->At( fHistoList->GetSelected()-1)->Draw() ; 445 fHistoList->SetTopEntry(fHistoList->GetSelected()); 446 447 448 449 450 fCanvas->cd(2); 451 fHistoList->Select(fHistoList->GetSelected(), kTRUE); 452 fHists->GetLowList()->At( fHistoList->GetSelected()-1)->Draw() ; 453 fHistoList->SetTopEntry(fHistoList->GetSelected()); 454 455 456 457 fCanv->Modified() ; 458 fCanv->Update(); 459 460 default: 461 break; 462 } 463 break; 464 465 466 } 467 468 case kCM_LISTBOX: 469 switch (GET_SUBMSG(msg)) 470 { 471 case M_LIST_HISTO: 472 473 if (fHistoLock == kTRUE ) 474 { 475 fCanvas->cd(1); 476 fHists->GetHighList()->At( fHistoList->GetSelected()-1)->Draw() ; 477 fCanvas->cd(2); 478 fHists->GetLowList()->At( fHistoList->GetSelected()-1)->Draw() ; 479 480 } 481 else 482 { 483 484 fCanv->cd() ; 485 486 fHists->GetHighList()->At( fHistoList->GetSelected()-1)->Draw() ; 487 488 } 489 fCanv->Modified() ; 490 fCanv->Update() ; 491 fVslider1->SetPosition( fHistoList->GetSelected()-1); 492 493 494 495 default: 496 break ; 497 } 498 499 500 case kC_CONTAINER: 501 switch (GET_SUBMSG(msg)) 502 { 503 504 case kCT_ITEMDBLCLICK: 505 506 break; 507 508 default: 509 break ; 510 } 511 512 513 514 default: 515 break; 516 517 case kC_VSLIDER: 518 switch(GET_SUBMSG(msg)) 519 { 520 case kSL_POS: 521 { 522 switch(parm1) 523 { 524 case M_VSId1: 525 526 // Check for the slider movement and sicronise with TGListBox 527 if ((parm2 >= 0) && (parm2) <= 576) 528 { 529 530 if (fHistoLock==kTRUE) 531 { 532 fCanvas->cd(1) ; 533 fHists->GetHighList()->At(parm2)->Draw() ; 534 fHistoList->Select(parm2+1, kTRUE); 535 536 fCanvas->cd(2) ; 537 fHists->GetLowList()->At(parm2)->Draw() ; 538 fHistoList->Select(parm2+1, kTRUE); 539 fHistoList->SetTopEntry(fHistoList->GetSelected()); 540 541 } 542 543 else 544 { 545 fCanv->cd() ; 546 fHists->GetHighList()->At(parm2)->Draw() ; 547 fHistoList->Select(parm2+1, kTRUE); 548 549 fHistoList->SetTopEntry(fHistoList->GetSelected()); 550 551 } 552 fCanv->Modified() ; 553 fCanv->Update() ; 554 555 if ((fRadio[1]->GetState()) == kButtonDown) 556 { 557 fRadio[0]->SetState(kButtonDown); 558 fRadio[1]->SetState(kButtonUp); 559 } 560 561 562 } 563 break; 564 } 565 break; 566 } 567 break; 568 } 569 break; 570 571 } 572 return kTRUE; 573 } 436 case kCM_LISTBOX: 437 if (GET_SUBMSG(msg) != M_LIST_HISTO) 438 break; 439 440 if (fHistoLock == kTRUE ) 441 { 442 fCanvas->cd(1); 443 DrawSelectedHi() ; 444 fCanvas->cd(2); 445 DrawSelectedLo() ; 446 } 447 else 448 { 449 fCanv->cd() ; 450 DrawSelectedHi() ; 451 } 452 fCanv->Modified() ; 453 fCanv->Update() ; 454 SetSelectedPos(); 455 break ; 456 457 /* 458 case kC_CONTAINER: 459 switch (GET_SUBMSG(msg)) 460 { 461 462 case kCT_ITEMDBLCLICK: 463 break; 464 465 default: 466 break ; 467 } 468 */ 469 470 case kC_VSLIDER: 471 if (GET_SUBMSG(msg)!=kSL_POS || parm1!=M_VSId1) 472 break; 473 474 // Check for the slider movement and sicronise with TGListBox 475 if (parm2<0 || parm2>576) 476 break; 477 478 if (fHistoLock==kTRUE) 479 { 480 fCanvas->cd(1) ; 481 DrawHi(parm2) ; 482 fHistoList->Select(parm2+1, kTRUE); 483 484 fCanvas->cd(2) ; 485 DrawLo(parm2) ; 486 } 487 else 488 { 489 fCanv->cd() ; 490 DrawHi(parm2) ; 491 } 492 493 fHistoList->Select(parm2+1, kTRUE); 494 SetSelectedTopEntry(); 495 496 fCanv->Modified() ; 497 fCanv->Update() ; 498 499 if (fRadio[1]->GetState() != kButtonDown) 500 break; 501 502 fRadio[0]->SetState(kButtonDown); 503 fRadio[1]->SetState(kButtonUp); 504 505 break; 506 507 } 508 return kTRUE; 509 } -
trunk/MagicSoft/Mars/mdatacheck/MGDisplayAdc.h
r466 r665 3 3 4 4 #ifndef ROOT_TFrame 5 #include <TGFrame.h> // TGTransientFrame 5 #include <TGFrame.h> // TGTransientFrame 6 #endif 7 #ifndef ROOT_TGListBox 8 #include <TGListBox.h> // TGListBox 9 #endif 10 #ifndef ROOT_TGSlider 11 #include <TGSlider.h> // TGVSlider 6 12 #endif 7 13 8 class MHistosAdc; 9 class TGListBox; 14 #ifndef MHISTOSADC_H 15 #include "MHistosAdc.h" 16 #endif 17 10 18 class TGTextButton; 11 19 class TRootEmbeddedCanvas; 12 20 class TCanvas; 13 class TGVSlider;14 21 class TGRadioButton; 15 22 … … 40 47 TGVSlider *fVslider1; 41 48 42 43 49 void DrawHi(Int_t i) { fHists->DrawHi(i); } 50 void DrawLo(Int_t i) { fHists->DrawLo(i); } 51 void DrawSelectedHi() { DrawHi( GetSelected()-1) ; } 52 void DrawSelectedLo() { DrawLo( GetSelected()-1) ; } 53 Int_t GetSelected() { return fHistoList->GetSelected(); } 54 void SelectSelected() { fHistoList->Select(GetSelected()-1, kTRUE); } 55 void SetSelectedTopEntry() { fHistoList->SetTopEntry(GetSelected()); } 56 void SetSelectedPos() { fVslider1->SetPosition( GetSelected()-1); } 44 57 45 58 public: -
trunk/MagicSoft/Mars/mdatacheck/MHistosAdc.cc
r462 r665 23 23 // 24 24 25 fHistHigh = new TObjArray(577);26 fHistLow = new TObjArray(577);27 28 25 // 29 26 // set the name and title of this object … … 38 35 // connect all the histogram with the container fHist 39 36 // 37 fHistHi = new TObjArray(577); 38 fHistLo = new TObjArray(577); 40 39 41 40 Char_t tmp1[40]; 42 41 Char_t tmp2[40]; 43 TH1F *h1;44 42 45 43 for ( Int_t i = 0 ; i < 577 ; i++) … … 48 46 sprintf ( tmp2, "high gain Pixel %d", i ) ; 49 47 50 h1 = new TH1F ( tmp1, tmp2, 256, 0., 255. ) ; 51 52 fHistHigh->Add( h1 ) ; 48 fHistHi->Add( new TH1F ( tmp1, tmp2, 256, 0., 255. ) ) ; 53 49 54 50 sprintf ( tmp1, "low %d", i ) ; 55 51 sprintf ( tmp2, "low gain Pixel %d", i ) ; 56 52 57 h1 = new TH1F ( tmp1, tmp2, 256, 0., 255. ) ; 58 59 fHistLow->Add( h1 ) ; 53 fHistLo->Add( new TH1F ( tmp1, tmp2, 256, 0., 255. ) ) ; 60 54 61 55 } … … 67 61 // default destructor 68 62 // 69 delete fHistHi gh ;70 delete fHistLo w ;63 delete fHistHi ; 64 delete fHistLo ; 71 65 } 72 66 … … 75 69 for ( Int_t i = 0 ; i < 576 ; i++) 76 70 { 77 fHistHi gh[i].Print() ;71 fHistHi[i].Print() ; 78 72 } 79 73 } 80 74 81 void MHistosAdc::FillAdcHistHi gh( Int_t iPix, Byte_t data)75 void MHistosAdc::FillAdcHistHi ( Int_t iPix, Byte_t data) 82 76 { 83 77 // 84 78 85 ((TH1F*) (fHistHigh->At(iPix)))->Fill( (Float_t) data ) ;79 GetHistHi(iPix)->Fill( (Float_t) data ) ; 86 80 } 87 81 88 void MHistosAdc::FillAdcHistLo w( Int_t iPix, Byte_t data)82 void MHistosAdc::FillAdcHistLo ( Int_t iPix, Byte_t data) 89 83 { 90 84 // 91 85 92 ((TH1F*) (fHistLow->At(iPix)))->Fill( (Float_t) data ) ;86 GetHistLo(iPix)->Fill( (Float_t) data ) ; 93 87 } 94 88 … … 99 93 // 100 94 95 // 96 // FIXME: Don't open a file and write to this file! 97 // just Fill the current container (or the two histograms 98 // to an open file. The user must choose a file before. 99 // 101 100 TFile out( name, "recreate") ; 102 101 … … 105 104 // 106 105 107 fHistLo w->Write() ;108 fHistHi gh->Write() ;106 fHistLo->Write() ; 107 fHistHi->Write() ; 109 108 } 110 109 -
trunk/MagicSoft/Mars/mdatacheck/MHistosAdc.h
r466 r665 6 6 #endif 7 7 8 #ifndef ROOT_TH1 9 #include <TH1.h> 10 #endif 8 11 #ifndef ROOT_TObjArray 9 12 #include <TObjArray.h> … … 17 20 { 18 21 private: 19 TObjArray *fHistHi gh; // List of High gain Histograms20 TObjArray *fHistLo w; // List of Low gain Histograms22 TObjArray *fHistHi; // List of High gain Histograms 23 TObjArray *fHistLo; // List of Low gain Histograms 21 24 22 25 public: … … 24 27 ~MHistosAdc(); 25 28 26 void FillAdcHistHi gh(Int_t iPix, Byte_t data);27 void FillAdcHistLo w (Int_t iPix, Byte_t data);29 void FillAdcHistHi (Int_t iPix, Byte_t data); 30 void FillAdcHistLo (Int_t iPix, Byte_t data); 28 31 29 32 void SaveHist(char *name); 30 33 31 void Print(Option_t * 34 void Print(Option_t *t = NULL); 32 35 36 TH1F *GetHistHi(Int_t i) { return (TH1F*)(fHistHi->At(i)); } 37 TH1F *GetHistLo(Int_t i) { return (TH1F*)(fHistLo->At(i)); } 33 38 34 TObjArray* GetHighList() 39 void DrawHi(Int_t i) { GetHistHi(i)->Draw(); } 40 void DrawLo(Int_t i) { GetHistHi(i)->Draw(); } 41 42 /* 43 TObjArray* GetHiList() 35 44 { 36 return ( fHistHigh ) ;45 return fHistHi ; 37 46 } 38 47 39 TObjArray* GetLo wList()48 TObjArray* GetLoList() 40 49 { 41 return ( fHistLow ) ;50 return fHistLo ; 42 51 } 43 44 Int_t GetHi ghEntries()52 */ 53 Int_t GetHiEntries() 45 54 { 46 return (fHistHigh->GetEntries() ) ;55 return fHistHi->GetEntries() ; 47 56 } 48 57 49 Int_t GetLo wEntries()58 Int_t GetLoEntries() 50 59 { 51 return (fHistLow->GetEntries() ) ;60 return fHistLo->GetEntries() ; 52 61 } 53 62 -
trunk/MagicSoft/Mars/mdatacheck/Makefile
r546 r665 6 6 # 7 7 ################################################################## 8 # @maintitle9 10 # @code11 12 #13 # please change all system depend values in the14 # config.mk.${OSTYPE} file15 #16 #17 8 include ../Makefile.conf.$(OSTYPE) 18 9 include ../Makefile.conf.general 19 10 20 # @endcode 11 # 12 # Handling name of the Root Dictionary Files 13 # 14 CINT = DataCheck 21 15 22 # @code 23 16 # 17 # Library name to creatre 18 # 24 19 LIB = mdatacheck.a 25 20 … … 27 22 # connect the include files defined in the config.mk file 28 23 # 29 INCLUDES = -I. -I../ -I../mbase -I../mraw 30 31 # 32 # ----->>> root libraries 33 # 34 35 ROOTLIBS = `root-config --libs` 36 ROOTGLIBS = `root-config --glibs` 37 ROOTCFLAGS = `root-config --cflags` 38 39 # 40 # compiler flags 41 # 42 43 CXXFLAGS = $(ROOTCFLAGS) $(INCLUDES) $(OPTIM) $(DEBUG) 44 CFLAGS = $(CXXFLAGS) 45 FFLAGS = $(CXXFLAGS) 24 INCLUDES = -I. -I../mbase -I../mraw 46 25 47 26 #------------------------------------------------------------------------------ 48 27 49 #.SILENT:50 51 28 .SUFFIXES: .c .cc .cxx .h .hxx .o 52 29 53 54 SRCFILES = MViewAdcSpectra.cc \ 30 SRCFILES = MDumpEvtHeader.cc \ 55 31 MFillAdcSpect.cc \ 56 MDumpEvtHeader.cc \ 32 MGDisplayAdc.cc \ 33 MHistosAdc.cc \ 57 34 MShowSpect.cc \ 58 MHistosAdc.cc \ 59 MGDisplayAdc.cc 35 MViewAdcSpectra.cc 60 36 61 37 SRCS = $(SRCFILES) … … 67 43 all: $(LIB) 68 44 69 depend: 70 @makedepend $(SRCS) $(INCLUDES) $(ROOTCFLAGS) \ 71 -f../Makefile.depend 2> kk.kk ; cat kk.kk 45 include ../Makefile.rules 72 46 73 $(LIB): $(OBJS) DataCheckCint.o 74 @echo " - Building Library $(LIB) ... " 75 $(AR) $(LIB) *.o 47 clean: rmlib rmcint rmobjs rmcore rmbin 76 48 77 DataCheckCint.cc: $(HEADERS) 78 @echo 79 @echo " - Generating dictionary DataCheckCint.cc ..." 80 81 $(ROOTSYS)/bin/rootcint -f DataCheckCint.cc \ 82 -c $(INCLUDES) $(HEADERS) DataCheckIncl.h DataCheckLinkDef.h 83 84 .cxx.o: 85 @echo " - Compiling " $< 86 $(CXX) $(CXXFLAGS) -c $< -o $@ 87 88 .cc.o: 89 @echo " - Compiling " $< 90 $(CXX) $(CXXFLAGS) -c $< -o $@ 91 92 .c.o: 93 @echo " - Compiling " $< 94 $(CC) $(CFLAGS) -c $< -o $@ 95 96 # 97 # The cleaning facility 98 # 99 100 rmlib: 101 @echo "Removing libraries..." 102 @rm -f lib*.a 103 104 rmcint: 105 @echo "Removing cint-stuff..." 106 @rm -f DataCheckCint.* 107 108 rmobjs: 109 @echo "Removing object files..." 110 @rm -f *.o 111 112 rmbin: 113 @echo "Removing binary files..." 114 @rm -f core 115 116 117 clean: rmlib rmcint rmobjs rmbin 118 119 mrproper: clean 120 @echo "Removing *~ kk.kk html/..." 121 @rm -f *~ kk.kk 122 123 cflags: 124 @echo $(INCLUDES) $(CXXFLAGS) 49 mrproper: clean rmbak 125 50 126 51 # @endcode -
trunk/MagicSoft/Mars/meventdisp/Makefile
r586 r665 1 ################################################################# 1 ################################################################## 2 2 # 3 3 # makefile … … 6 6 # 7 7 ################################################################## 8 # @maintitle9 10 # @code11 12 #13 # please change all system depend values in the14 # config.mk.${OSTYPE} file15 #16 #17 8 include ../Makefile.conf.$(OSTYPE) 18 9 include ../Makefile.conf.general 19 10 20 # @endcode 11 # 12 # Handling name of the Root Dictionary Files 13 # 14 CINT = EvtDisp 21 15 22 # @code 23 16 # 17 # Library name to creatre 18 # 24 19 LIB = meventdisp.a 25 20 … … 27 22 # connect the include files defined in the config.mk file 28 23 # 29 INCLUDES = -I. -I../ -I../mbase -I../mraw 30 31 # 32 # ----->>> root libraries 33 # 34 35 ROOTLIBS = `root-config --libs` 36 ROOTGLIBS = `root-config --glibs` 37 ROOTCFLAGS = `root-config --cflags` 38 39 # 40 # compiler flags 41 # 42 43 CXXFLAGS = $(ROOTCFLAGS) $(INCLUDES) $(OPTIM) $(DEBUG) 44 CFLAGS = $(CXXFLAGS) 45 FFLAGS = $(CXXFLAGS) 24 INCLUDES = -I. -I../mbase -I../mraw 46 25 47 26 #------------------------------------------------------------------------------ 48 27 49 #.SILENT:50 51 28 .SUFFIXES: .c .cc .cxx .h .hxx .o 52 29 53 54 30 SRCFILES = MGFadcDisp.cc 55 56 31 57 32 SRCS = $(SRCFILES) … … 63 38 all: $(LIB) 64 39 65 depend: 66 @makedepend $(SRCS) $(INCLUDES) $(ROOTCFLAGS) \ 67 -f../Makefile.depend 2> kk.kk ; cat kk.kk 40 include ../Makefile.rules 68 41 69 $(LIB): $(OBJS) EvtDispCint.o 70 @echo " - Building Library $(LIB) ... " 71 $(AR) $(LIB) *.o 42 clean: rmlib rmcint rmobjs rmcore rmbin 72 43 73 EvtDispCint.cc: $(HEADERS) 74 @echo 75 @echo " - Generating dictionary EvtDispCint.cc ..." 76 77 $(ROOTSYS)/bin/rootcint -f EvtDispCint.cc \ 78 -c $(INCLUDES) $(HEADERS) EvtDispIncl.h EvtDispLinkDef.h 79 80 .cxx.o: 81 @echo " - Compiling " $< 82 $(CXX) $(CXXFLAGS) -c $< -o $@ 83 84 .cc.o: 85 @echo " - Compiling " $< 86 $(CXX) $(CXXFLAGS) -c $< -o $@ 87 88 .c.o: 89 @echo " - Compiling " $< 90 $(CC) $(CFLAGS) -c $< -o $@ 91 92 # 93 # The cleaning facility 94 # 95 96 rmlib: 97 @echo "Removing libraries..." 98 @rm -f lib*.a 99 100 rmcint: 101 @echo "Removing cint-stuff..." 102 @rm -f EvtDispCint.* 103 104 rmobjs: 105 @echo "Removing object files..." 106 @rm -f *.o 107 108 rmbin: 109 @echo "Removing binary files..." 110 @rm -f core 111 112 113 clean: rmlib rmcint rmobjs rmbin 114 115 mrproper: clean 116 @echo "Removing *~ kk.kk html/..." 117 @rm -f *~ kk.kk 118 119 cflags: 120 @echo $(INCLUDES) $(CXXFLAGS) 44 mrproper: clean rmbak 121 45 122 46 # @endcode -
trunk/MagicSoft/Mars/mgui/MHexagon.h
r653 r665 11 11 12 12 #ifndef ROOT_TObject 13 #include "TObject.h"13 #include <TObject.h> 14 14 #endif 15 15 16 16 #ifndef ROOT_TAttLine 17 #include "TAttLine.h"17 #include <TAttLine.h> 18 18 #endif 19 19 20 20 #ifndef ROOT_TAttFill 21 #include "TAttFill.h"21 #include <TAttFill.h> 22 22 #endif 23 23 -
trunk/MagicSoft/Mars/mgui/Makefile
r654 r665 6 6 # 7 7 ################################################################## 8 # @maintitle9 10 # @code11 12 #13 # please change all system depend values in the14 # config.mk.${OSTYPE} file15 #16 #17 8 include ../Makefile.conf.$(OSTYPE) 18 9 include ../Makefile.conf.general 19 10 20 # @endcode 11 # 12 # Handling name of the Root Dictionary Files 13 # 14 CINT = Gui 21 15 22 # @code 23 16 # 17 # Library name to creatre 18 # 24 19 LIB = mgui.a 25 20 … … 27 22 # connect the include files defined in the config.mk file 28 23 # 29 INCLUDES = -I. -I../mbase -I../mraw -I../mdatacheck -I../meventdisp -I../manalysis 30 31 # 32 # ----->>> root libraries 33 # 34 35 ROOTLIBS = `root-config --libs` 36 ROOTGLIBS = `root-config --glibs` 37 ROOTCFLAGS = `root-config --cflags` 38 39 # 40 # compiler flags 41 # 42 43 CXXFLAGS = $(ROOTCFLAGS) $(INCLUDES) $(OPTIM) $(DEBUG) 44 CFLAGS = $(CXXFLAGS) 45 FFLAGS = $(CXXFLAGS) 24 INCLUDES = -I. -I../mbase -I../manalysis -I../mdatacheck -I../meventdisp 46 25 47 26 #------------------------------------------------------------------------------ 48 27 49 #.SILENT:50 51 28 .SUFFIXES: .c .cc .cxx .h .hxx .o 52 29 53 54 SRCFILES = MGMarsMain.cc \ 30 SRCFILES = MCamDisplay.cc \ 31 MCamNeighbor.cc \ 32 MGDataCheckMain.cc \ 55 33 MGEventDispMain.cc \ 56 MG DataCheckMain.cc \34 MGMarsMain.cc \ 57 35 MGMonteCarloMain.cc \ 58 MGPrototyp.cc \ 59 MHexagon.cc \ 36 MGPrototyp.cc \ 60 37 MGeomCam.cc \ 61 38 MGeomPix.cc \ 62 MCamNeighbor.cc \ 63 MCamDisplay.cc 64 39 MHexagon.cc 65 40 66 41 SRCS = $(SRCFILES) … … 72 47 all: $(LIB) 73 48 74 depend: 75 @makedepend $(SRCS) $(INCLUDES) $(ROOTCFLAGS) \ 76 -f../Makefile.depend 2> kk.kk ; cat kk.kk 49 include ../Makefile.rules 77 50 78 $(LIB): $(OBJS) GuiCint.o 79 @echo " - Building Library $(LIB) ... " 80 $(AR) $(LIB) *.o 51 clean: rmlib rmcint rmobjs rmcore rmbin 81 52 82 GuiCint.cc: $(HEADERS) 83 @echo 84 @echo " - Generating dictionary GuiCint.cc ..." 85 86 $(ROOTSYS)/bin/rootcint -f GuiCint.cc \ 87 -c $(INCLUDES) $(HEADERS) GuiIncl.h GuiLinkDef.h 88 89 .cxx.o: 90 @echo " - Compiling " $< 91 $(CXX) $(CXXFLAGS) -c $< -o $@ 92 93 .cc.o: 94 @echo " - Compiling " $< 95 $(CXX) $(CXXFLAGS) -c $< -o $@ 96 97 .c.o: 98 @echo " - Compiling " $< 99 $(CC) $(CFLAGS) -c $< -o $@ 100 101 # 102 # The cleaning facility 103 # 104 105 rmlib: 106 @echo "Removing libraries..." 107 @rm -f lib*.a 108 109 rmcint: 110 @echo "Removing cint-stuff..." 111 @rm -f GuiCint.* 112 113 rmobjs: 114 @echo "Removing object files..." 115 @rm -f *.o 116 117 rmbin: 118 @echo "Removing binary files..." 119 @rm -f core 120 121 122 clean: rmlib rmcint rmobjs rmbin 123 124 mrproper: clean 125 @echo "Removing *~ kk.kk html/..." 126 @rm -f *~ kk.kk 127 128 cflags: 129 @echo $(INCLUDES) $(CXXFLAGS) 53 mrproper: clean rmbak 130 54 131 55 # @endcode -
trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
r654 r665 24 24 ClassImp(MRawFileRead) 25 25 26 /* 27 ----------- please don't delete ------------26 27 // ----------- please don't delete ------------ 28 28 #define kBUFSZ 1024 29 29 … … 41 41 int underflow() 42 42 { 43 int sz=fread(fBuffer, 1, kBUFSZ, fd);43 int sz=fread(fBuffer, kBUFSZ, 1, fd); 44 44 setg(fBuffer, fBuffer, fBuffer+kBUFSZ); 45 45 … … 53 53 } 54 54 }; 55 */ 55 56 56 57 57 MRawFileRead::MRawFileRead(const char *fname, const char *name, const char *title) … … 63 63 // open the input stream 64 64 // 65 fIn = new ifstream(fname);65 fIn = new bifstream(fname); 66 66 67 67 if (!(*fIn)) -
trunk/MagicSoft/Mars/mraw/MRawFileRead.h
r654 r665 6 6 #endif 7 7 8 class ifstream;8 class bifstream; 9 9 10 10 class MTime; … … 24 24 MTime *fRawEvtTime; // raw evt time information container to fill from file 25 25 26 ifstream *fIn; //! buffered input stream (file to read from)26 bifstream *fIn; //! buffered input stream (file to read from) 27 27 28 28 public:
Note:
See TracChangeset
for help on using the changeset viewer.