Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

HistoDisplay Class Reference

#include <HistoDisplay.h>

List of all members.

Public Member Functions

 HistoDisplay (const TGWindow *p, UInt_t w, UInt_t h, const char *socketserver, Int_t port)
virtual ~HistoDisplay ()
virtual Bool_t ProcessMessage (Long_t msg, Long_t parm1, Long_t parm2)

Private Types

enum  EInputTypes { kTMapFile, kTFile, kTSocket }

Private Member Functions

void MakeMenuBar ()
void CloseMenuBar ()
void MakeTitleFrame (const char *)
void CloseTitleFrame ()
void MakeInputFrame ()
void CloseInputFrame ()
void MakeTGListTreeFrame ()
void CloseTGListTreeFrame ()
void MakeStatusBar ()
void CloseStatusBar ()
TObject * OpenFile (const char *filename, EInputTypes inputtype=kTFile, Option_t *option="READ")
TObject * CloseFile (const char *filename, EInputTypes inputtype=kTFile)
TObject * CloseFile (TObject *inputobj)
void CloseConnection ()
const char * FileDialogWindow ()
void FileNameClear ()
void MessageBox (const char *msg)
void HistoDisplayMain (Int_t autoOpen=0)
void MakeHistoList (TObject *inpuobj)
void MakeHistoListM (TMapFile *MFile)
void MakeHistoListR (TFile *RFile)
void MakeHistoListS (TSocket *sock)
TConsumerInfoMakeConsumerInfo (TObject *inputobj)
TConsumerInfoMakeConsumerInfo (const char *consumername, const char *filename)
void AddToDisplayedList (const TObject *inputobj)
void AddToTree (TObject *inputobj)
TString GetDirPath (const TString &)
void MakeTGListTree (const TString &, TObject *, const char *tip=0)
void RemoveTGListTree ()
void SortTGListTree ()
void DelTreeItemsOfInput (TObject *inputobj)
void AddTreeItemsOfInput (TObject *inputobj)
void RefreshTreeItem (TGListTreeItem *item)
void DrawHisto (TObject *obj)
void DrawHisto (TList *list)
CObjectUpdateHistoList (const char *objName, const TObject *inputobj)
TObject * GetNewObj (const char *objName, const TObject *inputobj)
CObjectGetCObjFromListItem (TGListTreeItem *item)
void UpdateTimerOn ()
void UpdateCanvas (TVirtualPad *currentpad=0)
void UpdatePad (TVirtualPad *pad)
void DrawUpdatedPad (TVirtualPad *currentPad)
void ReplacePad (TVirtualPad *newpad, TVirtualPad *oldpad)
void AddPadHistosToHistoList (TPad *pad)
void AddSubtractHisto (TVirtualPad *currentPad, int option)
void ClearCurrentPad ()
void RecursivePadClear (TVirtualPad *pad, Option_t *option="")
void DrawTH1 (TH1 *histo, Option_t *option, TVirtualPad *backpad)
void DrawTPad (TPad *pad1, TVirtualPad *pad2)
void CycleSlides (const TGListTreeItem *item, TVirtualPad *currentpad)
void SlideTimerOn (TGListTreeItem *item)
void StartSlides (TGListTreeItem *item)
void PopUpSlides (TGListTreeItem *item, const char *canvasname, const char *canvastitle)
void SearchWarningErrorFolder (TGListTreeItem *item, TObject *socket)
TH1F * ContentHisto (TH1 *histo)
void DrawOnTheCanvas (const char *canvasname, const char *canvastitle, int padx, int pady, TObject *obj)
void DrawContentHisto (TH1 *histo)
TH1 * HistoInPad (TVirtualPad *pad, Int_t &counthisto)
void PrintCanvas (TPad *canvas)
void ChangeCanvasNameTitle (TCanvas *canvas)
void DuplicateCanvasSize (TCanvas *guicanvas, TCanvas *consumercanvas)
void CloseWindow ()
void ResetObjects ()
void MenuConnectStatus ()
void MenuHelp (const char *s, const char *helpText)

Private Attributes

const char * fsocketserver
Int_t fport
TGMenuBar * fMenuBar
TGLayoutHints * fMenuBarLayout
TGLayoutHints * fMenuBarItemLayout
TGLayoutHints * fMenuBarHelpLayout
TGPopupMenu * fFileMenu
TGPopupMenu * fNewCascadeMenu
TGPopupMenu * fListTreeMenu
TGPopupMenu * fSortCascadeMenu
TGPopupMenu * fConnectMenu
TGPopupMenu * fHelpMenu
TGHorizontal3DLine * fMenuBarSeparator
TGLayoutHints * fMenuBarSeparatorLayout
TGCompositeFrame * fMainFrame
TGLayoutHints * fMainFrameLayout
ULong_t LightYellow
ULong_t Red
ULong_t Green
TGCompositeFrame * fTitleFrame
TGLayoutHints * fTitleFrameLayout
TGLabel * fTitleLabel
TGLayoutHints * fTitleLabelLayout
GContext_t fTextGC
TGPictureButton * fPicBut
TGLayoutHints * fPictLayout
TGGroupFrame * fFileNameFrame
TGLayoutHints * fFileNameFrameLayout
TGRadioButton * fRaButMFile
TGRadioButton * fRaButRFile
TGRadioButton * fRaButSocket
TGLayoutHints * fRaButLayout
TGLayoutHints * fFileNameLayout
TGLabel * fFileNameLabel
TGCompositeFrame * fFileOpenFrame
TGLayoutHints * fFileOpenFrameLayout
TGTextEntry * fFileNameTextEntry
TGTextBuffer * fFileNameBuffer
TGTextButton * fReadFileButton
TGCompositeFrame * fFileNameButtonFrame
TGLayoutHints * fFileNameButtonFrameLayout
TGLayoutHints * fFileNameButtonLayout
TGTextButton * fChooseFileButton
TGTextButton * fClearFileNameButton
TGCompositeFrame * fListTreeMainFrame
TGLayoutHints * fListTreeMainFrameLayout
TGLayoutHints * fMonitorNameLayout
TGLabel * fMonitorNameLabel
TGTextEntry * fMonitorNameTextEntry
TGTextBuffer * fMonitorNameBuffer
TGCompositeFrame * fHistoListFrame
TGLayoutHints * fHistoListFrameLayout
TGCanvas * fTGCanvas
TGLayoutHints * fTGCanvasLayout
TGListTree * fHistoListTree
TGCompositeFrame * fListButtonFrame
TGLayoutHints * fListButtonFrameLayout
TGCheckButton * fChButtonAutoUpdate
TGLayoutHints * fChButtonAutoUpdateLayout
Bool_t AutoUpdate
TGCompositeFrame * fFrequencyFrame
TGLayoutHints * fFrequencyFrameLayout
TGLabel * fFrequencyLabel
TGTextEntry * fFrequencyTextEntry
TGTextBuffer * fFrequencyTextBuffer
TGCompositeFrame * fControlButtonFrame
TGLayoutHints * fControlButtonFrameLayout
TGCompositeFrame * fButtonFrame
TGLayoutHints * fButtonFrameLayout
TGLayoutHints * fButtonLayout
TGTextButton * fStartHistoButton
TGTextButton * fPauseHistoButton
TGTextButton * fRestartHistoButton
TGTextButton * fClearHistoButton
TGTextButton * fStopHistoButton
TGTextButton * fNewCanvasButton
TGGroupFrame * fHistoButtonGFrame
TGLayoutHints * fHistoButtonGFrameLayout
TGCompositeFrame * fHistoButtonFrame
TGLayoutHints * fHistoButtonFrameLayout
TGLayoutHints * fHistoButtonLayout
TGTextButton * fZeroHistoButton
TGTextButton * fUnZeroHistoButton
TGTextButton * fContentHistoButton
TGStatusBar * fStatusBar
TString MonitorName
TString FileName
ConsumerListconsumerlist
TList * fHistoList
TList * fDisplayedList
TGListTreeItem * fSelectedItem
Bool_t Running
TList * fSlideCanvasList
TGCheckButton * fChButtonSlideUpdate
Bool_t SlideShowUpdate
TString CanvasName
TString CanvasTitle
Int_t CanvasNumber
HistoDisplayUpdateTimerfUpdateTimer
HistoDisplaySlideTimerfSlideTimer
char * fPrinter
char * fPrinterCommand
TGTextButton * fPrintHistoButton

Friends

class HistoDisplayUpdateTimer
class HistoDisplaySlideTimer


Member Enumeration Documentation

enum HistoDisplay::EInputTypes [private]
 

Enumeration values:
kTMapFile 
kTFile 
kTSocket 

Definition at line 248 of file HistoDisplay.h.

Referenced by ProcessMessage().

00248                    {
00249     kTMapFile,
00250     kTFile,
00251     kTSocket
00252   };


Constructor & Destructor Documentation

HistoDisplay::HistoDisplay const TGWindow *  p,
UInt_t  w,
UInt_t  h,
const char *  socketserver,
Int_t  port
 

Definition at line 393 of file HistoDisplay.cxx.

Referenced by ProcessMessage().

00395 : TGMainFrame(p, w, h)
00396 , consumerlist(new ConsumerList("http://www-b0.fnal.gov:8000/consumer/consumer_status.html"))
00397 {
00398   //
00399   // hjw
00400   // first check if the enevironment is set correctly:
00401   //
00402   char *c_ptr;
00403   c_ptr = getenv("CONSUMER_ICONS");
00404     if(c_ptr==NULL){
00405       cout<<"Unix logical CONSUMER_ICONS is not set, will not be able to load all icons"<<endl;
00406     }
00407 
00408     gStyle->SetPalette(1); //By Greg.
00409 
00410   gClient->GetColorByName("LightYellow",LightYellow);
00411   gClient->GetColorByName("Red",Red);
00412   gClient->GetColorByName("Green",Green);
00413 
00414 
00415 
00416 
00417 
00418 
00419   fsocketserver=socketserver;
00420   fport=port;
00421 
00422 
00423   MakeMenuBar();
00424 
00425   fMainFrame =
00426     new TGCompositeFrame(this, 200, 400, kVerticalFrame); 
00427 
00428   fMainFrameLayout =
00429     //new TGLayoutHints( kLHintsCenterX | kLHintsCenterY, 1, 1, 1, 1); 
00430     new TGLayoutHints( kLHintsCenterX | kLHintsCenterY |
00431                        kLHintsExpandX | kLHintsExpandY, 1, 1, 1, 1); 
00432 
00433   char fTitle[] = "MINOS Online Monitoring Display ";
00434   MakeTitleFrame(fTitle);
00435 
00436   MakeInputFrame();
00437 
00438   MakeTGListTreeFrame();
00439 
00440   MakeStatusBar();
00441 
00442   AddFrame(fMainFrame,fMainFrameLayout); 
00443 
00444   SetWindowName(" MINOS Online Monitoring Main Frame");
00445   Resize(GetDefaultSize());
00446   Layout();
00447 
00448   MapSubwindows();
00449   MapWindow();
00450 
00451 
00452   fSelectedItem = 0; // to prevent segmentation fault
00453   //InputObj = 0;
00454 
00455   fHistoList = new TList();
00456   fDisplayedList = new TList();
00457   //fDisplayedList = new CList();
00458 
00459 
00460   SlideShowUpdate = kFALSE;
00461   fSlideCanvasList = new TList();
00462 
00463   CanvasName = "MINOSDisplayCanvas"; 
00464   CanvasTitle = "MINOS Online Monitoring Display Canvas ";
00465   CanvasNumber = 0;
00466 
00467 
00468   //fUpdateTimer = new TTimer( this, 100, kTRUE );
00469   fUpdateTimer = new HistoDisplayUpdateTimer( this, 100, kTRUE );
00470   fSlideTimer = new HistoDisplaySlideTimer( this, 2000, kTRUE );
00471 
00472   Running = kFALSE;
00473 
00474   fPrinter = 0;
00475   fPrinterCommand = 0;
00476 
00477 
00478 }

HistoDisplay::~HistoDisplay  )  [virtual]
 

Definition at line 4433 of file HistoDisplay.cxx.

References CloseInputFrame(), CloseMenuBar(), CloseStatusBar(), CloseTGListTreeFrame(), CloseTitleFrame(), and ResetObjects().

04434 {
04435 
04436   ResetObjects();
04437 
04438   delete fHistoList;
04439   delete fDisplayedList;
04440   delete fSlideCanvasList;
04441 
04442   delete fUpdateTimer;
04443   delete fSlideTimer;
04444 
04445   CloseMenuBar();
04446   CloseTitleFrame();
04447   CloseTGListTreeFrame();
04448   CloseInputFrame();
04449   CloseStatusBar();
04450 
04451   delete fMainFrame;
04452   delete fMainFrameLayout;
04453 }


Member Function Documentation

void HistoDisplay::AddPadHistosToHistoList TPad *  pad  )  [private]
 

Definition at line 3958 of file HistoDisplay.cxx.

References fDisplayedList, and CObject::SetTObject().

Referenced by UpdateHistoList().

03959 {
03960   //cout << " In AddPadHistosToHistoList " << endl; 
03961 
03962   if ( !pad ) return;
03963 
03964   TObjLink *link = pad->GetListOfPrimitives()->FirstLink();
03965 
03966   while ( link ) {
03967 
03968     TObject *obj = link->GetObject();
03969 
03970     if ( obj ) {
03971 
03972       if ( obj->InheritsFrom( TPad::Class() ) ) 
03973         AddPadHistosToHistoList( (TPad*)obj ); 
03974 
03975       else if ( obj->InheritsFrom( TH1::Class() ) ) {
03976 
03977         TObject *objold = fDisplayedList->FindObject( obj->GetName() );
03978 
03979         if ( objold && objold->InheritsFrom( CObject::Class())  ) {
03980 
03981           CObject *cobj = (CObject*)objold;
03982           //cobj->SetTObject( obj );
03983           cobj->SetTObject( obj->Clone() );
03984 
03985         } //if ( objold && objold->InheritsFrom( CObject::Class()) )
03986         else {
03987 
03988           CHistogram *cobjnew =
03989             //new CHistogram( (TH1*)obj, 0, 0, 0 );
03990             new CHistogram( (TH1*)obj->Clone(), 0, 0, 0 );
03991 
03992                   fDisplayedList->Add( cobjnew );
03993 
03994         } //else //if ( objold && objold->InheritsFrom( CObject::Class()) ) )
03995 
03996       } //else if ( obj->InheritsFrom( TH1::Class() ) )
03997 
03998     } //if ( obj ) 
03999 
04000     link = link->Next();
04001 
04002   } //while ( link )
04003 
04004   //cout << " End of AddPadHistosToHistoList " << endl; 
04005 
04006 }

void HistoDisplay::AddSubtractHisto TVirtualPad *  currentPad,
int  option
[private]
 

Definition at line 4176 of file HistoDisplay.cxx.

References fDisplayedList, CObject::GetTObject(), option, and CHistogram::SetSubtractHisto().

Referenced by ProcessMessage().

04177 {
04178   // Zero or Restore all histos on the currentPad.
04179   // int option = 0    ; unzero
04180   //            = else ;   zero 
04181 
04182   // cout << " In AddSubtractHisto" << endl;
04183 
04184   if (!currentPad) return;
04185 
04186   TList *primitiveList = currentPad->GetListOfPrimitives();
04187   TIter next(primitiveList);
04188   TObject *obj = 0;
04189 
04190   while ( ( obj = next() ) ) {
04191     if ( obj->InheritsFrom(TPad::Class()) ) {
04192 
04193       AddSubtractHisto( (TPad*)obj , option);
04194 
04195     } //if ( obj->InheritsFrom(TPad::Class()) )
04196     else {
04197 
04198       if ( obj->InheritsFrom(TH1::Class()) ) {
04199 
04200         TObject *obj2 = 
04201           fDisplayedList->FindObject(obj->GetName());
04202 
04203         if( obj2 && obj2->InheritsFrom(CHistogram::Class()) ) {
04204 
04205           CHistogram *chisto = (CHistogram*)obj2;
04206           TH1 *histo = (TH1*) chisto->GetTObject();
04207 
04208           if (option) {
04209             if (histo) chisto->SetSubtractHisto( histo );
04210           } //if (option)
04211           else {
04212             chisto->SetSubtractHisto(0);
04213           } //else //if (option)
04214 
04215 
04216         }//if( obj2 && obj2->InheritsFrom(CHistogram::Class()) )
04217 
04218 
04219       } //if ( obj->InheritsFrom(TH1::Class()) )
04220 
04221 
04222     } //else//if ( obj->InheritsFrom(TPad::Class()) )
04223 
04224 
04225   } //while ( obj = next() )
04226 
04227 }

void HistoDisplay::AddToDisplayedList const TObject *  inputobj  )  [private]
 

Definition at line 1985 of file HistoDisplay.cxx.

References fHistoList.

Referenced by AddTreeItemsOfInput().

01986 {
01987   // cout << " In AddToDisplayedList " << endl;
01988 
01989   if ( !inputobj ) return ;
01990 
01991 
01992   if ( fHistoList && !fHistoList->IsEmpty() ) {
01993 
01994     TIter nextList(fHistoList);
01995     TObject *obj = 0;
01996     while ( ( obj = nextList() ) ) {
01997 
01998       //unused:     CObject *coj = UpdateHistoList( obj->GetName(), inputobj );
01999 
02000     }//while ( (obj = nextList()) )
02001 
02002   }//if ( fHistoList && !fHistoList->IsEmpty() )
02003 
02004   //tmp
02005   //fDisplayedList->ls();
02006 
02007 }

void HistoDisplay::AddToTree TObject *  inputobj  )  [private]
 

Definition at line 2012 of file HistoDisplay.cxx.

References fHistoList, fHistoListTree, GetDirPath(), and MakeTGListTree().

Referenced by AddTreeItemsOfInput().

02013 {
02014   if ( fHistoList && !fHistoList->IsEmpty() ) {
02015 
02016     TIter nextHisto(fHistoList);
02017     TObject *obj = 0;
02018 
02019     while ( (obj = nextHisto()) ) {
02020       TString PathName;
02021       //TString DirPath;
02022 
02023       PathName = GetDirPath( TString(obj->GetName()) ) 
02024         //PathName = "/" + TString( inputobj->GetName() ) 
02025         + "/" + TString(obj->GetName());
02026  
02027       //MakeTGListTree( PathName, inputobj );
02028       MakeTGListTree( PathName, inputobj, obj->GetTitle() );
02029     } //while ( (obj = nextHisto()) )
02030 
02031     fClient->NeedRedraw(fHistoListTree);
02032 
02033   } //if ( fHistoList && !fHistoList->IsEmpty() )
02034 
02035 }

void HistoDisplay::AddTreeItemsOfInput TObject *  inputobj  )  [private]
 

Definition at line 2328 of file HistoDisplay.cxx.

References AddToDisplayedList(), AddToTree(), TConsumerInfo::getPath(), MakeConsumerInfo(), MakeHistoList(), and MakeTGListTree().

Referenced by GetNewObj(), and ProcessMessage().

02329 {
02330   //cout << " In AddTreeItemsOfInput " << endl;
02331 
02332   if ( !inputobj ) {
02333     cout << " No input is specified. " << endl;
02334     return;
02335   } //if ( !inputobj )
02336 
02337 
02338   TPad *padsav = 0;
02339   if ( gPad && !( gROOT->GetListOfCanvases()->IsEmpty() ) )
02340     padsav = (TPad*) gPad;
02341 
02342 
02343   TConsumerInfo *info = MakeConsumerInfo( inputobj );
02344 
02345   if ( info ) {
02346     TIterConsumerInfo nextObjName( info );
02347 
02348     TString objName;
02349     Int_t countAdded = 0;
02350 
02351     while ( ( objName = nextObjName() ) ) {
02352       if ( objName.IsNull() ) break;
02353 
02354       TString pathname = 
02355         "/" + info->getPath( objName.Data() ) + "/" + objName;
02356 
02357       MakeTGListTree( pathname, inputobj );
02358       countAdded++;
02359 
02360     } //while ( objName = nextObjName() )
02361 
02362     if ( countAdded ) {
02363       //fClient->NeedRedraw( fHistoListTree );
02364       //fDisplayedList->ls();
02365     } //if ( cout2 )
02366     else
02367       cout << " No object"
02368            << " is found in the input: " 
02369            << inputobj->GetName()
02370            << endl;
02371 
02372     delete info;
02373 
02374   } //if( info )
02375   else {
02376 
02377     //if ( !inputobj ) return;
02378 
02379     MakeHistoList(inputobj);
02380     AddToTree(inputobj);
02381     AddToDisplayedList(inputobj);
02382 
02383   } //else //if( info )
02384 
02385   if ( padsav ) padsav->cd();
02386 
02387 }

void HistoDisplay::ChangeCanvasNameTitle TCanvas *  canvas  )  [private]
 

Definition at line 2946 of file HistoDisplay.cxx.

References count, fDisplayedList, fSlideCanvasList, and CObject::GetName().

Referenced by DrawHisto().

02947 {
02948   //cout << " In ChangeCanvasNameTitle " << endl;
02949 
02950   if ( !canvas ) return;
02951 
02952   TList *list = canvas->GetListOfPrimitives();
02953 
02954   Int_t count = 0;
02955   TObject *obj = 0;
02956 
02957 
02958   TString canvasname = "";
02959   TString canvastitle = "";
02960 
02961   /*
02962   const char *name = 0;
02963   name = canvas->GetName();
02964   if ( name && fDisplayedList->FindObject( name ) ) {
02965     count++;
02966     canvasname = name;
02967     canvastitle = canvas->GetTitle();
02968   } //if ( name && fDisplayedList->FindObject( obj ) ) 
02969   */
02970 
02971 
02972   TIter next( list );
02973 
02974   while ( ( obj = next() ) ) {
02975 
02976     const char *name = 0;
02977     name = obj->GetName();
02978 
02979     if ( strstr( name, "Pad_of_" ) )
02980       name = &( name[ strlen( "Pad_of_" ) ] );
02981 
02982     //cout << " name " <<  name << endl;
02983 
02984     if ( name && fDisplayedList->FindObject( name ) ) {
02985       count++;
02986       if ( count == 1 ) {
02987           canvasname = TString( name );
02988           canvastitle = TString( obj->GetTitle() );
02989       } // if ( count == 1 )
02990       else if ( count == 2 ) {
02991         canvasname = canvasname + "__" + TString( name );
02992         canvastitle = canvastitle + ", " + TString( obj->GetTitle() );
02993       } //else if ( count == 2 )
02994       else if ( count == 3 ) {
02995         canvasname = canvasname + "__etc";
02996         canvastitle = canvastitle + ", etc.";
02997       } //else if ( count == 3 )
02998     } //if ( name && fDisplayedList->FindObject( obj ) ) 
02999 
03000   } //while ( obj = next() )
03001 
03002   if ( count ) {
03003     if ( fSlideCanvasList->FindObject( canvas->GetName() ) )
03004       //canvastitle =  "<Slide Canvas>" + canvastitle; 
03005       canvastitle =  "<Auto Update>" + canvastitle; 
03006 
03007     canvas->SetName( canvasname.Data() );
03008     canvas->SetTitle( canvastitle.Data() );
03009   } //if ( count )
03010 
03011 }

void HistoDisplay::ClearCurrentPad  )  [private]
 

Definition at line 3785 of file HistoDisplay.cxx.

References RecursivePadClear().

Referenced by ProcessMessage().

03785                                    {
03786 
03787   //cout << " In ClearCurrentPad " << endl; 
03788 
03789   //TPad *padsav = (TPad*) gPad;
03790   TPad *pad = (TPad*)gROOT->GetSelectedPad();
03791 
03792   if ( !pad ) return;
03793 
03794   //pad->Clear();
03795   RecursivePadClear( pad );
03796   pad->cd();
03797 
03798   
03799   /*
03800     if ( pad != pad->GetCanvas() ) {
03801     pad->SetName("VOID");
03802     }
03803   */
03804   pad->SetName("VOID");
03805 
03806   pad->SetTitle("Cleared");
03807 
03808   pad->Modified();
03809   pad->Update();
03810   //padsav->cd();
03811 
03812   //cout << "Cleared " << endl;
03813 
03814 }

void HistoDisplay::CloseConnection  )  [private]
 

Definition at line 1392 of file HistoDisplay.cxx.

References DspEndConnection.

Referenced by ResetObjects().

01393 {
01394 
01395   //if (MFileOpen) {
01396   if ( gROOT->GetListOfMappedFiles() ) {
01397     //delete MFile;
01398     //gROOT->GetListOfMappedFiles()->Delete();
01399     // To avoid Error in <TMapFile::Close>: 
01400     //  shadow map == 0, should never happen!
01401     TIter next( gROOT->GetListOfMappedFiles() );
01402     TMapFile* mfile = 0; 
01403     while ( ( mfile = (TMapFile*)next() ) ) {
01404       mfile->Close();
01405       //gROOT->GetListOfMappedFiles()->Remove(mfile);
01406       // is called by close
01407     }
01408     //MFile = 0;
01409     //MFileOpen = kFALSE;
01410   }
01411 
01412   //if (RFileOpen) {
01413   if ( gROOT->GetListOfFiles() ) {
01414     //delete RFile;
01415     //gROOT->GetListOfFiles()->Delete();
01416     TIter next( gROOT->GetListOfFiles() );
01417     TFile* file = 0; 
01418     while ( ( file = (TFile*)next() ) ) {
01419       file->Close();
01420       //gROOT->GetListOfFiles()->Remove(file);
01421       // is called by close
01422     }
01423     //RFile = 0;
01424     //RFileOpen = kFALSE;
01425   }
01426 
01427   //if (sockOpen) {
01428 
01429   if ( gROOT->GetListOfSockets() ) {
01430     //gROOT->GetListOfSockets()->Delete();
01431     gROOT->GetListOfSockets()->ls();
01432     TIter next( gROOT->GetListOfSockets() );
01433     TSocket* socktmp = 0;
01434     while ( ( socktmp = (TSocket*)next() ) ) {
01435       //socktmp->Send("END CONNECTION");
01436       socktmp->Send( DspEndConnection.c_str() );
01437       socktmp->Close();
01438       //gROOT->GetListOfFiles()->Remove(socktmp);
01439       // is called by close
01440     }
01441     //sockOpen = kFALSE;
01442   }
01443 
01444   //InputOpen = kFALSE;
01445 
01446 }

TObject * HistoDisplay::CloseFile TObject *  inputobj  )  [private]
 

Definition at line 1370 of file HistoDisplay.cxx.

