HistoDisplay.cxx File Reference

#include <sys/types.h>
#include <sys/unistd.h>
#include <unistd.h>
#include "TVirtualX.h"
#include <TROOT.h>
#include <TStyle.h>
#include <TApplication.h>
#include <TGClient.h>
#include <TString.h>
#include <TRegexp.h>
#include <TGMenu.h>
#include <TG3DLine.h>
#include <TRootHelpDialog.h>
#include <HelpText.h>
#include <TGTextView.h>
#include <TGLabel.h>
#include <TGTextEntry.h>
#include <TGLayout.h>
#include <TGButton.h>
#include <TFile.h>
#include <TMapFile.h>
#include <TList.h>
#include <TCollection.h>
#include <TKey.h>
#include <TObject.h>
#include <TH1.h>
#include <TClass.h>
#include <TGListTree.h>
#include <TGWindow.h>
#include <TGCanvas.h>
#include <TCanvas.h>
#include <TTimer.h>
#include <TSystem.h>
#include <TVirtualPad.h>
#include <TGFileDialog.h>
#include <TGMsgBox.h>
#include <TGFrame.h>
#include <TGStatusBar.h>
#include <string.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include <cstring>
#include <TUrl.h>
#include <TFrame.h>
#include <TGTextEditDialogs.h>
#include <fstream>
#include <ctype.h>
#include "HistoDisplay.h"
#include "HistoDisplayHelpText.h"
#include "HistoDisplayPhoto.h"
#include "ConsumerList.h"
#include <TSocket.h>
#include <TMessage.h>
#include <strstream>
#include "TConsumerInfo.h"
#include "CObject.h"
#include "CHistogram.h"
#include "ServerProtocol.h"

Go to the source code of this file.

Enumerations

enum  HistoDisplayMessageTypes {
  kM_MENU_FILE_NEWGUI, kM_MENU_FILE_NEWCANVAS, kM_MENU_FILE_NEWSLIDE, kM_MENU_FILE_CLOSE,
  kM_MENU_FILE_EXIT, kM_MENU_LISTTREE_SORTTREE, kM_MENU_LISTTREE_SORTFOLDER, kM_MENU_LISTTREE_DELETE,
  kM_MENU_LISTTREE_CLEAR, kM_MENU_LISTTREE_REFRESH, kM_MENU_CONNECT_STATUS, kM_MENU_HELP_GUI,
  kM_MENU_HELP_ROOT, kM_MENU_HELP_CANVAS, kM_PICTBUTTON, kM_RABUTTON_MFILE,
  kM_RABUTTON_RFILE, kM_RABUTTON_SOCKET, kM_BUTTON_FILENAME, kM_BUTTON_CHOOSEFILE,
  kM_BUTTON_CLEARFILENAME, kM_BUTTON_PAUSE, kM_BUTTON_CLEAR, kM_BUTTON_PRINT,
  kM_BUTTON_RESTART, kM_BUTTON_ZERO, kM_BUTTON_UNZERO, kM_BUTTON_CONTENT,
  kM_BUTTON_STOP, kM_BUTTON_CANVAS, kM_CHBUTTON_AUTOUPDATE, kM_CHBUTTON_SLIDEUPDATE,
  kM_TEXTENTRY_FILENAME, kM_TEXTENTRY_MONITORNAME, kM_TEXTENTRY_FREQUENCY
}

Functions

char * getword (char *str, const char commentchar)
char * strdelete (char *str, const char *del)
char * strstrn (const char *s, const char *k)

Variables

const char * kSlideShowFolder = "slide"
const char * kWarningFolder = "warning"
const char * kErrorFolder = "error"
const char * kWarningErrorCanvasName = "WarningErrorCanvas"
const char * kWarningErrorCanvasTitle = "Warning/Error Canvas"

Enumeration Type Documentation

