CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Static Private Attributes
DialogFrame Class Reference

#include <DialogFrame.h>

Inheritance diagram for DialogFrame:

Public Member Functions

void areBremVisible ()
 
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_ [8]
 
TGraph * simplePartPattern_
 
TMarker * thisClusPattern_
 
TGNumberEntryField * threshEntry_ [6]
 
TGDoubleHSlider * thresholdS_ [6]
 
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 26 of file DialogFrame.cc.

References createCmdFrame(), and mainFrame_.

27  :TGMainFrame(p, w, h),evMan_(evman),display_(dm),attrView_(0),
29 {
30 
31  mainFrame_= new TGCompositeFrame(this,200,300,kVerticalFrame);
33  AddFrame(mainFrame_, new TGLayoutHints(kLHintsLeft | kLHintsExpandY));
34 
35  // Set a name to the main frame
36  SetWindowName("PFRootEvent Dialog");
37  // Map all subwindows of main frame
38  MapSubwindows();
39  // Initialize the layout algorithm
40  Resize(mainFrame_->GetDefaultSize());
41  // Map main frame
42  MapWindow();
43 
44 }
TMarker * thisClusPattern_
Definition: DialogFrame.h:55
TCanvas * attrView_
Definition: DialogFrame.h:54
TGraph * trackPattern_
Definition: DialogFrame.h:56
DisplayManager * display_
Definition: DialogFrame.h:37
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
TGCompositeFrame * mainFrame_
Definition: DialogFrame.h:38
void createCmdFrame()
Definition: DialogFrame.cc:94
TGraph * simplePartPattern_
Definition: DialogFrame.h:57
PFRootEventManager * evMan_
Definition: DialogFrame.h:35
T w() const
DialogFrame::~DialogFrame ( )
virtual

Definition at line 343 of file DialogFrame.cc.

References mainFrame_.

344 {
345  mainFrame_->Cleanup();
346 }
TGCompositeFrame * mainFrame_
Definition: DialogFrame.h:38

Member Function Documentation

void DialogFrame::areBremVisible ( )

Definition at line 407 of file DialogFrame.cc.

References display_, DisplayManager::displayAll(), DisplayManager::enableDrawBrem(), and selectObject_.

408 {
409  display_->enableDrawBrem((selectObject_[6]->IsDown()) ?true :false);
410  display_->displayAll();
411 }
void displayAll(bool noRedraw=true)
TGCheckButton * selectObject_[8]
Definition: DialogFrame.h:42
void enableDrawBrem(bool state)
DisplayManager * display_
Definition: DialogFrame.h:37
void DialogFrame::closeCanvasAttr ( )

Definition at line 46 of file DialogFrame.cc.

References attrView_, simplePartPattern_, thisClusPattern_, and trackPattern_.

Referenced by createCanvasAttr(), and modifyAttr().

47 {
48  if (gROOT->GetListOfCanvases()->FindObject("graphic Attributes"))
49  attrView_->Close();
50  attrView_=0;
52  trackPattern_=0;
54 }
TMarker * thisClusPattern_
Definition: DialogFrame.h:55
TCanvas * attrView_
Definition: DialogFrame.h:54
TGraph * trackPattern_
Definition: DialogFrame.h:56
TGraph * simplePartPattern_
Definition: DialogFrame.h:57
void DialogFrame::CloseWindow ( )
virtual

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

Definition at line 305 of file DialogFrame.cc.

306 {
308  gApplication->Terminate(0);
309 }
void DialogFrame::createCanvasAttr ( )

Definition at line 56 of file DialogFrame.cc.

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