01371 {
01372   //cout << " In CloseFile ( obj )" << endl;
01373 
01374   if ( obj ) { 
01375 
01376     if ( obj->InheritsFrom( TMapFile::Class() ) ) 
01377       ( (TMapFile*)obj )->Close();
01378 
01379     else if ( obj->InheritsFrom( TMapFile::Class() ) ) 
01380       ( (TFile*)obj )->Close();
01381 
01382     else if ( obj->InheritsFrom( TSocket::Class() ) ) 
01383       ( (TSocket*)obj )->Close();
01384  
01385   } //if ( obj ) 
01386 
01387   return obj;
01388 
01389 }

TObject * HistoDisplay::CloseFile const char *  filename,
EInputTypes  inputtype = kTFile
[private]
 

Definition at line 1340 of file HistoDisplay.cxx.

01342 {
01343   //cout << " In CloseFile " << endl;
01344 
01345   TObject *obj = 0;
01346 
01347   if ( inputtype == kTMapFile ) {
01348 
01349     while( ( obj = gROOT->GetListOfMappedFiles()->FindObject(filename) ) )
01350       ( (TMapFile*)obj )->Close();
01351 
01352   } //if ( inputtype == kTMapFile )
01353   else if ( inputtype == kTFile ) {
01354 
01355     while( ( obj = gROOT->GetListOfFiles()->FindObject(filename) ) )
01356       ( (TFile*)obj )->Close();
01357 
01358   } //else if ( inputtype == kTFile )
01359   else if ( inputtype == kTSocket ) {
01360 
01361     while( ( obj =gROOT->GetListOfSockets()->FindObject(filename) ) )
01362       ( (TSocket*)obj )->Close();
01363 
01364   } //else if ( inputtype == kTSocket ) 
01365  
01366   return obj;
01367 
01368 }

void HistoDisplay::CloseInputFrame  )  [private]
 

Definition at line 794 of file HistoDisplay.cxx.

Referenced by ~HistoDisplay().

00795 {
00796   delete fRaButMFile;
00797   delete fRaButRFile;
00798   delete fRaButSocket;
00799   delete fRaButLayout;
00800 
00801   delete fFileNameLabel; 
00802   delete fFileNameTextEntry;
00803   delete fReadFileButton;
00804   delete fFileOpenFrame;
00805   delete fFileOpenFrameLayout;
00806 
00807   delete   fChooseFileButton;
00808   delete   fClearFileNameButton;
00809   delete   fFileNameButtonFrame;
00810   delete   fFileNameButtonLayout;
00811   delete   fFileNameButtonFrameLayout;
00812 
00813   delete fFileNameLayout;
00814   delete fFileNameFrame;
00815   delete fFileNameFrameLayout;
00816 }

void HistoDisplay::CloseMenuBar  )  [private]
 

Definition at line 567 of file HistoDisplay.cxx.

Referenced by ~HistoDisplay().

00568 {
00569   delete fNewCascadeMenu;
00570   delete fFileMenu;
00571   delete fSortCascadeMenu;
00572   delete fListTreeMenu;
00573   delete fConnectMenu;
00574   delete fHelpMenu;
00575   delete fMenuBarItemLayout;
00576   delete fMenuBarHelpLayout;
00577   delete fMenuBar;
00578   delete fMenuBarLayout;
00579 
00580   delete fMenuBarSeparator;
00581   delete fMenuBarSeparatorLayout;
00582   delete consumerlist;
00583 }

void HistoDisplay::CloseStatusBar  )  [private]
 

Definition at line 1228 of file HistoDisplay.cxx.

Referenced by ~HistoDisplay().

01229 {
01230   delete fStatusBar;
01231 }

void HistoDisplay::CloseTGListTreeFrame  )  [private]
 

Definition at line 1157 of file HistoDisplay.cxx.

Referenced by ~HistoDisplay().

01158 {
01159   delete fMonitorNameLayout;
01160   delete fMonitorNameLabel;
01161   delete fMonitorNameBuffer;
01162   delete fMonitorNameTextEntry;
01163 
01164   delete fHistoListTree;
01165   delete fTGCanvas;
01166   delete fTGCanvasLayout;
01167 
01168   delete fChButtonAutoUpdate;
01169   delete fChButtonSlideUpdate;
01170   delete fChButtonAutoUpdateLayout;
01171 
01172 
01173   delete fFrequencyLabel;
01174   delete fFrequencyTextBuffer;
01175   delete fFrequencyTextEntry;
01176   delete fFrequencyFrame;
01177   delete fFrequencyFrameLayout;
01178 
01179   //delete fStartHistoButton;
01180   delete fPauseHistoButton;
01181   delete fRestartHistoButton;
01182   delete fClearHistoButton;
01183   delete fPrintHistoButton;
01184   delete fStopHistoButton;
01185   //delete fExitButton;
01186 
01187   delete fButtonLayout;
01188 
01189   delete fButtonFrame;
01190   delete fButtonFrameLayout;
01191 
01192 
01193 
01194   delete fZeroHistoButton;
01195   delete fUnZeroHistoButton;
01196   delete fContentHistoButton;
01197 
01198   delete fHistoButtonLayout;
01199 
01200   delete fHistoButtonFrame;
01201   delete fHistoButtonFrameLayout;
01202   delete fHistoButtonGFrame;
01203   delete fHistoButtonGFrameLayout;
01204 
01205 
01206   delete fControlButtonFrame;
01207   delete fControlButtonFrameLayout;
01208 
01209 
01210   delete fListButtonFrame;
01211   delete fListButtonFrameLayout;
01212 
01213   delete fHistoListFrame;
01214   delete fHistoListFrameLayout;
01215 
01216   delete fListTreeMainFrame;
01217   delete fListTreeMainFrameLayout;
01218 }

void HistoDisplay::CloseTitleFrame  )  [private]
 

Definition at line 623 of file HistoDisplay.cxx.

References fTextGC.

Referenced by ~HistoDisplay().

00624 {
00625   gVirtualX->DeleteGC(fTextGC);
00626   delete fTitleLabel;
00627   delete fTitleLabelLayout;
00628   delete fPicBut;
00629   delete fPictLayout;
00630   delete fTitleFrame;
00631   delete fTitleFrameLayout;
00632 }

void HistoDisplay::CloseWindow  )  [private]
 

Definition at line 4415 of file HistoDisplay.cxx.

Referenced by ProcessMessage().

04416 {
04417   gApplication->Terminate(0);
04418 
04419 }

TH1F * HistoDisplay::ContentHisto TH1 *  histo  )  [private]
 

Definition at line 4276 of file HistoDisplay.cxx.

References max, and min.

Referenced by DrawContentHisto().

04277 {
04278   //cout << " In ContentHisto" << endl;
04279   if (!histo) return 0;
04280 
04281   float min, max;
04282   min = histo->GetMinimum();
04283   max = histo->GetMaximum();
04284 
04285   if ( min == max ) return 0;
04286 
04287   int nbin;
04288   nbin = 50;
04289   float binsize;
04290   binsize = (max - min)/nbin;
04291 
04292   TH1F* contenthisto = 
04293     new TH1F("BinContenHisto", histo->GetTitle(), nbin,
04294             min - 2*binsize, max + 2*binsize );
04295   // oldone is removed by canvas->Clear() in DrawOntheCanvas.
04296 
04297   contenthisto->SetXTitle("Hits in a bin");
04298   contenthisto->SetYTitle("Number of bins");
04299 
04300   Int_t nbinsx = histo->GetNbinsX();
04301   Int_t nbinsy = histo->GetNbinsY();
04302   Int_t nbinsz = histo->GetNbinsZ();
04303 
04304 
04305    Int_t bin, binx, biny, binz;
04306    double content;
04307    for (binz=0;binz<=nbinsz+1;binz++) {
04308      for (biny=0;biny<=nbinsy+1;biny++) {
04309        for (binx=0;binx<=nbinsx+1;binx++) {
04310             bin = binx +(nbinsx+2)*(biny + (nbinsy+2)*binz);
04311             content = histo->GetBinContent(bin);
04312             if (content) contenthisto->Fill(content);
04313        }
04314      }
04315    }
04316 
04317    return contenthisto;
04318 }

void HistoDisplay::CycleSlides const TGListTreeItem *  item,
TVirtualPad *  currentpad
[private]
 

Definition at line 3437 of file HistoDisplay.cxx.

Referenced by HistoDisplaySlideTimer::Notify().

03439 {
03440   //  cout << " In CycleSlides " << endl;
03441 
03442   /*
03443   static TGListTreeItem *item = 0;
03444 
03445   TVirtualPad *padsav = 0;
03446 
03447   if ( !currentitem ) {
03448     Running = kFALSE;
03449     //    fReadFileButton->ChangeBackground(Red);
03450     return;
03451   } //if ( !currentitem ) 
03452 
03453   if ( !item || ( item && ( item->GetParent() != currentitem ) ) ) 
03454     item = currentitem->GetFirstChild();
03455 
03456   if ( item ) {
03457 
03458     //if ( !gROOT->GetListOfCanvases()->IsEmpty() && gPad )
03459     if ( gROOT->GetListOfCanvases()->IsEmpty() ) gPad = 0;
03460     padsav =  gPad;
03461 
03462     //TObject *obj = fDisplayedList->FindObject( item->GetText() );
03463     TObject *obj = GetCObjFromListItem( item );
03464 
03465     if( obj ) {
03466       if ( obj->InheritsFrom( CObject::Class() ) ) {
03467 
03468         const TObject *inputobj = 
03469           ( (CObject*)obj )->GetInputSource();
03470         TObject *cobj = 
03471           UpdateHistoList( item->GetText(), inputobj );
03472 
03473         fHistoListTree->HighlightItem( item );
03474         fClient->NeedRedraw( fHistoListTree );
03475 
03476         if ( currentpad &&
03477              gROOT->GetListOfCanvases()->FindObject( currentpad ) )
03478           currentpad->cd();
03479         else if ( padsav ) {
03480           padsav->cd();
03481           fSlideTimer->SetCurrentPad( padsav );
03482         }
03483 
03484         DrawHisto( cobj );
03485 
03486         if ( padsav ) padsav->cd();
03487 
03488       } //if ( obj->InheritsFrom( CObject::Class() ) )
03489     }//if( obj )
03490 
03491 
03492 
03493     item = item->GetNextSibling();
03494 
03495     if ( !item ) 
03496       if ( AutoUpdate ) item = fSelectedItem->GetFirstChild();
03497       else
03498         Running = kFALSE;
03499     //    fReadFileButton->ChangeBackground(Red);
03500 
03501   } // if ( item )
03502   else {
03503     Running = kFALSE;
03504     // fReadFileButton->ChangeBackground(Red);
03505   } //else //if ( item )
03506 
03507   */
03508 }

void HistoDisplay::DelTreeItemsOfInput TObject *  inputobj  )  [private]
 

Definition at line 2240 of file HistoDisplay.cxx.

References fHistoListTree.

02241 {
02242   //cout << " In DelTreeItemsOfInput " << endl;
02243   TGListTreeItem *item = fHistoListTree->GetFirstItem();
02244 
02245   while( item ) {
02246     fHistoListTree->RecursiveDeleteItem( item, inputobj );
02247     item = item->GetNextSibling();
02248   }//while( item )
02249 
02250 }

void HistoDisplay::DrawContentHisto TH1 *  histo  )  [private]
 

Definition at line 4264 of file HistoDisplay.cxx.

References ContentHisto(), and DrawOnTheCanvas().

Referenced by ProcessMessage().

04265 {
04266   //cout << " In DrawContentHisto" << endl;
04267   if ( !histo ) return;
04268 
04269   DrawOnTheCanvas( "ContentHistoCanvas", "Bin-Content Histogram Canvas",
04270                    300, 300,
04271                    ContentHisto(histo) ) ;
04272 }

void HistoDisplay::DrawHisto TList *  list  )  [private]
 

Definition at line 2806 of file HistoDisplay.cxx.

References CanvasName, CanvasNumber, CanvasTitle, ChangeCanvasNameTitle(), DrawTH1(), DrawTPad(), CObject::GetTObject(), option, RecursivePadClear(), and CHistogram::SubtractedHisto().

02807 {
02808   //cout << " In DrawHisto list " << endl;
02809 
02810   // For older version of ROOT, this is needed.
02811   //static int icount = 0;
02812   if ( gROOT->GetListOfCanvases()->IsEmpty() ) gPad = 0;
02813 
02814     if ( fSelectedList && !fSelectedList->IsEmpty() ) {
02815       int nPad = fSelectedList->GetSize();
02816       int nPadX = (int) sqrt( (float)nPad );
02817       int nPadY = nPadX;
02818 
02819       if ( nPadX*nPadY < nPad ) {
02820         nPadX++;
02821         if ( nPadX * nPadY < nPad ) nPadY++;
02822       } //if ( nPadX*nPadY < nPad ) 
02823 
02824 
02825       // pad size ww,wh--
02826       int ww, wh;
02827       ww = wh = 300;
02828 
02829       TCanvas *CurrentCanvas = 0;
02830 
02831       if ( !gPad ){
02832         CanvasNumber++;
02833         char *num = new char[3];
02834         sprintf( num, "%d", CanvasNumber);
02835         CurrentCanvas =
02836           new TCanvas( CanvasName + TString( num ),
02837                        CanvasTitle + TString( num) , ww * nPadX, wh * nPadY );
02838         delete num;
02839         CurrentCanvas->cd();
02840       }//if (!gPad)
02841       else {
02842         CurrentCanvas = (TCanvas*)gPad->GetCanvas();
02843 
02844         //CurrentCanvas->Clear();
02845         RecursivePadClear( CurrentCanvas );
02846         CurrentCanvas->cd();
02847 
02848         //tmp
02849         /*
02850         CurrentCanvas->SetWindowSize( ww * nPadX, wh * nPadY );
02851         CurrentCanvas->Resize();
02852         */
02853 
02854       }//if (!gPad) else
02855 
02856 
02857       CurrentCanvas->Divide( nPadX, nPadY );
02858 
02859 
02860       int iPad = 0;
02861 
02862       TIter nextList(fSelectedList);
02863 
02864       TObject *obj = 0;
02865       while ( ( obj = nextList() ) ) {
02866         iPad++;
02867 
02868         if ( obj->InheritsFrom( CHistogram::Class() ) ) {
02869 
02870           CurrentCanvas->cd(iPad);
02871 
02872           CHistogram *chisto = (CHistogram*)obj;
02873 
02874           TH1 *histo = chisto->SubtractedHisto();
02875           //TH1 *histo = chisto->GetHistoDrawn();
02876 
02877           if ( histo ) {
02878  
02879             Option_t *option;
02880             option = chisto->GetTObject()->GetOption();
02881 
02882             TPad *gpad = (TPad*)gPad;
02883 
02884             TString padname = "Pad_of_" +  TString( histo->GetName() ) ;
02885             TString padtitle = TString( histo->GetTitle() ) ;
02886 
02887             gpad->SetName( padname.Data() );
02888             gpad->SetTitle( padtitle.Data() );
02889 
02890             DrawTH1(histo, option, gpad);
02891 
02892             gpad->Modified();
02893             gpad->Update();
02894 
02895           } //if( histo )
02896 
02897         } //if ( obj->InheritsFrom( CHistogram::Class() ) )
02898             
02899         else if ( obj->InheritsFrom( CObject::Class() ) ) {
02900 
02901           CObject *cobj = (CObject*)obj;
02902           TObject *tobj = cobj->GetTObject();
02903 
02904           if ( tobj && tobj->InheritsFrom( TPad::Class() ) ) {
02905 
02906             CurrentCanvas->cd(iPad);
02907 
02908             TPad *gpad = (TPad*)gPad;
02909             TPad *c2 = (TPad*)tobj;
02910 
02911             if (c2) {
02912               gpad->SetName( c2->GetName() );
02913               gpad->SetTitle( c2->GetTitle() );
02914 
02915               DrawTPad(c2, gpad);
02916               //gpad->Modified();
02917               gpad->Update();
02918 
02919             } //if (c2)
02920 
02921           } //if ( tobj && tobj->InheritsFrom( TPad::Class() ) )
02922 
02923         } //else if ( obj->InheritsFrom( CObject::Class() ) )
02924 
02925       } // while ( obj = nextList() )
02926 
02927 
02928       ChangeCanvasNameTitle( CurrentCanvas );
02929 
02930 
02931       CurrentCanvas->cd();
02932       CurrentCanvas->Modified();
02933       CurrentCanvas->Update();
02934 
02935       //cout << "Drawing done" << endl << endl;
02936 
02937     } // if ( fSelectedList && !fSelectedList->IsEmpty() )
02938       
02939 
02940 }

void HistoDisplay::DrawHisto TObject *  obj  )  [private]
 

Definition at line 2623 of file HistoDisplay.cxx.

References CanvasName, CanvasNumber, CanvasTitle, ChangeCanvasNameTitle(), DrawTH1(), DrawTPad(), fSlideCanvasList, CObject::GetTObject(), option, RecursivePadClear(), and CHistogram::SubtractedHisto().

Referenced by ProcessMessage().

02624 {
02625   //cout << " In DrawHisto obj " << endl;
02626 
02627   /*
02628   // For older version of ROOT, this is needed.
02629   static int icount = 0;
02630   if ( !(icount++) || gROOT->GetListOfCanvases()->IsEmpty() ) gPad = 0;
02631   */
02632 
02633   if ( gROOT->GetListOfCanvases()->IsEmpty() ) gPad = 0;
02634 
02635   if ( obj ) {
02636 
02637     //obj->ls();
02638 
02639     TCanvas *CurrentCanvas = 0;
02640 
02641     if ( !gPad ) {
02642       CanvasNumber++;
02643       char *num= new char[3];
02644       sprintf( num, "%d", CanvasNumber );
02645       CurrentCanvas =
02646         new TCanvas( CanvasName + TString( num ),
02647                      CanvasTitle + TString( num ) , 500, 500 );
02648       delete[] num;
02649       CurrentCanvas->cd();
02650     }
02651 
02652 
02653 
02654     TPad *gPadSav = (TPad*)gPad;
02655     CurrentCanvas = gPadSav->GetCanvas();
02656 
02657 
02658     if ( obj->InheritsFrom( CHistogram::Class() ) ) {
02659 
02660       CHistogram *chisto = (CHistogram*) obj;
02661       TH1 *histo = chisto->SubtractedHisto();
02662       //TH1 *histo =  chisto->GetHistoDrawn();
02663 
02664       if ( histo ) {
02665 
02666         TObject *hobj = chisto->GetTObject();
02667 
02668         Option_t *option = 0;
02669         if ( hobj ) option = hobj->GetOption();
02670 
02671         //gPadSav->Clear();
02672         RecursivePadClear( gPadSav );
02673         gPadSav->cd();
02674 
02675 
02676 
02677         TString padname;
02678         TString padtitle;
02679 
02680         if ( gPadSav == CurrentCanvas ) {
02681 
02682           //tmp
02683           /*
02684           CurrentCanvas->SetWindowSize( 500, 500 );
02685           CurrentCanvas->Resize();
02686           */
02687 
02688           if ( strcmp( CurrentCanvas->GetName(),
02689                        kWarningErrorCanvasName ) ) {
02690 
02691           padname = "Canvas_of_" +  TString( histo->GetName() ) ;
02692           if ( fSlideCanvasList->FindObject( CurrentCanvas ) )
02693             //padtitle = "<Slide Canvas>" + TString( histo->GetTitle() );
02694             padtitle = "<Auto Update>" + TString( histo->GetTitle() );
02695           else
02696             padtitle = TString( histo->GetTitle() );
02697           CurrentCanvas->SetName( padname.Data() );
02698           CurrentCanvas->SetTitle( padtitle.Data() );
02699 
02700           } // if ( strcmp( CurrentCanvas->GetName(),
02701 
02702 
02703           //gPadSav->cd();
02704           //DrawTH1( histo, option, gPadSav );
02705           DrawTH1( histo, option, CurrentCanvas );
02706         } //if ( gPadSav == gPadSav->GetCanvas() )
02707         else { 
02708 
02709           padname = "Pad_of_" + TString( histo->GetName() );
02710           padtitle = TString( histo->GetTitle() );
02711 
02712           gPadSav->SetName( padname.Data() );
02713           gPadSav->SetTitle( padtitle.Data() );
02714           //gPadSav->cd();
02715           DrawTH1( histo, option, gPadSav );
02716 
02717           ChangeCanvasNameTitle( CurrentCanvas );
02718 
02719         } // else //if ( gPadSav == gPadSav->GetCanvas() )
02720 
02721 
02722       } //if ( histo )
02723 
02724     } //if ( obj->InheritsFrom( CHistogram::Class() ) ) 
02725 
02726     else if ( obj->InheritsFrom( CObject::Class() ) ) {
02727       CObject *cobj = (CObject*)obj;
02728       TObject *tobj = cobj->GetTObject();
02729 
02730       if ( tobj->InheritsFrom( TPad::Class() ) ) {
02731 
02732         TPad *c2 = (TPad*)tobj;
02733 
02734         //tmp
02735         //cout << " gPadSav->GetName() = " << gPadSav->GetName() << endl;
02736 
02737         gPadSav->cd(); // necessary to prevent bad x window allocation.
02738 
02739         if ( c2 ) {
02740 
02741 
02742           if ( gPadSav == CurrentCanvas ) {
02743             //gPadSav->Clear();
02744             //RecursivePadClear( gPadSav );
02745             gPadSav->cd();
02746 
02747           //tmp
02748           /*
02749             if ( c2->InheritsFrom( TCanvas::Class() ) )
02750               DuplicateCanvasSize( CurrentCanvas, (TCanvas*)c2 );
02751           */
02752 
02753           if ( strcmp( CurrentCanvas->GetName(),
02754                        kWarningErrorCanvasName ) ) {
02755 
02756             CurrentCanvas->SetName( c2->GetName() );
02757             TString padtitle;
02758             if ( fSlideCanvasList->FindObject( CurrentCanvas ) )
02759               //padtitle = "<Slide Canvas>" + TString( c2->GetTitle() );
02760               padtitle = "<Auto Update>" + TString( c2->GetTitle() );
02761             else
02762               padtitle = TString( c2->GetTitle() );
02763             CurrentCanvas->SetTitle( padtitle );
02764 
02765           } // if ( strcmp( CurrentCanvas->GetName(),
02766 
02767 
02768             DrawTPad( c2, gPadSav );
02769 
02770           } //if ( gPadSav == gPadSav->GetCanvas() )
02771           else {
02772             gPadSav->SetName( c2->GetName() );
02773             gPadSav->SetTitle( c2->GetTitle() );
02774             DrawTPad( c2, gPadSav );
02775             ChangeCanvasNameTitle( CurrentCanvas );
02776 
02777           } //else //if ( gPadSav == gPadSav->GetCanvas() ) 
02778 
02779         } //if (c2)
02780 
02781       } //if ( tobj->InheritsFrom( TPad::Class() ) )
02782 
02783     } //else if ( obj->InheritsFrom( CObject::Class() ) ) 
02784 
02785 
02786     //ChangeCanvasNameTitle( CurrentCanvas );
02787 
02788     gPadSav->cd();
02789     /*
02790     gPadSav->Modified();
02791     gPadSav->Update();
02792     */
02793     CurrentCanvas->Modified();
02794     CurrentCanvas->Update();
02795 
02796 
02797     //cout << "Drawing done" << endl << endl;
02798       
02799   } //if (obj)
02800 
02801 
02802 }

void HistoDisplay::DrawOnTheCanvas const char *  canvasname,
const char *  canvastitle,
int  padx,
int  pady,
TObject *  obj
[private]
 

Definition at line 4321 of file HistoDisplay.cxx.

References CHistogram::Draw().

Referenced by DrawContentHisto().

04324 {
04325   //cout << " In DrawOnTheCanvas" << endl;
04326   if (!obj) return;
04327 
04328   TPad *padsav  = (TPad*)gPad;
04329 
04330   TCanvas *canvas;
04331 
04332   canvas = 
04333     (TCanvas*) ( gROOT->GetListOfCanvases()->FindObject( canvasname ) );
04334 
04335   if (!canvas) {
04336     canvas = new TCanvas( canvasname, canvastitle, padx, pady);
04337   }
04338   else {
04339     //canvas->SetWindowSize( padx, pady);
04340     canvas->cd();
04341     canvas->Clear();
04342   } //if (!canvas)
04343 
04344   obj->Draw();
04345 
04346   canvas->Modified();
04347   canvas->Update();
04348 
04349   padsav->cd();
04350 
04351 }

void HistoDisplay::DrawTH1 TH1 *  histo,
Option_t *  option,
TVirtualPad *  backpad
[private]
 

Definition at line 3044 of file HistoDisplay.cxx.

References CObject::Draw(), and option.

Referenced by DrawHisto().

03046 {
03047   //cout << " In DrawTH1" << endl;
03048 
03049   if ( !histo || !BackPad ) return;
03050   //BackPad->Clear(); // Done by TH1::Draw()
03051   //RecursivePadClear( BackPad );
03052 
03053   BackPad->cd();
03054 
03055   //histo->Draw(option);
03056 
03057   histo->Draw();
03058   histo->SetDrawOption( option );
03059 
03060   //cout << " End of DrawTH1 " << endl;
03061 
03062 }

void HistoDisplay::DrawTPad TPad *  pad1,
TVirtualPad *  pad2
[private]
 

Definition at line 3068 of file HistoDisplay.cxx.

References RecursivePadClear().

Referenced by DrawHisto(), and DrawUpdatedPad().