Enumerator:
kM_MENU_FILE_NEWGUI 
kM_MENU_FILE_NEWCANVAS 
kM_MENU_FILE_NEWSLIDE 
kM_MENU_FILE_CLOSE 
kM_MENU_FILE_EXIT 
kM_MENU_LISTTREE_SORTTREE 
kM_MENU_LISTTREE_SORTFOLDER 
kM_MENU_LISTTREE_DELETE 
kM_MENU_LISTTREE_CLEAR 
kM_MENU_LISTTREE_REFRESH 
kM_MENU_CONNECT_STATUS 
kM_MENU_HELP_GUI 
kM_MENU_HELP_ROOT 
kM_MENU_HELP_CANVAS 
kM_PICTBUTTON 
kM_RABUTTON_MFILE 
kM_RABUTTON_RFILE 
kM_RABUTTON_SOCKET 
kM_BUTTON_FILENAME 
kM_BUTTON_CHOOSEFILE 
kM_BUTTON_CLEARFILENAME 
kM_BUTTON_PAUSE 
kM_BUTTON_CLEAR 
kM_BUTTON_PRINT 
kM_BUTTON_RESTART 
kM_BUTTON_ZERO 
kM_BUTTON_UNZERO 
kM_BUTTON_CONTENT 
kM_BUTTON_STOP 
kM_BUTTON_CANVAS 
kM_CHBUTTON_AUTOUPDATE 
kM_CHBUTTON_SLIDEUPDATE 
kM_TEXTENTRY_FILENAME 
kM_TEXTENTRY_MONITORNAME 
kM_TEXTENTRY_FREQUENCY 

Definition at line 323 of file HistoDisplay.cxx.

00323                               {
00324   kM_MENU_FILE_NEWGUI,
00325   kM_MENU_FILE_NEWCANVAS,
00326   kM_MENU_FILE_NEWSLIDE,
00327   kM_MENU_FILE_CLOSE,
00328   kM_MENU_FILE_EXIT,
00329   kM_MENU_LISTTREE_SORTTREE,
00330   kM_MENU_LISTTREE_SORTFOLDER,
00331   kM_MENU_LISTTREE_DELETE,
00332   kM_MENU_LISTTREE_CLEAR,
00333   kM_MENU_LISTTREE_REFRESH,
00334   /*
00335   kM_MENU_CONNECT_MON1,
00336   kM_MENU_CONNECT_MON2,
00337   kM_MENU_CONNECT_MON3,
00338   kM_MENU_CONNECT_MON4,
00339   kM_MENU_CONNECT_MON5,
00340   */
00341   kM_MENU_CONNECT_STATUS,
00342   kM_MENU_HELP_GUI,
00343   kM_MENU_HELP_ROOT,
00344   kM_MENU_HELP_CANVAS,
00345   kM_PICTBUTTON,
00346   kM_RABUTTON_MFILE,
00347   kM_RABUTTON_RFILE,
00348   kM_RABUTTON_SOCKET,
00349   kM_BUTTON_FILENAME,
00350   kM_BUTTON_CHOOSEFILE,
00351   kM_BUTTON_CLEARFILENAME,
00352   //kM_BUTTON_START,
00353   kM_BUTTON_PAUSE,
00354   kM_BUTTON_CLEAR,
00355   kM_BUTTON_PRINT,
00356   kM_BUTTON_RESTART,
00357   kM_BUTTON_ZERO,
00358   kM_BUTTON_UNZERO,
00359   kM_BUTTON_CONTENT,
00360   kM_BUTTON_STOP,
00361   kM_BUTTON_CANVAS,
00362   //kM_BUTTON_EXIT,
00363   kM_CHBUTTON_AUTOUPDATE,
00364   kM_CHBUTTON_SLIDEUPDATE,
00365   kM_TEXTENTRY_FILENAME,
00366   kM_TEXTENTRY_MONITORNAME,
00367   kM_TEXTENTRY_FREQUENCY
00368 };


Function Documentation

char* getword ( char *  str,
const char  commentchar 
)

Definition at line 1805 of file HistoDisplay.cxx.

