Back Midas Rome Roody Rootana
  Root Display GUI, Page 2 of 7  Not logged in ELOG logo
New entries since:Wed Dec 31 16:00:00 1969
ID Date Author Topic Subject
  134   02 Mar 2008 Exaos LeeBug ReportROODY kills analyzer too!!
I compiled roody svn231 with ROOT 5.18.00 and gcc 4.1 on Debain Linux 4.0 (AMD64).
I tested the roody with the "examples/experiment" in MIDAS svn4124 and
encountered the following error:
Error in <TFile::TFile>: file /last.root does not exist

 *** Break *** segmentation violation

 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 1090525536 (LWP 17985)]
 0x00000000004114e6 in root_server_thread (arg=<value optimized out>) at src/mana.c:5333
 Current language:  auto; currently c++
 (gdb) next
 [midas.c:2416:bm_validate_client_index,ERROR] Invalid client index 1 in buffer 'SYSMSG'. Client name '', pid 0 should be 17973
 0x00002b800b8a5460 in sighandler () from /opt/ROOT/Versions/Current/lib/libCore.so.5.18
 (gdb) next
 Single stepping until exit from function _Z10sighandleri, 
 which has no line number information.
 Cannot remove breakpoints because program is no longer writable.
 It might be running in another process.
 Further execution is probably impossible.
 0x00002b800b8a546e in sighandler () from /opt/ROOT/Versions/Current/lib/libCore.so.5.18
 ptrace: &#23052;&#8451;&#28225;&#38317;&#65348;&#37340;&#26473;&#28058;&#9660;.
 (gdb) next
 Single stepping until exit from function _Z10sighandleri, 
 which has no line number information.
 Cannot remove breakpoints because program is no longer writable.
 It might be running in another process.
 Further execution is probably impossible.
 0x00002b800b8a546e in sighandler () from /opt/ROOT/Versions/Current/lib/libCore.so.5.18
 ptrace: &#23052;&#8451;&#28225;&#38317;&#65348;&#37340;&#26473;&#28058;&#9660;.
 (gdb) next
 Single stepping until exit from function _Z10sighandleri, 
 which has no line number information.
 Cannot remove breakpoints because program is no longer writable.
 It might be running in another process.
 Further execution is probably impossible.
 0x00002b800b8a546e in sighandler () from /opt/ROOT/Versions/Current/lib/libCore.so.5.18

The system information is as the following:
$ uname -a
Linux daq-heg 2.6.18-5-amd64 #1 SMP Sat Dec 22 20:43:59 UTC 2007 x86_64 GNU/Linux

$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v 
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr 
--enable-shared --with-system-zlib --libexecdir=/usr/lib 
--without-included-gettext --enable-threads=posix --enable-nls 
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release 
x86_64-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

$ root-config --config
linuxx8664gcc --prefix=/opt/ROOT/Versions/5.18.00-gcc 
--datadir=/opt/ROOT/Versions/5.18.00-gcc/share 
--docdir=/opt/ROOT/Versions/5.18.00-gcc/doc 
--incdir=/opt/ROOT/Versions/5.18.00-gcc/include 
--libdir=/opt/ROOT/Versions/5.18.00-gcc/lib 
--etcdir=/opt/ROOT/Versions/5.18.00-gcc/etc 
--elispdir=/opt/ROOT/Versions/5.18.00-gcc/share/emacs/site-lisp --enable-cern 
--with-cern-libdir=/usr/lib --enable-fftw3 --enable-gdml --enable-mathcore 
--enable-mathmore --enable-opengl --enable-python --enable-qt --enable-roofit 
--enable-ruby --enable-shared --enable-soversion --enable-ssl --enable-xml 
--enable-xft --enable-xrootd --enable-g4root 
--with-g4-incdir=/opt/GEANT4/Versions/9.0.p01/include 
--with-g4-libdir=/opt/GEANT4/Versions/9.0.p01/lib/Linux-g++

Any idea to fix this problem?
  133   18 Feb 2008 Jimmy NgaiBug ReportRoody kills MIDAS Analyzer
Hi All,

I'm running Roody with MIDAS 2.0.0 and ROOT 5.14e on Scientific Linux 4.4. 
When Roody is monitoring the online histograms on Localhost, there are two 
possibilities that Roody will kill the MIDAS Analyzer: 
1) quiting Roody
2) unzoom a histogram when auto-refresh is on