03069 {
03070   //  cout << " In DrawTPad  " << endl;
03071 
03072   if ( !DrawnPad || !BackPad ) return;
03073 
03074   //copy pad attributes
03075   BackPad->Range( DrawnPad->GetX1(), DrawnPad->GetY1(),
03076                   DrawnPad->GetX2(), DrawnPad->GetY2() );
03077   BackPad->SetTickx( DrawnPad->GetTickx() );
03078   BackPad->SetTicky( DrawnPad->GetTicky() );
03079   BackPad->SetGridx( DrawnPad->GetGridx() );
03080   BackPad->SetGridy( DrawnPad->GetGridy() );
03081   BackPad->SetLogx( DrawnPad->GetLogx() );
03082   BackPad->SetLogy( DrawnPad->GetLogy() );
03083   BackPad->SetLogz( DrawnPad->GetLogz() );
03084   BackPad->SetBorderSize( DrawnPad->GetBorderSize() );
03085   BackPad->SetBorderMode( DrawnPad->GetBorderMode() );
03086   DrawnPad->TAttLine::Copy( (TAttLine&)*BackPad );
03087   DrawnPad->TAttFill::Copy( (TAttFill&)*BackPad );
03088   DrawnPad->TAttPad::Copy( (TAttPad&)*BackPad );
03089 
03090 
03091   TList *list = DrawnPad->GetListOfPrimitives();
03092   TIter next( list );
03093   TObject *objInPad;
03094 
03095   //  BackPad->Clear();
03096      RecursivePadClear( BackPad );
03097 
03098 
03099   //  BackPad->cd();
03100 
03101 
03102   while( ( objInPad = next() ) ) {
03103     BackPad->cd(); // this is absolutely necessary in compiled mode.
03104     // and just before Draw(). Learned hard way.
03105     // Seemed not true for newer ROOT version.
03106 
03107     //    objInPad->Print();
03108     gROOT->SetSelectedPad( BackPad ); 
03109     // not BackPad->cd() but this for primitiveList->Add
03110 
03111     // objInPad->DrawClone(); // Best choise to draw all in DrawnPad.
03112     // But does not draw them on additional pad made here.
03113     // Not allowed to change pad size. 
03114 
03115     //  objInPad->Clone()->Draw();
03116 
03117         BackPad->GetListOfPrimitives()
03118       //->Add( objInPad->Clone(), objInPad->GetDrawOption() );
03119         ->Add( objInPad->Clone(), next.GetOption() );
03120 
03121   } // while( objInPad = next() )
03122 
03123   BackPad->Modified();
03124   delete objInPad;
03125 
03126 }

void HistoDisplay::DrawUpdatedPad TVirtualPad *  currentPad  )  [private]
 

Definition at line 3530 of file HistoDisplay.cxx.

References DrawTPad(), fDisplayedList, CObject::GetInputSource(), CObject::GetTObject(), and UpdateHistoList().

Referenced by UpdatePad().

03531 {
03532   //  cout << " In DrawUpdatedPad " << endl;
03533 
03534   if ( ! currentPad ) return;
03535 
03536   //if ( currentPad != currentPad->GetCanvas() ) {
03537 
03538     const char *name = currentPad->GetName();
03539 
03540     TObject *objP = fDisplayedList->FindObject( name );
03541  
03542     if ( objP && objP->InheritsFrom( CObject::Class() ) ) {
03543 
03544       const TObject *inputObj = ( (CObject*)objP )->GetInputSource();
03545       CObject *objNew = UpdateHistoList( name, inputObj );
03546 
03547       if ( objNew ) {
03548         TObject *tobj =  objNew->GetTObject();
03549         
03550         if ( tobj->InheritsFrom( TPad::Class() ) ) {
03551            DrawTPad( (TPad*)tobj, currentPad );
03552           //      ReplacePad( (TPad*)tobj, currentPad );
03553            //     cout << "In here - replace pad\n";
03554           //      delete name;
03555          
03556                   return;
03557         } //if ( tobj->InheritsFrom( TPad::Class() ) )
03558        
03559       } //if ( objNew )
03560 
03561     } //if ( objP && objP->InheritsFrom( CObject::Class() ) )
03562 
03563     //} //if ( currentPad != currentPad->GetCanvas() )
03564 
03565 
03566   //TFrame *frame = currentPad->GetFrame();
03567 
03568   TObjOptLink *lnk = (TObjOptLink*)currentPad
03569     ->GetListOfPrimitives()
03570     ->FirstLink();
03571 
03572   while( lnk ) {
03573 
03574     TObject *obj = lnk->GetObject();
03575 
03576     if ( obj->InheritsFrom(TPad::Class()) ) {
03577 
03578       DrawUpdatedPad( (TPad*)obj );
03579         
03580     } //if ( obj->InheritsFrom(TPad::Class()) )
03581 
03582     else {
03583 
03584       if ( obj->InheritsFrom(TH1::Class()) ) {
03585 
03586         TObject *obj2 = fDisplayedList->FindObject(obj->GetName());
03587         
03588         if ( obj2 && obj2->InheritsFrom(CObject::Class()) ) {
03589 
03590           const TObject *inputObj = ((CObject*)obj2)->GetInputSource();
03591 
03592           CObject *objNew = UpdateHistoList(obj2->GetName(), inputObj);
03593 
03594           //objNew->ls();
03595 
03596           if (objNew && objNew->InheritsFrom(CHistogram::Class()) ) {
03597 
03598             //gROOT->SetSelectedPad( currentPad );
03599 
03600             TH1 *histo = (TH1*) (((CHistogram*)objNew)->SubtractedHisto());
03601             //TH1 *histo =  ( (CHistogram*)objNew )->GetHistoDrawn();
03602 
03603             if ( histo ) {
03604 
03605               //tmp
03606               if ( ! currentPad->GetPadPaint() ) {
03607 
03608                 TH1 *histoOld = (TH1*)obj;
03609                 histoOld->Reset();
03610                 histoOld->Add(histo);
03611 
03612                 TAxis *xaxis = histo->GetXaxis();
03613                 if ( xaxis ) {
03614                   char *title = new char[ strlen( xaxis->GetTitle() ) + 1 ];
03615                   strcpy( title, xaxis->GetTitle() ); 
03616                   histoOld->SetXTitle( title );
03617                   delete [] title;
03618                 } //if ( xaxis )
03619                 TAxis *yaxis = histo->GetYaxis();
03620                 if ( yaxis ) {
03621                   char *title = new char[ strlen( yaxis->GetTitle() ) + 1 ];
03622                   strcpy( title, yaxis->GetTitle() ); 
03623                   histoOld->SetYTitle( title );
03624                   delete [] title;
03625                 } //if ( yaxis )
03626                 TAxis *zaxis = histo->GetZaxis();
03627                 if ( zaxis ) {
03628                   char *title = new char[ strlen( zaxis->GetTitle() ) + 1 ];
03629                   strcpy( title, zaxis->GetTitle() ); 
03630                   histoOld->SetZTitle( title );
03631                   delete [] title;
03632                 } //if ( zaxis ) 
03633 
03634                 delete histo;
03635 
03636                 currentPad->Modified();
03637 
03638               } //if ( ! currentPad->GetPadPaint() )
03639               else
03640                 cout << " Pad is being paianted. Not updated. " << endl;
03641 
03642             } //if ( histo ) 
03643 
03644           } //if (objNew && objNew->InheritsFrom(CHistogram::Class()) )
03645 
03646         } //if ( obj2 && obj2->InheritsFrom(CObject::Class()) )
03647 
03648       } //if ( obj->InheritsFrom(TH1::Class()) )
03649 
03650       /*
03651       else if ( !( frame->IsEqual( obj ) ) ) {
03652 
03653       } //else if ( !( frame->IsEqual( obj ) ) )
03654       */
03655 
03656     } //else //if ( obj->InheritsFrom(TPad::Class()) )
03657 
03658    lnk = (TObjOptLink*) ( lnk->Next() );
03659 
03660   } //  while( lnk ) 
03661 
03662   // delete name;
03663 
03664   //  cout << " End of DrawUpdatedPad " << endl;
03665 }

void HistoDisplay::DuplicateCanvasSize TCanvas *  guicanvas,
TCanvas *  consumercanvas
[private]
 

Definition at line 3015 of file HistoDisplay.cxx.

03017 {
03018   //cout << " In DuplicateCanvasSize " << endl;
03019 
03020   if ( !guicanvas || !consumercanvas ) return;
03021   Int_t ww, wh;
03022 
03023   ww = consumercanvas->GetWindowWidth();
03024   wh = consumercanvas->GetWindowHeight();
03025 
03026   if ( !ww || !wh ) {
03027     ww = consumercanvas->GetWw() + 4;
03028     wh = consumercanvas->GetWh() + 28;
03029   } //if ( !ww || !wh )
03030 
03031   if ( ww && wh ) {
03032     guicanvas->SetWindowSize( ww, wh );
03033     guicanvas->Resize();
03034   } //if ( ww && wh )
03035 
03036 }

const char * HistoDisplay::FileDialogWindow  )  [private]
 

Definition at line 4526 of file HistoDisplay.cxx.

References fRaButMFile, fRaButRFile, and fRaButSocket.

Referenced by ProcessMessage().

04527 { 
04528 
04529   //const char *filetypes[] = { "All files",     "*",
04530   //                  "ROOT files",    "*.root",
04531   //                  "MAP files",     "*.map",
04532   //                  0,               0 };
04533 
04534 
04535   static TGFileInfo fi;
04536   //fi.fFileTypes = (char **)filetypes;
04537 
04538 
04539   //EInputTypes inputtype;
04540 
04541   if ( fRaButMFile->GetState() == kButtonDown ) {
04542     //inputtype = kTMapFile;
04543     const char* filetypes[] = { "MAP files",     "*.map",
04544                     "All files",     "*",
04545                     "ROOT files",    "*.root",
04546                     0,               0 };
04547     fi.fFileTypes = (const char **)filetypes;
04548   }
04549   else if ( fRaButRFile->GetState() == kButtonDown ) {
04550     //inputtype = kTFile;
04551     const char* filetypes[] = {"ROOT files",    "*.root",
04552                    "All files",     "*",
04553                    "MAP files",     "*.map",
04554                    0,               0 };
04555     fi.fFileTypes = (const char **)filetypes;
04556   }
04557   else if ( fRaButSocket->GetState() == kButtonDown ) {
04558     //inputtype = kTSocket;
04559     const char* filetypes[] = { "All files",     "*",
04560                     "ROOT files",    "*.root",
04561                     "MAP files",     "*.map",
04562                     0,               0 };
04563     fi.fFileTypes = (const char **)filetypes;
04564   }
04565 
04566 
04567 
04568   new TGFileDialog(gClient->GetRoot(), gClient->GetRoot(), kFDOpen, &fi);
04569 
04570   return fi.fFilename;
04571 }

void HistoDisplay::FileNameClear  )  [private]
 

Definition at line 4573 of file HistoDisplay.cxx.

References fFileNameBuffer, and fFileNameTextEntry.

Referenced by ProcessMessage().

04574 {
04575   //cout << " In File Name Clear " << endl;
04576   fFileNameBuffer->Clear();
04577   fFileNameTextEntry->SetState(kTRUE);
04578 }

CObject * HistoDisplay::GetCObjFromListItem TGListTreeItem *  item  )  [private]
 

Definition at line 2559 of file HistoDisplay.cxx.

References fDisplayedList, fHistoListTree, CObject::GetInputSource(), CObject::GetTitle(), CObject::SetInputSource(), and UpdateHistoList().

Referenced by ProcessMessage().

02560 {
02561   //cout << " In GetCObjFromListItem " << endl;
02562 
02563   if ( !item ) return 0;
02564 
02565   CObject *cobj = 0;
02566 
02567   //TVirtualPad *padsav = 0;
02568   //if ( gPad && !gROOT->GetListOfCanvases()->IsEmpty() ) padsav = gPad;
02569 
02570 
02571   TObject *obj = fDisplayedList->FindObject( item->GetText() );
02572 
02573   if ( !obj ) {
02574     if ( !item->GetFirstChild() ) {
02575       TObject *inputobj = (TObject*)item->GetUserData();
02576       if ( inputobj ) 
02577         cobj =  UpdateHistoList( item->GetText(), inputobj );
02578 
02579         if ( !cobj ) 
02580           //fHistoListTree->DeleteItem( item );
02581           cout <<  item->GetText() << " is not found." << endl;
02582         else
02583           fHistoListTree->SetToolTipItem( item, cobj->GetTitle() );
02584 
02585     } //if ( !item->GetFirstChild() )
02586   } //if ( !obj ) 
02587   else 
02588     if ( obj->InheritsFrom( CObject::Class() ) ) {
02589       cobj = ( CObject* )obj;
02590       const TObject *inputobj = (TObject*)item->GetUserData();
02591 
02592       if ( cobj->GetInputSource() != inputobj ) {
02593         //tmp
02594         //cout << " inputobj is changed " << endl;
02595         cobj->SetInputSource( inputobj );
02596 
02597       } //if ( cobj->GetInputSource() != inputobj ) 
02598         
02599     } //if ( obj->InheritsFrom( CObject::Class() ) )
02600 
02601 
02602 
02603   //if ( padsav ) padsav->cd();
02604 
02605 
02606   return cobj;
02607 
02608 }

TString HistoDisplay::GetDirPath const TString &   )  [private]
 

Definition at line 5438 of file HistoDisplay.cxx.

Referenced by AddToTree().

05439 {
05440   //cout << " GetDirPath " << endl;
05441 
05442   TString DirPath;
05443 
05444   DirPath = "/" + MonitorName ;
05445   //DirPath = "/";
05446 
05447   /*
05448   char *dirpath = new char[DirPath.Length()];
05449 
05450   cout << " DirPath in DirName" << DirPath.Data() << endl;
05451   strcpy(dirpath, DirPath.Data());
05452   cout << " dirpath in DirName" << dirpath << endl;
05453   return dirpath;
05454   */
05455 
05456   return DirPath;
05457 
05458 }

TObject * HistoDisplay::GetNewObj const char *  objName,
const TObject *  inputobj
[private]
 

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 4011 of file HistoDisplay.cxx.

References AddTreeItemsOfInput(), count, fChButtonSlideUpdate, fHistoListTree, fReadFileButton, CObject::GetName(), CObject::ReadObject(), Red, RefreshTreeItem(), Running, SearchWarningErrorFolder(), and SlideShowUpdate.

Referenced by MakeConsumerInfo(), and UpdateHistoList().

04012 {
04013   //cout << " In GetNewObj" << endl;
04014 
04015   TObject *obj = 0;
04016 
04017   if (inputobj) {
04018 
04019     if ( inputobj->IsA() == TMapFile::Class() )   {
04020       TMapFile *mfile = (TMapFile*)inputobj;
04021       if (mfile) obj = (TObject*)mfile->Get( objName );
04022     }
04023     else if ( inputobj->IsA() == TFile::Class() )   {
04024       TFile *rfile = (TFile*)inputobj;
04025       if (rfile) obj = (TObject*)rfile->Get( objName );
04026     }
04027     else if ( inputobj->IsA() == TSocket::Class() )   {
04028       TSocket *socket = (TSocket*)inputobj;
04029 
04030       if ( socket && socket->IsValid() ) {
04031 
04032         Int_t count = 0;
04033         Int_t maxcount = 8; 
04034 
04035         while ( !obj && count < maxcount ) {
04036 
04037           socket->Send( objName );
04038           TMessage *message = NULL;
04039 
04040           Int_t resRecv;
04041           resRecv = socket->Recv(message);
04042           //cout << "resRecv: " << resRecv << endl;
04043           if (resRecv == -1) {
04044             cerr << " HistoDisplay: ERROR:"
04045                  << " Socket->Receive failed. resRecv = " << resRecv << ".\n" 
04046                  << "    ==> Closing the socket connection." << ".\n"
04047                  << "    ==> Please open again. "
04048                  << endl;
04049             socket->Close();
04050             Running = kFALSE;
04051             fReadFileButton->ChangeBackground(Red);  
04052             //  cout << "Button changed to red\n";
04053             gClient->NeedRedraw(fReadFileButton);
04054             count = maxcount;      // Stop the request loop
04055           } //if (resRecv == -1)
04056           else {
04057             if (message) {
04058               if (message->What() == kMESS_OBJECT) {
04059                 obj = (TObject*)message->ReadObject(message->GetClass());
04061                 // The following was added: //2001/01/16 Wolfgang Wagner
04062                 if (obj) {
04063                   if (TString(obj->GetName()) != TString(objName))
04064                     cerr << "ERROR: Got object: " << obj->GetName()
04065                           << " but requested " << objName << "." << endl;
04066                 }
04068               }
04069               else {
04070                 if (message->What() == kMESS_STRING) {          
04071                   int messLength = message->BufferSize() + 10; 
04072                   char* keyString = new char[messLength];
04073                   message->ReadString(keyString,messLength);                  
04074                   string serverString(keyString);
04075                   delete keyString;
04076                   keyString = 0;
04077                   // We got a message string from Display Server 
04078                   // indicating a special request.
04079                   // Now we need to decode the string.
04080                   // The key strings are defined in ServerProtocol.hh
04081                   //
04082                   bool localDebug = false;
04083                   if (localDebug) {
04084                     cout << "HistoDisplay: got string: " << serverString
04085                          << "." << endl;
04086                   } 
04087                   if (serverString == DspEndConnection) {
04088                     cout << "HistoDisplay: The Display Server ended the "
04089                          << "connection." << endl;
04090                     count = maxcount;
04091                     socket->Close();
04092                     Running = kFALSE;
04093                     fReadFileButton->ChangeBackground(Red); 
04094                     // cout << "Button changed to red\n";            
04095                     gClient->NeedRedraw(fReadFileButton);
04096                     fChButtonSlideUpdate->SetState(kButtonUp);
04097                     SlideShowUpdate = kFALSE;
04098                   }
04099                   if (serverString == DspObjectNotFound) {
04100                     cerr << "HistoDisplay: The requested object '"
04101                          << objName << "' is not available from the "
04102                          << endl;
04103                     cerr << "Display Server." << endl;
04104                     count = maxcount;                      
04105                   }
04106                   if (serverString == DspRequestNewInfo) {
04107                     if (localDebug) {
04108                       cout << "HistoDisplay: The Display Server suggests "
04109                            << "to request the TConsumerInfo." << endl;
04110                     }  
04111                     //TConsumerInfo* locInfo = MakeConsumerInfo(socket); 
04112                     //DelTreeItemsOfInput( socket );
04113                     AddTreeItemsOfInput( socket );
04114                     RefreshTreeItem( fHistoListTree->GetFirstItem() );
04115                     SearchWarningErrorFolder
04116                       ( fHistoListTree->GetFirstItem(), socket );
04117                     fClient->NeedRedraw( fHistoListTree );
04118                   }
04119                 } 
04120               }
04121             }
04122           } //else //if (resRecv == -1)
04123 
04124           delete message;
04125           count++;
04126         } //while ( !obj && count < maxcount )
04127 
04128         if ( ! obj ) {
04129           cout << " Failed to get " << objName << endl;
04130         fReadFileButton->ChangeBackground(Red);
04131         gClient->NeedRedraw(fReadFileButton);
04132         fChButtonSlideUpdate->SetState(kButtonUp);
04133         SlideShowUpdate = kFALSE;
04134         //      cout << "Button changed to red\n";
04135         } //if ( ! obj )
04136         else {
04137           if ( count > 1 ) cout << " The object " << objName 
04138                                 << " is sent from the socket by " << count
04139                                 << " tries." << endl;
04140         } //else of if ( ! obj )
04141 
04142       } //if ( socket && socket->IsValid() )
04143       else {
04144         cout << "no connection to socket..."
04145              << socket->GetName() << endl;
04146         Running = kFALSE;
04147         fReadFileButton->ChangeBackground(Red);
04148         gClient->NeedRedraw(fReadFileButton);
04149         fChButtonSlideUpdate->SetState(kButtonUp);
04150         SlideShowUpdate = kFALSE;
04151         //   cout << "Button changed to red\n";
04152       } //else //if ( socket && socket->IsValid() )
04153 
04154     } // TMapFile,TFile, TSocket 
04155     else {
04156 
04157       cout << " No inputobj " << endl;
04158 
04159     } //else // TMapFile,TFile, TSocket
04160 
04161   } // if(inputobj)
04162 
04163   //tmp
04164   //if ( !obj ) cout << " No object found " << endl;
04165 
04166   return obj;
04167 
04168 }

void HistoDisplay::HistoDisplayMain Int_t  autoOpen = 0  )  [private]
 

TH1 * HistoDisplay::HistoInPad TVirtualPad *  pad,
Int_t &  counthisto
[private]
 

Definition at line 4231 of file HistoDisplay.cxx.

Referenced by ProcessMessage().

04232 {
04233   //cout << " In HistoInPad " << endl;
04234 
04235   if ( !pad ) return 0;
04236 
04237   TList *primitiveList = pad->GetListOfPrimitives();
04238   TIter next( primitiveList );
04239 
04240   TH1 *histo = 0;
04241 
04242   TObject *obj;
04243   while ( ( obj = next() ) && ( counthisto <= 1 ) ) {
04244 
04245     if ( obj->InheritsFrom( TH1::Class() ) ) {
04246       counthisto++ ;
04247       if ( counthisto == 1 ) histo = (TH1*)obj;
04248     } //if ( obj->InheritsFrom( TH1::Class() ) )
04249 
04250     if ( obj->InheritsFrom( TPad::Class() ) )
04251       histo = HistoInPad( (TPad*)obj , counthisto );
04252 
04253   } //while ( ( obj = next() ) && ( counthisto <= 1 ) )
04254 
04255   if ( counthisto >= 2 ) return 0;
04256 
04257   return histo;
04258 
04259 }

TConsumerInfo * HistoDisplay::MakeConsumerInfo const char *  consumername,
const char *  filename
[private]
 

Definition at line 1572 of file HistoDisplay.cxx.

References TConsumerInfo::addObject(), getword(), infile, TConsumerInfo::setInputName(), TConsumerInfo::setNevents(), TConsumerInfo::setRunNumber(), and strdelete().

01573 {
01574   //cout << " In Make ConsumerInfo( file ) " << endl;
01575   //cout << TheConsumerName << " " << filename << endl;
01576 
01577   //if ( !TheConsumerName || !filename ) return 0;
01578   if ( ( strlen( TheConsumerName ) == 0 ) || !filename ) return 0;
01579 
01580   TConsumerInfo *info = 0;
01581 
01582   const int maxsize = 256;
01583   ifstream infile( filename );
01584 
01585   if ( infile ) {
01586 
01587     do {
01588       char str[ maxsize ];
01589       infile.getline( str, maxsize - 1 );
01590 
01591       // ConsumerInfo --
01592       if ( char *pos = const_cast<char*>(strstr( str, "ConsumerInfo ")) ) {
01593 
01594         char *ConsumerName = 0;
01595         ConsumerName =  getword( pos + strlen( "ConsumerInfo " ) ); 
01596 
01597         if ( !strcmp( ConsumerName, TheConsumerName ) ) {
01598 
01599           //tmp
01600           //cout << " ConsumerName = " << ConsumerName << endl;
01601 
01602           info = new TConsumerInfo( "ConsumerInfo" );
01603 
01604           do {
01605             char str1[ maxsize ];
01606             infile.getline( str1, maxsize - 1 );
01607             // run: --
01608             if ( strstr( str1, "run:" ) ) {
01609               char *runstr = 0;
01610               runstr = getword( str1 + strlen( "run:" ) );
01611 
01612               int runnumber = 0;
01613               if ( runstr ) {
01614                 runnumber = atoi( runstr );
01615                 delete [] runstr;
01616               } //if ( runstr )
01617 
01618               //cout << " runnumber = " << runnumber << endl;
01619               info->setRunNumber( runnumber );
01620 
01621               if ( char *pos = const_cast<char*>(strstr( str1, "number of events:" )) ) {
01622                 char *nevstr = 0;
01623 
01624                 nevstr = getword( pos + strlen( "number of events:" ) );
01625 
01626                 int eventnumber = 0;
01627                 if ( nevstr ) {
01628                   eventnumber = atoi( nevstr );
01629                   delete [] nevstr;
01630                 } //if ( nevstr )
01631 
01632                 //cout << " eventnumber = " << eventnumber << endl;
01633                 info->setNevents( eventnumber );
01634 
01635 
01636               } //if ( char *pos = strstr( str1, "number of events:" ) ) 
01637 
01638             }// if ( strstr( str1, "run:" ) )
01639 
01640             //--
01641             // TMapFile, TFile, TSocket -- 
01642             char *inputname = 0;
01643 
01644             if ( strstr( str1, "TMapFile:" ) ) {
01645 
01646               inputname = getword( str1 + strlen( "TMapFile:" ) ); 
01647               info->setInputName( TString( "TMapFile:" ) +
01648                                   TString( inputname ) );
01649 
01650             }// if ( strstr( str1, "TMapFile:" ) )
01651             else if  ( strstr( str1, "TFile:" ) ) {
01652 
01653               inputname = getword( str1 + strlen( "TFile:" ) ); 
01654               info->setInputName( TString( "TFile:" ) +
01655                                   TString( inputname ) );
01656 
01657             }// else if ( strstr( str1, "TFile:" ) )
01658             else if  ( strstr( str1, "TSocket:" ) ) {
01659 
01660               inputname = getword( str1 + strlen( "TSocket:" ) ); 
01661               info->setInputName( TString( "TSocket:" ) +
01662                                   TString( inputname ) );
01663 
01664             } //else if  ( strstr( str1, "TSocket:" ) ) 
01665 
01666             if ( inputname ) {
01667 
01668               //cout << " InputName = " << inputname << endl;
01669               //info->setInputName( TString( inputname ) );
01670 
01671 
01672               delete [] inputname;
01673             } //if ( inputname )
01674 
01675             //--
01676             // objects: --
01677             if ( strstr( str1, "objects:" ) ) {
01678 
01679               do {
01680                 char str2[ maxsize ];
01681                 infile.getline( str2, maxsize - 1 );
01682 
01683                 if ( str2 && ( strlen( str2 ) > 0 ) 
01684                      && !strstr( str2, "ConsumerInfo" ) ) {
01685 
01686                   char *path = 0;
01687                   char *name = 0;
01688 
01689                   char *pathname = getword( str2 );
01690 
01691                   //if ( pathname && ( *pathname != commentchar ) ) {
01692                   if ( pathname ) {
01693 
01694                     char *begin = str2 + strlen( pathname ) + 1;
01695 
01696                     char *pos = 0;
01697                     while ( ( pos = const_cast<char*>(strchr( pathname, '\"' ) )) && 
01698                             ( strchr( pos + 1, '\"' ) ) ) {
01699                       char *tmp = 0;
01700                       tmp = const_cast<char*>(strdelete( pathname, "\"" ));
01701                       delete [] pathname;
01702                       pathname = strdelete( tmp, "\"" );
01703                       delete [] tmp;
01704                     } // while ( strchr( pathname, '\"') )
01705 
01706 
01707                     if ( char *pos = const_cast<char*>( strrchr( pathname, '/')) ) {
01708                       pos++;
01709 
01710                       name = new char[ strlen( pos ) + 1 ];
01711                       strcpy( name, pos );
01712 
01713                       char tmpchr = *pos;
01714                       *pos = '\0';
01715 
01716                       path = new char[ strlen( pathname ) + 1 ];
01717                       strcpy( path, pathname );
01718 
01719                       *pos = tmpchr;
01720         
01721                     } //if ( path = strrchr( pathname, '/') )
01722                     else {
01723                       path = new char;
01724                       *path = '\0'; // was: path="" < mem leak
01725 
01726                       name = new char[ strlen( pathname ) + 1 ];
01727                       strcpy( name, pathname );
01728 
01729                     } //else //if ( path = strrchr( pathname, '/') )
01730 
01731 
01732                     int status = 999;
01733                     char *statusstr = getword( begin );
01734                     if ( statusstr ) {
01735                       delete [] statusstr;
01736                       status = atoi( statusstr );
01737                     } //if ( statusstr )
01738 
01739                     /*
01740                     cout << " path = " << path 
01741                          << " name = " << name 
01742                          << " status = " << status << endl;
01743                     */
01744                     info->addObject( TString( name ), TString( path ), status );
01745 
01746                     if ( pathname ) {
01747                       delete [] pathname;
01748                       pathname = 0;
01749                     }
01750                     if ( path ) {
01751                       delete [] path;
01752                       path = 0;
01753                     }
01754                     if ( name ) {
01755                       delete [] name;
01756                       name = 0;
01757                     }
01758 
01759 
01760                   } //if ( pathname && ( *pathname != commentchar ) )
01761                 } // if ( str2 && ( strlen( str2 ) > 0 ) )
01762                 else break;
01763 
01764               } while( !infile.eof() ); //str2
01765 
01766 
01767               break;
01768 
01769             } //if ( strstr( str1, "objects:" ) )
01770 
01771             //--
01772 
01773 
01774           } while ( !infile.eof() ); //str1
01775 
01776 
01777           if ( ConsumerName ) delete [] ConsumerName;
01778           break;
01779 
01780         }//if ( !strcmp( ConsumerName, TheConsumerName ) )
01781 
01782       } //if ( strstr( str, "ConsumerInfo") ) 
01783 
01784 
01785     } while ( !infile.eof() ); //str
01786 
01787     infile.close();
01788 
01789     if ( !info ) cout << " No info of " << TheConsumerName 
01790                       << " in " << filename << endl;
01791 
01792   } //if ( infile )
01793   else
01794     cout << " Failed to open file " << filename << endl;
01795 
01796   return info;
01797 
01798 }

