CMS 3D CMS Logo

DialogFrame Class Reference

#include <RecoParticleFlow/PFRootEvent/interface/DialogFrame.h>

List of all members.

Public Member Functions

void closeCanvasAttr ()
virtual void CloseWindow ()
void createCanvasAttr ()
void createCmdFrame ()
 DialogFrame (PFRootEventManager *evman, DisplayManager *dm, const TGWindow *p, UInt_t w, UInt_t h)
void doLookForGenParticle ()
void doModifyOptions (unsigned obj)
void doModifyPtThreshold (unsigned obj, double val)
void doNextEvent ()
void doPreviousEvent ()
void doPrint ()
void doPrintGenParticles ()
void doReProcessEvent ()
void isPFBlockVisible ()
void modifyAttr ()
virtual bool ProcessMessage (Long_t msg, Long_t parm1, Long_t parm2)
void selectPrintOption (int opt)
void unZoom ()
void updateDisplay ()
virtual ~DialogFrame ()

Private Attributes

TCanvas * attrView_
TGCompositeFrame * cmdFrame_
DisplayManagerdisplay_
PFRootEventManagerevMan_
TGTextButton * exitButton
TGCompositeFrame * mainFrame_
TGNumberEntryField * maxLineEntry_
TGTextButton * nextButton
TGNumberEntryField * particleTypeEntry_
TGTextButton * previousButton
TGCheckButton * printButton_ [7]
TGTextButton * reProcessButton
TGCheckButton * selectObject_ [6]
TGraph * simplePartPattern_
TMarker * thisClusPattern_
TGNumberEntryField * threshEntry_ [5]
TGDoubleHSlider * thresholdS_ [5]
TGraph * trackPattern_

Static Private Attributes

static const int EN = 1
static const int ENER = 10
static const int MAXL = 20
static const int PARTTYPE = 30
static const int PFBLOCK = 40


Detailed Description

Definition at line 23 of file DialogFrame.h.


Constructor & Destructor Documentation

DialogFrame::DialogFrame ( PFRootEventManager evman,
DisplayManager dm,
const TGWindow *  p,
UInt_t  w,
UInt_t  h 
)

Definition at line 23 of file DialogFrame.cc.

References createCmdFrame(), and mainFrame_.

00024   :TGMainFrame(p, w, h),evMan_(evman),display_(dm),attrView_(0),
00025    thisClusPattern_(0),trackPattern_(0),simplePartPattern_(0)
00026 {
00027   
00028   mainFrame_= new TGCompositeFrame(this,200,300,kVerticalFrame);
00029   createCmdFrame();
00030   AddFrame(mainFrame_, new TGLayoutHints(kLHintsLeft | kLHintsExpandY));
00031   
00032   // Set a name to the main frame
00033   SetWindowName("PFRootEvent Dialog");
00034   // Map all subwindows of main frame
00035   MapSubwindows();
00036   // Initialize the layout algorithm
00037   Resize(mainFrame_->GetDefaultSize());
00038   // Map main frame
00039   MapWindow();
00040     
00041 }

DialogFrame::~DialogFrame (  )  [virtual]

Definition at line 316 of file DialogFrame.cc.

References mainFrame_.

00317 {
00318   mainFrame_->Cleanup();
00319 }


Member Function Documentation

void DialogFrame::closeCanvasAttr (  ) 

Definition at line 43 of file DialogFrame.cc.

References attrView_, simplePartPattern_, thisClusPattern_, and trackPattern_.

Referenced by createCanvasAttr(), and modifyAttr().

00044 {
00045   if (gROOT->GetListOfCanvases()->FindObject("graphic Attributes")) 
00046     attrView_->Close();
00047   attrView_=0;
00048   thisClusPattern_=0;
00049   trackPattern_=0;
00050   simplePartPattern_=0;
00051 }

void DialogFrame::CloseWindow (  )  [virtual]

!!WARNING keep the first letter of the method uppercase.It is an overriden ROOT method

Definition at line 281 of file DialogFrame.cc.

00282 {
00284   gApplication->Terminate(0);
00285 }

void DialogFrame::createCanvasAttr (  ) 

Definition at line 53 of file DialogFrame.cc.

References attrView_, closeCanvasAttr(), DisplayManager::clusPattern_, display_, thisClusPattern_, trackPattern_, DisplayManager::trackPatternL_, DisplayManager::trackPatternM_, tt, x, and y.