57 {
58  //creates an attributes canvas which enable modifications
59  //of cluster and track graphic attributes
60 
61  closeCanvasAttr();
62  attrView_=0;
63  attrView_ = new TCanvas("graphic Attributes","graphic Attributes",180,300);
64  const char *action1="win->DialogFrame::modifyAttr()";
65  const char *action2="win->DialogFrame::closeCanvasAttr()";
66  TButton *accept_ = new TButton("modify",action1,0.1,0.2,0.5,0.3);
67  TButton *cancel_ = new TButton("cancel",action2,0.54,0.2,0.9,0.3);
68  double x[3];
69  double y[3];
70  x[0]=0.1;x[1]=0.3;x[2]=0.5;
71  y[0]=0.6;y[1]=0.6;y[2]=0.6;
72  thisClusPattern_= new TMarker(0.3,0.8,display_->clusPattern_->GetMarkerStyle());
73  thisClusPattern_->SetMarkerColor(display_->clusPattern_->GetMarkerColor());
74  thisClusPattern_->SetMarkerSize(display_->clusPattern_->GetMarkerSize());
75  thisClusPattern_->Draw();
76  TText * tt=new TText(0.6,0.78,"clusters");
77  tt->SetTextSize(.08);
78  tt->Draw();
79  trackPattern_= new TGraph(3,x,y);
80  trackPattern_->SetLineColor(display_->trackPatternL_->GetLineColor());
81  trackPattern_->SetMarkerColor(display_->trackPatternM_->GetMarkerColor());
82  trackPattern_->SetMarkerStyle(display_->trackPatternM_->GetMarkerStyle());
83  trackPattern_->SetMarkerSize(display_->trackPatternM_->GetMarkerSize());
84  trackPattern_->Draw("pl");
85  TText *tt2= new TText(0.6,0.58,"recTracks");
86  tt2->SetTextSize(.08);
87  tt2->Draw();
88 
89  accept_->Draw();
90  cancel_->Draw();
91  attrView_->Update();
92 }
TAttLine * trackPatternL_
TMarker * thisClusPattern_
Definition: DialogFrame.h:55
TCanvas * attrView_
Definition: DialogFrame.h:54
TAttMarker * trackPatternM_
TAttMarker * clusPattern_
TGraph * trackPattern_
Definition: DialogFrame.h:56
void closeCanvasAttr()
Definition: DialogFrame.cc:46
DisplayManager * display_
Definition: DialogFrame.h:37
Definition: DDAxes.h:10
void DialogFrame::createCmdFrame ( )

Definition at line 94 of file DialogFrame.cc.

References DisplayManager::clusEnMin_, display_, DisplayManager::drawBrems_, DisplayManager::drawClus_, DisplayManager::drawGenParticles_, DisplayManager::drawGsfTracks_, DisplayManager::drawHits_, DisplayManager::drawParticles_, DisplayManager::drawPFBlocks_, DisplayManager::drawTracks_, EN, ENER, evMan_, exitButton, DisplayManager::genParticlePtMin_, DisplayManager::gsfPtMin_, DisplayManager::hitEnMin_, i, diffTwoXMLs::label, MessageLogger_cff::limit, 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_, findQualityFiles::size, threshEntry_, thresholdS_, and DisplayManager::trackPtMin_.

Referenced by DialogFrame().