TConsumerInfo * HistoDisplay::MakeConsumerInfo TObject *  inputobj  )  [private]
 

Definition at line 1514 of file HistoDisplay.cxx.

References GetNewObj().

Referenced by AddTreeItemsOfInput().

01515 {
01516   //cout << " In Make ConsumerInfo( inputobj ) " << endl;
01517 
01518   if ( !inputobj ) return 0;
01519 
01520   TConsumerInfo *info = 0;
01521   TObject *obj = 0;
01522 
01523   /*
01524   if ( inputobj->InheritsFrom( TMapFile::Class() ) ) {
01525     TMapFile *file = (TMapFile*) inputobj;
01526     obj =  file->Get("ConsumerInfo");
01527   } //if ( inputobj->InheritsFrom( TMapFile::Class() )
01528 
01529   else if ( inputobj->InheritsFrom( TFile::Class() ) ) {
01530     TFile *file = (TFile*) inputobj;
01531     obj =  file->Get("ConsumerInfo");
01532   } //if ( inputobj->InheritsFrom( TFile::Class() ) 
01533 
01534   else if ( inputobj->InheritsFrom( TSocket::Class() ) ) {
01535     TSocket *sock = (TSocket*) inputobj;
01536     if ( sock->IsValid() ) {
01537       //request TConsumerInfo
01538       TMessage *mess;
01539       sock->Send("ConsumerInfo");
01540       sock->Recv(mess);
01541       if ( mess ) {
01542         if ( mess->What() == kMESS_OBJECT) {
01543           obj = mess->ReadObject(mess->GetClass());
01544         } //if ( mess->What() == kMESS_OBJECT)
01545         delete mess;
01546       } //if ( mess )
01547     } //if ( sock->IsValid() )
01548   } //else if ( inputobj->InheritsFrom( TSocket::Class() ) )
01549 
01550   if ( obj && obj->InheritsFrom( TConsumerInfo::Class() ) ) {
01551     info = (TConsumerInfo*)obj;
01552     //info->print();
01553   } //if ( obj && obj->InheritsFrom( TConsumerInfo::Class() ) )
01554   */
01555 
01556 
01557   obj = GetNewObj( "ConsumerInfo", inputobj );
01558 
01559   if ( obj && obj->InheritsFrom( TConsumerInfo::Class() ) ) {
01560     info = (TConsumerInfo*)obj;
01561     //info->print();
01562   } //if ( obj && obj->InheritsFrom( TConsumerInfo::Class() ) )
01563 
01564 
01565 
01566   return info;
01567 }

void HistoDisplay::MakeHistoList TObject *  inpuobj  )  [private]
 

Definition at line 1899 of file HistoDisplay.cxx.

References fHistoList, MakeHistoListM(), MakeHistoListR(), and MakeHistoListS().

Referenced by AddTreeItemsOfInput().

01900 {
01901   //cout << " In MakeHistoList " << endl;
01902 
01903   if ( ! inputobj ) return ;
01904 
01905   if ( fHistoList && !( fHistoList->IsEmpty( )) ) fHistoList->Clear();
01906 
01907   if ( inputobj->IsA() == TMapFile::Class() ) {
01908     MakeHistoListM( (TMapFile*) inputobj );
01909   }
01910   else if ( inputobj->IsA() == TFile::Class() ) {
01911     MakeHistoListR( (TFile*) inputobj );
01912   }
01913   else if ( inputobj->IsA() == TSocket::Class() ) {
01914     MakeHistoListS( (TSocket*) inputobj );
01915   }
01916 
01917 }

void HistoDisplay::MakeHistoListM TMapFile *  MFile  )  [private]
 

Definition at line 1919 of file HistoDisplay.cxx.

References fHistoList.

Referenced by MakeHistoList().

01920 {
01921   if ( ! MFile ) return ;
01922 
01923   TMapRec *mr = MFile->GetFirst();
01924   while( MFile->OrgAddress(mr) ) {
01925     TString name = mr->GetName();
01926     TObject * obj = 0;
01927     obj = (TObject*)MFile->Get(name.Data(),obj);
01928     if ( obj && obj->InheritsFrom(TH1::Class()) ||
01929          //obj->InheritsFrom(TPad::Class()) ) {
01930          obj->InheritsFrom(TCanvas::Class()) ) {
01931       fHistoList->Add(obj);
01932     }
01933     mr = mr->GetNext();
01934   }
01935 }

void HistoDisplay::MakeHistoListR TFile *  RFile  )  [private]
 

Definition at line 1937 of file HistoDisplay.cxx.

References fHistoList.

Referenced by MakeHistoList().

01938 {
01939   if ( ! RFile ) return ;
01940 
01941   TIter next(RFile->GetListOfKeys());
01942   TKey *key;
01943   TObject *obj=0;
01944   while ( ( key = (TKey*)next() )  ) {
01945     obj = (TObject*)RFile->Get(key->GetName());
01946     if ( obj &&  obj->InheritsFrom(TH1::Class()) ||
01947          //obj->InheritsFrom(TPad::Class()) ) {
01948          obj->InheritsFrom(TCanvas::Class()) ) {
01949       fHistoList->Add(obj);
01950     }
01951   }
01952 }

void HistoDisplay::MakeHistoListS TSocket *  sock  )  [private]
 

Definition at line 1954 of file HistoDisplay.cxx.

References fHistoList, and TConsumerInfo::updateList().

Referenced by MakeHistoList().

01955 {
01956   if ( ! sock ) return ;
01957 
01958   if ( sock->IsValid() ) {
01959       //request TConsumerInfo
01960       TMessage *mess;
01961       TConsumerInfo *info;
01962       sock->Send("ConsumerInfo");
01963       sock->Recv(mess);
01964       if ( mess ) {
01965       if ( mess->What() == kMESS_OBJECT)
01966         {
01967           info = (TConsumerInfo*)mess->ReadObject(mess->GetClass());
01968           if (!info) {
01969               cerr << "Null info from ReadObject!!!\n";
01970               return;
01971           }
01972           //info->print();
01973           info->updateList(fHistoList,sock);
01974           delete info;
01975         }
01976       delete mess;
01977       }
01978   }
01979 
01980 }

void HistoDisplay::MakeInputFrame  )  [private]
 

Definition at line 636 of file HistoDisplay.cxx.

References fChooseFileButton, fClearFileNameButton, fFileNameBuffer, fFileNameButtonFrame, fFileNameButtonFrameLayout, fFileNameButtonLayout, fFileNameFrame, fFileNameFrameLayout, fFileNameLabel, fFileNameLayout, fFileNameTextEntry, fFileOpenFrame, fFileOpenFrameLayout, fMainFrame, fport, fRaButLayout, fRaButMFile, fRaButRFile, fRaButSocket, fReadFileButton, fsocketserver, kM_BUTTON_CHOOSEFILE, kM_BUTTON_CLEARFILENAME, kM_BUTTON_FILENAME, kM_RABUTTON_MFILE, kM_RABUTTON_RFILE, kM_RABUTTON_SOCKET, kM_TEXTENTRY_FILENAME, LightYellow, and Red.

00637 {
00638   // Input stream Frame --
00639 
00640   fFileNameFrame =
00641     //new TGGroupFrame(fMainFrame, "Input Stream", kVerticalFrame);
00642     new TGGroupFrame(fMainFrame, "Add Input Stream", kVerticalFrame);
00643   fFileNameFrameLayout =
00644     //new TGLayoutHints( kLHintsTop | kLHintsLeft, 2, 2, 2, 2);
00645     new TGLayoutHints( kLHintsTop | kLHintsLeft | kLHintsExpandX
00646                        , 4, 4, 2, 2);
00647 
00648   // Radio Buttons --
00649   fRaButMFile =
00650     new TGRadioButton(fFileNameFrame,
00651                        "Memory Map File", kM_RABUTTON_MFILE);
00652   fRaButRFile =
00653     new TGRadioButton(fFileNameFrame, 
00654                        "Other ROOT File", kM_RABUTTON_RFILE);
00655   fRaButSocket =
00656     new TGRadioButton(fFileNameFrame,
00657                        "Socket Connection", kM_RABUTTON_SOCKET);
00658   fRaButLayout =
00659     new TGLayoutHints(kLHintsTop | kLHintsLeft, 2,2,2,2);
00660 
00661   fRaButMFile->Associate(this);
00662   fRaButRFile->Associate(this);
00663   fRaButSocket->Associate(this);
00664 
00665   fFileNameFrame->AddFrame(fRaButMFile, fRaButLayout);
00666   fFileNameFrame->AddFrame(fRaButRFile, fRaButLayout);
00667   fFileNameFrame->AddFrame(fRaButSocket, fRaButLayout);
00668 
00669   fRaButMFile->SetState(kButtonUp);
00670   //fRaButRFile->SetState(kButtonDown);
00671   fRaButRFile->SetState(kButtonUp);
00672   //fRaButSocket->SetState(kButtonUp);
00673   fRaButSocket->SetState(kButtonDown);
00674 
00675   /*
00676   RaButMFileOn = kFALSE;
00677   RaButRFileOn = kTRUE;
00678   RaButSocketOn = kFALSE;
00679 
00680   MFileOpen = kFALSE;
00681   RFileOpen = kFALSE;
00682   sockOpen = kFALSE;
00683   */
00684   //InputOpen = kFALSE;
00685   //--
00686 
00687 
00688   // File Name --
00689   fFileNameLayout =
00690     new TGLayoutHints( kLHintsTop | kLHintsLeft, 3,3,2,2);
00691 
00692   // Label --
00693   fFileNameLabel = 
00694     new TGLabel( fFileNameFrame, "Name of File / Socket Server:Port" );
00695   fFileNameFrame->
00696     AddFrame( fFileNameLabel, fFileNameLayout );
00697 
00698   //--
00699 
00700   // File Name Text Buffer --
00701   fFileOpenFrame =
00702     new TGCompositeFrame(fFileNameFrame, 60, 20, kHorizontalFrame);
00703   fFileOpenFrameLayout =
00704     new TGLayoutHints( kLHintsTop | kLHintsLeft, 2,2,2,2);
00705 
00706   fFileNameTextEntry =
00707     new TGTextEntry( fFileOpenFrame, 
00708                      fFileNameBuffer = new TGTextBuffer(320),
00709                      kM_TEXTENTRY_FILENAME );
00710   char sstext[80];
00711  
00712 
00713   sprintf(sstext,"%s:%d",fsocketserver,fport);
00714  
00715 
00716   fFileNameBuffer->AddText(0,sstext);
00717   fFileNameTextEntry->
00718     Resize(340,fFileNameTextEntry->GetDefaultHeight());
00719   fFileOpenFrame->
00720     AddFrame( fFileNameTextEntry, fFileNameLayout );
00721 
00722   fReadFileButton =
00723     new TGTextButton(fFileOpenFrame,"Open", kM_BUTTON_FILENAME);
00724   fReadFileButton->Associate(this);
00725 
00726   fReadFileButton->SetToolTipText("Open local/remote file or socket.");
00727 
00728   //gClient->GetColorByName("LightYellow",LightYellow);
00729   fReadFileButton->ChangeBackground(Red);
00730   //  cout << "Button changed to red\n";
00731   fFileOpenFrame->
00732     AddFrame( fReadFileButton, fFileNameLayout );
00733 
00734   fFileNameFrame->
00735     AddFrame( fFileOpenFrame, fFileOpenFrameLayout );
00736   //--
00737 
00738 
00739   // Choose File, Clear buttons. --
00740   fFileNameButtonFrame =
00741     new TGCompositeFrame(fFileNameFrame, 60, 70, kHorizontalFrame);
00742 
00743   fFileNameButtonFrameLayout =
00744     //new TGLayoutHints( kLHintsTop | kLHintsLeft, 2,2,2,2);
00745     new TGLayoutHints( kLHintsTop | kLHintsLeft, 2,2,2,0);
00746 
00747   fFileNameButtonLayout =
00748     new TGLayoutHints( kLHintsLeft, 3,3,2,2);
00749 
00750 
00751   fChooseFileButton =
00752     new TGTextButton(fFileNameButtonFrame,"Choose File",
00753                      kM_BUTTON_CHOOSEFILE);
00754   fChooseFileButton->SetToolTipText("Choose Local file");
00755 
00756   fChooseFileButton->Associate(this);
00757 
00758   fFileNameButtonFrame->
00759     AddFrame( fChooseFileButton,
00760               //new TGLayoutHints(kLHintsTop | kLHintsCenterX, 3,5,2,2));
00761               new TGLayoutHints(kLHintsTop | kLHintsCenterX, 3,5,2,0));
00762 
00763   fChooseFileButton->ChangeBackground(LightYellow);
00764 
00765 
00766   fClearFileNameButton =
00767     new TGTextButton(fFileNameButtonFrame,"     Clear    ",
00768                      kM_BUTTON_CLEARFILENAME);
00769 
00770   fClearFileNameButton->SetToolTipText("Clear Input Source Name");
00771 
00772   fClearFileNameButton->Associate(this);
00773 
00774   fFileNameButtonFrame->
00775     AddFrame( fClearFileNameButton, 
00776               //new TGLayoutHints(kLHintsTop | kLHintsRight, 3,5,2,2));
00777               new TGLayoutHints(kLHintsTop | kLHintsRight, 3,5,2,0));
00778 
00779   fClearFileNameButton->ChangeBackground(LightYellow);
00780 
00781 
00782   fFileNameFrame->
00783     AddFrame( fFileNameButtonFrame, fFileNameButtonFrameLayout );
00784   //--
00785 
00786 
00787 
00788   fMainFrame->
00789     AddFrame( fFileNameFrame, fFileNameFrameLayout  );
00790   //--
00791 }

void HistoDisplay::MakeMenuBar  )  [private]
 

Definition at line 481 of file HistoDisplay.cxx.

References fConnectMenu, fFileMenu, fHelpMenu, fListTreeMenu, fMenuBar, fMenuBarHelpLayout, fMenuBarItemLayout, fMenuBarLayout, fMenuBarSeparator, fMenuBarSeparatorLayout, fNewCascadeMenu, fSortCascadeMenu, kM_MENU_CONNECT_STATUS, kM_MENU_FILE_CLOSE, kM_MENU_FILE_EXIT, kM_MENU_FILE_NEWCANVAS, kM_MENU_FILE_NEWGUI, kM_MENU_FILE_NEWSLIDE, kM_MENU_HELP_CANVAS, kM_MENU_HELP_GUI, kM_MENU_HELP_ROOT, kM_MENU_LISTTREE_CLEAR, kM_MENU_LISTTREE_DELETE, kM_MENU_LISTTREE_REFRESH, kM_MENU_LISTTREE_SORTFOLDER, and kM_MENU_LISTTREE_SORTTREE.

00482 {
00483   // File Menu --
00484   fFileMenu = new TGPopupMenu( fClient->GetRoot() );
00485   fNewCascadeMenu = new TGPopupMenu( fClient->GetRoot() );
00486   fNewCascadeMenu->AddEntry( "&GUI", kM_MENU_FILE_NEWGUI );
00487   fNewCascadeMenu->AddEntry( "&Canvas", kM_MENU_FILE_NEWCANVAS );
00488   //fNewCascadeMenu->AddEntry( "&Slide Show Canvas", kM_MENU_FILE_NEWSLIDE );
00489   fNewCascadeMenu->AddEntry( "&Auto-Update Canvas", kM_MENU_FILE_NEWSLIDE );
00490   fFileMenu->AddPopup( "&New", fNewCascadeMenu );
00491   fFileMenu->AddSeparator();
00492   fFileMenu->AddEntry( "&Close", kM_MENU_FILE_CLOSE );
00493   fFileMenu->AddEntry( "&Exit", kM_MENU_FILE_EXIT );
00494   //--
00495 
00496   // List Tree --
00497   fListTreeMenu = new TGPopupMenu( fClient->GetRoot() );
00498   fSortCascadeMenu = new TGPopupMenu( fClient->GetRoot() );
00499   fSortCascadeMenu->AddEntry( "&Tree", kM_MENU_LISTTREE_SORTTREE );
00500   fSortCascadeMenu->AddEntry( "In &Folder", kM_MENU_LISTTREE_SORTFOLDER );
00501   fListTreeMenu->AddPopup( "&Sort", fSortCascadeMenu );
00502   fListTreeMenu->AddSeparator();
00503   fListTreeMenu->AddEntry( "&Delete", kM_MENU_LISTTREE_DELETE );
00504   fListTreeMenu->AddEntry( "&Clear", kM_MENU_LISTTREE_CLEAR );
00505   fListTreeMenu->AddEntry( "&Refresh", kM_MENU_LISTTREE_REFRESH );
00506   //--
00507 
00508   // Connection Menu --
00509   fConnectMenu = new TGPopupMenu( fClient->GetRoot() );
00510   fConnectMenu->AddLabel( "CDF Monitors");
00511   fConnectMenu->AddSeparator();
00512   /*
00513   fConnectMenu->AddEntry( "&YMON", kM_MENU_CONNECT_MON1 );
00514   fConnectMenu->AddEntry( "&TRIGMON", kM_MENU_CONNECT_MON2 );
00515   fConnectMenu->AddEntry( "&LUMMON", kM_MENU_CONNECT_MON3 );
00516   fConnectMenu->AddEntry( "&PHYSMON", kM_MENU_CONNECT_MON4 );
00517   fConnectMenu->AddEntry( "&SPY", kM_MENU_CONNECT_MON5 );
00518   */
00519   fConnectMenu->AddSeparator();
00520   fConnectMenu->AddEntry( "&Status", kM_MENU_CONNECT_STATUS );
00521   //--
00522 
00523   // Help Menu --
00524   fHelpMenu = new TGPopupMenu( fClient->GetRoot() );
00525   fHelpMenu->AddEntry( "&About This GUI", kM_MENU_HELP_GUI );
00526   fHelpMenu->AddSeparator();
00527   fHelpMenu->AddEntry( "&About ROOT", kM_MENU_HELP_ROOT );
00528   fHelpMenu->AddEntry( "&About Canvas", kM_MENU_HELP_CANVAS );
00529   //--
00530 
00531   // Associate Menu Commands --
00532   fFileMenu->Associate(this);
00533   fNewCascadeMenu->Associate(this);
00534   fListTreeMenu->Associate(this);
00535   fSortCascadeMenu->Associate(this);
00536   fConnectMenu->Associate(this);
00537   fHelpMenu->Associate(this);
00538   //--
00539 
00540   // Create Menu Bar --
00541   fMenuBar = new TGMenuBar( this, 1, 1, kHorizontalFrame );
00542   fMenuBarLayout = 
00543     new TGLayoutHints( kLHintsTop | kLHintsLeft | kLHintsExpandX,
00544                        0, 0, 1, 1);
00545   fMenuBarItemLayout =
00546     new TGLayoutHints( kLHintsTop | kLHintsLeft, 0, 4, 0, 0 );
00547   fMenuBarHelpLayout =
00548     new TGLayoutHints( kLHintsTop | kLHintsRight );
00549 
00550   fMenuBar->AddPopup( "&File", fFileMenu, fMenuBarItemLayout );
00551   fMenuBar->AddPopup( "&List Tree", fListTreeMenu, fMenuBarItemLayout );
00552   fMenuBar->AddPopup( "&Connection", fConnectMenu, fMenuBarItemLayout );
00553   fMenuBar->AddPopup( "&Help", fHelpMenu, fMenuBarHelpLayout );
00554 
00555   AddFrame( fMenuBar, fMenuBarLayout );
00556   //--
00557 
00558   // Separator --
00559   fMenuBarSeparator = new TGHorizontal3DLine( this );
00560   fMenuBarSeparatorLayout =
00561     new TGLayoutHints( kLHintsTop | kLHintsExpandX );
00562   AddFrame( fMenuBarSeparator, fMenuBarSeparatorLayout );
00563   //--
00564 }

void HistoDisplay::MakeStatusBar  )  [private]
 

Definition at line 1220 of file HistoDisplay.cxx.

References fMainFrame, and fStatusBar.

01221 {
01222   Int_t parts[] = {20, 80};
01223   fStatusBar = new TGStatusBar(fMainFrame, 50, 10, kHorizontalFrame);
01224   fStatusBar->SetParts(parts, 2);
01225   fMainFrame->AddFrame(fStatusBar, new TGLayoutHints(kLHintsBottom| kLHintsExpandX));
01226 }

void HistoDisplay::MakeTGListTree const TString &  ,
TObject *  ,
const char *  tip = 0
[private]
 

Definition at line 2039 of file HistoDisplay.cxx.

References fHistoListTree.

Referenced by AddToTree(), and AddTreeItemsOfInput().

02043 {
02044   //cout << " In MakeTGListTree " << endl;
02045 
02046 
02047   while ( PathName.Contains("//") ) {
02048     TRegexp re("//+");
02049     PathName(re) = "/";
02050   }
02051 
02052   //cout << " PathName = " << PathName.Data() << endl;
02053 
02054   const int treemax = 10;
02055 
02056   int index[treemax];
02057 
02058   int PathLength = PathName.Length();
02059 
02060   int ii;
02061   int ind;
02062   for ( ii=0, ind = PathName.Index("/",1,0,TString::kExact) ;
02063         0 <= ind && ind <= PathLength ; ++ii ) {
02064     index[ii] = ind;
02065     ind = PathName.Index("/",1,ind+1,TString::kExact);
02066   }
02067 
02068   int nindex = ii;
02069   index[nindex] = PathLength;
02070 
02071   TString DirName;
02072   TString HistoName;
02073 
02074   TString CurPathName;
02075   TString CurParentName;
02076   TString CurItemName;
02077 
02078 
02079   TGListTreeItem *itemOrg= 0;
02080   itemOrg = fHistoListTree->FindItemByPathname( PathName.Data() );
02081 
02082   //if ( !fHistoListTree
02083   //->FindItemByPathname( PathName.Data() ) ) {
02084 
02085   if ( !itemOrg ) {
02086 
02087     if ( 1 < nindex ) {
02088 
02089       DirName = PathName( 0, index[nindex-1] );
02090       HistoName = PathName( index[nindex-1]+1, index[nindex] );
02091 
02092 
02093       if ( !fHistoListTree
02094           ->FindItemByPathname( DirName.Data() ) ) {
02095 
02096         for ( int i=0 ; i < nindex-1 ; ++i ) {
02097           CurPathName = DirName(0,index[i+1]);
02098 
02099           if ( !fHistoListTree
02100               ->FindItemByPathname( CurPathName.Data() ) ) {
02101 
02102             if ( i==0 ) { 
02103               CurItemName = DirName(index[i]+1,index[i+1]-index[i]-1);
02104               TGListTreeItem *item = 0;
02105               /*              
02106               fHistoListTree
02107                 ->AddItem( 0, CurItemName.Data() )
02108                 ->SetUserData(inputobj);
02109               */
02110               item = fHistoListTree
02111                 ->AddItem( 0, CurItemName.Data() );
02112               if ( item ) {
02113                 item->SetUserData(inputobj);
02114                 //if ( tip ) fHistoListTree->SetToolTipItem( item, tip );
02115               } // if ( item )
02116             } //if ( i==0 )
02117             else {
02118               CurParentName = DirName( 0, index[i]);
02119               CurItemName = DirName(index[i]+1,index[i+1]-index[i]-1);
02120               /*
02121               fHistoListTree
02122                 ->AddItem( fHistoListTree
02123                            ->FindItemByPathname( CurParentName.Data() ),
02124                            CurItemName.Data() )
02125                 ->SetUserData(inputobj);
02126               */
02127               TGListTreeItem *item = 0;
02128               item = fHistoListTree
02129                 ->AddItem( fHistoListTree
02130                            ->FindItemByPathname( CurParentName.Data() ),
02131                            CurItemName.Data() );
02132               if ( item ) {
02133                 item->SetUserData(inputobj);
02134                 //if ( tip ) fHistoListTree->SetToolTipItem( item, tip );
02135               } // if ( item )
02136 
02137             } // else //if ( i==0 )
02138           } // if ( !fHistoListTree...
02139         } //for ( int i=0 ; i < nindex-1 ; ++i )
02140       }//if ( !fHistoListTree...
02141 
02142       /*
02143       fHistoListTree
02144         ->AddItem( fHistoListTree->FindItemByPathname(DirName.Data()),
02145                    HistoName.Data() )
02146         ->SetUserData(inputobj);
02147       */
02148       TGListTreeItem *item = 0;
02149       item = fHistoListTree
02150         ->AddItem( fHistoListTree->FindItemByPathname(DirName.Data()),
02151                    HistoName.Data() );
02152       if ( item ) {
02153         item->SetUserData(inputobj);
02154         if ( tip ) fHistoListTree->SetToolTipItem( item, tip );
02155       } // if ( item )
02156 
02157     } //if ( 1 < nindex ) 
02158     else {
02159 
02160       HistoName = PathName( index[nindex-1]+1, index[nindex] );
02161       /*
02162       fHistoListTree
02163         ->AddItem( 0, HistoName.Data() )
02164         ->SetUserData(inputobj);
02165       */
02166       TGListTreeItem *item = 0;
02167       item = fHistoListTree
02168         ->AddItem( 0, HistoName.Data() );
02169       if ( item ) {
02170         item->SetUserData(inputobj);
02171         if ( tip ) fHistoListTree->SetToolTipItem( item, tip );
02172       } // if ( item )
02173 
02174 
02175     } //else // if ( 1 < nindex )
02176 
02177   } //  if ( !itemOrg ) 
02178   else {
02179     TObject *inputobjOrg = (TObject*) ( itemOrg->GetUserData() );
02180     if ( !inputobj->IsEqual( inputobjOrg ) ) {
02181       itemOrg->SetUserData(inputobj);
02182       if ( tip ) fHistoListTree->SetToolTipItem( itemOrg, tip );
02183     } //if ( !inputobj->IsEqual( inputobjOrg ) ) 
02184 
02185   } //else // if ( !itemOrg )
02186 }