00054 {
00055   //creates an attributes canvas which enable modifications
00056   //of cluster and track graphic attributes 
00057   
00058   closeCanvasAttr(); 
00059   attrView_=0;
00060   attrView_ = new TCanvas("graphic Attributes","graphic Attributes",180,300);
00061   char *action1="win->DialogFrame::modifyAttr()";
00062   char *action2="win->DialogFrame::closeCanvasAttr()";
00063   TButton *accept_ = new TButton("modify",action1,0.1,0.2,0.5,0.3);
00064   TButton *cancel_ = new TButton("cancel",action2,0.54,0.2,0.9,0.3);
00065   double x[3];
00066   double y[3];
00067   x[0]=0.1;x[1]=0.3;x[2]=0.5;
00068   y[0]=0.6;y[1]=0.6;y[2]=0.6;
00069   thisClusPattern_= new TMarker(0.3,0.8,display_->clusPattern_->GetMarkerStyle());
00070   thisClusPattern_->SetMarkerColor(display_->clusPattern_->GetMarkerColor());
00071   thisClusPattern_->SetMarkerSize(display_->clusPattern_->GetMarkerSize());
00072   thisClusPattern_->Draw();
00073   TText * tt=new TText(0.6,0.78,"clusters");
00074   tt->SetTextSize(.08);
00075   tt->Draw();
00076   trackPattern_= new TGraph(3,x,y);
00077   trackPattern_->SetLineColor(display_->trackPatternL_->GetLineColor());
00078   trackPattern_->SetMarkerColor(display_->trackPatternM_->GetMarkerColor());
00079   trackPattern_->SetMarkerStyle(display_->trackPatternM_->GetMarkerStyle());
00080   trackPattern_->SetMarkerSize(display_->trackPatternM_->GetMarkerSize());
00081   trackPattern_->Draw("pl");
00082   TText *tt2= new TText(0.6,0.58,"recTracks");
00083   tt2->SetTextSize(.08);
00084   tt2->Draw();
00085  
00086   accept_->Draw();
00087   cancel_->Draw();
00088   attrView_->Update();
00089 }

void DialogFrame::createCmdFrame (  ) 

Definition at line 91 of file DialogFrame.cc.

References DisplayManager::clusEnMin_, display_, DisplayManager::drawClus_, DisplayManager::drawGenParticles_, DisplayManager::drawHits_, DisplayManager::drawParticles_, DisplayManager::drawPFBlocks_, DisplayManager::drawTracks_, EN, ENER, evMan_, exitButton, DisplayManager::genParticlePtMin_, h1, h2, DisplayManager::hitEnMin_, i, label, mainFrame_, MAXL, maxLineEntry_, nextButton, DisplayManager::particlePtMin_, particleTypeEntry_, PARTTYPE, previousButton, printButton_, PFRootEventManager::printClusters_, PFRootEventManager::printGenParticles_, PFRootEventManager::printPFBlocks_, PFRootEventManager::printPFCandidates_, PFRootEventManager::printPFJets_, PFRootEventManager::printRecHits_, PFRootEventManager::printSimParticles_, reProcessButton, selectObject_, size, threshEntry_, thresholdS_, and DisplayManager::trackPtMin_.

Referenced by DialogFrame().