95 {
96  TGCompositeFrame *h1Frame1 = new TGCompositeFrame(mainFrame_, 100, 100, kHorizontalFrame | kRaisedFrame);
97  mainFrame_->AddFrame(h1Frame1,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
98  TGLayoutHints *lo;
99  lo = new TGLayoutHints(kLHintsLeft|kLHintsExpandX |kLHintsExpandY ,5,2,5,2);
100 
101  //create object selection buttons
102  TGGroupFrame *gr1= new TGGroupFrame(h1Frame1,"Draw Selection",kVerticalFrame);
103  gr1->SetLayoutManager(new TGMatrixLayout(gr1,9,3,5));
104 
105  selectObject_[0] = new TGCheckButton(gr1,"Hits");
106  selectObject_[0]->SetState(display_->drawHits_ ? kButtonDown :kButtonUp);
107  selectObject_[0]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=0)");
108  selectObject_[1] = new TGCheckButton(gr1,"Clusters");
109  selectObject_[1]->SetState(display_->drawClus_ ? kButtonDown :kButtonUp);
110  selectObject_[1]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=1)");
111  selectObject_[2] = new TGCheckButton(gr1,"Tracks");
112  selectObject_[2]->SetState(display_->drawTracks_ ? kButtonDown :kButtonUp);
113  selectObject_[2]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=2)");
114  selectObject_[3] = new TGCheckButton(gr1,"SimParticles");
115  selectObject_[3]->SetState(display_->drawParticles_ ? kButtonDown :kButtonUp);
116  selectObject_[3]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=3)");
117  selectObject_[4] = new TGCheckButton(gr1,"GenParticles");
118  selectObject_[4]->SetState(display_->drawGenParticles_ ? kButtonDown :kButtonUp);
119  selectObject_[4]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=4)");
120  selectObject_[5] = new TGCheckButton(gr1,"GsfTracks");
121  selectObject_[5]->SetState(display_->drawGsfTracks_ ? kButtonDown :kButtonUp);
122  selectObject_[5]->Connect("Clicked()","DialogFrame",this,"doModifyOptions(=5)");
123  selectObject_[6] = new TGCheckButton(gr1,"Brems visible");
124  selectObject_[6]->SetState(display_->drawBrems_ ? kButtonDown :kButtonUp);
125  selectObject_[6]->Connect("Clicked()","DialogFrame",this,"areBremVisible()");
126  selectObject_[7] = new TGCheckButton(gr1,"PFBlock visible");
127  selectObject_[7]->SetState(display_->drawPFBlocks_ ? kButtonDown :kButtonUp);
128  selectObject_[7]->Connect("Clicked()","DialogFrame",this,"isPFBlockVisible()");
129 
130 
131  // create threshold fields
132  TGNumberFormat::ELimit lim = TGNumberFormat::kNELLimitMinMax;
133  float limit=100;
134  for (int i=0;i<6;++i){
135  thresholdS_[i] = new TGDoubleHSlider(gr1,100,kDoubleScaleNo,ENER+i);
136  thresholdS_[i]->Associate(this);
137  thresholdS_[i]->SetRange(0,limit);
138 
139  threshEntry_[i] = new TGNumberEntryField(gr1,EN+i,0);
140  threshEntry_[i]->Associate(this);
141  threshEntry_[i]->SetLimits(lim,0,limit);
142  threshEntry_[i]->SetFormat((TGNumberFormat::EStyle)2);
143  }
144  thresholdS_[0]->SetPosition((float) display_->hitEnMin_,(float) display_->hitEnMin_);
145  thresholdS_[1]->SetPosition((float) display_->clusEnMin_,(float)display_->clusEnMin_);
146  thresholdS_[2]->SetPosition((float) display_->trackPtMin_,(float)display_->trackPtMin_);
147  thresholdS_[3]->SetPosition((float) display_->particlePtMin_,(float)display_->particlePtMin_);
148  thresholdS_[4]->SetPosition((float) display_->genParticlePtMin_,(float)display_->genParticlePtMin_);
149  thresholdS_[5]->SetPosition((float) display_->gsfPtMin_,(float)display_->gsfPtMin_);
150 
151 
152  int charw= threshEntry_[0]->GetCharWidth("O");
153  int size=charw*4;
154  for (int i=0;i<6;++i) {
155  threshEntry_[i]->SetNumber(thresholdS_[i]->GetMinPosition());
156  threshEntry_[i]->Resize(size,threshEntry_[i]->GetDefaultHeight());
157  }
158 
159  //
160  TGLayoutHints *lo1=new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 2, 2, 2);
161  TGLabel *label=new TGLabel(gr1," ");
162  gr1->AddFrame(label,lo1);
163  label=new TGLabel(gr1," En/Pt Threshold");
164  gr1->AddFrame(label,lo1);
165  label=new TGLabel(gr1," (Gev) ");
166  gr1->AddFrame(label,lo1);
167 
168  for (int i=0;i<6;++i) {
169  gr1->AddFrame(selectObject_[i],lo1);
170  gr1->AddFrame(thresholdS_[i],lo1);
171  gr1->AddFrame(threshEntry_[i],lo1);
172  }
173 
174 //gr1->AddFrame(selectObject_[6],lo1);
175 // h1Frame1->AddFrame(gr1,lo1);
176 // gr1->AddFrame(selectObject_[7],lo1);
177 // h1Frame1->AddFrame(gr1,lo1);
178 
179 // MURIEL - replace the previous four lines by :
180  TGLabel *label0 = new TGLabel(gr1," ");
181  gr1->AddFrame(selectObject_[6],lo1);
182  gr1->AddFrame(label0,lo1);
183  gr1->AddFrame(label0,lo1);
184  gr1->AddFrame(selectObject_[7],lo1);
185  h1Frame1->AddFrame(gr1,lo);
186 
187 
188  //add options frame
189  TGVerticalFrame *optionFrame = new TGVerticalFrame(h1Frame1,10,10,kSunkenFrame);
190 
191  //print space
192  TGLabel *lab1,*lab2;
193  TGHorizontalFrame *h2 = new TGHorizontalFrame(optionFrame,10,10);
194  TGGroupFrame *printGroup = new TGGroupFrame(h2, " Print", kVerticalFrame);
195  lab1 = new TGLabel(printGroup," ");
196  lab2 = new TGLabel(printGroup," ");
197  //TGLabel *lab3 = new TGLabel(printGroup," ");
198  printGroup->SetLayoutManager(new TGMatrixLayout(printGroup, 7,3,3));
199  printButton_[0] = new TGCheckButton(printGroup,"RecHits ");
200  printButton_[0]->SetState(evMan_->printRecHits_ ? kButtonDown :kButtonUp);
201  printButton_[0]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=0)");
202  printButton_[1] = new TGCheckButton(printGroup,"Clusters");
203  printButton_[1]->SetState(evMan_->printClusters_ ? kButtonDown :kButtonUp);
204  printButton_[1]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=1)");
205  printButton_[2] = new TGCheckButton(printGroup,"PFBlocks");
206  printButton_[2]->SetState(evMan_->printPFBlocks_ ? kButtonDown :kButtonUp);
207  printButton_[2]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=2)");
208  printButton_[3] = new TGCheckButton(printGroup,"PFCandidates ");
209  printButton_[3]->SetState(evMan_->printPFCandidates_ ? kButtonDown :kButtonUp);
210  printButton_[3]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=3)");
211  printButton_[4] = new TGCheckButton(printGroup,"PFJets ");
212  printButton_[4]->SetState(evMan_->printPFJets_ ? kButtonDown :kButtonUp);
213  printButton_[4]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=4)");
214  printButton_[5] = new TGCheckButton(printGroup,"SimParticles ");
215  printButton_[5]->SetState(evMan_->printSimParticles_ ? kButtonDown :kButtonUp);
216  printButton_[5]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=5)");
217  printButton_[6] = new TGCheckButton(printGroup,"GenParticles");
218  TGLabel *maxl = new TGLabel(printGroup,"max lines:");
219  maxLineEntry_= new TGNumberEntryField(printGroup,MAXL,30);
220  maxLineEntry_->Associate(this);
221  maxLineEntry_->SetFormat((TGNumberFormat::EStyle)0);
222  maxLineEntry_->Resize(charw*3,maxLineEntry_->GetDefaultHeight());
223  printButton_[6]->SetState(evMan_->printGenParticles_ ? kButtonDown :kButtonUp);
224  printButton_[6]->Connect("Clicked()","DialogFrame",this,"selectPrintOption(=6)");
225 
226 
227  for(UInt_t i = 0 ;i<6 ; ++i){
228  printGroup->AddFrame(printButton_[i],lo1);
229  printGroup->AddFrame(lab1,lo1);
230  printGroup->AddFrame(lab2,lo1);
231  }
232  printGroup->AddFrame(printButton_[6],lo1);
233  printGroup->AddFrame(maxl,lo1);
234  printGroup->AddFrame(maxLineEntry_,lo1);
235 
236 
237  TGTextButton *sendPrintButton = new TGTextButton(h2,"Print");
238  sendPrintButton->Connect("Clicked()","DialogFrame",this,"doPrint()");
239 
240  h2->AddFrame(printGroup,lo1);
241  h2->AddFrame(sendPrintButton,new TGLayoutHints(kLHintsLeft|kLHintsCenterY,2,2,2,2));
242 
243  TGGroupFrame *viewGroup = new TGGroupFrame(optionFrame,"View",kHorizontalFrame);
244  lab1 = new TGLabel(viewGroup," ");
245  lab2 = new TGLabel(viewGroup," ");
246  viewGroup->SetLayoutManager(new TGMatrixLayout(viewGroup, 3,3,3));
247 
248  TGTextButton *lookFor = new TGTextButton(viewGroup,"Look for");
249  lookFor->Connect("Clicked()","DialogFrame",this,"doLookForGenParticle()");
250  TGLabel *genPartNb = new TGLabel(viewGroup,"Gen Particle Nb:");
251  particleTypeEntry_ = new TGNumberEntryField(viewGroup,PARTTYPE,1);
252  particleTypeEntry_->Associate(this);
253  particleTypeEntry_->SetFormat((TGNumberFormat::EStyle)0);
254  particleTypeEntry_->Resize(charw*3,particleTypeEntry_->GetDefaultHeight());
255 
256  TGTextButton *unZoomButton = new TGTextButton(viewGroup,"Unzoom");
257  unZoomButton->Connect("Clicked()","DialogFrame",this,"unZoom()");
258 
259  TGTextButton *newAttrBis = new TGTextButton(viewGroup,"Modify Graphic Attr");
260  newAttrBis->Connect("Clicked()","DialogFrame",this,"createCanvasAttr()");
261 
262  viewGroup->AddFrame(lookFor,lo1);
263  viewGroup->AddFrame(genPartNb,lo1),
264  viewGroup->AddFrame(particleTypeEntry_,lo1);
265  viewGroup->AddFrame(unZoomButton,lo1);
266  viewGroup->AddFrame(lab1,lo1);
267  viewGroup->AddFrame(lab2,lo1);
268  viewGroup->AddFrame(newAttrBis,lo1);
269 
270  //
271  optionFrame->AddFrame(h2,lo);
272  optionFrame->AddFrame(viewGroup,lo1);
273  h1Frame1->AddFrame(optionFrame,lo);
274 
275 
276  // Next/Pevious/exit buttons
277 
278  TGHorizontalFrame *h1 = new TGHorizontalFrame(mainFrame_,20,30);
279  mainFrame_->AddFrame(h1,new TGLayoutHints(kLHintsCenterX,2,2,2,2));
280 
281  nextButton = new TGTextButton(h1,"Draw Next");
282  nextButton->Connect("Clicked()","DialogFrame",this,"doNextEvent()");
283  h1->AddFrame(nextButton,new TGLayoutHints(kLHintsBottom|kLHintsCenterX,2,2,2,2));
284 
285  previousButton = new TGTextButton(h1,"Draw Previous");
286  previousButton->Connect("Clicked()","DialogFrame",this,"doPreviousEvent()");
287  h1->AddFrame(previousButton,new TGLayoutHints(kLHintsBottom|kLHintsCenterX,2,2,2,2));
288 
289 
290  reProcessButton = new TGTextButton(h1,"Re-Process");
291  reProcessButton->Connect("Clicked()","DialogFrame",this,"doReProcessEvent()");
292  h1->AddFrame(reProcessButton,new TGLayoutHints(kLHintsBottom|kLHintsCenterX,2,2,2,2));
293 
294  //Modifie Graphic attributes in option file
295  // TGTextButton *newAttr = new TGTextButton(h1,"new GAttr");
296  // newAttr->Connect("Clicked()","DialogFrame",this,"modifyGraphicAttributes()");
297  // h1->AddFrame(newAttr,new TGLayoutHints(kLHintsBottom|kLHintsCenterX,2,2,2,2));
298 
299 
300  exitButton = new TGTextButton(h1,"&Exit","gApplication->Terminate(0)");
301  h1->AddFrame(exitButton,new TGLayoutHints(kLHintsBottom|kLHintsCenterX,2,2,2,2));
302 }
int i
Definition: DBlmapReader.cc:9
bool printPFJets_
print PFJets yes/no
bool printPFBlocks_
print PFBlocks yes/no
TGTextButton * exitButton
Definition: DialogFrame.h:48
TGNumberEntryField * threshEntry_[6]
Definition: DialogFrame.h:45
static const int MAXL
Definition: DialogFrame.h:30
TGTextButton * previousButton
Definition: DialogFrame.h:48
TGCheckButton * selectObject_[8]
Definition: DialogFrame.h:42
TGNumberEntryField * particleTypeEntry_
Definition: DialogFrame.h:47
static const int ENER
Definition: DialogFrame.h:29
double particlePtMin_
bool printClusters_
print clusters yes/no
TGCheckButton * printButton_[7]
Definition: DialogFrame.h:43
TGNumberEntryField * maxLineEntry_
Definition: DialogFrame.h:46
bool printPFCandidates_
print PFCandidates yes/no
TGDoubleHSlider * thresholdS_[6]
Definition: DialogFrame.h:44
unsigned int UInt_t
Definition: FUTypes.h:12
DisplayManager * display_
Definition: DialogFrame.h:37
TGTextButton * nextButton
Definition: DialogFrame.h:48
TGCompositeFrame * mainFrame_
Definition: DialogFrame.h:38
bool printSimParticles_
print true particles yes/no
static const int EN
Definition: DialogFrame.h:28
PFRootEventManager * evMan_
Definition: DialogFrame.h:35
TGTextButton * reProcessButton
Definition: DialogFrame.h:49
double genParticlePtMin_
bool printGenParticles_
print MC truth yes/no
tuple size
Write out results.
static const int PARTTYPE
Definition: DialogFrame.h:31
bool printRecHits_
print rechits yes/no
void DialogFrame::doLookForGenParticle ( )

