Back Midas Rome Roody Rootana
  Rome Analyzer Framework, Page 10 of 11  Not logged in ELOG logo
ID Date Author Topicdown Subject
  71   09 Apr 2005 Daniele BarbareschiBug ReportCompiling Builder
I am Daniele Barbareschi, I am a Corrado Gatto's student 
I work to interfacing between ALIROOT and MYSQL for CONSTANT CALIBRATION of 
subdetector.

There's a bug in compiling...

NAME of file "ROMEXML.h,ROMEXML.cpp" in the ultimate version ROME is lowercase.
The gmake program return error.

Maybe ROMESQL too.
See you those files and similar.

D.B.
  82   07 May 2005 Ryu SawadaBug ReportMismatch of [Set/Append]Formatted
In ROMEBuilder.cpp, there are some mismatchs of formart and argument of ROMEString::Set or 
AppendFormatted.

1000       format.SetFormatted("   void Set%%s%%%ds(%%-%ds %%s%%%ds) { f%%s%%%ds = %%s; };
\n",lb,typeLen,lb,lb,lb); 

3980             format.SetFormatted("   %%s%%s*%%%ds  Get%%sAt(int index)%%%ds\n",typeLen-
folderName[i].Length()-scl,0+nameLen-folderName[i].Length(),lt);

5875    buffer.AppendFormatted("   bool CheckConfiguration(int runNumber);\n",shortCut.Data()); 

6487    buffer.AppendFormatted("#include <TBranchElement.h>\n",shortCut.Data()); 

7231       buffer.AppendFormatted("   return buffer;\n",stringBuffer.Data());

7271                buffer.AppendFormatted("   if (!this->GetDataBase(name.Data())->Read
(values,path,gAnalyzer->GetCurrentRunNumber())) {\n",folderName[i].Data(),valueName[i][j].Data());

7358          buffer.AppendFormatted("%s                  xml->WriteElement(\"HistArrayStartIndex\",\"0\");
\n",blank.Data(),pointerI.Data(),histoName[taskHierarchyClassIndex[i]][j].Data()); 

8771    buffer.AppendFormatted(" obj/%sAnalyzer.obj obj/%sEventLoop.obj obj/%sConfig.obj obj/
main.obj",shortCut.Data(),shortCut.Data(),shortCut.Data(),shortCut.Data(),shortCut.Data());

8815    buffer.AppendFormatted("     g++ $(Flags) -o $@ $(objects) $(Libraries)\n\n",shortCut.Data
(),mainProgName.Data());

8872    buffer.AppendFormatted("obj/%sFAnalyzer.obj: src/framework/%sFAnalyzer.f src/framework/%
sAnalyzer.cpp include/framework/%sAnalyzer.h\n",shortCut.Data(),shortCut.Data(),shortCut.Data());

9341    htmlFile.SetFormatted("%s%sUserHTML.html",outDir.Data(),shortCut.Data(),mainProgName.Data
());
  84   13 May 2005 Ryu SawadaBug ReportMismatch of [Set/Append]Formatted
done.
> In ROMEBuilder.cpp, there are some mismatchs of formart and argument of ROMEString::Set or 
> AppendFormatted.
> 
> 1000       format.SetFormatted("   void Set%%s%%%ds(%%-%ds %%s%%%ds) { f%%s%%%ds = %%s; };
> \n",lb,typeLen,lb,lb,lb); 
> 
> 3980             format.SetFormatted("   %%s%%s*%%%ds  Get%%sAt(int index)%%%ds\n",typeLen-
> folderName[i].Length()-scl,0+nameLen-folderName[i].Length(),lt);
> 
> 5875    buffer.AppendFormatted("   bool CheckConfiguration(int runNumber);\n",shortCut.Data()); 
> 
> 6487    buffer.AppendFormatted("#include <TBranchElement.h>\n",shortCut.Data()); 
> 
> 7231       buffer.AppendFormatted("   return buffer;\n",stringBuffer.Data());
> 
> 7271                buffer.AppendFormatted("   if (!this->GetDataBase(name.Data())->Read
> (values,path,gAnalyzer->GetCurrentRunNumber())) {\n",folderName[i].Data(),valueName[i][j].Data());
> 
> 7358          buffer.AppendFormatted("%s                  xml->WriteElement(\"HistArrayStartIndex\",\"0\");
> \n",blank.Data(),pointerI.Data(),histoName[taskHierarchyClassIndex[i]][j].Data()); 
> 
> 8771    buffer.AppendFormatted(" obj/%sAnalyzer.obj obj/%sEventLoop.obj obj/%sConfig.obj obj/
> main.obj",shortCut.Data(),shortCut.Data(),shortCut.Data(),shortCut.Data(),shortCut.Data());
> 
> 8815    buffer.AppendFormatted("     g++ $(Flags) -o $@ $(objects) $(Libraries)\n\n",shortCut.Data
> (),mainProgName.Data());
> 
> 8872    buffer.AppendFormatted("obj/%sFAnalyzer.obj: src/framework/%sFAnalyzer.f src/framework/%
> sAnalyzer.cpp include/framework/%sAnalyzer.h\n",shortCut.Data(),shortCut.Data(),shortCut.Data());
> 
> 9341    htmlFile.SetFormatted("%s%sUserHTML.html",outDir.Data(),shortCut.Data(),mainProgName.Data
> ());
  87   26 Jun 2005 Yasuko HISAMATSUBug ReportNeed to include stdarg.h in file ROMEString.h
Hello,

It seems some compliers have a problem with making ROME, sending error message
saying,

 In file included from builder/src/ROMEBuilder.cpp:574:
/home/pekochan/rome/20050626/rome/include/ROMEString.h:41: type spec ifier
   omitted for parameter `va_list'
 ...etc


This problem can be fixed in file "ROMEString.h" by adding the following 
either line;

#include <stdarg.h>

or 

#include <Varargs.h>
  88   27 Jun 2005 Matthias SchneebeliBug ReportNeed to include stdarg.h in file ROMEString.h
> Hello,
> 
> It seems some compliers have a problem with making ROME, sending error message
> saying,
> 
>  In file included from builder/src/ROMEBuilder.cpp:574:
> /home/pekochan/rome/20050626/rome/include/ROMEString.h:41: type spec ifier
>    omitted for parameter `va_list'
>  ...etc
> 
> 
> This problem can be fixed in file "ROMEString.h" by adding the following 
> either line;
> 
> #include <stdarg.h>
> 
> or 
> 
> #include <Varargs.h>


Thanks for reporting that problem. 

#include <stdarg.h>
is added now in the cvs.
  91   28 Jun 2005 Ryu SawadaBug ReportNeed to include stdarg.h in file ROMEString.h
> > Hello,
> > 
> > It seems some compliers have a problem with making ROME, sending error message
> > saying,
> > 
> >  In file included from builder/src/ROMEBuilder.cpp:574:
> > /home/pekochan/rome/20050626/rome/include/ROMEString.h:41: type spec ifier
> >    omitted for parameter `va_list'
> >  ...etc
> > 
> > 
> > This problem can be fixed in file "ROMEString.h" by adding the following 
> > either line;
> > 
> > #include <stdarg.h>
> > 
> > or 
> > 
> > #include <Varargs.h>
> 
> 
> Thanks for reporting that problem. 
> 
> #include <stdarg.h>
> is added now in the cvs.
replaced with #include <Varargs.h>
  93   28 Jun 2005 Ryu SawadaBug Reportsupport folder object in folder.
When one makes a support folder type field in folder, pointer to the support folder or pointer of 
TClonesArray is in the folder.
But There is no "new" statement to create the object.
  97   29 Aug 2005 Ryu SawadaBug ReportTFile creation and TTree
When the filename base IO was added, it seems that TFile creation was moved from 
ROMEEventLoop::DAQInit to ROMEEventLoop:DAQEndOfRun.

So ROME makes TTrees without outputfile.

This is dangerous when a TTree becomes huge.
It can consume large amount of memory.
  98   30 Aug 2005 Matthias SchneebeliBug ReportTFile creation and TTree
> When the filename base IO was added, it seems that TFile creation was moved from 
> ROMEEventLoop::DAQInit to ROMEEventLoop:DAQEndOfRun.
> 
> So ROME makes TTrees without outputfile.
> 
> This is dangerous when a TTree becomes huge.
> It can consume large amount of memory.

Your right. I have changed it back.
  113   08 Feb 2006 Ryu SawadaBug ReportROMEEventLoop:Update
Recently the place to call ROMEEventLoop:Update was moved.
Probably because of this, in MIDAS online mode, event number is always incremented even when DAQ is not running.
  114   08 Feb 2006 Ryu SawadaBug ReportROMENetFolderServer
When I run ROME analyzer in online MIDAS mode.
It stopps with making core (segmentation fault).

It seems it makes core after "return" in main.cpp, namely finishing all code.

When I comment out following line in ROMEAnalyzer.cpp, it works propery.
tnet->StartServer(gROME->GetApplication(),gROME->GetPortNumber());

Probably it is relating to ROMENetServer or thread for this.
  115   09 Feb 2006 Ryu SawadaBug ReportROMENetFolderServer
I investigated the problem.

On my machine (Scientific Linux 4.2, gcc3.3.2, glibc2.3.2, ROOT5.08.00), following simple program reproduced the problem.
There was no probelm with ROOT version4.
Is it bug of ROOT ?

When I put -lpthread at the last. This problem stopped.
Actually without this option, my analyzer workes.
I guess -lpthread is not necessary.

I will check more and if not necessary, I will remove -lpthread.

--- Makefile ---
rootlibs := $(shell $(ROOTSYS)/bin/root-config --libs)
rootcflags := $(shell  $(ROOTSYS)/bin/root-config --cflags)

test: main.cpp
	g++ $(rootcflags) -o $@ $< -lpthread $(rootlibs) -lThread
------
--- main.cpp ---
#include <Riostream.h>
#include <TThread.h>

void* TestLoop(void *arg)
{
   return NULL;
}

int main(int argc, char *argv[])
{
   TThread *thread = new TThread("TestLoop", TestLoop);

   cout<<"OK"<<endl;
   return 0;
}  
------
  119   08 Mar 2006 Giovanni SignorelliBug ReportgAnalyzer->GetEventID() fails if EventID>127-48
This bug happened when reading a .MID file containing events with event_id=99.
The ReadMidas task is not able to read the event because it is not recognized.
This event_id, when recovered with GetEventID() method was transformed to a negative value. This probably happened because there is a +48 addition at some place (in SetEventID) and a -48 on GetEventID. This casuses the unsigned char to be recovered as a signed number (lots of FFFF in front of it).

Furthermore it is not writtenanywhere that EventID<0xFF.

I could solve the problem
1) by setting EventID = 16, for instance
2) by modifying ROMEAnalyzer.h as follows
// Event ID
Int_t GetEventID() { return (fEventID-48)&0xFF; }
char GetEventIDChar() { return (fEventID)&0xFF; }
  120   02 Apr 2006 Matthias SchneebeliBug ReportgAnalyzer->GetEventID() fails if EventID>127-48

Giovanni Signorelli wrote:
This bug happened when reading a .MID file containing events with event_id=99.
The ReadMidas task is not able to read the event because it is not recognized.
This event_id, when recovered with GetEventID() method was transformed to a negative value. This probably happened because there is a +48 addition at some place (in SetEventID) and a -48 on GetEventID. This casuses the unsigned char to be recovered as a signed number (lots of FFFF in front of it).

Furthermore it is not writtenanywhere that EventID<0xFF.

I could solve the problem
1) by setting EventID = 16, for instance
2) by modifying ROMEAnalyzer.h as follows
// Event ID
Int_t GetEventID() { return (fEventID-48)&0xFF; }
char GetEventIDChar() { return (fEventID)&0xFF; }




This should be fixed now.
  121   08 Jun 2006 Todd BredewegBug ReportUnable to run rome analyzer from crontab
I would like to use a bash script run from cron to analyze new midas event files automatically. Below is an abbreviated example script to test the way ROOT and ROME handle true batch mode
#! /bin/bash

BASEDIR=/data/0/PostRunQA		# Base directory for output files
ROMEDIR=${BASEDIR}/dance-rome		# Location of danceanalyzer

NRUN=7581
ROMECFG="romeConfig_Continuous.xml";

# Set PATH and LD_LIBRARY_PATH for correct versions of ...
# This also sets up the *SYS variables
source /opt/wnr/new/bin/newVersion --new root rome wnr

cd ${ROMEDIR};

# Check that ROOT works correctly
echo " Running ROOT batch mode test ";
root -b -q ../jmodScript.C

# Check that ROME works correctly
echo " Running danceanalyzer batch mode test ";
./danceanalyzer.exe -b -ns -q -i ${ROMECFG} -r ${NRUN}

The results for the ROOT section are the same when the script is run from the command line (full interactive environment) or when using at or crontab (non-interactive).
 Running ROOT batch mode test
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.10/00      1 March 2006   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************
                                                                                                                                  
Compiled on 3 April 2006 for linux with thread support.
                                                                                                                                  
CINT/ROOT C/C++ Interpreter version 5.16.8, February 9, 2006
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
 Executing rootlogon.C (31-MAY-2006)...  Finished setup
                                                                                                                                  
Processing ../jmodScript.C...
hello world
This is the end of ROOT -- Goodbye

jmodScript.C is merely a classic "hello world" script. The ROME test, on the other hand, returns quite different results for the two cases. When run from the command line it works as expected
 ...
 Running danceanalyzer batch mode test
 Executing rootlogon.C (31-MAY-2006)...  Finished setup
reading configuration from romeConfig_Continuous.xml
[bredeweg@enlil PostRunQA]$

but when run from at or crontab we get
 Running danceanalyzer batch mode test
 Executing rootlogon.C (31-MAY-2006)...  Finished setup
                                                                                                                                  
 *** Break *** segmentation violation
 Generating stack trace...
 0x081ec18b in main + 0x21b from ./danceanalyzer.exe
 0x0734678a in __libc_start_main + 0xda from /lib/tls/libc.so.6
 0x080dcd31 in TFile::TFile(char const*, char const*, char const*, int) + 0x51 from ./danceanalyzer.exe
/bin/bash: line 22: 28096 Aborted                 ./danceanalyzer.exe -b -ns -q -i ${ROMECFG} -r ${NRUN}

One question that we have been unable to answer as yet is whether rome is requiring a real TTY, which I do not believe is provided by cron.

We are using the following setup:
Redhat Enterprise Linux v3
ROOT v5.10.00
ROME RELEASE_2_4_R1004

I can provide additional information if needed.

Thanks in advance.

tab
  122   08 Jun 2006 Konstantin OlchanskiBug ReportUnable to run rome analyzer from crontab
(sorry for top-reply- I am trying to avoid elcode garbling my answer)

In the past, I have seen problems like yours, there are at least two issues:

1) "non interactive" ROOT running from cron or some other incomplete user
environment (no DISPLAY, no tty, no user)- a hello world script runs, but large
app does not, because some silly class somewhere requires an X11 connection. I
once had to fake it by running Xvnc and telling the cron jobs to use it as a
DISPLAY. I know ROOT now have a "dummy" graphics module exactly for this
purpose. I do not know how to activate it from the Rome environement, but I am
sure it is documented somewhere on the ROOT web site.

2) some programs coming from the MIDAS family assume existance of a keyboard and
display. Sometimes they can be faked by using "program < /dev/null", sometimes
not, I do not know what Rome does.

K.O.


[quote="Todd Bredeweg"]I would like to use a bash script run from cron to
analyze new midas event files automatically. Below is an abbreviated example
script to test the way ROOT and ROME handle true batch mode

[CODE]
#! /bin/bash

BASEDIR=/data/0/PostRunQA		# Base directory for output files
ROMEDIR=${BASEDIR}/dance-rome		# Location of danceanalyzer

NRUN=7581
ROMECFG="romeConfig_Continuous.xml";

# Set PATH and LD_LIBRARY_PATH for correct versions of ...
# This also sets up the *SYS variables
source /opt/wnr/new/bin/newVersion --new root rome wnr

cd ${ROMEDIR};

# Check that ROOT works correctly
echo " Running ROOT batch mode test ";
root -b -q ../jmodScript.C

# Check that ROME works correctly
echo " Running danceanalyzer batch mode test ";
./danceanalyzer.exe -b -ns -q -i ${ROMECFG} -r ${NRUN}
[/CODE]

The results for the ROOT section are the same when the script is run from the
command line (full interactive environment) or when using at or crontab
(non-interactive).

[CODE]
 Running ROOT batch mode test
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.10/00      1 March 2006   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************
                                                                               
                                                  
Compiled on 3 April 2006 for linux with thread support.
                                                                               
                                                  
CINT/ROOT C/C++ Interpreter version 5.16.8, February 9, 2006
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
 Executing rootlogon.C (31-MAY-2006)...  Finished setup
                                                                               
                                                  
Processing ../jmodScript.C...
hello world
This is the end of ROOT -- Goodbye
[/CODE]

jmodScript.C is merely a classic "hello world" script. The ROME test, on the
other hand, returns quite different results for the two cases. When run from the
command line it works as expected

[CODE]
 ...
 Running danceanalyzer batch mode test
 Executing rootlogon.C (31-MAY-2006)...  Finished setup
reading configuration from romeConfig_Continuous.xml
[bredeweg@enlil PostRunQA]$
[/CODE]

but when run from at or crontab we get 

[CODE] Running danceanalyzer batch mode test
 Executing rootlogon.C (31-MAY-2006)...  Finished setup
                                                                               
                                                  
 *** Break *** segmentation violation
 Generating stack trace...
 0x081ec18b in main + 0x21b from ./danceanalyzer.exe
 0x0734678a in __libc_start_main + 0xda from /lib/tls/libc.so.6
 0x080dcd31 in TFile::TFile(char const*, char const*, char const*, int) + 0x51
from ./danceanalyzer.exe
/bin/bash: line 22: 28096 Aborted                 ./danceanalyzer.exe -b -ns -q
-i ${ROMECFG} -r ${NRUN}[/CODE]

One question that we have been unable to answer as yet is whether rome is
requiring a real TTY, which I do not believe is provided by cron.

We are using the following setup:
    Redhat Enterprise Linux v3
    ROOT v5.10.00
    ROME RELEASE_2_4_R1004

I can provide additional information if needed.

Thanks in advance.

tab[/quote]
  139   09 Jun 2015 Farrukh AzfarBug ReportProblems with programming tabs when using TGraph
Dear Colleagues,
 
I have been using the ROME framework and have succesfully implemented a program 
to run on MIDAS input and plot histograms.

Not satisfied with the default settings of the Canvas, pads and text sizes etc I 
consulted Ryu who kindly showed me how to implement the event and init and update 
methods in the Tabs to bring the display closer to what I needed.

This has worked fine with histograms. However not with TGraphs:

I noticed that if I implemented the plotting of the TGraphs in the tab class then 
after setting points in the TGraph in the Fill tasks the Tab classes plot was 
empty -> is there something peculiar about TGraph ? Any tips would be great !

many thanks
Farrukh Azfar
  141   11 Jun 2015 Ryu SawadaBug ReportProblems with programming tabs when using TGraph
Dear Farrukh

I presume you implemented your tab which draws the graph.
Which option do you use for Draw function of the graph ?
I am afraid you might forget to add 'A' in the option.
For example, you need to use 'A' like,
  graph->Draw("APL");

Best regards,

Ryu

> Dear Colleagues,
>
> I have been using the ROME framework and have succesfully implemented a program
> to run on MIDAS input and plot histograms.
>
> Not satisfied with the default settings of the Canvas, pads and text sizes etc I
> consulted Ryu who kindly showed me how to implement the event and init and update
> methods in the Tabs to bring the display closer to what I needed.
>
> This has worked fine with histograms. However not with TGraphs:
>
> I noticed that if I implemented the plotting of the TGraphs in the tab class then
> after setting points in the TGraph in the Fill tasks the Tab classes plot was
> empty -> is there something peculiar about TGraph ? Any tips would be great !
>
> many thanks
> Farrukh Azfar
  Draft   13 Jun 2015 Farrukh AzfarBug ReportProblems with programming tabs when using TGraph
Hi Ryu,

thanks for your reply. yes I am(was) using it.


Ryu Sawada wrote:
Dear Farrukh

I presume you implemented your tab which draws the graph.
Which option do you use for Draw function of the graph ?
I am afraid you might forget to add 'A' in the option.
For example, you need to use 'A' like,
  graph->Draw("APL");

Best regards,

Ryu

> Dear Colleagues,
>
> I have been using the ROME framework and have succesfully implemented a program
> to run on MIDAS input and plot histograms.
>
> Not satisfied with the default settings of the Canvas, pads and text sizes etc I
> consulted Ryu who kindly showed me how to implement the event and init and update
> methods in the Tabs to bring the display closer to what I needed.
>
> This has worked fine with histograms. However not with TGraphs:
>
> I noticed that if I implemented the plotting of the TGraphs in the tab class then
> after setting points in the TGraph in the Fill tasks the Tab classes plot was
> empty -> is there something peculiar about TGraph ? Any tips would be great !
>
> many thanks
> Farrukh Azfar
  147   15 Jun 2015 Ryu SawadaBug ReportProblems with programming tabs when using TGraph
Dear Farrukh

If you attach your code related to the problem, I can investigate the problem.

Best regards,

Ryu


Farrukh Azfar wrote:
Hi Ryu,

thanks for your reply. yes I am(was) using it.


Ryu Sawada wrote:
Dear Farrukh

I presume you implemented your tab which draws the graph.
Which option do you use for Draw function of the graph ?
I am afraid you might forget to add 'A' in the option.
For example, you need to use 'A' like,
  graph->Draw("APL");

Best regards,

Ryu

> Dear Colleagues,
>
> I have been using the ROME framework and have succesfully implemented a program
> to run on MIDAS input and plot histograms.
>
> Not satisfied with the default settings of the Canvas, pads and text sizes etc I
> consulted Ryu who kindly showed me how to implement the event and init and update
> methods in the Tabs to bring the display closer to what I needed.
>
> This has worked fine with histograms. However not with TGraphs:
>
> I noticed that if I implemented the plotting of the TGraphs in the tab class then
> after setting points in the TGraph in the Fill tasks the Tab classes plot was
> empty -> is there something peculiar about TGraph ? Any tips would be great !
>
> many thanks
> Farrukh Azfar
ELOG V3.1.4-2e1708b5