00092 {
00093   TGCompositeFrame *h1Frame1 = new TGCompositeFrame(mainFrame_, 100, 100, kHorizontalFrame | kRaisedFrame);
00094   mainFrame_->AddFrame(h1Frame1,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
00095   TGLayoutHints *lo;
00096   lo = new TGLayoutHints(kLHintsLeft|kLHintsExpandX |kLHintsExpandY ,5,2,5,2);
00097   
00098   //create object selection buttons
00099   TGGroupFrame *gr1= new TGGroupFrame(h1Frame1,"Draw Selection",kVerticalFrame); 
00100   gr1->SetLayoutManager(new TGMatrixLayout(gr1,7,3,5));
00101   
00102   selectObject_[0] = new TGCheckButton(gr1,"Hits");
00103   selectObject_[0]->SetState(display_->drawHits_ ? kButtonDown :kButtonUp);
00104   selectObject_[0]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=0)");
00105   selectObject_[1] = new TGCheckButton(gr1,"Clusters");
00106   selectObject_[1]->SetState(display_->drawClus_ ? kButtonDown :kButtonUp);
00107   selectObject_[1]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=1)");
00108   selectObject_[2] = new TGCheckButton(gr1,"Tracks");
00109   selectObject_[2]->SetState(display_->drawTracks_ ? kButtonDown :kButtonUp);
00110   selectObject_[2]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=2)");
00111   selectObject_[3] = new TGCheckButton(gr1,"SimParticles");
00112   selectObject_[3]->SetState(display_->drawParticles_ ? kButtonDown :kButtonUp);
00113   selectObject_[3]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=3)");
00114   selectObject_[4] = new TGCheckButton(gr1,"GenParticles");
00115   selectObject_[4]->SetState(display_->drawGenParticles_ ? kButtonDown :kButtonUp);
00116   selectObject_[4]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=4)");
00117   selectObject_[5] = new TGCheckButton(gr1,"PFBlock visible");
00118   selectObject_[5]->SetState(display_->drawPFBlocks_ ? kButtonDown :kButtonUp);
00119   selectObject_[5]->Connect("Clicked()","DialogFrame",this,"isPFBlockVisible()");
00120 
00121   // create threshold fields
00122   TGNumberFormat::ELimit lim = TGNumberFormat::kNELLimitMinMax;  
00123   for (int i=0;i<5;++i){
00124     thresholdS_[i] = new TGDoubleHSlider(gr1,100,kDoubleScaleNo,ENER+i);
00125     thresholdS_[i]->Associate(this);
00126     thresholdS_[i]->SetRange(0,10);
00127    
00128     threshEntry_[i] = new TGNumberEntryField(gr1,EN+i,0);
00129     threshEntry_[i]->Associate(this);
00130     threshEntry_[i]->SetLimits(lim,0,10);
00131     threshEntry_[i]->SetFormat((TGNumberFormat::EStyle)2);
00132   }
00133   thresholdS_[0]->SetPosition((float) display_->hitEnMin_,(float) display_->hitEnMin_);
00134   thresholdS_[1]->SetPosition((float) display_->clusEnMin_,(float)display_->clusEnMin_);
00135   thresholdS_[2]->SetPosition((float) display_->trackPtMin_,(float)display_->trackPtMin_);
00136   thresholdS_[3]->SetPosition((float) display_->particlePtMin_,(float)display_->particlePtMin_);
00137   thresholdS_[4]->SetPosition((float) display_->genParticlePtMin_,(float)display_->genParticlePtMin_);
00138   
00139   
00140   int charw= threshEntry_[0]->GetCharWidth("O");
00141   int size=charw*4;
00142   for (int i=0;i<5;++i) {
00143     threshEntry_[i]->SetNumber(thresholdS_[i]->GetMinPosition());
00144     threshEntry_[i]->Resize(size,threshEntry_[i]->GetDefaultHeight());
00145   }
00146   
00147   //
00148   TGLayoutHints *lo1=new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 2, 2, 2);
00149   TGLabel *label=new TGLabel(gr1,"  ");
00150   gr1->AddFrame(label,lo1);
00151   label=new TGLabel(gr1," En/Pt  Threshold");
00152   gr1->AddFrame(label,lo1);
00153   label=new TGLabel(gr1," (Gev) ");  
00154   gr1->AddFrame(label,lo1);
00155   
00156   for (int i=0;i<5;++i) {
00157     gr1->AddFrame(selectObject_[i],lo1);
00158     gr1->AddFrame(thresholdS_[i],lo1);
00159     gr1->AddFrame(threshEntry_[i],lo1);
00160   }
00161   gr1->AddFrame(selectObject_[5],lo1);   
00162   h1Frame1->AddFrame(gr1,lo1);
00163   
00164   //add options frame
00165   TGVerticalFrame *optionFrame = new TGVerticalFrame(h1Frame1,10,10,kSunkenFrame);
00166   
00167   //print space
00168   TGLabel *lab1,*lab2;
00169   TGHorizontalFrame *h2 = new TGHorizontalFrame(optionFrame,10,10);
00170   TGGroupFrame *printGroup = new TGGroupFrame(h2, " Print", kVerticalFrame);
00171   lab1 = new TGLabel(printGroup," ");
00172   lab2 = new TGLabel(printGroup," ");
00173   //TGLabel *lab3 = new TGLabel(printGroup," ");
00174   printGroup->SetLayoutManager(new TGMatrixLayout(printGroup, 7,3,3));
00175   printButton_[0] = new TGCheckButton(printGroup,"RecHits ");
00176   printButton_[0]->SetState(evMan_->printRecHits_ ? kButtonDown :kButtonUp); 
00177   printButton_[0]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=0)");
00178   printButton_[1] = new TGCheckButton(printGroup,"Clusters");
00179   printButton_[1]->SetState(evMan_->printClusters_ ? kButtonDown :kButtonUp); 
00180   printButton_[1]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=1)");
00181   printButton_[2] = new TGCheckButton(printGroup,"PFBlocks");
00182   printButton_[2]->SetState(evMan_->printPFBlocks_ ? kButtonDown :kButtonUp); 
00183   printButton_[2]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=2)");
00184   printButton_[3] = new TGCheckButton(printGroup,"PFCandidates ");
00185   printButton_[3]->SetState(evMan_->printPFCandidates_ ? kButtonDown :kButtonUp); 
00186   printButton_[3]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=3)");
00187   printButton_[4] = new TGCheckButton(printGroup,"PFJets ");
00188   printButton_[4]->SetState(evMan_->printPFJets_ ? kButtonDown :kButtonUp); 
00189   printButton_[4]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=4)");
00190   printButton_[5] = new TGCheckButton(printGroup,"SimParticles ");
00191   printButton_[5]->SetState(evMan_->printSimParticles_ ? kButtonDown :kButtonUp); 
00192   printButton_[5]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=5)");
00193   printButton_[6] = new TGCheckButton(printGroup,"GenParticles");
00194   TGLabel *maxl = new TGLabel(printGroup,"max lines:");
00195   maxLineEntry_= new TGNumberEntryField(printGroup,MAXL,30);
00196   maxLineEntry_->Associate(this);
00197   maxLineEntry_->SetFormat((TGNumberFormat::EStyle)0);
00198   maxLineEntry_->Resize(charw*3,maxLineEntry_->GetDefaultHeight());
00199   printButton_[6]->SetState(evMan_->printGenParticles_ ? kButtonDown :kButtonUp); 
00200   printButton_[6]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=6)");
00201   
00202     
00203   for(UInt_t i = 0 ;i<6 ; ++i){
00204     printGroup->AddFrame(printButton_[i],lo1);
00205     printGroup->AddFrame(lab1,lo1);
00206     printGroup->AddFrame(lab2,lo1);
00207   }
00208   printGroup->AddFrame(printButton_[6],lo1);
00209   printGroup->AddFrame(maxl,lo1);
00210   printGroup->AddFrame(maxLineEntry_,lo1);
00211   
00212   
00213   TGTextButton *sendPrintButton = new TGTextButton(h2,"Print");
00214   sendPrintButton->Connect("Clicked()","DialogFrame",this,"doPrint()");
00215   
00216   h2->AddFrame(printGroup,lo1);
00217   h2->AddFrame(sendPrintButton,new TGLayoutHints(kLHintsLeft|kLHintsCenterY,2,2,2,2));
00218   
00219   TGGroupFrame *viewGroup = new TGGroupFrame(optionFrame,"View",kHorizontalFrame);
00220   lab1 = new TGLabel(viewGroup," ");
00221   lab2 = new TGLabel(viewGroup," ");
00222   viewGroup->SetLayoutManager(new TGMatrixLayout(viewGroup, 3,3,3));
00223   
00224   TGTextButton *lookFor = new TGTextButton(viewGroup,"Look for");
00225   lookFor->Connect("Clicked()","DialogFrame",this,"doLookForGenParticle()");
00226   TGLabel *genPartNb = new TGLabel(viewGroup,"Gen Particle Nb:");
00227   particleTypeEntry_ = new TGNumberEntryField(viewGroup,PARTTYPE,1);
00228   particleTypeEntry_->Associate(this);
00229   particleTypeEntry_->SetFormat((TGNumberFormat::EStyle)0);
00230   particleTypeEntry_->Resize(charw*3,particleTypeEntry_->GetDefaultHeight());
00231  
00232   TGTextButton *unZoomButton = new TGTextButton(viewGroup,"Unzoom");
00233   unZoomButton->Connect("Clicked()","DialogFrame",this,"unZoom()");
00234 
00235   TGTextButton *newAttrBis = new TGTextButton(viewGroup,"Modify Graphic Attr");
00236   newAttrBis->Connect("Clicked()","DialogFrame",this,"createCanvasAttr()");
00237   
00238   viewGroup->AddFrame(lookFor,lo1);
00239   viewGroup->AddFrame(genPartNb,lo1),
00240     viewGroup->AddFrame(particleTypeEntry_,lo1);
00241   viewGroup->AddFrame(unZoomButton,lo1);
00242   viewGroup->AddFrame(lab1,lo1);
00243   viewGroup->AddFrame(lab2,lo1);
00244   viewGroup->AddFrame(newAttrBis,lo1); 
00245   
00246   //
00247   optionFrame->AddFrame(h2,lo);
00248   optionFrame->AddFrame(viewGroup,lo1);
00249   h1Frame1->AddFrame(optionFrame,lo);
00250 
00251   
00252   // Next/Pevious/exit buttons
00253   
00254   TGHorizontalFrame *h1 = new TGHorizontalFrame(mainFrame_,20,30);
00255   mainFrame_->AddFrame(h1,new TGLayoutHints(kLHintsCenterX,2,2,2,2));
00256   
00257   nextButton = new TGTextButton(h1,"Draw Next");
00258   nextButton->Connect("Clicked()","DialogFrame",this,"doNextEvent()");
00259   h1->AddFrame(nextButton,new TGLayoutHints(kLHintsBottom|kLHintsCenterX,2,2,2,2));
00260   
00261   previousButton = new TGTextButton(h1,"Draw Previous");
00262   previousButton->Connect("Clicked()","DialogFrame",this,"doPreviousEvent()");
00263   h1->AddFrame(previousButton,new TGLayoutHints(kLHintsBottom|kLHintsCenterX,2,2,2,2));
00264   
00265   
00266   reProcessButton = new TGTextButton(h1,"Re-Process");
00267   reProcessButton->Connect("Clicked()","DialogFrame",this,"doReProcessEvent()");
00268   h1->AddFrame(reProcessButton,new TGLayoutHints(kLHintsBottom|kLHintsCenterX,2,2,2,2));
00269   
00270   //Modifie Graphic attributes in option file
00271   //  TGTextButton *newAttr = new TGTextButton(h1,"new GAttr");
00272   //  newAttr->Connect("Clicked()","DialogFrame",this,"modifyGraphicAttributes()");
00273   //  h1->AddFrame(newAttr,new TGLayoutHints(kLHintsBottom|kLHintsCenterX,2,2,2,2));
00274 
00275     
00276   exitButton = new TGTextButton(h1,"&Exit","gApplication->Terminate(0)");
00277   h1->AddFrame(exitButton,new TGLayoutHints(kLHintsBottom|kLHintsCenterX,2,2,2,2));
00278 }  