Any ideas?

Best Regards,
Jimmy
  132   19 Nov 2007 John M O'DonnellBug Fixuint32_t or UInt_t
I'm using Redhat workstation with:
  gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
  ROOT version 5.16/00

it is unlikely that UInt_t will ever be too small.  If it is too small, then ROOT will
break!  It is clearly intended to be 32 bits long.  From Rtypes.h:

#ifdef R__INT16
typedef long           Int_t;       //Signed integer 4 bytes
typedef unsigned long  UInt_t;      //Unsigned integer 4 bytes
#else
typedef int            Int_t;       //Signed integer 4 bytes (int)
typedef unsigned int   UInt_t;      //Unsigned integer 4 bytes (unsigned int)
#endif

Of course, stdint.h is defined in a standard.  However ROOT doesn't really try to follow
the standard (CINT compiles a language similar to C++, but not exactly C++), and indeed
the file stdint.h is not explicitly included in any of $ROOTSYS/include/*.h.

John.

> > I just downloaded and compiled the latest tarball.
> > 
> > line 98 of DataSourceTNetFolder.h complained about unit32_t.  While I could have
> > added an include to make this work, I instead changed it to use the ROOT type
> > UInt_t.
> 
> Uint_t is technically incorrect. The data returned from the socket connection is a
> 32-bit pointer to an object in the remote process (how do they come up with
> communication protocols like this?!?). The type "Uint_t" is not defined to be of any
> particular size and is not necessarily big enough to hold a 32-bit unsigned integer.
> 
> According to the "C99" standard, the correct C data type for 32-bit unsigned
> integers is uint32_t, defined in "#include <stdint.h>", e.g. see
> http://www.oreillynet.com/pub/a/network/2003/10/07/michael_barr.html
> 
> I have now added the missing "#include <stdint.h>" statement to
> DataSourceTNetFolder.h, commited as revision 230.
> 
> I am puzzled why the code compiled without this include statement, possibly on my
> SL4.3 machine with ROOT v5.16.00, some ROOT or system header file included it for
> me. I am curious what system you use where this code failed to compile?
> 
> K.O.
  131   16 Nov 2007 Konstantin OlchanskiBug Fixuint32_t or UInt_t
> I just downloaded and compiled the latest tarball.
> 
> line 98 of DataSourceTNetFolder.h complained about unit32_t.  While I could have
> added an include to make this work, I instead changed it to use the ROOT type
> UInt_t.

Uint_t is technically incorrect. The data returned from the socket connection is a
32-bit pointer to an object in the remote process (how do they come up with
communication protocols like this?!?). The type "Uint_t" is not defined to be of any
particular size and is not necessarily big enough to hold a 32-bit unsigned integer.

According to the "C99" standard, the correct C data type for 32-bit unsigned
integers is uint32_t, defined in "#include <stdint.h>", e.g. see
http://www.oreillynet.com/pub/a/network/2003/10/07/michael_barr.html

I have now added the missing "#include <stdint.h>" statement to
DataSourceTNetFolder.h, commited as revision 230.

I am puzzled why the code compiled without this include statement, possibly on my
SL4.3 machine with ROOT v5.16.00, some ROOT or system header file included it for
me. I am curious what system you use where this code failed to compile?

K.O.
  130   16 Nov 2007 John M O'DonnellBug Fixuint32_t or UInt_t
I just downloaded and compiled the latest tarball.

line 98 of DataSourceTNetFolder.h complained about unit32_t.  While I could have
added an include to make this work, I instead changed it to use the ROOT type
UInt_t.

Perhaps this change should be included in the distribution
Attachment 1: DataSourceTNetFolder.h
//
// DataSourceTNetFolder.h
//
// $Id$
//

#include "DataSourceBase.h"

#include "TSocket.h"
#include "TFolder.h"

class DataSourceTNetFolder: public DataSourceBase
{
 private:
  TSocket *fSocket;

 public:
  DataSourceTNetFolder(TSocket* socket) // ctor
    {
      fName = socket->GetName();
      fName += ":";
      char buf[256];
      sprintf(buf, "%d", socket->GetPort());
      fName += buf;
      fSocket = socket;
    }

  ~DataSourceTNetFolder() // dtor
    {
      fSocket = NULL;
    }

  void Close()
    {
      fSocket->Close();
    }

  void Reopen()
    {
      std::string host = fSocket->GetName();
      int         port = fSocket->GetPort();
      fSocket->Close();
      delete fSocket;
      fSocket = new TSocket(host.c_str(), port);
    }

  static TObjArray* ListRemoteObjects(TSocket* sock, const char* foldername)
    {
      size_t p = 0;
      
      {
	std::string str = "GetPointer ";
	str += foldername;
	if (!sock->Send(str.c_str()))
	  return NULL;
	
	TMessage *m = NULL;
	if (!sock->Recv(m))
	  return NULL;
	
	if (!m)
	  return NULL;
	
	*m >> p;
	delete m;
	m = NULL;
      }

      if (!sock->Send("GetListOfFolders"))
	return NULL;

      TMessage m(kMESS_ANY);
      m.Reset();
      m << p;

      if (!sock->Send(m))
	return NULL;

      TMessage *mr = 0;
      if (!sock->Recv(mr))
	return NULL;

      TObjArray *list = NULL;

      if (mr)
	{
	  list = (TObjArray *) mr->ReadObjectAny(mr->GetClass());
	}
      
      delete mr;
      return list;
    }

  static TObject* ReadRemoteObject(TSocket* sock, const char* foldername, const char* objname)
    {
      printf("ReadRemoteObject %s from folder %s\n", objname, foldername);

      UInt_t p = 0;
      
      {
	std::string str = "GetPointer ";
	str += foldername;
	if (!sock->Send(str.c_str()))
	  return NULL;
	
	TMessage *m = NULL;
	if (!sock->Recv(m))
	  return NULL;
	
	if (!m)
	  return NULL;
	
	*m >> p;
	delete m;
	m = NULL;
      }

      printf("Folder %s pointer %d\n", foldername, (int)p);

      {
	std::string str = "FindObject ";
	str += objname;
	if (!sock->Send(str.c_str()))
	  return NULL;

	TMessage m(kMESS_ANY);
	m.Reset();
	m << p;
	if (!sock->Send(m))
	  return NULL;

	TMessage *mr = 0;

	if (!sock->Recv(mr))
	  return NULL;

	TObject *obj = NULL;

	if (mr)
	  {
	    bool adddir = TH1::AddDirectoryStatus();
	    TH1::AddDirectory(false);

	    obj = (TObject*)mr->ReadObjectAny(0);

	    TH1::AddDirectory(adddir);
	  }
	
	delete mr;
	return obj;
      }
    }

  static void ExecuteRemoteCommand(TSocket* socket, const char *line)
    {
      if (!socket->IsValid())
	return;
      
      // The line is executed by the CINT of the server
      socket->Send("Execute");
      socket->Send(line);
    }

  void EnumerateTFolder(ObjectList* list, TFolder* f, ObjectPath path)
  {
    TIterator   *iterator = f->GetListOfFolders()->MakeIterator();
    while (1)
      {
	TNamed *obj = (TNamed*)iterator->Next();
	if (obj == NULL)
	  break;

	const char* classname = obj->ClassName();
	const char* name      = obj->GetName();

	if (strcmp(classname,"TFolder") == 0)
	  {
	    TFolder* f = (TFolder*)obj;
	    ObjectPath p = path;
	    p.push_back(name);
	    EnumerateTFolder(list, f, p);
	  }
	//else if (strcmp(classname,"TDirectory") == 0)
	//  {
	//    TDirectory* d = (TDirectory*)obj;
	//    ObjectPath p = path;
	//    p.push_back(name);
	//    EnumerateTDirectory(list, d, p);
	//  }
	else
	  {
	    ObjectPath p = path;
	    std::string s;
	    s += name;
	    //s += "(";
	    //s += classname;
	    //s += ")";
	    p.push_back(s);
	    list->push_back(p);
	  }
      }
  }

  TFolder* ReadFolder(const char* foldername, ObjectPath path, const char* name)
    {
      TObject* obj = ReadRemoteObject(fSocket, foldername, name);
      if (!obj)
	return NULL;

      if (obj->InheritsFrom(TFolder::Class()))
	return (TFolder*)obj;

      ObjectPath p = path;
      p.push_back(name);

      return NULL;
    }

  void Enumerate(ObjectList* list, const char* foldername, ObjectPath path)
  {
    TCollection *contents = ListRemoteObjects(fSocket, foldername);
    if (!contents)
      return;
    TIterator   *iterator = contents->MakeIterator();
    while (1)
      {
	TNamed *obj = (TNamed*)iterator->Next();
	if (obj == NULL)
	  break;

	const char* classname = obj->ClassName();
	const char* name      = obj->GetName();

	if (strcmp(classname,"TObjString") == 0)
	  {
	    TObject* xobj = ReadRemoteObject(fSocket, foldername, name);
	    if (!xobj)
	      continue;
	    
	    if (xobj->InheritsFrom(TFolder::Class()))
	      {
		TFolder *fff = (TFolder*)xobj;
		ObjectPath p = path;
		p.push_back(name);
		EnumerateTFolder(list, fff, p);
		continue;
	      }
	  }

	ObjectPath p = path;
	std::string s;
	s += name;
	//s += "(";
	//s += classname;
	//s += ")";
	p.push_back(s);
	list->push_back(p);
      }
  }

  ObjectList GetList()
  {
    ObjectList list;
    ObjectPath path;
    path.push_back(fName);
    char *topfolder = "histos";
    path.push_back(topfolder);
    Enumerate(&list, topfolder, path);
    return list;
  }

  TObject* GetObject(const ObjectPath& path)
    {
      //gDirectory->pwd();
      //gDirectory->ls();
      
      const char *name = path.back().c_str();
      printf("Get object %s from %s\n", name, fName.c_str());

      const char *foldername = path[path.size()-2].c_str();

      TObject* obj = ReadRemoteObject(fSocket, foldername, name);

      return obj;
    }

  void ResetAll()
  {
    printf("ResetAll %s\n", fName.c_str());

    ExecuteRemoteCommand(fSocket, "gAnalyzer->ResetAllHistos()");
  }

  void ResetObject(const ObjectPath& path)
  {
    printf("ResetObject %s\n", path.toString().c_str());

    std::string name = path.back();

    std::string s;
... 17 more lines ...
  129   04 Dec 2006 Konstantin OlchanskiBug FixAdd menu for SetOptStat
I commited the implementation for a new menu item: "OptStat". It allows setting
gStyle->SetOptStat in a user-friendly manner. K.O.
  128   26 Sep 2006 Konstantin OlchanskiInfoNew version coming up...
> > FYI, I am presently working in an updated version of roody.
> 
> The new version of Roody has been commited.
> 
> It has been tested only on Linux (SL4.3) and while we are shaking out the new bugs,
> all are welcome to try it and report any problems. It should not eat your data.
> 
> If the new version does not work for you at all, the old version was preserved as
> an SVN branch, accessible using this SVN command:
> svn checkout svn://ladd00.triumf.ca/roody/branches/roody-v1 roody-v1

(the email notification for this message did not work at first, trying again)

K.O.
  125   26 Sep 2006 Konstantin OlchanskiInfoNew version coming up...
> FYI, I am presently working in an updated version of roody.

The new version of Roody has been commited.

It has been tested only on Linux (SL4.3) and while we are shaking out the new bugs,
all are welcome to try it and report any problems. It should not eat your data.

If the new version does not work for you at all, the old version was preserved as
an SVN branch, accessible using this SVN command:
svn checkout svn://ladd00.triumf.ca/roody/branches/roody-v1 roody-v1

K.O.
  124   04 Sep 2006 Konstantin OlchanskiInfoadded "make docs"
I commited the missing images, fixed the doxygen config file and added the "make docs" target. Now 
"make docs" will generate the documentation and place it into the directory "html". K.O.
  123   04 Sep 2006 Konstantin OlchanskiInforoody CVS converted to SVN
The ROODY source code repository has been converted from CVS to SVN.

The new command to "get" the sources is:
svn checkout svn://ladd00.triumf.ca/roody/trunk roody

At this time, I do not know how to "convert" a local CVS checkout tree into an SVN checout tree other than 
by brute force (new svn checout, copy modified files from the cvs checout, erase the old cvs checkout 
tree).

For the latest ROODY insructions, please visit http://daq-plone.triumf.ca/SR/ROODY/

K.O.
  122   27 Aug 2006 Konstantin OlchanskiInfoNew version coming up...
FYI, I am presently working in an updated version of roody.

The user interface, GUI and user-visible functionality I am leaving alone. The under-the-hood handling of 
histogram data I am reworking using our latest understanding of the workings of ROOT (object ownership, 
etc) and C++ (hey, with STL std::map, C++ is as easy as perl!).

The updated version may also fix some of the existing problems- crashes caused by confused object 
ownership rules, long startup times (current code has to look at every existing histogram before starting- 
slow if many histograms in an online folder) and inability to display TGraph objects (that is what started 
me working on the code).

While at it, we will move the Roody code repository from CVS to SVN.

K.O.
  121   21 Aug 2006 Konstantin OlchanskiBug FixBetter zoom & rebin controls, show TDirectory contents
I commited a series of changed to Roody:
- cleanup unused files
- show contents of TDirectory objects (this used to work before, why was it
removed? It was a 1 line fix!)
- rework and simplify controls for zooming and rebinning of TCanvas contents
K.O.
  120   22 Jun 2006 Joe ChumaBug Fixroody refresh button fix (again)
The refresh button was in the wrong state the first time the user set the refresh rate for online histograms.
  119   07 Jun 2006 Joe ChumaBug Fixroody online fixes
Roody has been modified so the resetting of individual histograms should now work. This involved a check for "//" at beginning of path to histogram and remove if it is there.

Also, the properties of the refresh button have been changed. It is enabled when there is a socket connection, and if the refresh rate = 0, button says "refresh now", but if the refresh rate > 0, button toggles refresh on/off (with appropriate labeling).
  118   06 Jun 2006 Konstantin OlchanskiBug Fixminor fixes
> Minor fixes that escaped quality assurance by previous commiters:
> 2) have "make clean" remove obsolete stuff from src (src/roody, src/rootsys.h,
etc)
> 3) fix completely nonfunctional enforcement of setting ROOTSYS to the
compiled-in value: execv() should have been execvp() (my bug), actually do call
setenv("ROOTSYS","blah...") (OS_UNIX was not defined in the Makefile, bug by
previous committer).


(previous message was completely garbled by the Elog "ELCode" whatever it is)


Restored fixes (2) and (3) that were removed by a careless previous committer.

(Note this assumes windows has "setenv()", which I believe it does have, please
test compilation on Windows ASAP and let me know).

K.O.
  117   06 Jun 2006 Konstantin OlchanskiBug Fixminor fixes

Konstantin Olchanski wrote:
Minor fixes that escaped quality assurance by previous commiters:
2) have "make clean" remove obsolete stuff from src (src/roody, src/rootsys.h, etc)
3) fix completely nonfunctional enforcement of setting ROOTSYS to the compiled-in value: execv() should have been execvp() (my bug), actually do call setenv("ROOTSYS","blah...") (OS_UNIX was not defined in the Makefile, bug by previous committer).


Restored fixes (2) and (3) that were removed by a careless previous committer.

(Note this assumes windows has "setenv()", which I believe it does have, please test compilation on Windows ASAP and let me know).

K.O.
  116   06 Jun 2006 Konstantin OlchanskiInfoRoody still using CVS
To prevent confusion- according to Joe Chuma and Konstantin Olchanski, we are
still using CVS for Roody development. K.O.
  115   05 Jun 2006 Joe ChumaBug Fixreset histograms
Roody should now be able to reset online histograms. Use the "reset all" menu item to reset all online histograms, or use the right click context menu on individual histograms to reset just one histogram (or a set of histograms chosen by holding down the ctrl key while selecting). The latest ROME analyzer is required for these features to be used.
  114   19 Apr 2006 Joe ChumaBug Fixpause/restart button fixed
The pause/restart button was not working properly, as a result of some confusion about the return value from the TString Compare method. It should now be fixed.
  113   18 Apr 2006 Joe ChumaBug FixPause/Restart Refresh button added
A Pause/restart refresh button has been added to the Roody frame so users may quickly pause and restart online histogram refreshing.
ELOG V3.1.4-2e1708b5