Definition at line 311 of file DialogFrame.cc.

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

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

312 {
313  int num = particleTypeEntry_->GetIntNumber();
314  display_->lookForGenParticle((unsigned)num);
315 }
void lookForGenParticle(unsigned barcode)
look for particle with index i in MC truth.
TGNumberEntryField * particleTypeEntry_
Definition: DialogFrame.h:47
DisplayManager * display_
Definition: DialogFrame.h:37
long long int num
Definition: procUtils.cc:71
void DialogFrame::doModifyOptions ( unsigned  obj)

Definition at line 318 of file DialogFrame.cc.

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

319 {
320  switch (objNb) {
321  case 0:
322  display_->drawHits_ = (selectObject_[0]->IsDown()) ?true :false;
323  break;
324  case 1:
325  display_->drawClus_ = (selectObject_[1]->IsDown()) ?true :false;
326  break;
327  case 2:
328  display_->drawTracks_ = (selectObject_[2]->IsDown()) ?true :false;
329  break;
330  case 3:
331  display_->drawParticles_ = (selectObject_[3]->IsDown()) ?true :false;
332  break;
333  case 4:
334  display_->drawGenParticles_ = (selectObject_[4]->IsDown()) ?true :false;
335  break;
336  case 5:
337  display_->drawGsfTracks_ = (selectObject_[5]->IsDown()) ?true :false;
338  break;
339  }
340  display_->displayAll();
341 }
void displayAll(bool noRedraw=true)
TGCheckButton * selectObject_[8]
Definition: DialogFrame.h:42
DisplayManager * display_
Definition: DialogFrame.h:37
void DialogFrame::doModifyPtThreshold ( unsigned  obj,
double  val 
)