void HistoDisplay::MakeTGListTreeFrame  )  [private]
 

Definition at line 820 of file HistoDisplay.cxx.

References AutoUpdate, fButtonFrame, fButtonFrameLayout, fButtonLayout, fChButtonAutoUpdate, fChButtonAutoUpdateLayout, fChButtonSlideUpdate, fClearHistoButton, fContentHistoButton, fControlButtonFrame, fControlButtonFrameLayout, fFrequencyFrame, fFrequencyFrameLayout, fFrequencyLabel, fFrequencyTextBuffer, fFrequencyTextEntry, fHistoButtonFrame, fHistoButtonFrameLayout, fHistoButtonGFrame, fHistoButtonGFrameLayout, fHistoButtonLayout, fHistoListFrame, fHistoListFrameLayout, fHistoListTree, fListButtonFrame, fListButtonFrameLayout, fListTreeMainFrame, fListTreeMainFrameLayout, fMainFrame, fMonitorNameBuffer, fMonitorNameLabel, fMonitorNameLayout, fMonitorNameTextEntry, fNewCanvasButton, fPauseHistoButton, fPrintHistoButton, fRestartHistoButton, fStopHistoButton, fTGCanvas, fTGCanvasLayout, fUnZeroHistoButton, fZeroHistoButton, kM_BUTTON_CANVAS, kM_BUTTON_CLEAR, kM_BUTTON_CONTENT, kM_BUTTON_PAUSE, kM_BUTTON_PRINT, kM_BUTTON_RESTART, kM_BUTTON_STOP, kM_BUTTON_UNZERO, kM_BUTTON_ZERO, kM_CHBUTTON_AUTOUPDATE, kM_CHBUTTON_SLIDEUPDATE, kM_TEXTENTRY_FREQUENCY, kM_TEXTENTRY_MONITORNAME, LightYellow, and SlideShowUpdate.

00821 {
00822   fListTreeMainFrame =
00823     new TGCompositeFrame(fMainFrame,200,300,kVerticalFrame);
00824   fListTreeMainFrameLayout =
00825     //new TGLayoutHints( kLHintsTop | kLHintsExpandX, 5, 5, 5, 5);
00826     new TGLayoutHints( kLHintsTop | kLHintsLeft |
00827                        kLHintsExpandX | kLHintsExpandY, 5, 5, 5, 5);
00828 
00829 
00830   // MonitorName --
00831   fMonitorNameLayout =
00832     new TGLayoutHints( kLHintsTop | kLHintsLeft, 2,2,2,2);
00833   //new TGLayoutHints( kLHintsTop | kLHintsLeft | kLHintsExpandX,
00834   //           2, 200, 2, 2);
00835 
00836   fMonitorNameLabel =
00837     new TGLabel( fListTreeMainFrame,
00838                  // " Location in List Tree " );
00839          " Consumer Name in \"ConsumerInfo.txt\" ( Optional User Control )" );
00840   fListTreeMainFrame->
00841     AddFrame( fMonitorNameLabel, fMonitorNameLayout );
00842 
00843   fMonitorNameTextEntry = 
00844     new TGTextEntry( fListTreeMainFrame,
00845                      fMonitorNameBuffer = new TGTextBuffer(256),
00846                      kM_TEXTENTRY_MONITORNAME );
00847   fMonitorNameTextEntry->
00848     Resize(260, fMonitorNameTextEntry->GetDefaultHeight());
00849 
00850   fListTreeMainFrame->
00851     AddFrame( fMonitorNameTextEntry, fMonitorNameLayout );
00852   //--
00853 
00854 
00855 
00856   // Make List Tree Frame --
00857 
00858   fHistoListFrame =
00859     new TGCompositeFrame(fListTreeMainFrame, 220, 300, kHorizontalFrame);
00860   fHistoListFrameLayout =
00861     new TGLayoutHints( kLHintsTop | kLHintsLeft |
00862                        kLHintsExpandX | kLHintsExpandY,
00863     //new TGLayoutHints( kLHintsTop | kLHintsCenterX,
00864                        1, 1, 1, 1); 
00865 
00866 
00867   // Make List Tree --
00868   fTGCanvas =
00869     new TGCanvas(fHistoListFrame, 210, 300, kSunkenFrame | kDoubleBorder);
00870   fTGCanvasLayout =
00871     //new TGLayoutHints( kLHintsTop | kLHintsLeft | kLHintsExpandY);
00872     new TGLayoutHints( kLHintsTop | kLHintsLeft |
00873                        kLHintsExpandX | kLHintsExpandY );
00874   // , 2, 2, 2, 2); 
00875 
00876   fHistoListTree = new TGListTree(fTGCanvas->GetViewPort()
00877                                   , 210, 300, kHorizontalFrame);
00878   fHistoListTree->Associate(this);
00879   fTGCanvas->SetContainer(fHistoListTree);
00880 
00881   //tmp 2000/12/08
00882   fHistoListTree->SetAutoTips();
00883 
00884 
00885   fHistoListFrame->AddFrame(fTGCanvas,fTGCanvasLayout);
00886   //--
00887 
00888 
00889   // Button Frame of List Tree --
00890   fListButtonFrame =
00891     new TGCompositeFrame(fHistoListFrame, 100, 300,
00892                          kVerticalFrame );
00893   fListButtonFrameLayout = 
00894     //    new TGLayoutHints(kLHintsRight | kLHintsCenterY, 10, 10, 10, 10);
00895     //new TGLayoutHints( kLHintsCenterY, 2, 2, 5, 5);
00896     new TGLayoutHints( kLHintsRight | kLHintsCenterY |
00897                        kLHintsExpandX , 2, 2, 5, 5);
00898 
00899 
00900 
00901   // AutoUpdate Check Button --
00902   fChButtonAutoUpdate = 
00903     new TGCheckButton(fListButtonFrame, "Update Automatically",
00904               kM_CHBUTTON_AUTOUPDATE);
00905   //fChButtonAutoUpdateLayout =
00906   //new TGLayoutHints( kLHintsTop | kLHintsCenterX,5,5,15,25);
00907   fChButtonAutoUpdateLayout =
00908     new TGLayoutHints( kLHintsTop | kLHintsLeft,5,2,2,2);
00909   fChButtonAutoUpdate->Associate(this);
00910   fListButtonFrame->
00911     AddFrame( fChButtonAutoUpdate, fChButtonAutoUpdateLayout );
00912   fChButtonAutoUpdate->SetState(kButtonDown);
00913   AutoUpdate = kTRUE;
00914   //--
00915 
00916 
00917   // Slide Show Check Button --
00918   fChButtonSlideUpdate = 
00919     //new TGCheckButton(fListButtonFrame, "Update Slide Show Canvases",
00920     new TGCheckButton(fListButtonFrame, "Update Multi Canvases",
00921               kM_CHBUTTON_SLIDEUPDATE);
00922   fChButtonSlideUpdate->Associate(this);
00923   fListButtonFrame->
00924     AddFrame( fChButtonSlideUpdate, fChButtonAutoUpdateLayout );
00925   fChButtonSlideUpdate->SetState(kButtonUp);
00926   SlideShowUpdate = kFALSE;
00927   //--
00928 
00929 
00930   // Update Frequency --
00931   fFrequencyFrame = 
00932     new TGCompositeFrame(fListButtonFrame, 100, 50,
00933                          kHorizontalFrame );
00934   fFrequencyFrameLayout = 
00935     //    new TGLayoutHints(kLHintsRight | kLHintsCenterY, 10, 10, 10, 10);
00936     new TGLayoutHints( kLHintsTop | kLHintsLeft );
00937 
00938   fFrequencyLabel =
00939     //new TGLabel( fListButtonFrame, "Update Delay (msec)" );
00940     new TGLabel( fFrequencyFrame, "Update Delay (msec)" );
00941   //fListButtonFrame->
00942   fFrequencyFrame->
00943     AddFrame( fFrequencyLabel, fChButtonAutoUpdateLayout);
00944 
00945 
00946 
00947   fFrequencyTextEntry =
00948     //new TGTextEntry( fListButtonFrame,
00949     new TGTextEntry( fFrequencyFrame,
00950                      fFrequencyTextBuffer = new TGTextBuffer(40),
00951                      kM_TEXTENTRY_FREQUENCY );
00952   //fFrequencyTextBuffer->AddText(0,  "0");
00953   fFrequencyTextBuffer->AddText(0,  "3000");
00954 
00955   fFrequencyTextEntry->
00956     Resize( 50, fFrequencyTextEntry->GetDefaultHeight() );
00957 
00958   //fListButtonFrame->
00959   fFrequencyFrame->
00960     AddFrame( fFrequencyTextEntry, fChButtonAutoUpdateLayout);
00961 
00962   fListButtonFrame->
00963     AddFrame(fFrequencyFrame, fFrequencyFrameLayout);
00964 
00965   //--
00966 
00967 
00968   // Control Buttons --
00969 
00970   fControlButtonFrame =
00971     new TGCompositeFrame( fListButtonFrame, 200, 300,
00972                           kHorizontalFrame );
00973   fControlButtonFrameLayout =
00974     new TGLayoutHints( kLHintsCenterX | kLHintsCenterY, 5,5,5,5);
00975 
00976 
00977 
00978   // List Tree Control Buttons --
00979   fButtonFrame =
00980     new TGCompositeFrame(fControlButtonFrame, 90, 300,
00981                          kVerticalFrame | kFixedWidth );
00982   fButtonFrameLayout = 
00983     new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 10, 10, 10, 10);
00984 
00985   fButtonLayout =
00986     new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX,
00987                       //5, 5, 5, 5);
00988                       5, 5, 2, 2);
00989   /*
00990   fStartHistoButton =
00991     new TGTextButton(fButtonFrame, "&Start", kM_BUTTON_START);
00992   fStartHistoButton->Associate(this);
00993   fStartHistoButton->SetToolTipText("Start Monitoring");
00994   */
00995 
00996   fRestartHistoButton =
00997     new TGTextButton(fButtonFrame, "&Update", kM_BUTTON_RESTART);
00998   fRestartHistoButton->Associate(this);
00999   fRestartHistoButton->SetToolTipText("Update Current Pad");
01000 
01001   fPauseHistoButton = 
01002     new TGTextButton(fButtonFrame, "&Pause", kM_BUTTON_PAUSE); 
01003   fPauseHistoButton->Associate(this);
01004   fPauseHistoButton->SetToolTipText("Pause Updating Current Pad");
01005 
01006   fClearHistoButton = 
01007     new TGTextButton(fButtonFrame, "&Clear", kM_BUTTON_CLEAR); 
01008   fClearHistoButton->Associate(this);
01009   fClearHistoButton->SetToolTipText("Clear Current Pad");
01010 
01011   fPrintHistoButton = 
01012     new TGTextButton(fButtonFrame, "&Print", kM_BUTTON_PRINT); 
01013   fPrintHistoButton->Associate(this);
01014   //fPrintHistoButton->SetToolTipText("Print Current Canvas");
01015   fPrintHistoButton->SetToolTipText("Print Current Pad");
01016 
01017   fStopHistoButton = 
01018     new TGTextButton(fButtonFrame, "&Reset", kM_BUTTON_STOP);
01019   fStopHistoButton->Associate(this);
01020   fStopHistoButton->SetToolTipText("Reset All");
01021 
01022   fNewCanvasButton = 
01023     new TGTextButton(fButtonFrame, "&New Canvas", kM_BUTTON_CANVAS);
01024   fNewCanvasButton->Associate(this);
01025   fNewCanvasButton->SetToolTipText("Draw new canvas");
01026 
01027   /*
01028   fExitButton =
01029     new TGTextButton(fButtonFrame, "&Exit", kM_BUTTON_EXIT); 
01030   fExitButton->Associate(this);
01031   fExitButton->SetToolTipText("Exit from this GUI");
01032   */
01033 
01034   //fButtonFrame->AddFrame(fStartHistoButton, fButtonLayout);
01035   fButtonFrame->AddFrame(fRestartHistoButton, fButtonLayout);
01036   fButtonFrame->AddFrame(fPauseHistoButton, fButtonLayout);
01037   fButtonFrame->AddFrame(fClearHistoButton, fButtonLayout);
01038   fButtonFrame->AddFrame(fPrintHistoButton, fButtonLayout);
01039   fButtonFrame->AddFrame(fStopHistoButton, fButtonLayout);
01040   fButtonFrame->AddFrame(fNewCanvasButton, fButtonLayout);
01041   //fButtonFrame->AddFrame(fExitButton, fButtonLayout);
01042 
01043   //tmp
01044   //fStartHistoButton->SetState(kButtonDisabled);
01045   fPauseHistoButton->SetState(kButtonDisabled);
01046   //fClearHistoButton->SetState(kButtonDisabled);
01047   //fPrintHistoButton->SetState(kButtonDisabled);
01048   //fRestartHistoButton->SetState(kButtonDisabled);
01049   //fStopHistoButton->SetState(kButtonDisabled);
01050 
01051   //Pausing = kFALSE;
01052 
01053   //gClient->GetColorByName("LightYellow",LightYellow);
01054 
01055   //fStartHistoButton->ChangeBackground(LightYellow);
01056   fPauseHistoButton->ChangeBackground(LightYellow);
01057   fClearHistoButton->ChangeBackground(LightYellow);
01058   fPrintHistoButton->ChangeBackground(LightYellow);
01059   fRestartHistoButton->ChangeBackground(LightYellow);
01060   fStopHistoButton->ChangeBackground(LightYellow);
01061   fNewCanvasButton->ChangeBackground(LightYellow);
01062   //fExitButton->ChangeBackground(LightYellow);
01063 
01064 
01065   fControlButtonFrame->
01066     AddFrame(fButtonFrame, fButtonFrameLayout);
01067   //--
01068 
01069 
01070   // Histogram Control Buttons --
01071   fHistoButtonGFrame
01072     = new TGGroupFrame(fControlButtonFrame, "Histogram",
01073                        kVerticalFrame );
01074 
01075   fHistoButtonGFrameLayout = 
01076     //    new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, 2, 2, 2, 2);
01077     new TGLayoutHints(kLHintsRight | kLHintsCenterY, 10, 10, 10, 10);
01078 
01079 
01080   fHistoButtonFrame =
01081     new TGCompositeFrame(fHistoButtonGFrame, 50, 30,
01082                          kVerticalFrame | kFixedWidth );
01083 
01084 
01085   fHistoButtonFrameLayout = 
01086     //new TGLayoutHints(kLHintsCenterX | kLHintsCenterY | kLHintsExpandX,
01087     new TGLayoutHints(kLHintsRight | kLHintsCenterY); 
01088   //                 , 1, 1, 1, 1);
01089 
01090   fHistoButtonLayout =
01091     new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX,
01092                       1, 1, 5, 5);
01093 
01094   fZeroHistoButton = 
01095     new TGTextButton(fHistoButtonFrame, "&Zero", kM_BUTTON_ZERO);
01096   fZeroHistoButton->Associate(this);
01097   fZeroHistoButton->SetToolTipText("Reset selected Histograms");
01098 
01099   fUnZeroHistoButton = 
01100     new TGTextButton(fHistoButtonFrame, "&Restore", kM_BUTTON_UNZERO);
01101   fUnZeroHistoButton->Associate(this);
01102   fUnZeroHistoButton
01103     ->SetToolTipText("Back before reseting selected Histograms");
01104 
01105 
01106   fContentHistoButton = 
01107     new TGTextButton(fHistoButtonFrame, "&Content", kM_BUTTON_CONTENT);
01108   fContentHistoButton->Associate(this);
01109   fContentHistoButton
01110     ->SetToolTipText("Draw Bin-Content Histo of a Selected Item");
01111 
01112 
01113   fHistoButtonFrame->AddFrame(fZeroHistoButton, fHistoButtonLayout);
01114   fHistoButtonFrame->AddFrame(fUnZeroHistoButton, fHistoButtonLayout);
01115   fHistoButtonFrame->AddFrame(fContentHistoButton, fHistoButtonLayout);
01116 
01117   //fZeroHistoButton->SetState(kButtonDisabled);
01118   //fUnZeroHistoButton->SetState(kButtonDisabled);
01119   //fContentHistoButton->SetState(kButtonDisabled);
01120 
01121   fZeroHistoButton->ChangeBackground(LightYellow);
01122   fUnZeroHistoButton->ChangeBackground(LightYellow);
01123   fContentHistoButton->ChangeBackground(LightYellow);
01124 
01125 
01126   fHistoButtonGFrame->
01127     AddFrame(fHistoButtonFrame, fHistoButtonFrameLayout);
01128 
01129   fControlButtonFrame->
01130     AddFrame(fHistoButtonGFrame, fHistoButtonGFrameLayout);
01131 
01132   //--
01133 
01134 
01135   fListButtonFrame->
01136     AddFrame(fControlButtonFrame, fControlButtonFrameLayout);
01137 
01138 
01139   fHistoListFrame->
01140     AddFrame(fListButtonFrame, fListButtonFrameLayout);
01141 
01142 
01143   fListTreeMainFrame->
01144     AddFrame(fHistoListFrame,fHistoListFrameLayout);
01145 
01146   //--
01147 
01148   fMainFrame->
01149     AddFrame(fListTreeMainFrame,fListTreeMainFrameLayout);
01150 
01151   //--
01152 
01153 }

void HistoDisplay::MakeTitleFrame const char *   )  [private]
 

Definition at line 587 of file HistoDisplay.cxx.

References fMainFrame, fPicBut, fPictLayout, fTextGC, fTitleFrame, fTitleFrameLayout, fTitleLabel, fTitleLabelLayout, and kM_PICTBUTTON.

00588 {
00589    // Title Frame with logo picture --
00590 
00591    fTitleFrame = new TGCompositeFrame(fMainFrame,200,40,kHorizontalFrame);
00592    fTitleFrameLayout = new TGLayoutHints(kLHintsTop | kLHintsExpandX,
00593                                          0, 0, 0, 0);
00594    FontStruct_t labelfont;
00595    labelfont = gClient->GetFontByName(
00596               "-*-times-bold-r-*-*-24-*-*-*-*-*-*-*");
00597    GCValues_t   gval;
00598    gval.fMask = kGCForeground | kGCFont;
00599    gval.fFont = gVirtualX->GetFontHandle(labelfont);
00600    gClient->GetColorByName("red", gval.fForeground);
00601    fTextGC = gVirtualX->CreateGC(gClient->GetRoot()->GetId(), &gval);
00602 
00603    fTitleLabel       = new TGLabel(fTitleFrame, fTitle , fTextGC, labelfont);
00604    fTitleLabelLayout = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 40, 10, 20, 20);
00605    fTitleFrame->AddFrame(fTitleLabel, fTitleLabelLayout);
00606 
00607    fPicBut = 
00608      new TGPictureButton( fTitleFrame,
00609                           gClient-> GetPicture("${CONSUMER_ICONS}/minos.xpm"),
00610                           kM_PICTBUTTON);
00611    fPictLayout = new TGLayoutHints(kLHintsTop | kLHintsRight
00612                                    //,0,0,0,0);
00613                                    ,0,4,4,0);
00614    fPicBut->Associate(this);
00615    fTitleFrame->AddFrame(fPicBut, fPictLayout);
00616 
00617    fMainFrame->
00618      AddFrame(fTitleFrame,fTitleFrameLayout);
00619    //--
00620 }

void HistoDisplay::MenuConnectStatus  )  [private]
 

Definition at line 4456 of file HistoDisplay.cxx.

References consumerlist, ConsumerList::print(), and ConsumerList::readWebPage().

Referenced by ProcessMessage().

04457 {
04458 
04459         TGTransientFrame *fTransientFrame;
04460         fTransientFrame =
04461           new TGTransientFrame(gClient->GetRoot(), this, 500, 200);
04462         TGLayoutHints *fLayout;
04463         fLayout =
04464           new TGLayoutHints( kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 0);
04465 
04466         TGTextView *fTextView;
04467         fTextView =
04468           new TGTextView( fTransientFrame, 600, 200);
04469                           //,kSunkenFrame | kDoubleBorder );
04470 
04471         TString StatusTxt = "\n";
04472         consumerlist->readWebPage();
04473         ostrstream ostr;
04474         consumerlist->print(ostr);
04475         ostr << ends;
04476         StatusTxt.Append(ostr.str());
04477 
04478 
04479         if ( fTextView->LoadBuffer( StatusTxt.Data() ) ) {
04480           fTextView->MapWindow();
04481         }
04482         else {
04483           cout << " Failed to load Socket status text info."  << endl;
04484         }
04485 
04486         fTransientFrame->AddFrame(fTextView,fLayout);
04487         fTransientFrame->SetWindowName("Connection Status");
04488         fTransientFrame->MapSubwindows();
04489         fTransientFrame->MapWindow();
04490 
04491 }

void HistoDisplay::MenuHelp const char *  s,
const char *  helpText
[private]
 

Definition at line 4496 of file HistoDisplay.cxx.

References s().

Referenced by ProcessMessage().

04497 {
04498   //cout << " In MenuHelp " << endl;
04499 
04500   TRootHelpDialog  *fHelpDialog;
04501   fHelpDialog =
04502     new TRootHelpDialog( this, s, 500, 400);
04503   {
04504     fHelpDialog->SetText(helpText);
04505     fHelpDialog->Popup();
04506   }
04507 }

void HistoDisplay::MessageBox const char *  msg  )  [private]
 

Definition at line 4509 of file HistoDisplay.cxx.

Referenced by ProcessMessage().

04510 {
04511   //cout << " In MessageBox " << endl;
04512 
04513         int retval;
04514 
04515         EMsgBoxIcon icontype = kMBIconExclamation;
04516         //Int_t buttons = kMBOk;
04517         int buttons = kMBOk;
04518 
04519         new TGMsgBox(fClient->GetRoot(), this, "WARNING", msg, 
04520                      icontype, buttons, &retval);
04521 }

TObject * HistoDisplay::OpenFile const char *  filename,
EInputTypes  inputtype = kTFile,
Option_t *  option = "READ"
[private]
 

Definition at line 1238 of file HistoDisplay.cxx.

References Create(), and option.

Referenced by ProcessMessage().

01241 {
01242   //cout << " In OpenFile " << endl;
01243 
01244   TObject *InputObj = 0;
01245 
01246   if ( inputtype == kTMapFile ) {
01247     TObject *obj =gROOT->GetListOfMappedFiles()->FindObject(filename) ;
01248     TMapFile *MFile = 0;
01249     if ( obj ) {
01250       MFile = (TMapFile*)obj;
01251     }
01252     else {
01253       //TMapFile::SetMapAddress(0x40c0000);
01254       MFile = TMapFile::Create(filename, option);
01255     }
01256 
01257     if ( MFile &&
01258          MFile->IsFolder() &&
01259          (MFile->IsA() == TMapFile::Class())  ) {
01260       //MFile->ls();
01261       //InputOpen = kTRUE;
01262       InputObj = MFile;
01263     }
01264     else {
01265       cout << " Error Opening " << filename << endl;
01266       if ( MFile ) MFile->Close();
01267       //InputOpen = kFALSE;
01268     }
01269   } //if ( inputtype == kTMapFile )
01270 
01271   else if ( inputtype == kTFile ) {
01272     TObject *obj = gROOT->GetListOfFiles()->FindObject(filename);
01273     TFile *RFile = 0;
01274     if ( obj ) {
01275       RFile = (TFile*)obj;
01276     }
01277     else {
01278       RFile = TFile::Open(filename, option);
01279     }
01280     if ( RFile &&
01281          RFile->IsOpen()  &&
01282          RFile->IsFolder() &&
01283          !(RFile->IsZombie()) &&
01284          (RFile->IsA() == TFile::Class()) &&
01285          (RFile->IsA() != TMapFile::Class())  ) {
01286       //RFile->ls();
01287       //InputOpen = kTRUE;
01288       InputObj = RFile;
01289     }
01290     else {
01291       cout << " Error Opening " << filename << endl;
01292       if ( RFile ) RFile->Close();
01293       //InputOpen = kFALSE;
01294     }
01295   } //else if ( inputtype == kTFile ) 
01296 
01297 
01298   else if ( inputtype == kTSocket ) {
01299 
01300     TSocket *sock = 0;
01301     //TObject *obj =gROOT->GetListOfSockets()->FindObject(filename);
01302     //if ( obj ) sock = (TSocket*)obj;
01303     //else {
01304 
01305     sock = (TSocket*)gROOT->GetListOfSockets()->FindObject(filename);
01306     //while ( sock && !sock->IsValid() ) {
01307     while ( sock ) {
01308       sock->Close();
01309       sock = (TSocket*)gROOT->GetListOfSockets()->FindObject(filename);
01310     }//while ( sock && !sock->IsValid() ) 
01311 
01312     if ( !sock ) {
01313       TUrl url(filename);
01314       sock = new TSocket(url.GetHost(),url.GetPort());
01315       //cout << " Socket Server Name = " << url.GetHost() << endl;
01316       //cout << " port = " << url.GetPort() << endl;
01317     } //if ( !sock ) 
01318 
01319     sock->SetName( filename );
01320 
01321     if ( sock && sock->IsValid() ) {
01322       cout << " Socket Server = " << filename << endl;
01323       //InputOpen = kTRUE;
01324       InputObj = sock;
01325     }
01326     else {
01327       cout << " Error Opening " << filename << endl;
01328       if ( sock ) sock->Close();
01329       //InputOpen = kFALSE;
01330     }
01331   } //else if ( inputtype == kTSocket ) {
01332 
01333 
01334   return InputObj;
01335 
01336 }

