CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/RecoParticleFlow/PFRootEvent/src/DialogFrame.cc

Go to the documentation of this file.
00001 #include <iostream>
00002 #include <fstream>
00003 #include <stdlib.h>
00004 
00005 #include "RecoParticleFlow/PFTracking/interface/PFGeometry.h"
00006 #include "RecoParticleFlow/PFRootEvent/interface/DialogFrame.h"
00007 #include "RecoParticleFlow/PFRootEvent/interface/DisplayCommon.h"
00008 
00009 #include "RecoParticleFlow/PFRootEvent/interface/PFRootEventManager.h"
00010 #include "RecoParticleFlow/PFRootEvent/interface/DisplayManager.h"
00011 
00012 #include <TROOT.h>
00013 #include <TTree.h>
00014 #include "TLine.h"
00015 #include "TList.h"
00016 #include "TCanvas.h"
00017 #include "TButton.h"
00018 #include "TGraph.h"
00019 #include "TMarker.h"
00020 #include "TText.h"
00021 #include <TApplication.h>
00022 
00023 
00024 
00025 
00026 DialogFrame::DialogFrame(PFRootEventManager *evman,DisplayManager *dm,const TGWindow *p,UInt_t w,UInt_t h)
00027   :TGMainFrame(p, w, h),evMan_(evman),display_(dm),attrView_(0),
00028    thisClusPattern_(0),trackPattern_(0),simplePartPattern_(0)
00029 {
00030   
00031   mainFrame_= new TGCompositeFrame(this,200,300,kVerticalFrame);
00032   createCmdFrame();
00033   AddFrame(mainFrame_, new TGLayoutHints(kLHintsLeft | kLHintsExpandY));
00034   
00035   // Set a name to the main frame
00036   SetWindowName("PFRootEvent Dialog");
00037   // Map all subwindows of main frame
00038   MapSubwindows();
00039   // Initialize the layout algorithm
00040   Resize(mainFrame_->GetDefaultSize());
00041   // Map main frame
00042   MapWindow();
00043     
00044 }
00045 //__________________________________________________________________________________________________
00046 void DialogFrame::closeCanvasAttr()
00047 {
00048   if (gROOT->GetListOfCanvases()->FindObject("graphic Attributes")) 
00049     attrView_->Close();
00050   attrView_=0;
00051   thisClusPattern_=0;
00052   trackPattern_=0;
00053   simplePartPattern_=0;
00054 }
00055 //__________________________________________________________________________________________________
00056 void DialogFrame::createCanvasAttr()
00057 {
00058   //creates an attributes canvas which enable modifications
00059   //of cluster and track graphic attributes 
00060   
00061   closeCanvasAttr(); 
00062   attrView_=0;
00063   attrView_ = new TCanvas("graphic Attributes","graphic Attributes",180,300);
00064   const char *action1="win->DialogFrame::modifyAttr()";
00065   const char *action2="win->DialogFrame::closeCanvasAttr()";
00066   TButton *accept_ = new TButton("modify",action1,0.1,0.2,0.5,0.3);
00067   TButton *cancel_ = new TButton("cancel",action2,0.54,0.2,0.9,0.3);
00068   double x[3];
00069   double y[3];
00070   x[0]=0.1;x[1]=0.3;x[2]=0.5;
00071   y[0]=0.6;y[1]=0.6;y[2]=0.6;
00072   thisClusPattern_= new TMarker(0.3,0.8,display_->clusPattern_->GetMarkerStyle());
00073   thisClusPattern_->SetMarkerColor(display_->clusPattern_->GetMarkerColor());
00074   thisClusPattern_->SetMarkerSize(display_->clusPattern_->GetMarkerSize());
00075   thisClusPattern_->Draw();
00076   TText * tt=new TText(0.6,0.78,"clusters");
00077   tt->SetTextSize(.08);
00078   tt->Draw();
00079   trackPattern_= new TGraph(3,x,y);
00080   trackPattern_->SetLineColor(display_->trackPatternL_->GetLineColor());
00081   trackPattern_->SetMarkerColor(display_->trackPatternM_->GetMarkerColor());
00082   trackPattern_->SetMarkerStyle(display_->trackPatternM_->GetMarkerStyle());
00083   trackPattern_->SetMarkerSize(display_->trackPatternM_->GetMarkerSize());
00084   trackPattern_->Draw("pl");
00085   TText *tt2= new TText(0.6,0.58,"recTracks");
00086   tt2->SetTextSize(.08);
00087   tt2->Draw();
00088  
00089   accept_->Draw();
00090   cancel_->Draw();
00091   attrView_->Update();
00092 }
00093 //__________________________________________________________________________________________________
00094 void DialogFrame::createCmdFrame() 
00095 {
00096   TGCompositeFrame *h1Frame1 = new TGCompositeFrame(mainFrame_, 100, 100, kHorizontalFrame | kRaisedFrame);
00097   mainFrame_->AddFrame(h1Frame1,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
00098   TGLayoutHints *lo;
00099   lo = new TGLayoutHints(kLHintsLeft|kLHintsExpandX |kLHintsExpandY ,5,2,5,2);
00100   
00101   //create object selection buttons
00102   TGGroupFrame *gr1= new TGGroupFrame(h1Frame1,"Draw Selection",kVerticalFrame); 
00103   gr1->SetLayoutManager(new TGMatrixLayout(gr1,9,3,5));
00104   
00105   selectObject_[0] = new TGCheckButton(gr1,"Hits");
00106   selectObject_[0]->SetState(display_->drawHits_ ? kButtonDown :kButtonUp);
00107   selectObject_[0]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=0)");
00108   selectObject_[1] = new TGCheckButton(gr1,"Clusters");
00109   selectObject_[1]->SetState(display_->drawClus_ ? kButtonDown :kButtonUp);
00110   selectObject_[1]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=1)");
00111   selectObject_[2] = new TGCheckButton(gr1,"Tracks");
00112   selectObject_[2]->SetState(display_->drawTracks_ ? kButtonDown :kButtonUp);
00113   selectObject_[2]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=2)");
00114   selectObject_[3] = new TGCheckButton(gr1,"SimParticles");
00115   selectObject_[3]->SetState(display_->drawParticles_ ? kButtonDown :kButtonUp);
00116   selectObject_[3]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=3)");
00117   selectObject_[4] = new TGCheckButton(gr1,"GenParticles");
00118   selectObject_[4]->SetState(display_->drawGenParticles_ ? kButtonDown :kButtonUp);
00119   selectObject_[4]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=4)");
00120   selectObject_[5] = new TGCheckButton(gr1,"GsfTracks");
00121   selectObject_[5]->SetState(display_->drawGsfTracks_ ? kButtonDown :kButtonUp);
00122   selectObject_[5]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=5)");
00123   selectObject_[6] = new TGCheckButton(gr1,"Brems visible");
00124   selectObject_[6]->SetState(display_->drawBrems_ ? kButtonDown :kButtonUp);
00125   selectObject_[6]->Connect("Clicked()","DialogFrame",this,"areBremVisible()");
00126   selectObject_[7] = new TGCheckButton(gr1,"PFBlock visible");
00127   selectObject_[7]->SetState(display_->drawPFBlocks_ ? kButtonDown :kButtonUp);
00128   selectObject_[7]->Connect("Clicked()","DialogFrame",this,"isPFBlockVisible()");
00129 
00130 
00131   // create threshold fields
00132   TGNumberFormat::ELimit lim = TGNumberFormat::kNELLimitMinMax;  
00133   float limit=100;
00134   for (int i=0;i<6;++i){
00135     thresholdS_[i] = new TGDoubleHSlider(gr1,100,kDoubleScaleNo,ENER+i);
00136     thresholdS_[i]->Associate(this);
00137     thresholdS_[i]->SetRange(0,limit);
00138    
00139     threshEntry_[i] = new TGNumberEntryField(gr1,EN+i,0);
00140     threshEntry_[i]->Associate(this);
00141     threshEntry_[i]->SetLimits(lim,0,limit);
00142     threshEntry_[i]->SetFormat((TGNumberFormat::EStyle)2);
00143   }
00144   thresholdS_[0]->SetPosition((float) display_->hitEnMin_,(float) display_->hitEnMin_);
00145   thresholdS_[1]->SetPosition((float) display_->clusEnMin_,(float)display_->clusEnMin_);
00146   thresholdS_[2]->SetPosition((float) display_->trackPtMin_,(float)display_->trackPtMin_);
00147   thresholdS_[3]->SetPosition((float) display_->particlePtMin_,(float)display_->particlePtMin_);
00148   thresholdS_[4]->SetPosition((float) display_->genParticlePtMin_,(float)display_->genParticlePtMin_);
00149   thresholdS_[5]->SetPosition((float) display_->gsfPtMin_,(float)display_->gsfPtMin_);
00150   
00151   
00152   int charw= threshEntry_[0]->GetCharWidth("O");
00153   int size=charw*4;
00154   for (int i=0;i<6;++i) {
00155     threshEntry_[i]->SetNumber(thresholdS_[i]->GetMinPosition());
00156     threshEntry_[i]->Resize(size,threshEntry_[i]->GetDefaultHeight());
00157   }
00158   
00159   //
00160   TGLayoutHints *lo1=new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 2, 2, 2);
00161   TGLabel *label=new TGLabel(gr1,"  ");
00162   gr1->AddFrame(label,lo1);
00163   label=new TGLabel(gr1," En/Pt  Threshold");
00164   gr1->AddFrame(label,lo1);
00165   label=new TGLabel(gr1," (Gev) ");  
00166   gr1->AddFrame(label,lo1);
00167   
00168   for (int i=0;i<6;++i) {
00169     gr1->AddFrame(selectObject_[i],lo1);
00170     gr1->AddFrame(thresholdS_[i],lo1);
00171     gr1->AddFrame(threshEntry_[i],lo1);
00172   }
00173   
00174 //gr1->AddFrame(selectObject_[6],lo1);   
00175 //  h1Frame1->AddFrame(gr1,lo1);
00176 //  gr1->AddFrame(selectObject_[7],lo1);   
00177 //  h1Frame1->AddFrame(gr1,lo1);
00178 
00179 // MURIEL - replace the previous four  lines by :
00180   TGLabel *label0 = new TGLabel(gr1,"  ");
00181   gr1->AddFrame(selectObject_[6],lo1);   
00182   gr1->AddFrame(label0,lo1);   
00183   gr1->AddFrame(label0,lo1);
00184   gr1->AddFrame(selectObject_[7],lo1);   
00185   h1Frame1->AddFrame(gr1,lo);
00186   
00187   
00188   //add options frame
00189   TGVerticalFrame *optionFrame = new TGVerticalFrame(h1Frame1,10,10,kSunkenFrame);
00190   
00191   //print space
00192   TGLabel *lab1,*lab2;
00193   TGHorizontalFrame *h2 = new TGHorizontalFrame(optionFrame,10,10);
00194   TGGroupFrame *printGroup = new TGGroupFrame(h2, " Print", kVerticalFrame);
00195   lab1 = new TGLabel(printGroup," ");
00196   lab2 = new TGLabel(printGroup," ");
00197   //TGLabel *lab3 = new TGLabel(printGroup," ");
00198   printGroup->SetLayoutManager(new TGMatrixLayout(printGroup, 7,3,3));
00199   printButton_[0] = new TGCheckButton(printGroup,"RecHits ");
00200   printButton_[0]->SetState(evMan_->printRecHits_ ? kButtonDown :kButtonUp); 
00201   printButton_[0]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=0)");
00202   printButton_[1] = new TGCheckButton(printGroup,"Clusters");
00203   printButton_[1]->SetState(evMan_->printClusters_ ? kButtonDown :kButtonUp); 
00204   printButton_[1]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=1)");
00205   printButton_[2] = new TGCheckButton(printGroup,"PFBlocks");
00206   printButton_[2]->SetState(evMan_->printPFBlocks_ ? kButtonDown :kButtonUp); 
00207   printButton_[2]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=2)");
00208   printButton_[3] = new TGCheckButton(printGroup,"PFCandidates ");
00209   printButton_[3]->SetState(evMan_->printPFCandidates_ ? kButtonDown :kButtonUp); 
00210   printButton_[3]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=3)");
00211   printButton_[4] = new TGCheckButton(printGroup,"PFJets ");
00212   printButton_[4]->SetState(evMan_->printPFJets_ ? kButtonDown :kButtonUp); 
00213   printButton_[4]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=4)");
00214   printButton_[5] = new TGCheckButton(printGroup,"SimParticles ");
00215   printButton_[5]->SetState(evMan_->printSimParticles_ ? kButtonDown :kButtonUp); 
00216   printButton_[5]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=5)");
00217   printButton_[6] = new TGCheckButton(printGroup,"GenParticles");
00218   TGLabel *maxl = new TGLabel(printGroup,"max lines:");
00219   maxLineEntry_= new TGNumberEntryField(printGroup,MAXL,30);
00220   maxLineEntry_->Associate(this);
00221   maxLineEntry_->SetFormat((TGNumberFormat::EStyle)0);
00222   maxLineEntry_->Resize(charw*3,maxLineEntry_->GetDefaultHeight());
00223   printButton_[6]->SetState(evMan_->printGenParticles_ ? kButtonDown :kButtonUp); 
00224   printButton_[6]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=6)");
00225   
00226     
00227   for(UInt_t i = 0 ;i<6 ; ++i){
00228     printGroup->AddFrame(printButton_[i],lo1);
00229     printGroup->AddFrame(lab1,lo1);
00230     printGroup->AddFrame(lab2,lo1);
00231   }
00232   printGroup->AddFrame(printButton_[6],lo1);
00233   printGroup->AddFrame(maxl,lo1);
00234   printGroup->AddFrame(maxLineEntry_,lo1);
00235   
00236   
00237   TGTextButton *sendPrintButton = new TGTextButton(h2,"Print");
00238   sendPrintButton->Connect("Clicked()","DialogFrame",this,"doPrint()");
00239   
00240   h2->AddFrame(printGroup,lo1);
00241   h2->AddFrame(sendPrintButton,new TGLayoutHints(kLHintsLeft|kLHintsCenterY,2,2,2,2));
00242   
00243   TGGroupFrame *viewGroup = new TGGroupFrame(optionFrame,"View",kHorizontalFrame);
00244   lab1 = new TGLabel(viewGroup," ");
00245   lab2 = new TGLabel(viewGroup," ");
00246   viewGroup->SetLayoutManager(new TGMatrixLayout(viewGroup, 3,3,3));
00247   
00248   TGTextButton *lookFor = new TGTextButton(viewGroup,"Look for");
00249   lookFor->Connect("Clicked()","DialogFrame",this,"doLookForGenParticle()");
00250   TGLabel *genPartNb = new TGLabel(viewGroup,"Gen Particle Nb:");
00251   particleTypeEntry_ = new TGNumberEntryField(viewGroup,PARTTYPE,1);
00252   particleTypeEntry_->Associate(this);
00253   particleTypeEntry_->SetFormat((TGNumberFormat::EStyle)0);
00254   particleTypeEntry_->Resize(charw*3,particleTypeEntry_->GetDefaultHeight());
00255  
00256   TGTextButton *unZoomButton = new TGTextButton(viewGroup,"Unzoom");
00257   unZoomButton->Connect("Clicked()","DialogFrame",this,"unZoom()");
00258 
00259   TGTextButton *newAttrBis = new TGTextButton(viewGroup,"Modify Graphic Attr");
00260   newAttrBis->Connect("Clicked()","DialogFrame",this,"createCanvasAttr()");
00261   
00262   viewGroup->AddFrame(lookFor,lo1);
00263   viewGroup->AddFrame(genPartNb,lo1),
00264     viewGroup->AddFrame(particleTypeEntry_,lo1);
00265   viewGroup->AddFrame(unZoomButton,lo1);
00266   viewGroup->AddFrame(lab1,lo1);
00267   viewGroup->AddFrame(lab2,lo1);
00268   viewGroup->AddFrame(newAttrBis,lo1); 
00269   
00270   //
00271   optionFrame->AddFrame(h2,lo);
00272   optionFrame->AddFrame(viewGroup,lo1);
00273   h1Frame1->AddFrame(optionFrame,lo);
00274 
00275   
00276   // Next/Pevious/exit buttons
00277   
00278   TGHorizontalFrame *h1 = new TGHorizontalFrame(mainFrame_,20,30);
00279   mainFrame_->AddFrame(h1,new TGLayoutHints(kLHintsCenterX,2,2,2,2));
00280   
00281   nextButton = new TGTextButton(h1,"Draw Next");
00282   nextButton->Connect("Clicked()","DialogFrame",this,"doNextEvent()");
00283   h1->AddFrame(nextButton,new TGLayoutHints(kLHintsBottom|kLHintsCenterX,2,2,2,2));
00284   
00285   previousButton = new TGTextButton(h1,"Draw Previous");
00286   previousButton->Connect("Clicked()","DialogFrame",this,"doPreviousEvent()");
00287   h1->AddFrame(previousButton,new TGLayoutHints(kLHintsBottom|kLHintsCenterX,2,2,2,2));
00288   
00289   
00290   reProcessButton = new TGTextButton(h1,"Re-Process");
00291   reProcessButton->Connect("Clicked()","DialogFrame",this,"doReProcessEvent()");
00292   h1->AddFrame(reProcessButton,new TGLayoutHints(kLHintsBottom|kLHintsCenterX,2,2,2,2));
00293   
00294   //Modifie Graphic attributes in option file
00295   //  TGTextButton *newAttr = new TGTextButton(h1,"new GAttr");
00296   //  newAttr->Connect("Clicked()","DialogFrame",this,"modifyGraphicAttributes()");
00297   //  h1->AddFrame(newAttr,new TGLayoutHints(kLHintsBottom|kLHintsCenterX,2,2,2,2));
00298 
00299     
00300   exitButton = new TGTextButton(h1,"&Exit","gApplication->Terminate(0)");
00301   h1->AddFrame(exitButton,new TGLayoutHints(kLHintsBottom|kLHintsCenterX,2,2,2,2));
00302 }  
00303   
00304 //________________________________________________________________________________
00305 void DialogFrame::CloseWindow()
00306 {
00308   gApplication->Terminate(0);
00309 }
00310 //_________________________________________________________________________________
00311 void DialogFrame::doLookForGenParticle()
00312 {
00313   int num = particleTypeEntry_->GetIntNumber();
00314   display_->lookForGenParticle((unsigned)num);
00315 }
00316 
00317 //_________________________________________________________________________________
00318 void DialogFrame::doModifyOptions(unsigned objNb)
00319 {
00320   switch (objNb) {
00321   case 0:
00322     display_->drawHits_ = (selectObject_[0]->IsDown()) ?true :false;
00323     break;
00324   case 1:
00325     display_->drawClus_ = (selectObject_[1]->IsDown()) ?true :false;
00326     break; 
00327   case 2:
00328     display_->drawTracks_ = (selectObject_[2]->IsDown()) ?true :false;
00329     break;
00330   case 3: 
00331     display_->drawParticles_ = (selectObject_[3]->IsDown()) ?true :false;
00332     break;
00333   case 4:
00334     display_->drawGenParticles_ = (selectObject_[4]->IsDown()) ?true :false;
00335     break;    
00336   case 5:
00337     display_->drawGsfTracks_ = (selectObject_[5]->IsDown()) ?true :false;
00338     break;    
00339   }
00340   display_->displayAll();    
00341 }
00342 //_______________________________________________________________________________
00343 DialogFrame::~DialogFrame()
00344 {
00345   mainFrame_->Cleanup();
00346 }
00347 //________________________________________________________________________________
00348 void DialogFrame::doModifyPtThreshold(unsigned objNb,double pt)
00349 {
00350   switch(objNb) {
00351   case 0: 
00352     display_->hitEnMin_= pt;break;
00353   case 1:
00354     display_->clusEnMin_= pt;break;
00355   case 2:
00356     display_->trackPtMin_= pt;break;
00357   case 3:
00358     display_->particlePtMin_= pt;break;
00359   case 4:
00360     display_->genParticlePtMin_= pt;break;
00361   case 5:
00362     display_->gsfPtMin_= pt;break;
00363     
00364   default:break;
00365   }  
00366   display_->displayAll();
00367 }
00368 //_________________________________________________________________________________
00369 void DialogFrame::doNextEvent()
00370 {
00371   display_->displayNext();
00372   doLookForGenParticle();  
00373   //   int eventNumber = evMan_->eventNumber();
00374   //TODOLIST:display new value of eventNumber in the futur reserve field
00375 } 
00376 //_________________________________________________________________________________
00377 void DialogFrame::doPreviousEvent()
00378 {
00379   display_->displayPrevious();
00380   doLookForGenParticle();  
00381   //   int eventNumber = evMan_->eventNumber();
00382   //TODOLIST:display new value of eventNumber in the futur reserve field
00383 }
00384 //_________________________________________________________________________________
00385 void DialogFrame::doPrint()
00386 {
00387   evMan_->print(std::cout,maxLineEntry_->GetIntNumber());
00388 }
00389 //________________________________________________________________________________
00390 void DialogFrame::doPrintGenParticles()
00391 {
00392   evMan_->printGenParticles(std::cout,maxLineEntry_->GetIntNumber());
00393 }
00394 //_________________________________________________________________________________
00395 void DialogFrame::doReProcessEvent()
00396 {
00397   int eventNumber = evMan_->eventNumber();
00398   display_->display(eventNumber);
00399 }
00400 //_________________________________________________________________________________
00401 void DialogFrame::isPFBlockVisible()
00402 {
00403   display_->enableDrawPFBlock((selectObject_[7]->IsDown()) ?true :false);
00404   
00405 }
00406 //_________________________________________________________________________________
00407 void DialogFrame::areBremVisible()
00408 {
00409   display_->enableDrawBrem((selectObject_[6]->IsDown()) ?true :false);
00410   display_->displayAll();
00411 }
00412 
00413 
00414 //_________________________________________________________________________________
00415 void DialogFrame::selectPrintOption(int opt)
00416 {
00417   switch (opt) {
00418   case 0:
00419     evMan_->printRecHits_ = (printButton_[0]->IsDown()) ?true :false;
00420     break;
00421   case 1:
00422     evMan_->printClusters_ = (printButton_[1]->IsDown()) ?true :false;
00423     break;
00424   case 2:
00425     evMan_->printPFBlocks_ = (printButton_[2]->IsDown()) ?true :false;
00426     break;
00427   case 3:
00428     evMan_->printPFCandidates_ = (printButton_[3]->IsDown()) ?true :false;
00429     break;
00430   case 4:
00431     evMan_->printPFJets_ = (printButton_[4]->IsDown()) ?true :false;
00432     break;
00433   case 5:
00434     evMan_->printSimParticles_ = (printButton_[5]->IsDown()) ?true :false;
00435     break;
00436   case 6:
00437     evMan_->printGenParticles_ = (printButton_[6]->IsDown()) ?true :false;
00438     break;
00439   default: break;  
00440     
00441   }
00442 } 
00443 //________________________________________________________________________________
00444 void DialogFrame::updateDisplay()
00445 {
00446   display_->updateDisplay();
00447 }
00448 
00449 //________________________________________________________________________________
00450 void DialogFrame::unZoom()
00451 {
00452   display_->unZoom();
00453 }
00454 //________________________________________________________________________________
00455 /*void DialogFrame::modifyGraphicAttributes()
00456   {
00457   // readOption avec nom du fichier apres valeurs changees a la main
00458   std::cout <<"do it yourself in the root input window"<<std::endl;
00459   std::cout <<"Edit your option file "<<std::endl;
00460   std::cout <<"modify the clusAttributes, trackAttributes or simpleTrackAttributes "<<std::endl;
00461   std::cout <<"type :dm->readOptions(opt.c_str();"<<std::endl;
00462   } 
00463 */
00464 //______________________________________________________________________________________
00465 void DialogFrame::modifyAttr()
00466 { 
00467   display_->clusPattern_->SetMarkerStyle(thisClusPattern_->GetMarkerStyle());
00468   display_->clusPattern_->SetMarkerSize(thisClusPattern_->GetMarkerSize());
00469   display_->clusPattern_->SetMarkerColor(thisClusPattern_->GetMarkerColor());
00470   display_->trackPatternL_->SetLineColor(trackPattern_->GetLineColor());
00471   display_->trackPatternM_->SetMarkerStyle(trackPattern_->GetMarkerStyle());
00472   display_->trackPatternM_->SetMarkerSize(trackPattern_->GetMarkerSize());
00473   //trackPattern_->SetMarkerColor(display_->trackAttributes_[0]);
00474   closeCanvasAttr();
00475   display_->drawWithNewGraphicAttributes();
00476 }
00477 //_________________________________________________________________________________
00478 Bool_t DialogFrame::ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
00479 { 
00480   switch (GET_MSG(msg)) {
00481   case kC_TEXTENTRY:
00482     switch (GET_SUBMSG(msg)) {
00483     case kTE_ENTER:
00484       switch (parm1) {
00485       case EN :case EN+1: case EN+2: case EN+3: case EN+4: case EN+5:
00486         {
00487           //int eventNumber=evMan_->iEvent_;
00488           float val=threshEntry_[parm1-EN]->GetNumber();
00489           thresholdS_[parm1-EN]->SetPosition(val,val);
00490           doModifyPtThreshold(parm1-EN,val);
00491           break;
00492         }
00493       case MAXL:  // print genPart max lines
00494         evMan_->printGenParticles_ = true;
00495         printButton_[6]->SetState(kButtonDown);
00496         doPrintGenParticles();
00497         break;
00498       case PARTTYPE:
00499         doLookForGenParticle(); 
00500         break;
00501       default:break;
00502       }
00503       break;
00504     default:break;
00505     }
00506     break;
00507   case kC_HSLIDER:
00508     switch (GET_SUBMSG(msg)) {
00509     case kSL_POS:
00510       switch (parm1) {
00511       case ENER: case ENER+1: case ENER+2: case ENER+3: case ENER+4: case ENER+5:
00512         {
00513           unsigned index=parm1-ENER;
00514           float val = thresholdS_[index]->GetMinPosition();
00515           threshEntry_[index]->SetNumber(val);
00516           fClient->NeedRedraw(threshEntry_[index]);
00517           break;
00518         } 
00519       default:break;
00520       }
00521       break;  
00522     case kSL_RELEASE:
00523       switch (parm1) {
00524       case ENER: case ENER+1: case ENER+2: case ENER+3:case ENER+4: case ENER+5:
00525         {
00526           float val = thresholdS_[parm1-ENER]->GetMinPosition();
00527           doModifyPtThreshold(parm1-ENER,(double)val);
00528           break;
00529         } 
00530       default:break;    
00531       }
00532       break;
00533     default:break;       
00534     }
00535     break;
00536   default:break;
00537   }
00538   return true;   
00539 }