Definition at line 348 of file DialogFrame.cc.

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

Referenced by ProcessMessage().

349 {
350  switch(objNb) {
351  case 0:
352  display_->hitEnMin_= pt;break;
353  case 1:
354  display_->clusEnMin_= pt;break;
355  case 2:
356  display_->trackPtMin_= pt;break;
357  case 3:
358  display_->particlePtMin_= pt;break;
359  case 4:
360  display_->genParticlePtMin_= pt;break;
361  case 5:
362  display_->gsfPtMin_= pt;break;
363 
364  default:break;
365  }
366  display_->displayAll();
367 }
void displayAll(bool noRedraw=true)
double particlePtMin_
DisplayManager * display_
Definition: DialogFrame.h:37
double genParticlePtMin_
void DialogFrame::doNextEvent ( )

Definition at line 369 of file DialogFrame.cc.

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

370 {
373  // int eventNumber = evMan_->eventNumber();
374  //TODOLIST:display new value of eventNumber in the futur reserve field
375 }
DisplayManager * display_
Definition: DialogFrame.h:37
void doLookForGenParticle()
Definition: DialogFrame.cc:311
void DialogFrame::doPreviousEvent ( )

Definition at line 377 of file DialogFrame.cc.

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

378 {
381  // int eventNumber = evMan_->eventNumber();
382  //TODOLIST:display new value of eventNumber in the futur reserve field
383 }
DisplayManager * display_
Definition: DialogFrame.h:37
void doLookForGenParticle()
Definition: DialogFrame.cc:311
void DialogFrame::doPrint ( )