void DialogFrame::doLookForGenParticle (  ) 

Definition at line 287 of file DialogFrame.cc.

References display_, DisplayManager::lookForGenParticle(), funct::num(), and particleTypeEntry_.

Referenced by doNextEvent(), doPreviousEvent(), and ProcessMessage().

00288 {
00289   int num = particleTypeEntry_->GetIntNumber();
00290   display_->lookForGenParticle((unsigned)num);
00291 }

void DialogFrame::doModifyOptions ( unsigned  obj  ) 

Definition at line 294 of file DialogFrame.cc.

References display_, DisplayManager::displayAll(), DisplayManager::drawClus_, DisplayManager::drawGenParticles_, DisplayManager::drawHits_, DisplayManager::drawParticles_, DisplayManager::drawTracks_, and selectObject_.

00295 {
00296   switch (objNb) {
00297   case 0:
00298     display_->drawHits_ = (selectObject_[0]->IsDown()) ?true :false;
00299     break;
00300   case 1:
00301     display_->drawClus_ = (selectObject_[1]->IsDown()) ?true :false;
00302     break; 
00303   case 2:
00304     display_->drawTracks_ = (selectObject_[2]->IsDown()) ?true :false;
00305     break;
00306   case 3: 
00307     display_->drawParticles_ = (selectObject_[3]->IsDown()) ?true :false;
00308     break;
00309   case 4:
00310     display_->drawGenParticles_ = (selectObject_[4]->IsDown()) ?true :false;
00311     break;    
00312   }
00313   display_->displayAll();    
00314 }

