Back Midas Rome Roody Rootana
  Root Display GUI  Not logged in ELOG logo
Entry  05 Oct 2004, John M O'Donnell, Suggestion, displaying and selecting cuts 
    Reply  20 Dec 2004, John M O'Donnell, Bug Fix, displaying cuts implementation cut_display.patch
       Reply  07 Jan 2005, John M O'Donnell, Bug Fix, displaying cuts implementation 
          Reply  10 Jan 2005, Stefan Ritt, Bug Fix, displaying cuts implementation 
       Reply  13 Jan 2005, John M O'Donnell, Bug Fix, displaying cuts implementation 
Message ID: 78     Entry time: 20 Dec 2004     In reply to: 67     Reply to this: 79   81
Author: John M O'Donnell 
Topic: Bug Fix 
Subject: displaying cuts implementation 
Attached is a cvs patch to allow roody to display graphical cuts (TCutG).

Does somebody have the permissions to commit this patch to the cvs repository?

It also includes some hooks where code for updating a cut will be implmented.
Updating cuts will be done with another patch, to both roody and midas.  This same
mechanism can be used for creating new cuts and sending them to the analyzer.

The final part of this project will be a change to midas to allow cuts to be booked
into (sub)folders.  I have some code which I am using for testing purposes, but I
don't like where it stores the cuts for persistence between different invocations of
the analyzer.  I'm thinking that cuts should be stored in last.root, and retrieved
from there.

John.
Attachment 1: cut_display.patch  2 kB  | Hide | Hide all
? MTGListTreeDict.cxx
? MTGListTreeDict.h
? RoodyDict.cxx
? RoodyDict.h
? TGTextDialogDict.cxx
? TGTextDialogDict.h
? TNetFolderDict.cxx
? TNetFolderDict.h
? TPeakFindPanelDict.cxx
? TPeakFindPanelDict.h
? TXaxisLimitsDialogDict.cxx
? TXaxisLimitsDialogDict.h
? roody
Index: Roody.cxx
===================================================================
RCS file: /usr/local/cvsroot/roody/src/Roody.cxx,v
retrieving revision 1.42
diff -r1.42 Roody.cxx
284a285
>   AddSetCut();
673a675,689
> void Roody::AddSetCut()
> {
>   TClassMenuItem *menuItem = new TClassMenuItem( TClassMenuItem::kPopupUserFunction,
> 		                                 Roody::Class(),
> 						 "Send to Analyzer", "SetCut", this,
> 						 "TObject*", 0);
>   TCutG::Class()->GetMenuList()->AddFirst(menuItem);
> }
> 
> void Roody::SetCut(TObject *o)
> {
>   TCutG *cut = static_cast<TCutG*>(o);
> cout << "SetCut callback for " << cut->GetName() << " not yet implemented" << endl;
> }
> 
989a1006,1010
>   else if( obj->InheritsFrom(TCutG::Class()) )
>   {
>     TCutG *c = static_cast<TCutG*>(obj);
>     c->Draw();
>   }
2354a2376,2382
>     else if( type && type->Contains("TCutG") && !found )
>     {
>       fFileOnlineContents->AddItem( item, itemDescription.c_str(),
> 		                    (void*)new TObjString(name.c_str()),
> 				    gClient->GetPicture("cut_t.xpm"),
> 				    gClient->GetPicture("cut_t.xpm") );
>     }
2410a2439,2443
>   else if (object->InheritsFrom(TCutG::Class()) )
>   {
>     TCutG *cut = static_cast<TCutG*>(object);
>     DrawObject( dest, cut);
>   }
Index: Roody.h
===================================================================
RCS file: /usr/local/cvsroot/roody/src/Roody.h,v
retrieving revision 1.36
diff -r1.36 Roody.h
259a260
> #include "TCutG.h"
305a307
>   void SetCut(TObject *cut);
464a467
>   void AddSetCut();
Index: TNetFolder.cpp
===================================================================
RCS file: /usr/local/cvsroot/roody/src/TNetFolder.cpp,v
retrieving revision 1.1
diff -r1.1 TNetFolder.cpp
49,51c49,54
<   TObjArray *list = (TObjArray*) m->ReadObject(m->GetClass());
<   delete m;
<   return list;
---
>   if (m) {
>     TObjArray *list = (TObjArray*) m->ReadObject(m->GetClass());
>     delete m;
>     return list;
>   }
>   return 0;
ELOG V3.1.4-2e1708b5