Definition at line 385 of file DialogFrame.cc.

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

386 {
387  evMan_->print(std::cout,maxLineEntry_->GetIntNumber());
388 }
void print(std::ostream &out=std::cout, int maxNLines=-1) const
print information
TGNumberEntryField * maxLineEntry_
Definition: DialogFrame.h:46
tuple cout
Definition: gather_cfg.py:121
PFRootEventManager * evMan_
Definition: DialogFrame.h:35
void DialogFrame::doPrintGenParticles ( )

Definition at line 390 of file DialogFrame.cc.

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

Referenced by ProcessMessage().

391 {
393 }
TGNumberEntryField * maxLineEntry_
Definition: DialogFrame.h:46
void printGenParticles(std::ostream &out=std::cout, int maxNLines=-1) const
print the HepMC truth
tuple cout
Definition: gather_cfg.py:121
PFRootEventManager * evMan_
Definition: DialogFrame.h:35
void DialogFrame::doReProcessEvent ( )

Definition at line 395 of file DialogFrame.cc.

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

396 {
397  int eventNumber = evMan_->eventNumber();
398  display_->display(eventNumber);
399 }
void display(int ientry)
DisplayManager * display_
Definition: DialogFrame.h:37
PFRootEventManager * evMan_
Definition: DialogFrame.h:35
void DialogFrame::isPFBlockVisible ( )