void DialogFrame::doModifyPtThreshold ( unsigned  obj,
double  val 
)

Definition at line 321 of file DialogFrame.cc.

References DisplayManager::clusEnMin_, display_, DisplayManager::displayAll(), DisplayManager::genParticlePtMin_, DisplayManager::hitEnMin_, DisplayManager::particlePtMin_, and DisplayManager::trackPtMin_.

Referenced by ProcessMessage().

00322 {
00323   switch(objNb) {
00324   case 0: 
00325     display_->hitEnMin_= pt;break;
00326   case 1:
00327     display_->clusEnMin_= pt;break;
00328   case 2:
00329     display_->trackPtMin_= pt;break;
00330   case 3:
00331     display_->particlePtMin_= pt;break;
00332   case 4:
00333     display_->genParticlePtMin_= pt;break;
00334     
00335   default:break;
00336   }  
00337   display_->displayAll();
00338 }

void DialogFrame::doNextEvent (  ) 

Definition at line 340 of file DialogFrame.cc.

References display_, DisplayManager::displayNext(), and doLookForGenParticle().

00341 {
00342   display_->displayNext();
00343   doLookForGenParticle();  
00344   //   int eventNumber = evMan_->eventNumber();
00345   //TODOLIST:display new value of eventNumber in the futur reserve field
00346 } 