void HistoDisplay::PopUpSlides TGListTreeItem *  item,
const char *  canvasname,
const char *  canvastitle
[private]
 

Definition at line 2511 of file HistoDisplay.cxx.

References fSlideTimer, and StartSlides().

Referenced by SearchWarningErrorFolder().

02513 {
02514   //cout << " In PopUpWarningSlides " << endl;
02515 
02516   TVirtualPad *padsav = 0;
02517   if ( gPad ) padsav = gPad;
02518 
02519   TCanvas *canvas = 0;
02520 
02521   canvas =
02522     (TCanvas*) 
02523     ( gROOT->GetListOfCanvases()->FindObject( canvasname ) );
02524             
02525   if ( !canvas ) {
02526     canvas = 
02527       new TCanvas( canvasname, canvastitle, 400, 400 );
02528   } //if ( !canvas )
02529 
02530   if ( canvas ) {
02531 
02532     TCanvasImp *canvasimp = canvas->GetCanvasImp();
02533     if ( canvasimp ) canvasimp->Show();
02534 
02535     canvas->Clear();
02536     canvas->cd();
02537 
02538     //if ( fSlideTimer )
02539     if ( fSlideTimer && !fSlideTimer->HasTimedOut() )
02540       fSlideTimer->TurnOff();
02541 
02542     StartSlides( item );
02543 
02544   } // if ( canvas ) 
02545 
02546   if ( padsav ) padsav->cd();
02547 
02548 
02549 }

void HistoDisplay::PrintCanvas TPad *  canvas  )  [private]
 

Definition at line 4355 of file HistoDisplay.cxx.

References CObject::GetName(), and gSystem().

Referenced by ProcessMessage().

04356 {
04357   //cout << " In PrintCanvas " << endl;
04358   // From TGTextEdit.cxx
04359     Int_t ret;
04360     static char *gPrinter = 0;
04361     static char *gPrintCommand = 0;
04362 
04363     if (!gPrinter) {
04364       //gPrinter = StrDup(""); // use gEnv
04365       //gPrintCommand = StrDup("lpr");
04366       gPrinter = StrDup("157-ept7-hp"); // use gEnv
04367       gPrintCommand = StrDup("xprint -h -P");
04368     } //if (!gPrinter)
04369 
04370     //unused    TGPrintDialog *printdialog =
04371     //      new TGPrintDialog( fClient->GetRoot(), this, 400, 150,
04372     //          &gPrinter, &gPrintCommand, &ret );
04373 
04374     if ( ret ) {
04375       if ( canvas ) {
04376 
04377         const char *canvasname = canvas->GetName();
04378 
04379         char *msg = 0;
04380         if ( strlen( gPrinter ) ) {
04381           /*
04382           msg = new char[ strlen( gPrintCommand ) + 3 + strlen( gPrinter ) 
04383                         + 1 + strlen( canvasname ) + 4 + 1 ];
04384           sprintf( msg, "%s -P%s %s.ps\n", gPrintCommand,
04385                    gPrinter, canvasname );
04386           */
04387           msg = new char[ strlen( gPrintCommand ) + 1 + strlen( gPrinter ) 
04388                         + 1 + strlen( canvasname ) + 6 + 1 ];
04389           sprintf( msg, "%s %s \"%s.ps\"\n", gPrintCommand,
04390                    gPrinter, canvasname );
04391 
04392         } //if ( gPrinter )
04393         else {
04394           msg = new char[ strlen( gPrintCommand )
04395                         + 1 + strlen( canvasname ) + 6 + 1 ];
04396           sprintf( msg, "%s \"%s.ps\"\n", gPrintCommand, canvasname );  
04397         } //else //if ( gPrinter ) 
04398 
04399 
04400         canvas->Print( 0, "ps" );
04401 
04402         cout << msg << endl;
04403         gSystem->Exec( msg );
04404 
04405         if ( msg ) delete [] msg;
04406 
04407       } //if ( canvas )
04408     } //if (ret)
04409 
04410     // do not need delete printdialog
04411     // because done by closing the windown.
04412 }

Bool_t HistoDisplay::ProcessMessage Long_t  msg,
Long_t  parm1,
Long_t  parm2
[virtual]
 

Definition at line 4584 of file HistoDisplay.cxx.

References AddSubtractHisto(), AddTreeItemsOfInput(), AutoUpdate, CanvasName, CanvasNumber, CanvasTitle, ClearCurrentPad(), CloseWindow(), DrawContentHisto(), DrawHisto(), EInputTypes, fChButtonAutoUpdate, fChButtonSlideUpdate, fDisplayedList, fFileNameBuffer, fFileNameTextEntry, fHistoListTree, FileDialogWindow(), FileName, FileNameClear(), fPauseHistoButton, fRaButMFile, fRaButRFile, fRaButSocket, fReadFileButton, fRestartHistoButton, fSelectedItem, fSlideCanvasList, fSlideTimer, fStatusBar, fUpdateTimer, GetCObjFromListItem(), HistoDisplaySlideTimer::GetCurrentPad(), gHelpHistoDisplay, Green, HistoDisplay(), HistoInPad(), kM_BUTTON_CANVAS, kM_BUTTON_CHOOSEFILE, kM_BUTTON_CLEAR, kM_BUTTON_CLEARFILENAME, kM_BUTTON_CONTENT, kM_BUTTON_FILENAME, kM_BUTTON_PAUSE, kM_BUTTON_PRINT, kM_BUTTON_RESTART, kM_BUTTON_STOP, kM_BUTTON_UNZERO, kM_BUTTON_ZERO, kM_CHBUTTON_AUTOUPDATE, kM_CHBUTTON_SLIDEUPDATE, kM_MENU_CONNECT_STATUS, kM_MENU_FILE_CLOSE, kM_MENU_FILE_EXIT, kM_MENU_FILE_NEWCANVAS, kM_MENU_FILE_NEWGUI, kM_MENU_FILE_NEWSLIDE, kM_MENU_HELP_CANVAS, kM_MENU_HELP_GUI, kM_MENU_HELP_ROOT, kM_MENU_LISTTREE_CLEAR, kM_MENU_LISTTREE_DELETE, kM_MENU_LISTTREE_REFRESH, kM_MENU_LISTTREE_SORTFOLDER, kM_MENU_LISTTREE_SORTTREE, kM_PICTBUTTON, kM_RABUTTON_MFILE, kM_RABUTTON_RFILE, kM_RABUTTON_SOCKET, kM_TEXTENTRY_FILENAME, MenuConnectStatus(), MenuHelp(), MessageBox(), OpenFile(), PrintCanvas(), RecursivePadClear(), Red, RefreshTreeItem(), RemoveTGListTree(), ResetObjects(), Running, SlideShowUpdate, SortTGListTree(), StartSlides(), strstrn(), UpdateCanvas(), and UpdateTimerOn().

04585 {
04586 
04587   //cout << " In ProcessMessage " << endl;
04588 
04589   //static TObject *inputobj = 0;
04590   //TObject *inputobj2 =0;
04591   TPad *gpad = 0;
04592 
04593   switch ( GET_MSG(msg) ) {
04594   case kC_COMMAND:
04595     switch ( GET_SUBMSG(msg) ) {
04596     case kCM_MENU:
04597       switch ( parm1 ) {
04598       case kM_MENU_FILE_NEWGUI:
04599         new HistoDisplay(gClient->GetRoot(), 200, 400, fsocketserver, fport);
04600         break;
04601       case kM_MENU_FILE_NEWCANVAS:
04602         //gROOT->GetMakeDefCanvas()();
04603         {
04604           CanvasNumber++;
04605           char *num = new char[3];
04606           sprintf( num, "%d", CanvasNumber);
04607           TCanvas *CurrentCanvas =
04608             new TCanvas( CanvasName + TString( num ),
04609                          CanvasTitle + TString( num) , 500, 500 );
04610           delete num;
04611           CurrentCanvas->cd();
04612         }
04613         break;
04614       case kM_MENU_FILE_NEWSLIDE:
04615         {
04616           static int i = 0;
04617           i++;
04618           //TString name = "MINOSSlideShowCanvas";
04619           //TString title = "MINOS Slide Show Canvas ";
04620           TString name = "AutoUpdateCanvas";
04621           TString title = "Auto Update Canvas ";
04622           char *num = 0;
04623           num = new char[ 3 ];
04624           sprintf( num, "%d", i );
04625           name = name + TString( num );
04626           title = title + TString( num );
04627           delete num;
04628           //tmp
04629           //cout << name << " " << title << endl; 
04630           TCanvas *slideCanvas = new TCanvas( name, title, 500, 500 );
04631           slideCanvas->cd();
04632           if ( fSlideCanvasList ) {
04633             if ( !( fSlideCanvasList->IsEmpty() ) )  {
04634               TObjLink *link = fSlideCanvasList->FirstLink();
04635               while ( link ) {
04636                 TObject *obj = 0;
04637                 obj = link->GetObject();
04638                 link = link->Next();
04639                 if ( !obj ||
04640                      !( gROOT->GetListOfCanvases()->FindObject( obj ) ) )
04641                   fSlideCanvasList->Remove( obj );
04642               } //while ( link )
04643             } //if ( !( fSlideCanvasList->IsEmpty() )
04644             fSlideCanvasList->Add( slideCanvas );
04645           } //if ( fSlideCanvasList )
04646         } //{
04647         break;
04648       case kM_MENU_FILE_CLOSE:
04649         // Do not know how to close one window.
04650         DestroyWindow(); // in TGWindow
04651         //cout << " Sorry. Not yet. " << endl;
04652         break;
04653       case kM_MENU_FILE_EXIT:
04654         Running = kFALSE;
04655         fReadFileButton->ChangeBackground(Red);
04656         //  cout << "Button changed to red\n";
04657         fChButtonSlideUpdate->SetState(kButtonUp);
04658         SlideShowUpdate = kFALSE;         
04659         gClient->NeedRedraw(fReadFileButton);
04660 
04661         ResetObjects();
04662 
04663         CloseWindow();
04664         break;
04665       case kM_MENU_LISTTREE_SORTTREE:
04666         SortTGListTree();
04667         break;
04668       case kM_MENU_LISTTREE_SORTFOLDER:
04669         if ( fSelectedItem ) {
04670           fHistoListTree->SortChildren(fSelectedItem);
04671           fClient->NeedRedraw(fHistoListTree);
04672         }
04673         break;
04674       case kM_MENU_LISTTREE_DELETE:
04675         if ( fSelectedItem ) {
04676           CObject *cobj = 
04677             (CObject*) fDisplayedList
04678             ->FindObject(fSelectedItem->GetText()); 
04679 
04680           if ( fDisplayedList->Remove( cobj ) ) delete cobj;
04681 
04682           fHistoListTree->DeleteItem(fSelectedItem);
04683           fClient->NeedRedraw(fHistoListTree);
04684         }
04685         fSelectedItem = 0;
04686         break;
04687       case kM_MENU_LISTTREE_CLEAR:
04688 
04689         if ( fDisplayedList ) fDisplayedList->Clear();
04690         RemoveTGListTree();
04691         break;
04692       case kM_MENU_LISTTREE_REFRESH:
04693 
04694         if ( fSelectedItem )
04695           RefreshTreeItem( fSelectedItem );
04696         else
04697           RefreshTreeItem( fHistoListTree->GetFirstItem() );
04698 
04699         break;
04700         /*
04701       case kM_MENU_CONNECT_MON1:
04702         cout << " Sorry. Not yet implemented. " << endl;
04703         break;
04704       case kM_MENU_CONNECT_MON2:
04705         cout << " Sorry. Not yet implemented. " << endl;
04706         break;
04707       case kM_MENU_CONNECT_MON3:
04708         cout << " Sorry. Not yet implemented. " << endl;
04709         break;
04710       case kM_MENU_CONNECT_MON4:
04711         cout << " Sorry. Not yet implemented. " << endl;
04712         break;
04713       case kM_MENU_CONNECT_MON5:
04714         cout << " Sorry. Not yet implemented. " << endl;
04715         break;
04716         */
04717 
04718       case kM_MENU_CONNECT_STATUS:
04719         MenuConnectStatus();
04720         break;
04721 
04722       case kM_MENU_HELP_GUI:
04723         MenuHelp("Help on this GUI...", gHelpHistoDisplay);
04724         break;
04725 
04726       case kM_MENU_HELP_ROOT:
04727         MenuHelp("Help on ROOT...", gHelpAbout);
04728         break;
04729 
04730       case kM_MENU_HELP_CANVAS:
04731         MenuHelp("Help on Canvas...", gHelpCanvas);
04732         break;
04733       } // switch( parm1 )
04734       break; //kCM_MENU
04735 
04736 
04737     case kCM_BUTTON:
04738       switch ( parm1 ) {
04739 
04740       case kM_PICTBUTTON:
04741         //PopupWindow();
04742         new PhotoWindow(fClient->GetRoot(), this, 400, 500);
04743         break;
04744 
04745 
04746       case kM_BUTTON_FILENAME:
04747         {
04748 
04749           // dp : reset first
04750 
04751           fReadFileButton->SetState(kButtonUp);
04752           fReadFileButton->ChangeBackground(Red);
04753           fChButtonSlideUpdate->SetState(kButtonUp);
04754           SlideShowUpdate = kFALSE;
04755           // cout << "Button changed to red\n";   
04756             gClient->NeedRedraw(fReadFileButton);
04757           Running = kFALSE;
04758 
04759           fSelectedItem = 0;
04760 
04761           ResetObjects();
04762 
04763           // Delete and Remove files, socket, and lists, ListTrees --
04764           if ( gPad && !( gROOT->GetListOfCanvases()->IsEmpty() ) ) {
04765             TCanvas *CurrentCanvas = 0;
04766             CurrentCanvas = gPad->GetCanvas();
04767             if ( CurrentCanvas ) {
04768               //CurrentCanvas->Clear();
04769               RecursivePadClear( CurrentCanvas );
04770               CurrentCanvas->cd();
04771               CurrentCanvas->Modified();
04772               CurrentCanvas->Update();
04773             } //if ( CurrentCanvas )
04774           } //if ( gPad && !( gROOT->GetCanvasList()->IsEmpty() ) )
04775 
04776 
04777 
04778 
04779 
04780           FileName = TString( fFileNameBuffer->GetString() );
04781 
04782           EInputTypes inputtype;
04783 
04784           if ( fRaButMFile->GetState() == kButtonDown )
04785             inputtype = kTMapFile;
04786           else if ( fRaButRFile->GetState() == kButtonDown )
04787             inputtype = kTFile;
04788           else if ( fRaButSocket->GetState() == kButtonDown )
04789             inputtype = kTSocket;
04790 
04791           //InputObj = OpenFile( FileName.Data(), inputtype, "READ" );
04792           TObject *InputObj = OpenFile( FileName.Data(), inputtype, "READ" );
04793 
04794 
04795           //if ( InputOpen ) {
04796           if ( InputObj ) {
04797 
04798             AddTreeItemsOfInput( InputObj );
04799             //RefreshTreeItem( fHistoListTree->GetFirstItem() );
04800             fClient->NeedRedraw( fHistoListTree );
04801             fReadFileButton->ChangeBackground(Green);
04802             // cout << "Button changed to green\n";
04803             // cout << "Opened file\n";
04804             gClient->NeedRedraw(fReadFileButton);
04805             //    fMainFrame->Update();
04806 
04807             char* str = new char[ 9 + FileName.Length() ];
04808             strcpy(str, " Opened ");
04809             fStatusBar
04810               ->SetText( strcat(str, FileName.Data()), 1);
04811             delete [] str;
04812           } //if ( InputObj ) 
04813           else {
04814 
04815             //if ( inputtype == kTMapFile && !InputOpen ) {
04816             if ( inputtype == kTMapFile ) {
04817               const char *sg = "Failed to open memory map file.";
04818               MessageBox(sg);
04819             }
04820             //else if ( inputtype == kTFile && !InputOpen ) {
04821             else if ( inputtype == kTFile ) {
04822               const char *sg = "Failed to open ROOT file.";
04823               MessageBox(sg);
04824             }
04825             //else if ( inputtype == kTSocket && !InputOpen ) {
04826             else if ( inputtype == kTSocket ) {
04827               const char *sg = "Failed to open the socket connection.";
04828               MessageBox(sg);
04829             }
04830 
04831             char* str = new char[16+FileName.Length()];
04832             str = strcpy(str," Error Opening ");
04833             fStatusBar
04834               ->SetText( strcat(str, FileName.Data()), 1);
04835             delete [] str;
04836           }
04837         }
04838 
04839         break;
04840 
04841 
04842       case kM_BUTTON_CHOOSEFILE:
04843         if( (fRaButMFile->GetState() == kButtonDown) ||
04844             (fRaButRFile->GetState() == kButtonDown) ) {
04845 
04846           const char *file = FileDialogWindow(); 
04847           if ( file ){ 
04848 
04849             fFileNameBuffer->Clear();
04850 
04851             // Older version of  ROOT.
04852             /*
04853             char s[80] = "";
04854             strcat(s, gSystem->WorkingDirectory()); 
04855             strcat(s, "/"); 
04856             strcat(s, file); 
04857 
04858             fFileNameBuffer->AddText(0, s);
04859             */
04860 
04861             fFileNameBuffer->AddText(0, file);
04862 
04863             gClient->NeedRedraw(fFileNameTextEntry);
04864 
04865             //T.A
04866             delete [] file;
04867           }
04868 
04869         }
04870 
04871         break;
04872             
04873       case kM_BUTTON_CLEARFILENAME:
04874 
04875         FileNameClear();
04876 
04877         break;
04878 
04879         /*
04880       case kM_BUTTON_START:
04881 
04882         MonitorName = TString( fMonitorNameBuffer->GetString() );
04883 
04884         HistoDisplayMain();
04885         //inputobj2 = inputobj;
04886         //HistoDisplayMain( inputobj2 );
04887 
04888         //tmp
04889         //fReadFileButton->SetState(kButtonUp);
04890 
04891         //tmp
04892         //fStartHistoButton->SetState(kButtonDisabled);
04893         fStopHistoButton->SetState(kButtonUp);
04894 
04895         fClearHistoButton->SetState(kButtonUp);
04896 
04897         fPrintHistoButton->SetState(kButtonUp);
04898 
04899         fZeroHistoButton->SetState(kButtonUp);
04900         fUnZeroHistoButton->SetState(kButtonUp);
04901         fContentHistoButton->SetState(kButtonUp);
04902 
04903 
04904         break;
04905         */
04906 
04907       case kM_BUTTON_PAUSE:
04908 
04909         if ( Running ) {
04910           fPauseHistoButton->SetState( kButtonDisabled );
04911           fRestartHistoButton->SetState( kButtonUp );
04912           Running = kFALSE;
04913         } //if ( Running )
04914 
04915 
04916 
04917         break;
04918       case kM_BUTTON_CLEAR:
04919 
04920         ClearCurrentPad();
04921         break;
04922 
04923       case kM_BUTTON_PRINT:
04924 
04925         if ( gPad || !( gROOT->GetListOfCanvases()->IsEmpty() ) ) {
04926           //PrintCanvas( gPad->GetCanvas() );
04927           PrintCanvas( (TPad*)gPad );
04928         }//if ( gPad || !( gROOT->GetListOfCanvases()->IsEmpty() ) ) 
04929           
04930         break;
04931 
04932       case kM_BUTTON_RESTART:
04933 
04934         if ( fSelectedItem ) {
04935           /*
04936           if ( strstr( fSelectedItem->GetText(), "slide" ) ||
04937                strstr( fSelectedItem->GetText(), "Slide" ) ||
04938                strstr( fSelectedItem->GetText(), "SLIDE" ) ) {
04939           */
04940           if ( strstrn( fSelectedItem->GetText(), kSlideShowFolder ) ) {
04941 
04942             StartSlides( fSelectedItem );
04943 
04944           } //if ( strstr( fSelectedItem->GetText() ) ||
04945 
04946           else {
04947 
04948             if ( AutoUpdate ) {
04949               fPauseHistoButton->SetState( kButtonUp );
04950               fRestartHistoButton->SetState( kButtonDisabled );
04951               UpdateTimerOn();
04952             } // if ( AutoUpdate ) {
04953             else {
04954               UpdateCanvas();
04955             } //else //if ( AutoUpdate ) {
04956 
04957           } //else // if ( strstr( fSelectedItem->GetText(), "slide" ) ||
04958 
04959         } //if( fSelectedItem )  
04960 
04961         break;
04962       case kM_BUTTON_ZERO:
04963 
04964         gpad = (TPad*)gPad;
04965         AddSubtractHisto(gpad, 1);
04966 
04967         UpdateCanvas();
04968 
04969 
04970 
04971         break;
04972       case kM_BUTTON_UNZERO:
04973 
04974         gpad = (TPad*)gPad;
04975         AddSubtractHisto(gpad, 0);
04976         UpdateCanvas();
04977 
04978         break;
04979       case kM_BUTTON_CONTENT:
04980         /*
04981         if ( fSelectedItem ) {
04982           TObject *obj = 
04983             fDisplayedList->FindObject( fSelectedItem->GetText() );
04984           if ( obj && obj->InheritsFrom(CHistogram::Class()) ) {
04985             TH1 *histo =
04986               (TH1*) ( ((CHistogram*)obj)->SubtractedHisto() );
04987             //TH1 *histo =  ( (CHistogram*)obj )->GetHistoDrawn();
04988 
04989             DrawContentHisto( histo );
04990             delete histo;
04991           }
04992         }
04993         */
04994 
04995         gpad = (TPad*)gPad;
04996         if ( gpad ) {
04997 
04998           Int_t counthisto = 0;
04999           TH1 *histo = HistoInPad( gpad , counthisto );
05000           if ( counthisto == 1 ) DrawContentHisto( histo ); 
05001           else if ( counthisto >= 2 )
05002             cout << " Select one histo on canvas. " << endl;
05003 
05004         } //if ( gpad )
05005 
05006 
05007         break;
05008 
05009       case kM_BUTTON_CANVAS:
05010         {
05011           static int i = 0;
05012           i++;
05013           //TString name = "MINOSSlideShowCanvas";
05014           //TString title = "MINOS Slide Show Canvas ";
05015           TString name = "AutoUpdateCanvas";
05016           TString title = "Auto Update Canvas ";
05017           char *num = 0;
05018           num = new char[ 3 ];
05019           sprintf( num, "%d", i );
05020           name = name + TString( num );
05021           title = title + TString( num );
05022           delete num;
05023           //tmp
05024           //cout << name << " " << title << endl; 
05025           TCanvas *slideCanvas = new TCanvas( name, title, 500, 500 );
05026           slideCanvas->cd();
05027           if ( fSlideCanvasList ) {
05028             if ( !( fSlideCanvasList->IsEmpty() ) )  {
05029               TObjLink *link = fSlideCanvasList->FirstLink();
05030               while ( link ) {
05031                 TObject *obj = 0;
05032                 obj = link->GetObject();
05033                 link = link->Next();
05034                 if ( !obj ||
05035                      !( gROOT->GetListOfCanvases()->FindObject( obj ) ) )
05036                   fSlideCanvasList->Remove( obj );
05037               } //while ( link )
05038             } //if ( !( fSlideCanvasList->IsEmpty() )
05039             fSlideCanvasList->Add( slideCanvas );
05040           } //if ( fSlideCanvasList )
05041         } //{
05042         break;
05043 
05044       case kM_BUTTON_STOP:
05045 
05046         cout << "Pressed RESET\n";
05047         /*
05048         fPauseHistoButton->SetState(kButtonDisabled);
05049         fRestartHistoButton->SetState(kButtonDisabled);
05050         fZeroHistoButton->SetState(kButtonDisabled);
05051         fUnZeroHistoButton->SetState(kButtonDisabled);
05052         fContentHistoButton->SetState(kButtonDisabled);
05053         fStopHistoButton->SetState(kButtonDisabled);
05054         */
05055 
05056         if (fUpdateTimer) {fUpdateTimer->TurnOff();}
05057         if (fSlideTimer) {fSlideTimer->TurnOff();}
05058 
05059         if ( Running ) {
05060           fPauseHistoButton->SetState( kButtonDisabled );
05061           fRestartHistoButton->SetState( kButtonUp );
05062           Running = kFALSE;
05063         }
05064 
05065 ;
05066 
05067         fReadFileButton->SetState(kButtonUp);
05068           fReadFileButton->ChangeBackground(Red);
05069           // cout << "Button changed to red\n";  
05070             gClient->NeedRedraw(fReadFileButton);
05071             fChButtonSlideUpdate->SetState(kButtonUp);
05072             SlideShowUpdate = kFALSE;
05073         Running = kFALSE;
05074 
05075         fSelectedItem = 0;
05076 
05077         ResetObjects();
05078 
05079         fHistoListTree->Clear(); //dp
05080 
05081         // Delete and Remove files, socket, and lists, ListTrees --
05082         if ( gPad && !( gROOT->GetListOfCanvases()->IsEmpty() ) ) {
05083           TCanvas *CurrentCanvas = 0;
05084           CurrentCanvas = gPad->GetCanvas();
05085           if ( CurrentCanvas ) {
05086             //CurrentCanvas->Clear();
05087             RecursivePadClear( CurrentCanvas );
05088             CurrentCanvas->cd();
05089             CurrentCanvas->Modified();
05090             CurrentCanvas->Update();
05091           } //if ( CurrentCanvas )
05092         } //if ( gPad && !( gROOT->GetCanvasList()->IsEmpty() ) )
05093 
05094 
05095         //--
05096 
05097         break;
05098         /*
05099       case kM_BUTTON_EXIT:
05100         Running = kFALSE;
05101 
05102         ResetObjects();
05103 
05104         CloseWindow();
05105         break;
05106         */
05107 
05108       } //switch parm1
05109       break; //kCM_BUTTON
05110 
05111     case kCM_CHECKBUTTON:
05112       switch ( parm1 ) {
05113       case kM_CHBUTTON_AUTOUPDATE:
05114         if ( fChButtonAutoUpdate->GetState() == kButtonDown ) {
05115           AutoUpdate = kTRUE;
05116 
05117           fChButtonSlideUpdate->SetState(kButtonUp);
05118         }
05119         else {
05120           AutoUpdate = kFALSE;
05121           fPauseHistoButton->SetState(kButtonDisabled);
05122           fRestartHistoButton->SetState(kButtonUp);
05123           Running = kFALSE;
05124 
05125           fChButtonSlideUpdate->SetState(kButtonUp);
05126           fChButtonSlideUpdate->SetState(kButtonDisabled);
05127           SlideShowUpdate = kFALSE;
05128         }
05129         break;
05130 
05131       case kM_CHBUTTON_SLIDEUPDATE:
05132         if ( fChButtonSlideUpdate->GetState() == kButtonDown ) 
05133           SlideShowUpdate = kTRUE;
05134         else 
05135           SlideShowUpdate = kFALSE;
05136 
05137         break;
05138       } // switch parm1 of Check Button
05139 
05140       break; //kCM_CHECKBUTTON
05141 
05142     case kCM_RADIOBUTTON:
05143       switch ( parm1 ) {
05144       case kM_RABUTTON_MFILE:
05145         fRaButMFile->SetState(kButtonDown);
05146         fRaButRFile->SetState(kButtonUp);
05147         fRaButSocket->SetState(kButtonUp);
05148         break; // kM_RABUTTON_MFILE
05149       case kM_RABUTTON_RFILE:
05150         fRaButMFile->SetState(kButtonUp);
05151         fRaButRFile->SetState(kButtonDown);
05152         fRaButSocket->SetState(kButtonUp);
05153         break; // kM_RABUTTON_RFILE
05154       case kM_RABUTTON_SOCKET:
05155         fRaButMFile->SetState(kButtonUp);
05156         fRaButRFile->SetState(kButtonUp);
05157         fRaButSocket->SetState(kButtonDown);
05158         break; // kM_RABUTTON_SOCKET
05159       } // switch parm1 of Radio Button
05160 
05161       break; //kCM_RADIOBUTTON
05162 
05163 
05164     } //switch submsg of kC_COMMAND
05165     break; // kC_COMMAND
05166 
05167   case kC_LISTTREE:
05168     switch ( GET_SUBMSG(msg) ) {
05169 
05170     case kCT_ITEMCLICK:
05171       if ( parm1 == kButton1 || parm1 == kButton2 ) {
05172         TGListTreeItem *item;
05173         if ( (item = fHistoListTree->GetSelected()) !=0 &&
05174             item != fSelectedItem) {
05175           fClient->NeedRedraw(fHistoListTree);
05176           fSelectedItem = item;
05177         }
05178       } //if parm1 of kCT_ITEMCLICK
05179 
05180       else if ( parm1 == kButton3 ) {
05181         TGListTreeItem *item;
05182         if ( (item = fHistoListTree->GetSelected()) !=0 ) {
05183           fClient->NeedRedraw(fHistoListTree);
05184           fSelectedItem = item;
05185 
05186 
05187           if ( fSelectedItem ) {
05188 
05189             /*
05190             if ( strstr( fSelectedItem->GetText(), "slide" ) ||
05191                  strstr( fSelectedItem->GetText(), "Slide" ) ||
05192                  strstr( fSelectedItem->GetText(), "SLIDE" ) ) {
05193             */
05194             if ( strstrn( fSelectedItem->GetText(), kSlideShowFolder ) ) {
05195 
05196               //dp            StartSlides( fSelectedItem );
05197 
05198             } //if ( strstr( fSelectedItem->GetText() ) ||
05199 
05200 
05201             else {
05202 
05203               if ( fSlideTimer && 
05204                    ( fSlideTimer->GetCurrentPad() == gPad ) &&
05205                    !fSlideTimer->HasTimedOut() )
05206                 //if ( fSlideTimer )
05207                 fSlideTimer->TurnOff();
05208 
05209 
05210               if ( fSelectedItem->GetFirstChild() &&
05211                    fSelectedItem->GetFirstChild()->GetNextSibling() &&
05212                    fSelectedItem->IsOpen() ) {
05213 
05214                 TList *selectedList = new TList();
05215 
05216                 TGListTreeItem *item2;
05217                 item2 = fSelectedItem->GetFirstChild();
05218 
05219                 while ( item2 ) {
05220                   //TObject *obj2 = 0;
05221                   //obj2 = fDisplayedList->FindObject( item2->GetText() );
05222 
05223                   TObject *obj2 = GetCObjFromListItem( item2 );
05224 
05225                   if( obj2 ) {
05226                     selectedList->Add( obj2 );
05227                     //obj2->ls();
05228                   }//if( obj2 )
05229                   item2 = item2->GetNextSibling();
05230                 }// while( item2 )
05231 
05232                 DrawHisto( selectedList );
05233                 delete selectedList;
05234 
05235               } //if ( selectedItem->GetFirstChild() &&
05236               else {
05237 
05238                 //TObject *obj =
05239                 //fDisplayedList->FindObject( fSelectedItem->GetText() );
05240 
05241                 TObject *obj = GetCObjFromListItem( item );
05242 
05243                 DrawHisto( obj );
05244 
05245               } //else //if ( selectedItem->GetFirstChild() &&
05246 
05247 
05248               if ( AutoUpdate ) {
05249                 fPauseHistoButton->SetState( kButtonUp );
05250                 fRestartHistoButton->SetState( kButtonDisabled );
05251               
05252                 UpdateTimerOn();
05253 
05254               } //if (AutoUpdate)
05255               else {
05256 
05257                 //if ( !Running ) {
05258                   fPauseHistoButton->SetState( kButtonDisabled );
05259                   fRestartHistoButton->SetState( kButtonUp );
05260                   //} //if ( !Running ) {
05261 
05262               } //else //if (AutoUpdate)
05263 
05264 
05265 
05266             } //else //if ( strstr( fSelectedItem->GetText() ) ||
05267 
05268           } //if ( fSelectedItem )
05269 
05270 
05271         } //if ( (item = fHistoListTree->GetSelected()) !=0 )
05272       } // else if parm1 == kButton3 of kCT_ITEMCLICK
05273       break; // kCT_ITEMCLICK
05274 
05275 
05276     case kCT_ITEMDBLCLICK:
05277       //if ( parm1 == kButton1 ) {
05278       if ( parm1 ) {
05279         TGListTreeItem *item;
05280         if ( (item = fHistoListTree->GetSelected()) !=0 ) {
05281           fClient->NeedRedraw(fHistoListTree);
05282           fSelectedItem = item;
05283 
05284           if ( fSelectedItem ) {
05285 
05286             //TObject *obj =
05287             //fDisplayedList->FindObject( fSelectedItem->GetText() );
05288 
05289             TObject *obj = GetCObjFromListItem( item );
05290 
05291             if ( !obj ) {
05292  
05293               /*
05294               if ( ( strstr( fSelectedItem->GetText(), "slide" ) ||
05295                      strstr( fSelectedItem->GetText(), "Slide" ) ||
05296                      strstr( fSelectedItem->GetText(), "SLIDE" ) ) ) {
05297               */
05298               if ( strstrn( fSelectedItem->GetText(), kSlideShowFolder ) ) {
05299 
05300                 //dp            StartSlides( fSelectedItem );
05301 
05302               } // if ( ( strstr( fSelectedItem->GetText(), "slide" ) ||
05303 
05304             } //if ( !obj )  
05305 
05306             else {
05307 
05308               if ( fSlideTimer &&
05309                    ( fSlideTimer->GetCurrentPad() == gPad ) &&
05310                    !fSlideTimer->HasTimedOut() )
05311                 //if ( fSlideTimer )
05312                 fSlideTimer->TurnOff();
05313 
05314               DrawHisto( obj );
05315 
05316               if ( AutoUpdate ) {
05317                 fPauseHistoButton->SetState( kButtonUp );
05318                 fRestartHistoButton->SetState( kButtonDisabled );
05319 
05320                 UpdateTimerOn();
05321 
05322               } //if ( AutoUpdate )
05323               else {
05324 
05325                 //if ( !Running ) {
05326                   fPauseHistoButton->SetState( kButtonDisabled );
05327                   fRestartHistoButton->SetState( kButtonUp );
05328                   //} //if ( !Running ) {
05329 
05330               } //else //if (AutoUpdate)
05331 
05332 
05333             } //else //if ( !obj )
05334 
05335 
05336           } //if ( fSelectedItem )
05337 
05338 
05339         } //if ( (item = fHistoListTree->GetSelected()) !=0 )
05340       } //if ( parm1 == kButton1 ) of kCT_ITEMDBLCLICK
05341       break; // kCT_ITEMDBLCLICK
05342 
05343     } // switch submsg of kC_LISTTREE
05344     break; //case kC_LISTTREE
05345 
05346   case kC_TEXTENTRY:
05347     switch (GET_SUBMSG(msg)) {
05348 
05349     case kTE_ENTER:
05350 
05351       switch ( parm1 ) {
05352 
05353       case kM_TEXTENTRY_FILENAME:
05354 
05355         {
05356           FileName = TString( fFileNameBuffer->GetString() );
05357 
05358           EInputTypes inputtype;
05359 
05360           if ( fRaButMFile->GetState() == kButtonDown )
05361             inputtype = kTMapFile;
05362           else if ( fRaButRFile->GetState() == kButtonDown )
05363             inputtype = kTFile;
05364           else if ( fRaButSocket->GetState() == kButtonDown )
05365             inputtype = kTSocket;
05366 
05367           //InputObj = OpenFile( FileName.Data(), inputtype, "READ" );
05368           TObject *InputObj = OpenFile( FileName.Data(), inputtype, "READ" );
05369 
05370 
05371           //if ( InputOpen ) {
05372           if ( InputObj ) {
05373 
05374             AddTreeItemsOfInput( InputObj );
05375             //RefreshTreeItem( fHistoListTree->GetFirstItem() );
05376             fClient->NeedRedraw( fHistoListTree );
05377 
05378 
05379             char* str = new char[ 9 + FileName.Length() ];
05380             strcpy(str, " Opened ");
05381             fStatusBar
05382               ->SetText( strcat(str, FileName.Data()), 1);
05383             delete [] str;
05384           } //if ( InputObj ) 
05385           else {
05386 
05387             //if ( inputtype == kTMapFile && !InputOpen ) {
05388             if ( inputtype == kTMapFile ) {
05389               const char *sg = "Failed to open memory map file.";
05390               MessageBox(sg);
05391             }
05392             //else if ( inputtype == kTFile && !InputOpen ) {
05393             else if ( inputtype == kTFile ) {
05394               const char *sg = "Failed to open ROOT file.";
05395               MessageBox(sg);
05396             }
05397             //else if ( inputtype == kTSocket && !InputOpen ) {
05398             else if ( inputtype == kTSocket ) {
05399               const char *sg = "Failed to open the socket connection.";
05400               MessageBox(sg);
05401             }
05402 
05403             char* str = new char[16+FileName.Length()];
05404             strcpy(str," Error Opening ");
05405             fStatusBar
05406               ->SetText( strcat(str, FileName.Data()), 1);
05407             delete [] str;
05408 
05409           } // else //if ( InputObj )
05410 
05411         }
05412         break;//  kM_TEXTENTRY_FILENAME
05413     
05414       }//switch ( parm1 )
05415 
05416       break; //case kTE_ENTER:
05417 
05418     default:
05419       break;
05420 
05421     }//switch (GET_SUBMSG(msg)) 
05422 
05423     break; //case kC_TEXTENTRY:
05424 
05425   default:
05426     break;
05427 
05428   } //switch ( GET_MSG(msg) )
05429 
05430   return kTRUE;
05431 
05432 }