Definition at line 401 of file DialogFrame.cc.

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

402 {
403  display_->enableDrawPFBlock((selectObject_[7]->IsDown()) ?true :false);
404 
405 }
TGCheckButton * selectObject_[8]
Definition: DialogFrame.h:42
DisplayManager * display_
Definition: DialogFrame.h:37
void enableDrawPFBlock(bool state)
void DialogFrame::modifyAttr ( )

Definition at line 465 of file DialogFrame.cc.

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

466 {
467  display_->clusPattern_->SetMarkerStyle(thisClusPattern_->GetMarkerStyle());
468  display_->clusPattern_->SetMarkerSize(thisClusPattern_->GetMarkerSize());
469  display_->clusPattern_->SetMarkerColor(thisClusPattern_->GetMarkerColor());
470  display_->trackPatternL_->SetLineColor(trackPattern_->GetLineColor());
471  display_->trackPatternM_->SetMarkerStyle(trackPattern_->GetMarkerStyle());
472  display_->trackPatternM_->SetMarkerSize(trackPattern_->GetMarkerSize());
473  //trackPattern_->SetMarkerColor(display_->trackAttributes_[0]);
474  closeCanvasAttr();
476 }
TAttLine * trackPatternL_
TMarker * thisClusPattern_
Definition: DialogFrame.h:55
void drawWithNewGraphicAttributes()
TAttMarker * trackPatternM_
TAttMarker * clusPattern_
TGraph * trackPattern_
Definition: DialogFrame.h:56
void closeCanvasAttr()
Definition: DialogFrame.cc:46
DisplayManager * display_
Definition: DialogFrame.h:37
Bool_t DialogFrame::ProcessMessage ( Long_t  msg,
Long_t  parm1,
Long_t  parm2 
)
virtual

Definition at line 478 of file DialogFrame.cc.

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

479 {
480  switch (GET_MSG(msg)) {
481  case kC_TEXTENTRY:
482  switch (GET_SUBMSG(msg)) {
483  case kTE_ENTER:
484  switch (parm1) {
485  case EN :case EN+1: case EN+2: case EN+3: case EN+4: case EN+5:
486  {
487  //int eventNumber=evMan_->iEvent_;
488  float val=threshEntry_[parm1-EN]->GetNumber();
489  thresholdS_[parm1-EN]->SetPosition(val,val);
490  doModifyPtThreshold(parm1-EN,val);
491  break;
492  }
493  case MAXL: // print genPart max lines
494  evMan_->printGenParticles_ = true;
495  printButton_[6]->SetState(kButtonDown);
497  break;
498  case PARTTYPE:
500  break;
501  default:break;
502  }
503  break;
504  default:break;
505  }
506  break;
507  case kC_HSLIDER:
508  switch (GET_SUBMSG(msg)) {
509  case kSL_POS:
510  switch (parm1) {
511  case ENER: case ENER+1: case ENER+2: case ENER+3: case ENER+4: case ENER+5:
512  {
513  unsigned index=parm1-ENER;
514  float val = thresholdS_[index]->GetMinPosition();
515  threshEntry_[index]->SetNumber(val);
516  fClient->NeedRedraw(threshEntry_[index]);
517  break;
518  }
519  default:break;
520  }
521  break;
522  case kSL_RELEASE:
523  switch (parm1) {
524  case ENER: case ENER+1: case ENER+2: case ENER+3:case ENER+4: case ENER+5:
525  {
526  float val = thresholdS_[parm1-ENER]->GetMinPosition();
527  doModifyPtThreshold(parm1-ENER,(double)val);
528  break;
529  }
530  default:break;
531  }
532  break;
533  default:break;
534  }
535  break;
536  default:break;
537  }
538  return true;
539 }
void doModifyPtThreshold(unsigned obj, double val)
Definition: DialogFrame.cc:348
TGNumberEntryField * threshEntry_[6]
Definition: DialogFrame.h:45
static const int MAXL
Definition: DialogFrame.h:30
static const int ENER
Definition: DialogFrame.h:29
void doPrintGenParticles()
Definition: DialogFrame.cc:390
TGCheckButton * printButton_[7]
Definition: DialogFrame.h:43
TGDoubleHSlider * thresholdS_[6]
Definition: DialogFrame.h:44
void doLookForGenParticle()
Definition: DialogFrame.cc:311
static const int EN
Definition: DialogFrame.h:28
PFRootEventManager * evMan_
Definition: DialogFrame.h:35
bool printGenParticles_
print MC truth yes/no
static const int PARTTYPE
Definition: DialogFrame.h:31
void DialogFrame::selectPrintOption ( int  opt)