void DialogFrame::doPreviousEvent (  ) 

Definition at line 348 of file DialogFrame.cc.

References display_, DisplayManager::displayPrevious(), and doLookForGenParticle().

00349 {
00350   display_->displayPrevious();
00351   doLookForGenParticle();  
00352   //   int eventNumber = evMan_->eventNumber();
00353   //TODOLIST:display new value of eventNumber in the futur reserve field
00354 }

void DialogFrame::doPrint (  ) 

Definition at line 356 of file DialogFrame.cc.

References GenMuonPlsPt100GeV_cfg::cout, evMan_, maxLineEntry_, and PFRootEventManager::print().

00357 {
00358   evMan_->print(std::cout,maxLineEntry_->GetIntNumber());
00359 }

void DialogFrame::doPrintGenParticles (  ) 

Definition at line 361 of file DialogFrame.cc.

References GenMuonPlsPt100GeV_cfg::cout, evMan_, maxLineEntry_, and PFRootEventManager::printGenParticles().

Referenced by ProcessMessage().

00362 {
00363   evMan_->printGenParticles(std::cout,maxLineEntry_->GetIntNumber());
00364 }

void DialogFrame::doReProcessEvent (  ) 

Definition at line 366 of file DialogFrame.cc.

References DisplayManager::display(), display_, PFRootEventManager::eventNumber(), and evMan_.

00367 {
00368   int eventNumber = evMan_->eventNumber();
00369   display_->display(eventNumber);
00370 }

void DialogFrame::isPFBlockVisible (  ) 

Definition at line 372 of file DialogFrame.cc.

References display_, DisplayManager::enableDrawPFBlock(), and selectObject_.

00373 {
00374   display_->enableDrawPFBlock((selectObject_[5]->IsDown()) ?true :false);
00375 }

void DialogFrame::modifyAttr (  ) 

Definition at line 427 of file DialogFrame.cc.

References closeCanvasAttr(), DisplayManager::clusPattern_, display_, DisplayManager::drawWithNewGraphicAttributes(), thisClusPattern_, trackPattern_, DisplayManager::trackPatternL_, and DisplayManager::trackPatternM_.

00428 { 
00429   display_->clusPattern_->SetMarkerStyle(thisClusPattern_->GetMarkerStyle());
00430   display_->clusPattern_->SetMarkerSize(thisClusPattern_->GetMarkerSize());
00431   display_->clusPattern_->SetMarkerColor(thisClusPattern_->GetMarkerColor());
00432   display_->trackPatternL_->SetLineColor(trackPattern_->GetLineColor());
00433   display_->trackPatternM_->SetMarkerStyle(trackPattern_->GetMarkerStyle());
00434   display_->trackPatternM_->SetMarkerSize(trackPattern_->GetMarkerSize());
00435   //trackPattern_->SetMarkerColor(display_->trackAttributes_[0]);
00436   closeCanvasAttr();
00437   display_->drawWithNewGraphicAttributes();
00438 }

Bool_t DialogFrame::ProcessMessage ( Long_t  msg,
Long_t  parm1,
Long_t  parm2 
) [virtual]