void HistoDisplay::RecursivePadClear TVirtualPad *  pad,
Option_t *  option = ""
[private]
 

Definition at line 3129 of file HistoDisplay.cxx.

References option.

Referenced by ClearCurrentPad(), DrawHisto(), DrawTPad(), and ProcessMessage().

03130 {
03131   //cout << " In RecursivePadClear " << endl;
03132   if ( !pad ) return;
03133   //cout << pad->GetName() << endl;
03134 
03135 
03136   TList *primitivelist = pad->GetListOfPrimitives();
03137   TFrame *frame = pad->GetFrame();
03138 
03139   TIter next( primitivelist );
03140 
03141   TObject *obj;
03142   while ( ( obj = next() ) ) {
03143 
03144       if ( !( obj->TestBit( kCanDelete ) ) &&
03145            !( frame && frame->IsEqual( obj ) ) ) obj->SetBit( kCanDelete );
03146 
03147       if ( obj->InheritsFrom( TPad::Class() )  ) {
03148         TPad *padInside = (TPad*) obj;
03149         RecursivePadClear( padInside, option );
03150       } // if ( obj->InheritsFrom( TPad::Class() )  )
03151 
03152   } //while ( obj = next() )
03153 
03154   pad->Clear( option );
03155 
03156 }

void HistoDisplay::RefreshTreeItem TGListTreeItem *  item  )  [private]
 

Definition at line 2391 of file HistoDisplay.cxx.

References fHistoListTree, CObject::GetTitle(), and UpdateHistoList().

Referenced by GetNewObj(), and ProcessMessage().

02392 {
02393   //cout << " In RefreshTreeItem " << endl;
02394 
02395 
02396   while ( item ) {
02397 
02398     //tmp
02399     //cout << " item = " << item->GetText() <<endl;
02400 
02401     TGListTreeItem *sibling = item->GetNextSibling();
02402 
02403     TGListTreeItem *parent = item->GetParent();
02404 
02405     TGListTreeItem *firstchild = item->GetFirstChild();
02406 
02407     if ( firstchild ) {
02408 
02409       RefreshTreeItem( firstchild );
02410 
02411     } //if ( firstchild ) 
02412     else {
02413 
02414       TObject *inputobj =
02415         (TObject*)item->GetUserData();
02416 
02417       if ( inputobj ) {
02418 
02419         TPad *padsav = 0;
02420         if ( gPad && !( gROOT->GetListOfCanvases()->IsEmpty() ) )
02421           padsav = (TPad*) gPad;
02422       
02423         CObject *cobj = UpdateHistoList( item->GetText(), inputobj );
02424         if ( !cobj ) 
02425           fHistoListTree->DeleteItem( item );
02426         else
02427           fHistoListTree->SetToolTipItem( item, cobj->GetTitle() );
02428 
02429         if ( padsav ) padsav->cd();
02430 
02431       } //if ( inputobj )
02432 
02433     } //else //if ( firstchild )
02434 
02435     item = sibling;
02436 
02437     if ( !item &&
02438          parent && !( parent->GetFirstChild() ) )
02439       fHistoListTree->DeleteItem( parent );
02440 
02441   }  //while ( item ) 
02442 
02443   //fClient->NeedRedraw( fHistoListTree );
02444 
02445 }

void HistoDisplay::RemoveTGListTree  )  [private]
 

Definition at line 2226 of file HistoDisplay.cxx.

References fHistoListTree, and fSelectedItem.

Referenced by ProcessMessage(), and ResetObjects().

02227 {
02228   TGListTreeItem *item;
02229   if ( fHistoListTree ) {
02230     while ( (item = fHistoListTree->GetFirstItem()) ) {
02231       fHistoListTree->DeleteItem( item );
02232     } //while ( (item = fHistoListTree->GetFirstItem()) )
02233     fClient->NeedRedraw(fHistoListTree);
02234     fSelectedItem = 0;
02235   }//if ( fHistoListTree ) 
02236 }

void HistoDisplay::ReplacePad TVirtualPad *  newpad,
TVirtualPad *  oldpad
[private]
 

Definition at line 3669 of file HistoDisplay.cxx.

References CHistogram::Draw(), fDisplayedList, and CHistogram::SubtractedHisto().

03670 {
03671   // cout << " In ReplacePad " << endl;
03672 
03673   if ( !newpad || !oldpad ) return;
03674 
03675   TFrame *frame = newpad->GetFrame();
03676 
03677   TList *oldPrimitiveList = oldpad->GetListOfPrimitives();
03678   TList *newPrimitiveList = newpad->GetListOfPrimitives(); 
03679 
03680   TIter next( newPrimitiveList );
03681 
03682   TObject *obj;
03683   while( ( obj = next() ) ) {
03684 
03685       TObject *objOld = 
03686         oldPrimitiveList->FindObject( obj->GetName() );
03687       TObject *cobj =
03688         fDisplayedList->FindObject( obj->GetName() );
03689 
03690       if ( obj->InheritsFrom( TPad::Class() ) &&
03691            objOld &&
03692            objOld->InheritsFrom( TPad::Class() ) )
03693 
03694         ReplacePad( (TPad*)obj, (TPad*)objOld );
03695 
03696       else if ( obj->InheritsFrom( TH1::Class() ) 
03697                 && objOld
03698                 && objOld->InheritsFrom( TH1::Class() ) ) {
03699 
03700         TH1 *histo;
03701         TH1 *histoOld = (TH1*)objOld;
03702 
03703         if ( cobj && cobj->InheritsFrom( CHistogram::Class() ) ) {
03704           CHistogram *chisto = (CHistogram*)cobj;
03705           //chisto->SetTObject( obj );
03706           histo = chisto->SubtractedHisto();
03707         } //if ( cobj && cobj->InheritsFrom( CHistogram::Class() ) )
03708         else {
03709           histo = (TH1*)( obj->Clone() );
03710         } //else //if ( cobj && cobj->InheritsFrom( CHistogram::Class() ) )
03711 
03712         if ( histo && histoOld
03713              && ! obj->IsEqual( objOld )  ) {
03714           //tmp
03715           if ( ! oldpad->GetPadPaint() ) {
03716 
03717             histoOld->Reset();
03718             histoOld->Add( histo );
03719 
03720             TAxis *xaxis = histo->GetXaxis();
03721             if ( xaxis ) {
03722               char *title = new char[ strlen( xaxis->GetTitle() ) + 1 ];
03723               strcpy( title, xaxis->GetTitle() ); 
03724               histoOld->SetXTitle( title );
03725               delete [] title;
03726             } //if ( xaxis )
03727             TAxis *yaxis = histo->GetYaxis();
03728             if ( yaxis ) {
03729               char *title = new char[ strlen( yaxis->GetTitle() ) + 1 ];
03730               strcpy( title, yaxis->GetTitle() ); 
03731               histoOld->SetYTitle( title );
03732               delete [] title;
03733             } //if ( yaxis )
03734             TAxis *zaxis = histo->GetZaxis();
03735             if ( zaxis ) {
03736               char *title = new char[ strlen( zaxis->GetTitle() ) + 1 ];
03737               strcpy( title, zaxis->GetTitle() ); 
03738               histoOld->SetZTitle( title );
03739               delete [] title;
03740             } //if ( zaxis ) 
03741 
03742             delete histo;
03743             oldpad->Modified();
03744 
03745           } //if ( ! oldpad->GetPadPaint() )
03746           else
03747             cout << " Pad is being painted. Not updated. " << endl;
03748 
03749         } //if ( histo && histoOld )
03750 
03751       }  //else if ( obj->InheritsFrom( TH1::Class() ) && 
03752 
03753       //tmp
03754       // Should be comment out the following to avoid double TFrames.
03755       else {
03756 
03757         if ( !( frame->IsEqual( obj ) ) ) {
03758 
03759           //tmp
03760           if ( objOld ) {
03761                //&& !obj->IsEqual(objOld) ) {
03762             TObject *objtmp = oldPrimitiveList->Remove( objOld );
03763             if ( objtmp ) delete objOld;
03764           } //if ( objOld ) 
03765 
03766           oldpad->cd();
03767           obj->Clone()->Draw();
03768           oldpad->Modified();
03769 
03770         } //if ( !( frame->IsEqual( obj ) ) )
03771 
03772       } //else //if ( obj->InheritsFrom( TPad::Class() ) &&
03773 
03774   } //while ( obj = next() )
03775 
03776 
03777 }

void HistoDisplay::ResetObjects  )  [private]
 

Definition at line 4421 of file HistoDisplay.cxx.

References CloseConnection(), fDisplayedList, and RemoveTGListTree().

Referenced by ProcessMessage(), and ~HistoDisplay().

04422 {
04423   //cout << " In ResetObjects " << endl;
04424 
04425   RemoveTGListTree();
04426 
04427   if ( fDisplayedList ) fDisplayedList->Delete();
04428 
04429   CloseConnection();
04430 }

void HistoDisplay::SearchWarningErrorFolder TGListTreeItem *  item,
TObject *  socket
[private]
 

Definition at line 2451 of file HistoDisplay.cxx.

References fHistoListTree, kWarningErrorCanvasName, kWarningErrorCanvasTitle, PopUpSlides(), and strstrn().

Referenced by GetNewObj().

02452 {
02453   //cout << " In SearchWarningErrorFolder " << endl;
02454 
02455   while ( item ) {
02456 
02457     /*
02458       if ( ( strstr( item->GetText(), "warning" ) ||
02459              strstr( item->GetText(), "Warning" ) ||
02460              strstr( item->GetText(), "WARNING" ) ||
02461              strstr( item->GetText(), "error" ) ||
02462              strstr( item->GetText(), "Error" ) ||
02463              strstr( item->GetText(), "ERROR" )  ) &&
02464            ( socket->IsEqual( (TObject*) item->GetUserData() )  )  ) {
02465     */
02466 
02467     if ( ( ( strstrn( item->GetText(), kWarningFolder ) ) ||
02468            ( strstrn( item->GetText(), kErrorFolder ) ) ) &&
02469          //( socket->IsEqual( (TObject*) item->GetUserData() ) ) ) {
02470          ( !strcmp( socket->GetName(), 
02471                     ( (TObject*)item->GetUserData())->GetName() ) ) ) {
02472 
02473         //tmp
02474       //cout << "item->GetText()" << item->GetText() << endl;
02475 
02476 
02477         fHistoListTree->OpenItem( item );
02478 
02479         /*
02480         PopUpSlides( item,
02481                      "WarningErrorCanvas",
02482                      "Warning/Error Canvas" );
02483         */
02484 
02485 
02486         PopUpSlides( item,
02487                      kWarningErrorCanvasName,
02488                      kWarningErrorCanvasTitle );
02489 
02490       } //if ( strstr( item->GetText(), "warning" ) ||
02491 
02492 
02493     TGListTreeItem *sibling = item->GetNextSibling();
02494     TGListTreeItem *firstchild = item->GetFirstChild();
02495 
02496     if ( firstchild ) {
02497 
02498       SearchWarningErrorFolder( firstchild, socket );
02499 
02500     } //if ( firstchild ) 
02501 
02502     item = sibling;
02503 
02504   }  //while ( item ) 
02505 
02506 
02507 
02508 }

void HistoDisplay::SlideTimerOn TGListTreeItem *  item  )  [private]
 

Definition at line 3350 of file HistoDisplay.cxx.

03351 {
03352   //  cout << " In SlideTimerOn " << endl;
03353 
03354   //if ( !gPad || ( gROOT->GetListOfCanvases()->IsEmpty() ) ) return;
03355 
03356   /*
03357   Int_t sleeptime  = 0;
03358 
03359   sleeptime =  atoi( fFrequencyTextBuffer->GetString() );
03360 
03361   if ( fSlideTimer ) {
03362 
03363     fSlideTimer->SetTime( max( sleeptime, 2000 ) );
03364     //cout << " Timer Time = " << fSlideTimer->GetTime() << endl;
03365 
03366     //fSlideTimer->SetCurrentItem( fSelectedItem ); 
03367     fSlideTimer->SetCurrentItem( item ); 
03368 
03369     TVirtualPad *pad = 0;
03370     //if ( gPad && !gROOT->GetListOfCanvases()->IsEmpty() ) pad = gPad;
03371     if ( gROOT->GetListOfCanvases()->IsEmpty() ) gPad = 0;
03372     pad = gPad;
03373     fSlideTimer->SetCurrentPad( pad );
03374 
03375 
03376     if ( fUpdateTimer
03377          && ( fUpdateTimer->GetCurrentPad() == gPad )
03378          && !fUpdateTimer->HasTimedOut() )
03379       //if ( fUpdateTimer )
03380       fUpdateTimer->TurnOff();
03381 
03382 
03383 
03384     Running = kTRUE;
03385     fReadFileButton->ChangeBackground(Green);
03386     //  cout << "Button changed to green\n"; 
03387     gClient->NeedRedraw(fReadFileButton);
03388    fSlideTimer->TurnOn();
03389 
03390   } // if ( fSlideTimer ) {
03391 
03392   */
03393 }

void HistoDisplay::SortTGListTree  )  [private]
 

Definition at line 2190 of file HistoDisplay.cxx.

References fHistoListTree.

Referenced by ProcessMessage().

02191 {
02192 
02193   if ( fHistoListTree->GetFirstItem() ) {
02194 
02195   TGListTreeItem *item;
02196   TGListTreeItem **list;
02197   int ichild = 0;
02198   int iparent = 0;
02199 
02200   const int itemmax = 200;
02201   list = new TGListTreeItem* [itemmax];
02202   list[ichild] = fHistoListTree->GetFirstItem();
02203 
02204   do
02205   {
02206     if ( fHistoListTree->SortChildren( list[iparent] ) ) {
02207       if ( (item = list[iparent]->GetFirstChild()) ) {
02208         list[++ichild] = item;
02209         while ( ( item =  list[ichild]->GetNextSibling() )
02210                 && ichild < itemmax ) list[++ichild] = item;
02211       }
02212     }
02213     iparent++;
02214 
02215   } while ( iparent <= ichild && ichild < itemmax );
02216   
02217   delete [] list;
02218 
02219   } //if ( fHistoListTree->GetFirstItem() )
02220 
02221   fClient->NeedRedraw(fHistoListTree);
02222 
02223 }

void HistoDisplay::StartSlides TGListTreeItem *  item  )  [private]
 

Definition at line 3319 of file HistoDisplay.cxx.

Referenced by PopUpSlides(), and ProcessMessage().

03320 {
03321   // cout << " In StartSlides " << endl;
03322   /*
03323   if ( selectedItem &&
03324        selectedItem->GetFirstChild() &&
03325        selectedItem->GetFirstChild()->GetNextSibling() &&
03326        selectedItem->IsOpen() ) {
03327 
03328     //Running = kTRUE;
03329 
03330     fPauseHistoButton->SetState( kButtonUp );
03331     fRestartHistoButton->SetState( kButtonDisabled );
03332   */
03333     /*
03334     //if ( fUpdateTimer && !fUpdateTimer->HasTimedOut() )
03335     if ( fUpdateTimer )
03336       fUpdateTimer->TurnOff();
03337     */
03338   /*
03339     //SlideTimerOn();
03340     SlideTimerOn( selectedItem );
03341 
03342   } //if ( selectedItem &&
03343   */
03344 
03345 }