Definition at line 415 of file DialogFrame.cc.

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

416 {
417  switch (opt) {
418  case 0:
419  evMan_->printRecHits_ = (printButton_[0]->IsDown()) ?true :false;
420  break;
421  case 1:
422  evMan_->printClusters_ = (printButton_[1]->IsDown()) ?true :false;
423  break;
424  case 2:
425  evMan_->printPFBlocks_ = (printButton_[2]->IsDown()) ?true :false;
426  break;
427  case 3:
428  evMan_->printPFCandidates_ = (printButton_[3]->IsDown()) ?true :false;
429  break;
430  case 4:
431  evMan_->printPFJets_ = (printButton_[4]->IsDown()) ?true :false;
432  break;
433  case 5:
434  evMan_->printSimParticles_ = (printButton_[5]->IsDown()) ?true :false;
435  break;
436  case 6:
437  evMan_->printGenParticles_ = (printButton_[6]->IsDown()) ?true :false;
438  break;
439  default: break;
440 
441  }
442 }
bool printPFJets_
print PFJets yes/no
bool printPFBlocks_
print PFBlocks yes/no
bool printClusters_
print clusters yes/no
TGCheckButton * printButton_[7]
Definition: DialogFrame.h:43
bool printPFCandidates_
print PFCandidates yes/no
bool printSimParticles_
print true particles yes/no
PFRootEventManager * evMan_
Definition: DialogFrame.h:35
bool printGenParticles_
print MC truth yes/no
bool printRecHits_
print rechits yes/no
void DialogFrame::unZoom ( )

Definition at line 450 of file DialogFrame.cc.

References display_, and DisplayManager::unZoom().

451 {
452  display_->unZoom();
453 }
DisplayManager * display_
Definition: DialogFrame.h:37
void DialogFrame::updateDisplay ( )

Definition at line 444 of file DialogFrame.cc.

References display_, and DisplayManager::updateDisplay().

445 {
447 }
DisplayManager * display_
Definition: DialogFrame.h:37

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
const int DialogFrame::EN =1
staticprivate

Definition at line 28 of file DialogFrame.h.

Referenced by createCmdFrame(), and ProcessMessage().

const int DialogFrame::ENER =10
staticprivate

Definition at line 29 of file DialogFrame.h.

Referenced by createCmdFrame(), and ProcessMessage().

PFRootEventManager* DialogFrame::evMan_
private
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
staticprivate

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
staticprivate

Definition at line 31 of file DialogFrame.h.

Referenced by createCmdFrame(), and ProcessMessage().

const int DialogFrame::PFBLOCK =40
staticprivate

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_[8]
private

Definition at line 42 of file DialogFrame.h.

Referenced by areBremVisible(), 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_[6]
private

Definition at line 45 of file DialogFrame.h.

Referenced by createCmdFrame(), and ProcessMessage().

TGDoubleHSlider* DialogFrame::thresholdS_[6]
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().