Definition at line 440 of file DialogFrame.cc.

References doLookForGenParticle(), doModifyPtThreshold(), doPrintGenParticles(), EN, ENER, evMan_, index, MAXL, PARTTYPE, printButton_, PFRootEventManager::printGenParticles_, threshEntry_, and thresholdS_.

00441 { 
00442   switch (GET_MSG(msg)) {
00443   case kC_TEXTENTRY:
00444     switch (GET_SUBMSG(msg)) {
00445     case kTE_ENTER:
00446       switch (parm1) {
00447       case EN :case EN+1: case EN+2: case EN+3: case EN+4:
00448         {
00449           //int eventNumber=evMan_->iEvent_;
00450           float val=threshEntry_[parm1-EN]->GetNumber();
00451           thresholdS_[parm1-EN]->SetPosition(val,val);
00452           doModifyPtThreshold(parm1-EN,val);
00453           break;
00454         }
00455       case MAXL:  // print genPart max lines
00456         evMan_->printGenParticles_ = true;
00457         printButton_[6]->SetState(kButtonDown);
00458         doPrintGenParticles();
00459         break;
00460       case PARTTYPE:
00461         doLookForGenParticle(); 
00462         break;
00463       default:break;
00464       }
00465       break;
00466     default:break;
00467     }
00468     break;
00469   case kC_HSLIDER:
00470     switch (GET_SUBMSG(msg)) {
00471     case kSL_POS:
00472       switch (parm1) {
00473       case ENER: case ENER+1: case ENER+2: case ENER+3: case ENER+4:
00474         {
00475           unsigned index=parm1-ENER;
00476           float val = thresholdS_[index]->GetMinPosition();
00477           threshEntry_[index]->SetNumber(val);
00478           fClient->NeedRedraw(threshEntry_[index]);
00479           break;
00480         } 
00481       default:break;
00482       }
00483       break;  
00484     case kSL_RELEASE:
00485       switch (parm1) {
00486       case ENER: case ENER+1: case ENER+2: case ENER+3:case ENER+4:
00487         {
00488           float val = thresholdS_[parm1-ENER]->GetMinPosition();
00489           doModifyPtThreshold(parm1-ENER,(double)val);
00490           break;
00491         } 
00492       default:break;    
00493       }
00494       break;
00495     default:break;       
00496     }
00497     break;
00498   default:break;
00499   }
00500   return true;   
00501 }             

void DialogFrame::selectPrintOption ( int  opt  ) 

Definition at line 377 of file DialogFrame.cc.

References evMan_, printButton_, PFRootEventManager::printClusters_, PFRootEventManager::printGenParticles_, PFRootEventManager::printPFBlocks_, PFRootEventManager::printPFCandidates_, PFRootEventManager::printPFJets_, PFRootEventManager::printRecHits_, and PFRootEventManager::printSimParticles_.

00378 {
00379   switch (opt) {
00380   case 0:
00381     evMan_->printRecHits_ = (printButton_[0]->IsDown()) ?true :false;
00382     break;
00383   case 1:
00384     evMan_->printClusters_ = (printButton_[1]->IsDown()) ?true :false;
00385     break;
00386   case 2:
00387     evMan_->printPFBlocks_ = (printButton_[2]->IsDown()) ?true :false;
00388     break;
00389   case 3:
00390     evMan_->printPFCandidates_ = (printButton_[3]->IsDown()) ?true :false;
00391     break;
00392   case 4:
00393     evMan_->printPFJets_ = (printButton_[4]->IsDown()) ?true :false;
00394     break;
00395   case 5:
00396     evMan_->printSimParticles_ = (printButton_[5]->IsDown()) ?true :false;
00397     break;
00398   case 6:
00399     evMan_->printGenParticles_ = (printButton_[6]->IsDown()) ?true :false;
00400     break;
00401   default: break;  
00402     
00403   }
00404 } 

void DialogFrame::unZoom (  ) 

Definition at line 412 of file DialogFrame.cc.

References display_, and DisplayManager::unZoom().

00413 {
00414   display_->unZoom();
00415 }

void DialogFrame::updateDisplay (  ) 

Definition at line 406 of file DialogFrame.cc.

References display_, and DisplayManager::updateDisplay().

00407 {
00408   display_->updateDisplay();
00409 }