void HistoDisplay::UpdateCanvas TVirtualPad *  currentpad = 0  )  [private]
 

Definition at line 3235 of file HistoDisplay.cxx.

References AutoUpdate, fSlideCanvasList, SlideShowUpdate, and UpdatePad().

Referenced by HistoDisplayUpdateTimer::Notify(), and ProcessMessage().

03235                                                          {
03236 
03237   //  cout << " In UpdateCanvas " << endl;
03238 
03239   if ( gPad && !( gROOT->GetListOfCanvases()->IsEmpty() ) ) {
03240 
03241     TCanvas *canvas = 0;
03242     static TObjLink *link = 0;
03243 
03244     TPad *gPadSav = (TPad*) gPad;
03245 
03246     if ( AutoUpdate &&
03247         SlideShowUpdate &&
03248         fSlideCanvasList &&
03249         !( fSlideCanvasList->IsEmpty() ) ) {
03250 
03251       if ( !link ) link = fSlideCanvasList->FirstLink();
03252 
03253       if ( link ) {
03254 
03255         TObject *ocanv = 0;
03256         if ( ( ocanv = link->GetObject() ) &&
03257              ( gROOT->GetListOfCanvases()->FindObject( ocanv ) ) &&
03258              ( ocanv->InheritsFrom( TCanvas::Class() ) ) ) {
03259           canvas = (TCanvas*) ocanv;
03260 
03261           //canvas->cd();
03262           UpdatePad( canvas );
03263 
03264           link = link->Next();
03265         } //if ( ( ocanv = link->GetObject() ) &&
03266         else {
03267           TObjLink *linktmp = link;
03268           link = link->Next();
03269           fSlideCanvasList->Remove( linktmp );
03270           return;
03271         } // else //if ( ( ocanv = link->GetObject() ) &&
03272 
03273       } //if ( link ) 
03274 
03275 
03276     } //if ( AutoUpdate &&
03277     else {
03278 
03279       link = 0;
03280       //canvas = gPad->GetCanvas();
03281 
03282       if ( !currentpad ||
03283            !gROOT->GetListOfCanvases()->FindObject( currentpad ) )
03284         currentpad = gPadSav;
03285 
03286       UpdatePad( currentpad );
03287 
03288       //      canvas = currentpad->GetCanvas();  DP
03289 
03290     } //else //if ( AutoUpdate && 
03291 
03292     /*
03293     if ( canvas ) {
03294       TCanvasImp *canvasimp = canvas->GetCanvasImp();
03295       if ( canvasimp ) canvasimp->Show();
03296     } // if ( canvas ) 
03297     */
03298 
03299     //TPad *gpad = (TPad*) gPad;
03300     //UpdatePad( gpad );
03301 
03302 
03303     delete canvas;
03304     delete link;
03305     //    cout << gROOT->GetListOfCanvases()->GetSize();
03306   
03307 
03308      gPadSav->cd();
03309      // delete gPadSav;
03310   } //if( gPad && !( gROOT->GetListOfCanvases()->IsEmpty() ) ) 
03311 
03312 
03313 }

CObject * HistoDisplay::UpdateHistoList const char *  objName,
const TObject *  inputobj
[private]
 

Definition at line 3822 of file HistoDisplay.cxx.

References AddPadHistosToHistoList(), fDisplayedList, CObject::GetInputSource(), GetNewObj(), CObject::SetInputSource(), and CObject::SetTObject().

Referenced by DrawUpdatedPad(), GetCObjFromListItem(), and RefreshTreeItem().

03823 {
03824   //cout << " In UpdateHistoList " << endl;
03825   //cout << " updating " << objName << endl;
03826 
03827   /*
03828   if ( !inputobj ) {
03829     cout << " Input Object is not set. " << endl; 
03830     return 0;
03831   }
03832   */
03833 
03834   //const char *path = gROOT->GetPath(); 
03835   TVirtualPad *padsav = 0;
03836   if ( gPad && !gROOT->GetListOfCanvases()->IsEmpty() ) padsav = gPad;
03837 
03838 
03839 
03840   TObject *obj = GetNewObj( objName, inputobj );
03841   CObject *cobj = 0; 
03842 
03843   if ( obj ) {
03844 
03845     TObject *objold = fDisplayedList->FindObject( objName );
03846 
03847     /*
03848     TObjLink *lnk = fDisplayedList->FirstLink();
03849     while (lnk) {
03850       TObject *objtmp = lnk->GetObject();
03851       if (objtmp && 
03852           objtmp->GetName() && !strcmp(objName, objtmp->GetName())) {
03853 
03854         if ( objtmp->InheritsFrom( CObject::Class() ) ) {
03855           CObject *cobjtmp = (CObject*)objtmp;
03856           TObject *inputtmp = cobjtmp->GetInputSource();
03857           if ( ( inputtmp && inputtmp->GetName() ) &&
03858                ( inputobj && inputobj->GetName() ) &&
03859                ( !strcmp( inputtmp->GetName(),
03860                           inputobj->GetName() ) ) ) {
03861             //objold = objtmp;
03862             cobj = cobjtmp;
03863             cobj->SetTObject( obj );
03864             if ( cobj->GetInputSource() != inputobj )
03865               cobj->SetInputSource( inputobj );
03866               
03867           } //if ( ( inputtmp && inputtmp->GetName() ) &&
03868 
03869 
03870         }//if ( objtmp->InheritsFrom( CObject::Class() ) ) 
03871 
03872 
03873       } //if ( objtmp && objtmp->GetName() && ... )
03874 
03875       lnk = lnk->Next();
03876     } //while (lnk) 
03877 
03878     */
03879 
03880 
03881     if ( objold && objold->InheritsFrom( CObject::Class() ) ) {
03882 
03883       cobj = (CObject*) objold;
03884 
03885       if ( cobj ) {
03886         cobj->SetTObject( obj );
03887         //if ( cobj->GetInputSource() != inputobj )
03888         if ( inputobj != cobj->GetInputSource()  ) {
03889           cobj->SetInputSource( inputobj );
03890           //tmp
03891           //cout << " InputObj is updated. " << endl;
03892         } // if ( inputobj != cobj->GetInputSource()  )  
03893       } // if ( cobj )
03894 
03895     } //if ( objold && objold->InheritsFrom( CObject::Class() ) )
03896 
03897     else {
03898 
03899       //if ( !cobj ) {
03900 
03901       if ( obj->InheritsFrom(TH1::Class()) ) {
03902 
03903         CHistogram *cobjnew =
03904           new CHistogram( (TH1*)obj, inputobj, 0, 0 );
03905 
03906                         fDisplayedList->Add( cobjnew );
03907 
03908         cobj = cobjnew;
03909 
03910       } //if ( obj->InheritsFrom(TH1::Class()) )
03911       else {
03912 
03913         CObject *cobjnew =
03914           new CObject( obj, inputobj );
03915 
03916                         fDisplayedList->Add( cobjnew );
03917 
03918         cobj = cobjnew;
03919 
03920       } // else //if ( obj->InheritsFrom(TH1::Class()) )
03921 
03922       //} // if ( !cobj ) 
03923 
03924 
03925     } //else //if ( objold && objold->InheritsFrom( CObject::Class() ) )
03926 
03927         if ( obj->InheritsFrom( TPad::Class() ) )
03928         AddPadHistosToHistoList( (TPad*)obj );
03929 
03930   } //if ( obj )
03931 
03932   else {
03933 
03934     //tmp
03935     /*
03936     if ( objold && objold->InheritsFrom( CObject::Class() ) ) 
03937       cobj = (CObject*) objold;
03938     */
03939     //tmp
03940     //cout << " obj is not got from the input stream. " << endl;
03941 
03942   } //else //if(obj)
03943 
03944   //tmp
03945   if ( !cobj ) cout << " Not updated. " << endl;
03946 
03947 
03948   //gROOT->Cd( path );
03949   if ( padsav ) padsav->cd(); 
03950 
03951 
03952   return cobj;
03953 
03954 }

void HistoDisplay::UpdatePad TVirtualPad *  pad  )  [private]
 

Definition at line 3515 of file HistoDisplay.cxx.

References DrawUpdatedPad().

Referenced by UpdateCanvas().

03516 {
03517   //cout << " In UpdatePad " << endl;
03518 
03519   if ( !pad ) return;
03520 
03521   DrawUpdatedPad( pad );
03522   pad->cd();
03523   pad->Modified();
03524   pad->Update();
03525 
03526 }

void HistoDisplay::UpdateTimerOn  )  [private]
 

Definition at line 3161 of file HistoDisplay.cxx.

References fFrequencyTextBuffer, fUpdateTimer, max, Running, and HistoDisplayUpdateTimer::SetCurrentPad().

Referenced by ProcessMessage().

03162 {
03163   //cout << " In UpdateTimerOn " << endl;
03164 
03165   TVirtualPad *currentPad;
03166 
03167   if ( !gPad || ( gROOT->GetListOfCanvases()->IsEmpty() ) )
03168     return;
03169   else
03170     currentPad = gPad;
03171 
03172 
03173   Int_t sleeptime  = 0;
03174 
03175   if ( AutoUpdate ) {
03176 
03177     sleeptime =  atoi( fFrequencyTextBuffer->GetString() );
03178 
03179     if ( fUpdateTimer ) {
03180       fUpdateTimer->SetTime( max( sleeptime, 800 ) );
03181       //cout << " Timer Time = " << fUpdateTimer->GetTime() << endl;
03182 
03183       fUpdateTimer->SetCurrentPad( currentPad );
03184 
03185       Running = kTRUE;
03186 //      fReadFileButton->ChangeBackground(Green);
03187       fUpdateTimer->TurnOn();
03188 
03189       //return;
03190     } //if ( fUpdateTimer )
03191 
03192   } //if ( AutoUpdate )
03193 
03194 
03195   //cout << "Update done" << endl << endl;
03196 
03197 }


Friends And Related Function Documentation

friend class HistoDisplaySlideTimer [friend]
 

Definition at line 80 of file HistoDisplay.h.

friend class HistoDisplayUpdateTimer [friend]
 

Definition at line 79 of file HistoDisplay.h.


Member Data Documentation

Bool_t HistoDisplay::AutoUpdate [private]
 

Definition at line 200 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame(), HistoDisplayUpdateTimer::Notify(), ProcessMessage(), and UpdateCanvas().

TString HistoDisplay::CanvasName [private]
 

Definition at line 396 of file HistoDisplay.h.

Referenced by DrawHisto(), and ProcessMessage().

Int_t HistoDisplay::CanvasNumber [private]
 

Definition at line 398 of file HistoDisplay.h.

Referenced by DrawHisto(), and ProcessMessage().

TString HistoDisplay::CanvasTitle [private]
 

Definition at line 397 of file HistoDisplay.h.

Referenced by DrawHisto(), and ProcessMessage().

ConsumerList* HistoDisplay::consumerlist [private]
 

Definition at line 275 of file HistoDisplay.h.

Referenced by MenuConnectStatus().

TGCompositeFrame* HistoDisplay::fButtonFrame [private]
 

Definition at line 215 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGLayoutHints* HistoDisplay::fButtonFrameLayout [private]
 

Definition at line 216 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGLayoutHints* HistoDisplay::fButtonLayout [private]
 

Definition at line 217 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGCheckButton* HistoDisplay::fChButtonAutoUpdate [private]
 

Definition at line 198 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame(), and ProcessMessage().

TGLayoutHints* HistoDisplay::fChButtonAutoUpdateLayout [private]
 

Definition at line 199 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGCheckButton* HistoDisplay::fChButtonSlideUpdate [private]
 

Definition at line 389 of file HistoDisplay.h.

Referenced by GetNewObj(), MakeTGListTreeFrame(), and ProcessMessage().

TGTextButton* HistoDisplay::fChooseFileButton [private]
 

Definition at line 170 of file HistoDisplay.h.

Referenced by MakeInputFrame().

TGTextButton* HistoDisplay::fClearFileNameButton [private]
 

Definition at line 171 of file HistoDisplay.h.

Referenced by MakeInputFrame().

TGTextButton* HistoDisplay::fClearHistoButton [private]
 

Definition at line 222 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGPopupMenu* HistoDisplay::fConnectMenu [private]
 

Definition at line 100 of file HistoDisplay.h.

Referenced by MakeMenuBar().

TGTextButton* HistoDisplay::fContentHistoButton [private]
 

Definition at line 236 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGCompositeFrame* HistoDisplay::fControlButtonFrame [private]
 

Definition at line 211 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGLayoutHints* HistoDisplay::fControlButtonFrameLayout [private]
 

Definition at line 212 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TList* HistoDisplay::fDisplayedList [private]
 

Definition at line 309 of file HistoDisplay.h.

Referenced by AddPadHistosToHistoList(), AddSubtractHisto(), ChangeCanvasNameTitle(), DrawUpdatedPad(), GetCObjFromListItem(), ProcessMessage(), ReplacePad(), ResetObjects(), and UpdateHistoList().

TGPopupMenu* HistoDisplay::fFileMenu [private]
 

Definition at line 96 of file HistoDisplay.h.

Referenced by MakeMenuBar().

TGTextBuffer* HistoDisplay::fFileNameBuffer [private]
 

Definition at line 163 of file HistoDisplay.h.

Referenced by FileNameClear(), MakeInputFrame(), and ProcessMessage().

TGCompositeFrame* HistoDisplay::fFileNameButtonFrame [private]
 

Definition at line 167 of file HistoDisplay.h.

Referenced by MakeInputFrame().

TGLayoutHints* HistoDisplay::fFileNameButtonFrameLayout [private]
 

Definition at line 168 of file HistoDisplay.h.

Referenced by MakeInputFrame().

TGLayoutHints* HistoDisplay::fFileNameButtonLayout [private]
 

Definition at line 169 of file HistoDisplay.h.

Referenced by MakeInputFrame().

TGGroupFrame* HistoDisplay::fFileNameFrame [private]
 

Definition at line 142 of file HistoDisplay.h.

Referenced by MakeInputFrame().

TGLayoutHints* HistoDisplay::fFileNameFrameLayout [private]
 

Definition at line 143 of file HistoDisplay.h.

Referenced by MakeInputFrame().

TGLabel* HistoDisplay::fFileNameLabel [private]
 

Definition at line 157 of file HistoDisplay.h.

Referenced by MakeInputFrame().

TGLayoutHints* HistoDisplay::fFileNameLayout [private]
 

Definition at line 156 of file HistoDisplay.h.

Referenced by MakeInputFrame().

TGTextEntry* HistoDisplay::fFileNameTextEntry [private]
 

Definition at line 162 of file HistoDisplay.h.

Referenced by FileNameClear(), MakeInputFrame(), and ProcessMessage().

TGCompositeFrame* HistoDisplay::fFileOpenFrame [private]
 

Definition at line 159 of file HistoDisplay.h.

Referenced by MakeInputFrame().

TGLayoutHints* HistoDisplay::fFileOpenFrameLayout [private]
 

Definition at line 160 of file HistoDisplay.h.

Referenced by MakeInputFrame().

TGCompositeFrame* HistoDisplay::fFrequencyFrame [private]
 

Definition at line 203 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGLayoutHints* HistoDisplay::fFrequencyFrameLayout [private]
 

Definition at line 204 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGLabel* HistoDisplay::fFrequencyLabel [private]
 

Definition at line 206 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGTextBuffer* HistoDisplay::fFrequencyTextBuffer [private]
 

Definition at line 208 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame(), and UpdateTimerOn().

TGTextEntry* HistoDisplay::fFrequencyTextEntry [private]
 

Definition at line 207 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGPopupMenu* HistoDisplay::fHelpMenu [private]
 

Definition at line 101 of file HistoDisplay.h.

Referenced by MakeMenuBar().

TGCompositeFrame* HistoDisplay::fHistoButtonFrame [private]
 

Definition at line 230 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGLayoutHints* HistoDisplay::fHistoButtonFrameLayout [private]
 

Definition at line 231 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGGroupFrame* HistoDisplay::fHistoButtonGFrame [private]
 

Definition at line 228 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGLayoutHints* HistoDisplay::fHistoButtonGFrameLayout [private]
 

Definition at line 229 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGLayoutHints* HistoDisplay::fHistoButtonLayout [private]
 

Definition at line 232 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TList* HistoDisplay::fHistoList [private]
 

Definition at line 294 of file HistoDisplay.h.

Referenced by AddToDisplayedList(), AddToTree(), MakeHistoList(), MakeHistoListM(), MakeHistoListR(), and MakeHistoListS().

TGCompositeFrame* HistoDisplay::fHistoListFrame [private]
 

Definition at line 188 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGLayoutHints* HistoDisplay::fHistoListFrameLayout [private]
 

Definition at line 189 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGListTree* HistoDisplay::fHistoListTree [private]
 

Definition at line 193 of file HistoDisplay.h.

Referenced by AddToTree(), DelTreeItemsOfInput(), GetCObjFromListItem(), GetNewObj(), MakeTGListTree(), MakeTGListTreeFrame(), HistoDisplaySlideTimer::Notify(), HistoDisplayUpdateTimer::Notify(), ProcessMessage(), RefreshTreeItem(), RemoveTGListTree(), SearchWarningErrorFolder(), and SortTGListTree().

TString HistoDisplay::FileName [private]
 

Definition at line 272 of file HistoDisplay.h.

Referenced by ProcessMessage().

TGCompositeFrame* HistoDisplay::fListButtonFrame [private]
 

Definition at line 195 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGLayoutHints* HistoDisplay::fListButtonFrameLayout [private]
 

Definition at line 196 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGCompositeFrame* HistoDisplay::fListTreeMainFrame [private]
 

Definition at line 179 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGLayoutHints* HistoDisplay::fListTreeMainFrameLayout [private]
 

Definition at line 180 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGPopupMenu* HistoDisplay::fListTreeMenu [private]
 

Definition at line 98 of file HistoDisplay.h.

Referenced by MakeMenuBar().

TGCompositeFrame* HistoDisplay::fMainFrame [private]
 

Definition at line 110 of file HistoDisplay.h.

Referenced by MakeInputFrame(), MakeStatusBar(), MakeTGListTreeFrame(), and MakeTitleFrame().

TGLayoutHints* HistoDisplay::fMainFrameLayout [private]
 

Definition at line 111 of file HistoDisplay.h.

TGMenuBar* HistoDisplay::fMenuBar [private]
 

Definition at line 92 of file HistoDisplay.h.

Referenced by MakeMenuBar().

TGLayoutHints* HistoDisplay::fMenuBarHelpLayout [private]
 

Definition at line 95 of file HistoDisplay.h.

Referenced by MakeMenuBar().

TGLayoutHints* HistoDisplay::fMenuBarItemLayout [private]
 

Definition at line 94 of file HistoDisplay.h.

Referenced by MakeMenuBar().

TGLayoutHints* HistoDisplay::fMenuBarLayout [private]
 

Definition at line 93 of file HistoDisplay.h.

Referenced by MakeMenuBar().

TGHorizontal3DLine* HistoDisplay::fMenuBarSeparator [private]
 

Definition at line 103 of file HistoDisplay.h.

Referenced by MakeMenuBar().

TGLayoutHints* HistoDisplay::fMenuBarSeparatorLayout [private]
 

Definition at line 104 of file HistoDisplay.h.

Referenced by MakeMenuBar().

TGTextBuffer* HistoDisplay::fMonitorNameBuffer [private]
 

Definition at line 185 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGLabel* HistoDisplay::fMonitorNameLabel [private]
 

Definition at line 183 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGLayoutHints* HistoDisplay::fMonitorNameLayout [private]
 

Definition at line 182 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGTextEntry* HistoDisplay::fMonitorNameTextEntry [private]
 

Definition at line 184 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGTextButton* HistoDisplay::fNewCanvasButton [private]
 

Definition at line 224 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGPopupMenu* HistoDisplay::fNewCascadeMenu [private]
 

Definition at line 97 of file HistoDisplay.h.

Referenced by MakeMenuBar().

TGTextButton* HistoDisplay::fPauseHistoButton [private]
 

Definition at line 220 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame(), HistoDisplaySlideTimer::Notify(), HistoDisplayUpdateTimer::Notify(), and ProcessMessage().

TGPictureButton* HistoDisplay::fPicBut [private]
 

Definition at line 132 of file HistoDisplay.h.

Referenced by MakeTitleFrame().

TGLayoutHints* HistoDisplay::fPictLayout [private]
 

Definition at line 133 of file HistoDisplay.h.

Referenced by MakeTitleFrame().

Int_t HistoDisplay::fport [private]
 

Definition at line 86 of file HistoDisplay.h.

Referenced by MakeInputFrame().

char* HistoDisplay::fPrinter [private]
 

Definition at line 444 of file HistoDisplay.h.

char* HistoDisplay::fPrinterCommand [private]
 

Definition at line 445 of file HistoDisplay.h.

TGTextButton* HistoDisplay::fPrintHistoButton [private]
 

Definition at line 448 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGLayoutHints* HistoDisplay::fRaButLayout [private]
 

Definition at line 148 of file HistoDisplay.h.

Referenced by MakeInputFrame().

TGRadioButton* HistoDisplay::fRaButMFile [private]
 

Definition at line 145 of file HistoDisplay.h.

Referenced by FileDialogWindow(), MakeInputFrame(), and ProcessMessage().

TGRadioButton* HistoDisplay::fRaButRFile [private]
 

Definition at line 146 of file HistoDisplay.h.

Referenced by FileDialogWindow(), MakeInputFrame(), and ProcessMessage().

TGRadioButton* HistoDisplay::fRaButSocket [private]
 

Definition at line 147 of file HistoDisplay.h.

Referenced by FileDialogWindow(), MakeInputFrame(), and ProcessMessage().

TGTextButton* HistoDisplay::fReadFileButton [private]
 

Definition at line 165 of file HistoDisplay.h.

Referenced by GetNewObj(), MakeInputFrame(), HistoDisplaySlideTimer::Notify(), and ProcessMessage().

TGTextButton* HistoDisplay::fRestartHistoButton [private]
 

Definition at line 221 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame(), HistoDisplaySlideTimer::Notify(), HistoDisplayUpdateTimer::Notify(), and ProcessMessage().

TGListTreeItem* HistoDisplay::fSelectedItem [private]
 

Definition at line 330 of file HistoDisplay.h.

Referenced by HistoDisplaySlideTimer::Notify(), HistoDisplayUpdateTimer::Notify(), ProcessMessage(), and RemoveTGListTree().

TList* HistoDisplay::fSlideCanvasList [private]
 

Definition at line 388 of file HistoDisplay.h.

Referenced by ChangeCanvasNameTitle(), DrawHisto(), ProcessMessage(), and UpdateCanvas().

HistoDisplaySlideTimer* HistoDisplay::fSlideTimer [private]
 

Definition at line 420 of file HistoDisplay.h.

Referenced by PopUpSlides(), and ProcessMessage().

const char* HistoDisplay::fsocketserver [private]
 

Definition at line 85 of file HistoDisplay.h.

Referenced by MakeInputFrame().

TGPopupMenu* HistoDisplay::fSortCascadeMenu [private]
 

Definition at line 99 of file HistoDisplay.h.

Referenced by MakeMenuBar().

TGTextButton* HistoDisplay::fStartHistoButton [private]
 

Definition at line 219 of file HistoDisplay.h.

TGStatusBar* HistoDisplay::fStatusBar [private]
 

Definition at line 242 of file HistoDisplay.h.

Referenced by MakeStatusBar(), and ProcessMessage().

TGTextButton* HistoDisplay::fStopHistoButton [private]
 

Definition at line 223 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

GContext_t HistoDisplay::fTextGC [private]
 

Definition at line 131 of file HistoDisplay.h.

Referenced by CloseTitleFrame(), and MakeTitleFrame().

TGCanvas* HistoDisplay::fTGCanvas [private]
 

Definition at line 191 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGLayoutHints* HistoDisplay::fTGCanvasLayout [private]
 

Definition at line 192 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

TGCompositeFrame* HistoDisplay::fTitleFrame [private]
 

Definition at line 127 of file HistoDisplay.h.

Referenced by MakeTitleFrame().

TGLayoutHints* HistoDisplay::fTitleFrameLayout [private]
 

Definition at line 128 of file HistoDisplay.h.

Referenced by MakeTitleFrame().

TGLabel* HistoDisplay::fTitleLabel [private]
 

Definition at line 129 of file HistoDisplay.h.

Referenced by MakeTitleFrame().

TGLayoutHints* HistoDisplay::fTitleLabelLayout [private]
 

Definition at line 130 of file HistoDisplay.h.

Referenced by MakeTitleFrame().

TGTextButton* HistoDisplay::fUnZeroHistoButton [private]
 

Definition at line 235 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

HistoDisplayUpdateTimer* HistoDisplay::fUpdateTimer [private]
 

Definition at line 404 of file HistoDisplay.h.

Referenced by ProcessMessage(), and UpdateTimerOn().

TGTextButton* HistoDisplay::fZeroHistoButton [private]
 

Definition at line 234 of file HistoDisplay.h.

Referenced by MakeTGListTreeFrame().

ULong_t HistoDisplay::Green [private]
 

Definition at line 119 of file HistoDisplay.h.

Referenced by HistoDisplaySlideTimer::Notify(), and ProcessMessage().

ULong_t HistoDisplay::LightYellow [private]
 

Definition at line 117 of file HistoDisplay.h.

Referenced by MakeInputFrame(), and MakeTGListTreeFrame().

TString HistoDisplay::MonitorName [private]
 

Definition at line 271 of file HistoDisplay.h.

ULong_t HistoDisplay::Red [private]
 

Definition at line 118 of file HistoDisplay.h.

Referenced by GetNewObj(), MakeInputFrame(), and ProcessMessage().

Bool_t HistoDisplay::Running [private]
 

Definition at line 340 of file HistoDisplay.h.

Referenced by GetNewObj(), HistoDisplaySlideTimer::Notify(), HistoDisplayUpdateTimer::Notify(), ProcessMessage(), and UpdateTimerOn().

Bool_t HistoDisplay::SlideShowUpdate [private]
 

Definition at line 390 of file HistoDisplay.h.

Referenced by GetNewObj(), MakeTGListTreeFrame(), ProcessMessage(), and UpdateCanvas().


The documentation for this class was generated from the following files:
Generated on Fri Mar 28 16:02:09 2008 for loon by  doxygen 1.3.9.1