Referenced by HistoDisplay::MakeConsumerInfo().

01806 {
01807   //cout << " In getword " << endl;
01808 
01809   char *word = 0;
01810 
01811   if ( str && ( strlen( str ) > 0 ) ) {
01812     char *begin = str;
01813     while( isspace( *begin ) && ( *begin != '\0' ) ) begin++;
01814 
01815     //if ( *begin != '\0' ) {
01816     if ( ( *begin != '\0' ) &&
01817          ( *begin != commentchar ) ) {
01818 
01819       char *end = begin;
01820 
01821       //while( !isspace( *end ) ) end++;
01822 
01823       while( !isspace( *end ) ) {
01824         char *tmp = 0;
01825         if ( ( *end == '\"' ) && 
01826              ( tmp = const_cast<char*>(strchr( end + 1 , '\"' )) )  ) end = tmp;
01827         else end++;
01828       }
01829 
01830       char tmpchr = *end;
01831       *end = '\0';
01832  
01833       word = new char[ strlen( begin ) + 1 ];
01834       strcpy( word , begin );
01835 
01836       *end = tmpchr;
01837 
01838     } //if ( *begin != '\0' )
01839 
01840   } // if ( str && ( strlen( str ) > 0 ) )
01841 
01842   return word;
01843 
01844 }

char* strdelete ( char *  str,
const char *  del 
)

Definition at line 1847 of file HistoDisplay.cxx.

Referenced by HistoDisplay::MakeConsumerInfo().

01848 {
01849   //cout << " In strdelete " << endl;
01850 
01851   char *newword = 0;
01852 
01853   char *pos = 0;
01854   if ( ( pos = const_cast<char*>(strstr( str, del )) ) ) {
01855     newword = new char[ strlen( str ) - strlen( del ) + 1 ];
01856     if ( newword ) {
01857       char tmp = *pos;
01858       *pos = '\0';
01859 
01860       strcpy( newword, str );
01861 
01862       *pos = tmp;
01863 
01864       strcat( newword, pos + strlen( del ) );
01865 
01866     }//if ( newword )
01867   } //if ( pos = strstr( str, del ) )
01868 
01869   return newword;
01870 
01871 }

char* strstrn ( const char *  s,
const char *  k 
)

Definition at line 1875 of file HistoDisplay.cxx.

Referenced by HistoDisplay::ProcessMessage(), and HistoDisplay::SearchWarningErrorFolder().

01876 {
01877   const char *pk = k;
01878   const char *ps = 0;
01879 
01880   while ( *s != '\0' ) {
01881     if ( tolower( *s ) == tolower( *pk ) ) {
01882       if ( pk == k ) ps = s;
01883       pk++;
01884       if ( *pk == '\0' ) break;
01885     } //if ( tolower( *ps ) == tolower( *pk ) )
01886     else {
01887       pk = k;
01888       ps = 0;
01889     } //else //if ( tolower( *ps ) == tolower( *pk ) )
01890     s++;
01891   } //while ( *s != '\0' ) 
01892 
01893   return  (char*) ps;
01894 
01895 }


Variable Documentation

const char* kErrorFolder = "error"

Definition at line 385 of file HistoDisplay.cxx.

Referenced by HistoDisplay::SearchWarningErrorFolder().

const char* kSlideShowFolder = "slide"

Definition at line 382 of file HistoDisplay.cxx.

Referenced by HistoDisplay::ProcessMessage().

const char* kWarningErrorCanvasName = "WarningErrorCanvas"
const char* kWarningErrorCanvasTitle = "Warning/Error Canvas"

Definition at line 387 of file HistoDisplay.cxx.

Referenced by HistoDisplay::SearchWarningErrorFolder().

const char* kWarningFolder = "warning"

Definition at line 384 of file HistoDisplay.cxx.

Referenced by HistoDisplay::SearchWarningErrorFolder().


Generated on 24 Jul 2018 for loon by  doxygen 1.6.1