Member Data Documentation

TCanvas* DialogFrame::attrView_ [private]

Definition at line 54 of file DialogFrame.h.

Referenced by closeCanvasAttr(), and createCanvasAttr().

TGCompositeFrame* DialogFrame::cmdFrame_ [private]

Definition at line 39 of file DialogFrame.h.

DisplayManager* DialogFrame::display_ [private]

Definition at line 37 of file DialogFrame.h.

Referenced by createCanvasAttr(), createCmdFrame(), doLookForGenParticle(), doModifyOptions(), doModifyPtThreshold(), doNextEvent(), doPreviousEvent(), doReProcessEvent(), isPFBlockVisible(), modifyAttr(), unZoom(), and updateDisplay().

const int DialogFrame::EN = 1 [static, private]

Definition at line 28 of file DialogFrame.h.

Referenced by createCmdFrame(), and ProcessMessage().

const int DialogFrame::ENER = 10 [static, private]

Definition at line 29 of file DialogFrame.h.

Referenced by createCmdFrame(), and ProcessMessage().

PFRootEventManager* DialogFrame::evMan_ [private]

Definition at line 35 of file DialogFrame.h.

Referenced by createCmdFrame(), doPrint(), doPrintGenParticles(), doReProcessEvent(), ProcessMessage(), and selectPrintOption().

TGTextButton* DialogFrame::exitButton [private]

Definition at line 48 of file DialogFrame.h.

Referenced by createCmdFrame().

TGCompositeFrame* DialogFrame::mainFrame_ [private]

Definition at line 38 of file DialogFrame.h.

Referenced by createCmdFrame(), DialogFrame(), and ~DialogFrame().

const int DialogFrame::MAXL = 20 [static, private]

Definition at line 30 of file DialogFrame.h.

Referenced by createCmdFrame(), and ProcessMessage().

TGNumberEntryField* DialogFrame::maxLineEntry_ [private]

Definition at line 46 of file DialogFrame.h.

Referenced by createCmdFrame(), doPrint(), and doPrintGenParticles().

TGTextButton * DialogFrame::nextButton [private]

Definition at line 48 of file DialogFrame.h.

Referenced by createCmdFrame().

TGNumberEntryField* DialogFrame::particleTypeEntry_ [private]

Definition at line 47 of file DialogFrame.h.

Referenced by createCmdFrame(), and doLookForGenParticle().

const int DialogFrame::PARTTYPE = 30 [static, private]

Definition at line 31 of file DialogFrame.h.

Referenced by createCmdFrame(), and ProcessMessage().

const int DialogFrame::PFBLOCK = 40 [static, private]

Definition at line 32 of file DialogFrame.h.

TGTextButton * DialogFrame::previousButton [private]

Definition at line 48 of file DialogFrame.h.

Referenced by createCmdFrame().

TGCheckButton* DialogFrame::printButton_[7] [private]

Definition at line 43 of file DialogFrame.h.

Referenced by createCmdFrame(), ProcessMessage(), and selectPrintOption().

TGTextButton* DialogFrame::reProcessButton [private]

Definition at line 49 of file DialogFrame.h.

Referenced by createCmdFrame().

TGCheckButton* DialogFrame::selectObject_[6] [private]

Definition at line 42 of file DialogFrame.h.

Referenced by createCmdFrame(), doModifyOptions(), and isPFBlockVisible().

TGraph* DialogFrame::simplePartPattern_ [private]

Definition at line 57 of file DialogFrame.h.

Referenced by closeCanvasAttr().

TMarker* DialogFrame::thisClusPattern_ [private]

Definition at line 55 of file DialogFrame.h.

Referenced by closeCanvasAttr(), createCanvasAttr(), and modifyAttr().

TGNumberEntryField* DialogFrame::threshEntry_[5] [private]

Definition at line 45 of file DialogFrame.h.

Referenced by createCmdFrame(), and ProcessMessage().

TGDoubleHSlider* DialogFrame::thresholdS_[5] [private]

Definition at line 44 of file DialogFrame.h.

Referenced by createCmdFrame(), and ProcessMessage().

TGraph* DialogFrame::trackPattern_ [private]

Definition at line 56 of file DialogFrame.h.

Referenced by closeCanvasAttr(), createCanvasAttr(), and modifyAttr().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:18:24 2009 for CMSSW by  doxygen 1.5.4