Back Midas Rome Roody Rootana
  Rome Analyzer Framework, Page 2 of 6  Not logged in ELOG logo
Entry  23 Oct 2015, Wes Gohn, Forum, TGraph objects 
Does anyone have an example of how to add TGraph objects in ROME? We often use these in our MIDAS analyzers to create plots of quantities vs. event number (i.e. bank size, number of triggers, etc). Thanks!
    Reply  29 Oct 2015, Ryu Sawada, Forum, TGraph objects 
Hello,

You can find an example in $ROMESYS/examples/histoGUI
Graphs are defined in histoGUI.xml and the data points are set in src/tasks/HGUITFillHisto.cpp

Best regards,

Ryu

> Does anyone have an example of how to add TGraph objects in ROME? We often use these in our MIDAS analyzers to create plots of quantities vs. event number (i.e. bank size, number of triggers, etc). Thanks!
Entry  21 Oct 2015, SUDESHNA GANGULY, Info, Adding Trees and Branches in ROME 
Hi,

I need to add a tree, the tree will have n branches. Each branch will refer to
one event. Now Each branch will have 5 leaves. Each leaf will have data from one
WFD channel. There are data from total 5 WFD channels per event in our midas bank.

I have seen some examples of trees and branches in ROME, but I don't know how I
can loop over one channel to another channel and save those data into each leaf.

Any help will be appreciated greatly.

Sudeshna Ganguly
    Reply  22 Oct 2015, Ryu Sawada, Info, Adding Trees and Branches in ROME 
Dear Sudeshna Ganguly

It might be my misunderstanding, but do you mean that you want to add a new branch every time when you take one
event ? (namely, the number of branches n equals to the number of events ?)

In ROME, ( and I guess in most of user applications), each entry in the tree (instead of each branch) refers to one
event. Namely, the number of branches n is independent of the number of events; and the number of entries
increases as you take more events.

In the ROME applications, there is a one to one relation between,
- ROME Folder and Branch in Tree
- ROME Field in Folder and Leave in Tree
ROME folder and field are supposed to be defined in an XML file and the implementation (i.e. conversion to C++ code)
is done by ROMEBuilder.

Folders and fileds can be arrays.

I think, in your case, ROME folder could be like one of the followings depending on your data structure and preference,
Since I guess WFD stands for Wave Form Digitizer and guess has many numbers (instead of one), I expect you may use the 2nd or 3rd example,

1) A single variable 'WFD' is in five 'Data' folder instances
            <FolderName>Data</FolderName>
            <ArraySize>5</ArraySize>
            <Field>
                <FieldName>WFD</FieldName>
                <FieldType>Double_t</FieldType>
                <FieldComment>WFD Values</FieldComment>
            </Field>

2) A variable-length array 'WFD' is in five 'Data' folder instances
            <FolderName>Data</FolderName>
            <ArraySize>5</ArraySize>
            <Field>
                <FieldName>WFD</FieldName>
                <FieldType>Double_t</FieldType>
                <ArraySize>vector</ArraySize>
                <FieldComment>WFD Values</FieldComment>
            </Field>

3) A fixed-length array 'WFD' is in five 'Data' folder instances
            <FolderName>Data</FolderName>
            <ArraySize>5</ArraySize>
            <Field>
                <FieldName>WFD</FieldName>
                <FieldType>Double_t</FieldType>
                <ArraySize>1024</ArraySize>
                <FieldComment>WFD Values</FieldComment>
            </Field>

4) An array 'WFD' is in one 'Data' folder instance, and the array size of 'WFD' is five.
            <FolderName>Data</FolderName>
            <Field>
                <FieldName>WFD</FieldName>
                <FieldType>Double_t</FieldType>
                <ArraySize>5</ArraySize>
                <FieldComment>WFD Values</FieldComment>
            </Field>


Once you add a relation between the 'Data' folder and a branch in a tree (as shown <Tree> section of $ROMESYS/examples/midas/midas.xml),
The generated application,
- reads the tree and copies data in to the folder before every event (if the <DAQSystem> in config XML is rome)
- fills the tree with copying data from the folder

So you don't need to write code to read/write tees.
Instead you need to access the folders.

The access method depends on the folder structure. For the example above,

1)
   Int_t nCh = 5;
   for (Int_t iCh = 0; iCh < nCh; iCh++) {
      gAnalyzer->GetDataAt(iCh)->SetWFD(some_number);
   }

2)
   Int_t nCh = 5;
   for (Int_t iCh = 0; iCh < nCh; iCh++) {
      gAnalyzer->GetDataAt(iCh)->SetWFDSize(1024);
      Int_t wfdSize = gAnalyzer->GetDataAt(iCh)->GetWFDSize();
      for (Int_t i = 0; i < wfdSize; i++) {
         gAnalyzer->GetDataAt(iCh)->SetWFDAt(i, some_number);
      }
   }

3)
   Int_t nCh = 5;
   for (Int_t iCh = 0; iCh < nCh; iCh++) {
      for (Int_t i = 0; i < 1024; i++) {
         gAnalyzer->GetDataAt(iCh)->SetWFDAt(i, some_number);
      }
   }

4)
   Int_t nCh = 5;
   for (Int_t iCh = 0; iCh < nCh; iCh++) {
      gAnalyzer->GetData()->SetWFDAt(iCh, some_number);
   }

You can read the variables by using GetWFD (or GetWFDAt if WFD is an array) function.


You can find more example of the folder structure in $ROMESYS/examples/argus/folders/folderEntries.xml.

Ryu

> Hi,
>
> I need to add a tree, the tree will have n branches. Each branch will refer to
> one event. Now Each branch will have 5 leaves. Each leaf will have data from one
> WFD channel. There are data from total 5 WFD channels per event in our midas bank.
>
> I have seen some examples of trees and branches in ROME, but I don't know how I
> can loop over one channel to another channel and save those data into each leaf.
>
> Any help will be appreciated greatly.
>
> Sudeshna Ganguly
Entry  03 Sep 2015, Farrukh Azfar, Bug Report, Saving canvas as pdf via a button one vs many pads MIDTBCTab.cppMIDTRCTab.cpp
Dear Colleagues 

we have implemented in one of our tabs a button to call a function which saves a 
canvas to a pdf file with a time date stamp.

1) This works fine when there is only one histogram on the canvas and this code 
is MIDTBCTab.cpp (attached)

2) When the canvas is divided up into a 5x11 pads with 55 histograms and 
we want to save the _whole_ canvas with the whole picture (_not_ any individual 
pads) the code crashes  and no file is generated - the tab code is MIDTRCTab.cpp
and this is also attached 

I am wondering what is going on - is there anything obviously wrong ?

many thanks 

Farrukh
    Reply  07 Sep 2015, Ryu Sawada, Bug Report, Saving canvas as pdf via a button one vs many pads SampleCanvas.20150907.175151.pdf
Dear Farrukh

I tried your code, but the problem was not reproduced.
I can save the canvas as attached without crash.

Only the difference from your code is the histograms.
Since I don't have your task I took and draw 'ADC' histograms from 'FillHistogram' task.
No other changes were made from your code.
I edited .h file of the tab from the automatically generated ones.

Ryu



> Dear Colleagues 
> 
> we have implemented in one of our tabs a button to call a function which saves a 
> canvas to a pdf file with a time date stamp.
> 
> 1) This works fine when there is only one histogram on the canvas and this code 
> is MIDTBCTab.cpp (attached)
> 
> 2) When the canvas is divided up into a 5x11 pads with 55 histograms and 
> we want to save the _whole_ canvas with the whole picture (_not_ any individual 
> pads) the code crashes  and no file is generated - the tab code is MIDTRCTab.cpp
> and this is also attached 
> 
> I am wondering what is going on - is there anything obviously wrong ?
> 
> many thanks 
> 
> Farrukh
       Reply  07 Sep 2015, Farrukh Azfar, Bug Report, Saving canvas as pdf via a button one vs many pads 
Dear Ryu,

thanks very much for trying this out. Perhaps Sudeshna can verify that the problem is still 
there in her code or if its fixed ?

- thanks
Farrukh

> Dear Farrukh
> 
> I tried your code, but the problem was not reproduced.
> I can save the canvas as attached without crash.
> 
> Only the difference from your code is the histograms.
> Since I don't have your task I took and draw 'ADC' histograms from 'FillHistogram' task.
> No other changes were made from your code.
> I edited .h file of the tab from the automatically generated ones.
> 
> Ryu
> 
> 
> 
> > Dear Colleagues 
> > 
> > we have implemented in one of our tabs a button to call a function which saves a 
> > canvas to a pdf file with a time date stamp.
> > 
> > 1) This works fine when there is only one histogram on the canvas and this code 
> > is MIDTBCTab.cpp (attached)
> > 
> > 2) When the canvas is divided up into a 5x11 pads with 55 histograms and 
> > we want to save the _whole_ canvas with the whole picture (_not_ any individual 
> > pads) the code crashes  and no file is generated - the tab code is MIDTRCTab.cpp
> > and this is also attached 
> > 
> > I am wondering what is going on - is there anything obviously wrong ?
> > 
> > many thanks 
> > 
> > Farrukh
Entry  02 Sep 2015, Farrukh Azfar, Forum, ARGUS display with canvas and pads ...  
Dear Colleagues,

We are succesfully running a ROME executable both online and offline with an 
ARGUS display with a canvas that has multiple pads on it. We have also 
implemented a "Save" button which one can click on and save the _entire_ canvas 
(containing all the pads) and saves it to pdf.

I was wondering how one would go about making the following modification :

When a user moves a mouse over to a particular pad and clicks on it - then only 
the histogram on that pad is displayed on a separate canvas (so the user can 
examine it closely) and also save just this one histogram - with a save button 
similar to the one we've already written.

many thanks for any insight

Farrukh 
    Reply  03 Sep 2015, Ryu Sawada, Forum, ARGUS display with canvas and pads ...  
Dear Farrukh

What you want to do is probably possible ( I will write a possible method later.).
However TPad has already several mouse operations (zoom, right-click menu, select active pad and so on); so I am not sure it is the best idea to add own mouse operation (which 
could override other pre-implemented operations.)
I will write three solutions below.
I wrote an example of the first method.

== Method 1 : Menu ==
For this solutions, I modified an example in the ROME package.
The update is done only in the 'develop' branch.
You can read the example by 'git checkout develop' command after you clone the ROME package.
The example is in $ROMESYS/examples/argus/menu and the third tab (T3) is one for that.
In ROME, you can easily add menu items in the menu bar. In the example, menu items to open and save a specific tab are prepared.

== Method 2 : dedicated buttons ==
If you prefer buttons instead of menu, you can put dedicated buttons to trigger "OpenPad" function in the example instead of adding menus. The buttons can be implemented 
either of the following two methods,
 1) TGTextButton, which can work as the same way as your Save button
 2) Writing own class derived from TBox or TMarker. A box or maker can be put on each canvas.

I hope the first method is obvious for you. You can make another button similar to your Save button and call "OpenPad" function.

The second method is a little more complicated; you make your own class and override "ExecuteEvent" method.
In the overriding function, you can call any functions when the box or marker is single-clicked, double-clicked, mouse-over and so on.
A disadvantage is that the box or marker is always visible, and will be drawn in the output PDF files too.

== Method 3: click on Pad ==
You can probably do what you write with making own class derived from TPad; then you override "ExecuteEvent" function for calling a function to make a separated canvas and 
draw a clone of itself.
You may also need own TCanvas and TRootEmbeddedCanvas for using the customized classes instead of regular TPad and TCanvas.

If you are satisfied with the first method, please try the example.
The second method with TGTextButton must not be very difficult.

If you prefer the second (using TBox or TMarker) and third method, I will investigate if it is actually possible.
For the two methods, I think you need to write your own classes.

Best regards,

Ryu

> Dear Colleagues,
> 
> We are succesfully running a ROME executable both online and offline with an 
> ARGUS display with a canvas that has multiple pads on it. We have also 
> implemented a "Save" button which one can click on and save the _entire_ canvas 
> (containing all the pads) and saves it to pdf.
> 
> I was wondering how one would go about making the following modification :
> 
> When a user moves a mouse over to a particular pad and clicks on it - then only 
> the histogram on that pad is displayed on a separate canvas (so the user can 
> examine it closely) and also save just this one histogram - with a save button 
> similar to the one we've already written.
> 
> many thanks for any insight
> 
> Farrukh 
       Reply  03 Sep 2015, Farrukh Azfar, Forum, ARGUS display with canvas and pads ...  
Hi Ryu

thanks very much - I will certainly look at this example. In the meantime we are having some issues with out save buttons - I will post a thread separately
-Farrukh

> Dear Farrukh
> 
> What you want to do is probably possible ( I will write a possible method later.).
> However TPad has already several mouse operations (zoom, right-click menu, select active pad and so on); so I am not sure it is the best idea to add own mouse operation (which 
> could override other pre-implemented operations.)
> I will write three solutions below.
> I wrote an example of the first method.
> 
> == Method 1 : Menu ==
> For this solutions, I modified an example in the ROME package.
> The update is done only in the 'develop' branch.
> You can read the example by 'git checkout develop' command after you clone the ROME package.
> The example is in $ROMESYS/examples/argus/menu and the third tab (T3) is one for that.
> In ROME, you can easily add menu items in the menu bar. In the example, menu items to open and save a specific tab are prepared.
> 
> == Method 2 : dedicated buttons ==
> If you prefer buttons instead of menu, you can put dedicated buttons to trigger "OpenPad" function in the example instead of adding menus. The buttons can be implemented 
> either of the following two methods,
>  1) TButton, which can work as the same way as your Save button
>  2) Writing own class derived from TBox or TMarker. A box or maker can be put on each canvas.
> 
> I hope the first method is obvious for you. You can make another button similar to your Save button and call "OpenPad" function.
> 
> The second method is a little more complicated; you make your own class and override "ExecuteEvent" method.
> In the overriding function, you can call any functions when the box or marker is single-clicked, double-clicked, mouse-over and so on.
> A disadvantage is that the box or marker is always visible, and will be drawn in the output PDF files too.
> 
> == Method 3: click on Pad ==
> You can probably do what you write with making own class derived from TPad; then you override "ExecuteEvent" function for calling a function to make a separated canvas and 
> draw a clone of itself.
> You may also need own TCanvas and TRootEmbeddedCanvas for using the customized classes instead of regular TPad and TCanvas.
> 
> If you are satisfied with the first method, please try the example.
> The second method with TButton must not be very difficult.
> 
> If you prefer the second (using TBox or TMarker) and third method, I will investigate if it is actually possible.
> For the two methods, I think you need to write your own classes.
> 
> Best regards,
> 
> Ryu
> 
> > Dear Colleagues,
> > 
> > We are succesfully running a ROME executable both online and offline with an 
> > ARGUS display with a canvas that has multiple pads on it. We have also 
> > implemented a "Save" button which one can click on and save the _entire_ canvas 
> > (containing all the pads) and saves it to pdf.
> > 
> > I was wondering how one would go about making the following modification :
> > 
> > When a user moves a mouse over to a particular pad and clicks on it - then only 
> > the histogram on that pad is displayed on a separate canvas (so the user can 
> > examine it closely) and also save just this one histogram - with a save button 
> > similar to the one we've already written.
> > 
> > many thanks for any insight
> > 
> > Farrukh 
          Reply  04 Sep 2015, Farrukh Azfar, Forum, ARGUS display with canvas and pads ...  
Dear Ryu,

we've coded up our own example menu based on what you made for us - and thank you very much for that - we notice however that the resulting menu is nowhere to be seen on the frame.

When we did buttons we had to associate them with a frame - and I note that there seems to be no association to a frame in the code you wrote for us - so we never see a menu - is 
this what is to be expceted ?

thanks 
Farrukh

> Hi Ryu
> 
> thanks very much - I will certainly look at this example. In the meantime we are having some issues with out save buttons - I will post a thread separately
> -Farrukh
> 
> > Dear Farrukh
> > 
> > What you want to do is probably possible ( I will write a possible method later.).
> > However TPad has already several mouse operations (zoom, right-click menu, select active pad and so on); so I am not sure it is the best idea to add own mouse operation (which 
> > could override other pre-implemented operations.)
> > I will write three solutions below.
> > I wrote an example of the first method.
> > 
> > == Method 1 : Menu ==
> > For this solutions, I modified an example in the ROME package.
> > The update is done only in the 'develop' branch.
> > You can read the example by 'git checkout develop' command after you clone the ROME package.
> > The example is in $ROMESYS/examples/argus/menu and the third tab (T3) is one for that.
> > In ROME, you can easily add menu items in the menu bar. In the example, menu items to open and save a specific tab are prepared.
> > 
> > == Method 2 : dedicated buttons ==
> > If you prefer buttons instead of menu, you can put dedicated buttons to trigger "OpenPad" function in the example instead of adding menus. The buttons can be implemented 
> > either of the following two methods,
> >  1) TButton, which can work as the same way as your Save button
> >  2) Writing own class derived from TBox or TMarker. A box or maker can be put on each canvas.
> > 
> > I hope the first method is obvious for you. You can make another button similar to your Save button and call "OpenPad" function.
> > 
> > The second method is a little more complicated; you make your own class and override "ExecuteEvent" method.
> > In the overriding function, you can call any functions when the box or marker is single-clicked, double-clicked, mouse-over and so on.
> > A disadvantage is that the box or marker is always visible, and will be drawn in the output PDF files too.
> > 
> > == Method 3: click on Pad ==
> > You can probably do what you write with making own class derived from TPad; then you override "ExecuteEvent" function for calling a function to make a separated canvas and 
> > draw a clone of itself.
> > You may also need own TCanvas and TRootEmbeddedCanvas for using the customized classes instead of regular TPad and TCanvas.
> > 
> > If you are satisfied with the first method, please try the example.
> > The second method with TButton must not be very difficult.
> > 
> > If you prefer the second (using TBox or TMarker) and third method, I will investigate if it is actually possible.
> > For the two methods, I think you need to write your own classes.
> > 
> > Best regards,
> > 
> > Ryu
> > 
> > > Dear Colleagues,
> > > 
> > > We are succesfully running a ROME executable both online and offline with an 
> > > ARGUS display with a canvas that has multiple pads on it. We have also 
> > > implemented a "Save" button which one can click on and save the _entire_ canvas 
> > > (containing all the pads) and saves it to pdf.
> > > 
> > > I was wondering how one would go about making the following modification :
> > > 
> > > When a user moves a mouse over to a particular pad and clicks on it - then only 
> > > the histogram on that pad is displayed on a separate canvas (so the user can 
> > > examine it closely) and also save just this one histogram - with a save button 
> > > similar to the one we've already written.
> > > 
> > > many thanks for any insight
> > > 
> > > Farrukh 
             Reply  04 Sep 2015, Ryu Sawada, Forum, ARGUS display with canvas and pads ...  
Dear Farrukh

The menu items are defined in,
examples/argus/menu/menu.xml, in the part for 'T3' tab.

Did you modify the definition XML for your program ?

Ryu


> Dear Ryu,
> 
> we've coded up our own example menu based on what you made for us - and thank you very much 
for that - we notice however that the resulting menu is nowhere to be seen on the frame.
> 
> When we did buttons we had to associate them with a frame - and I note that there seems to be no 
association to a frame in the code you wrote for us - so we never see a menu - is 
> this what is to be expceted ?
> 
> thanks 
> Farrukh
> 
> > Hi Ryu
> > 
> > thanks very much - I will certainly look at this example. In the meantime we are having some 
issues with out save buttons - I will post a thread separately
> > -Farrukh
> > 
> > > Dear Farrukh
> > > 
> > > What you want to do is probably possible ( I will write a possible method later.).
> > > However TPad has already several mouse operations (zoom, right-click menu, select active pad 
and so on); so I am not sure it is the best idea to add own mouse operation (which 
> > > could override other pre-implemented operations.)
> > > I will write three solutions below.
> > > I wrote an example of the first method.
> > > 
> > > == Method 1 : Menu ==
> > > For this solutions, I modified an example in the ROME package.
> > > The update is done only in the 'develop' branch.
> > > You can read the example by 'git checkout develop' command after you clone the ROME 
package.
> > > The example is in $ROMESYS/examples/argus/menu and the third tab (T3) is one for that.
> > > In ROME, you can easily add menu items in the menu bar. In the example, menu items to open 
and save a specific tab are prepared.
> > > 
> > > == Method 2 : dedicated buttons ==
> > > If you prefer buttons instead of menu, you can put dedicated buttons to trigger "OpenPad" 
function in the example instead of adding menus. The buttons can be implemented 
> > > either of the following two methods,
> > >  1) TButton, which can work as the same way as your Save button
> > >  2) Writing own class derived from TBox or TMarker. A box or maker can be put on each 
canvas.
> > > 
> > > I hope the first method is obvious for you. You can make another button similar to your Save 
button and call "OpenPad" function.
> > > 
> > > The second method is a little more complicated; you make your own class and override 
"ExecuteEvent" method.
> > > In the overriding function, you can call any functions when the box or marker is single-clicked, 
double-clicked, mouse-over and so on.
> > > A disadvantage is that the box or marker is always visible, and will be drawn in the output PDF 
files too.
> > > 
> > > == Method 3: click on Pad ==
> > > You can probably do what you write with making own class derived from TPad; then you 
override "ExecuteEvent" function for calling a function to make a separated canvas and 
> > > draw a clone of itself.
> > > You may also need own TCanvas and TRootEmbeddedCanvas for using the customized classes 
instead of regular TPad and TCanvas.
> > > 
> > > If you are satisfied with the first method, please try the example.
> > > The second method with TButton must not be very difficult.
> > > 
> > > If you prefer the second (using TBox or TMarker) and third method, I will investigate if it is 
actually possible.
> > > For the two methods, I think you need to write your own classes.
> > > 
> > > Best regards,
> > > 
> > > Ryu
> > > 
> > > > Dear Colleagues,
> > > > 
> > > > We are succesfully running a ROME executable both online and offline with an 
> > > > ARGUS display with a canvas that has multiple pads on it. We have also 
> > > > implemented a "Save" button which one can click on and save the _entire_ canvas 
> > > > (containing all the pads) and saves it to pdf.
> > > > 
> > > > I was wondering how one would go about making the following modification :
> > > > 
> > > > When a user moves a mouse over to a particular pad and clicks on it - then only 
> > > > the histogram on that pad is displayed on a separate canvas (so the user can 
> > > > examine it closely) and also save just this one histogram - with a save button 
> > > > similar to the one we've already written.
> > > > 
> > > > many thanks for any insight
> > > > 
> > > > Farrukh 
       Reply  03 Sep 2015, Farrukh Azfar, Forum, ARGUS display with canvas and pads ...  
Hi Ryu 

thanks ever so much. 

We will modify our code as per your example - is it neccesary to build in development as well or is that only where your example is

-Farrukh

> Dear Farrukh
> 
> What you want to do is probably possible ( I will write a possible method later.).
> However TPad has already several mouse operations (zoom, right-click menu, select active pad and so on); so I am not sure it is the best idea to add own mouse operation (which 
> could override other pre-implemented operations.)
> I will write three solutions below.
> I wrote an example of the first method.
> 
> == Method 1 : Menu ==
> For this solutions, I modified an example in the ROME package.
> The update is done only in the 'develop' branch.
> You can read the example by 'git checkout develop' command after you clone the ROME package.
> The example is in $ROMESYS/examples/argus/menu and the third tab (T3) is one for that.
> In ROME, you can easily add menu items in the menu bar. In the example, menu items to open and save a specific tab are prepared.
> 
> == Method 2 : dedicated buttons ==
> If you prefer buttons instead of menu, you can put dedicated buttons to trigger "OpenPad" function in the example instead of adding menus. The buttons can be implemented 
> either of the following two methods,
>  1) TGTextButton, which can work as the same way as your Save button
>  2) Writing own class derived from TBox or TMarker. A box or maker can be put on each canvas.
> 
> I hope the first method is obvious for you. You can make another button similar to your Save button and call "OpenPad" function.
> 
> The second method is a little more complicated; you make your own class and override "ExecuteEvent" method.
> In the overriding function, you can call any functions when the box or marker is single-clicked, double-clicked, mouse-over and so on.
> A disadvantage is that the box or marker is always visible, and will be drawn in the output PDF files too.
> 
> == Method 3: click on Pad ==
> You can probably do what you write with making own class derived from TPad; then you override "ExecuteEvent" function for calling a function to make a separated canvas and 
> draw a clone of itself.
> You may also need own TCanvas and TRootEmbeddedCanvas for using the customized classes instead of regular TPad and TCanvas.
> 
> If you are satisfied with the first method, please try the example.
> The second method with TGTextButton must not be very difficult.
> 
> If you prefer the second (using TBox or TMarker) and third method, I will investigate if it is actually possible.
> For the two methods, I think you need to write your own classes.
> 
> Best regards,
> 
> Ryu
> 
> > Dear Colleagues,
> > 
> > We are succesfully running a ROME executable both online and offline with an 
> > ARGUS display with a canvas that has multiple pads on it. We have also 
> > implemented a "Save" button which one can click on and save the _entire_ canvas 
> > (containing all the pads) and saves it to pdf.
> > 
> > I was wondering how one would go about making the following modification :
> > 
> > When a user moves a mouse over to a particular pad and clicks on it - then only 
> > the histogram on that pad is displayed on a separate canvas (so the user can 
> > examine it closely) and also save just this one histogram - with a save button 
> > similar to the one we've already written.
> > 
> > many thanks for any insight
> > 
> > Farrukh 
          Reply  04 Sep 2015, Ryu Sawada, Forum, ARGUS display with canvas and pads ...  
Dear Farrukh

It is not necessary to build in 'develop' branch of ROME.

Ryu

> Hi Ryu 
> 
> thanks ever so much. 
> 
> We will modify our code as per your example - is it neccesary to build in development as well or is that only where your example is
> 
> -Farrukh
> 
> > Dear Farrukh
> > 
> > What you want to do is probably possible ( I will write a possible method later.).
> > However TPad has already several mouse operations (zoom, right-click menu, select active pad and so on); so I am not sure it is the best idea to add own mouse operation (which 
> > could override other pre-implemented operations.)
> > I will write three solutions below.
> > I wrote an example of the first method.
> > 
> > == Method 1 : Menu ==
> > For this solutions, I modified an example in the ROME package.
> > The update is done only in the 'develop' branch.
> > You can read the example by 'git checkout develop' command after you clone the ROME package.
> > The example is in $ROMESYS/examples/argus/menu and the third tab (T3) is one for that.
> > In ROME, you can easily add menu items in the menu bar. In the example, menu items to open and save a specific tab are prepared.
> > 
> > == Method 2 : dedicated buttons ==
> > If you prefer buttons instead of menu, you can put dedicated buttons to trigger "OpenPad" function in the example instead of adding menus. The buttons can be implemented 
> > either of the following two methods,
> >  1) TGTextButton, which can work as the same way as your Save button
> >  2) Writing own class derived from TBox or TMarker. A box or maker can be put on each canvas.
> > 
> > I hope the first method is obvious for you. You can make another button similar to your Save button and call "OpenPad" function.
> > 
> > The second method is a little more complicated; you make your own class and override "ExecuteEvent" method.
> > In the overriding function, you can call any functions when the box or marker is single-clicked, double-clicked, mouse-over and so on.
> > A disadvantage is that the box or marker is always visible, and will be drawn in the output PDF files too.
> > 
> > == Method 3: click on Pad ==
> > You can probably do what you write with making own class derived from TPad; then you override "ExecuteEvent" function for calling a function to make a separated canvas and 
> > draw a clone of itself.
> > You may also need own TCanvas and TRootEmbeddedCanvas for using the customized classes instead of regular TPad and TCanvas.
> > 
> > If you are satisfied with the first method, please try the example.
> > The second method with TGTextButton must not be very difficult.
> > 
> > If you prefer the second (using TBox or TMarker) and third method, I will investigate if it is actually possible.
> > For the two methods, I think you need to write your own classes.
> > 
> > Best regards,
> > 
> > Ryu
> > 
> > > Dear Colleagues,
> > > 
> > > We are succesfully running a ROME executable both online and offline with an 
> > > ARGUS display with a canvas that has multiple pads on it. We have also 
> > > implemented a "Save" button which one can click on and save the _entire_ canvas 
> > > (containing all the pads) and saves it to pdf.
> > > 
> > > I was wondering how one would go about making the following modification :
> > > 
> > > When a user moves a mouse over to a particular pad and clicks on it - then only 
> > > the histogram on that pad is displayed on a separate canvas (so the user can 
> > > examine it closely) and also save just this one histogram - with a save button 
> > > similar to the one we've already written.
> > > 
> > > many thanks for any insight
> > > 
> > > Farrukh 
       Reply  07 Sep 2015, Ryu Sawada, Forum, ARGUS display with canvas and pads ...  
I found rather easy way for the Method 3 (click on pad).

I implemented in the same example,
namely, the third tab in $ROMESYS/examples/argus/menu.

You can add a macro which is executed when an event occurs on each pad  with,
   fCanvas->GetCanvas()->GetPad(1)->AddExec("ex1", ".x OpenCanvas.C");

Then you can write any function in the macro.
In this example, it opens a copy of canvas and save the clicked pad into a PDF file.

Ryu

> Dear Farrukh
> 
> What you want to do is probably possible ( I will write a possible method later.).
> However TPad has already several mouse operations (zoom, right-click menu, select active pad 
and so on); so I am not sure it is the best idea to add own mouse operation (which 
> could override other pre-implemented operations.)
> I will write three solutions below.
> I wrote an example of the first method.
> 
> == Method 1 : Menu ==
> For this solutions, I modified an example in the ROME package.
> The update is done only in the 'develop' branch.
> You can read the example by 'git checkout develop' command after you clone the ROME package.
> The example is in $ROMESYS/examples/argus/menu and the third tab (T3) is one for that.
> In ROME, you can easily add menu items in the menu bar. In the example, menu items to open and 
save a specific tab are prepared.
> 
> == Method 2 : dedicated buttons ==
> If you prefer buttons instead of menu, you can put dedicated buttons to trigger "OpenPad" function 
in the example instead of adding menus. The buttons can be implemented 
> either of the following two methods,
>  1) TGTextButton, which can work as the same way as your Save button
>  2) Writing own class derived from TBox or TMarker. A box or maker can be put on each canvas.
> 
> I hope the first method is obvious for you. You can make another button similar to your Save button 
and call "OpenPad" function.
> 
> The second method is a little more complicated; you make your own class and override 
"ExecuteEvent" method.
> In the overriding function, you can call any functions when the box or marker is single-clicked, 
double-clicked, mouse-over and so on.
> A disadvantage is that the box or marker is always visible, and will be drawn in the output PDF files 
too.
> 
> == Method 3: click on Pad ==
> You can probably do what you write with making own class derived from TPad; then you override 
"ExecuteEvent" function for calling a function to make a separated canvas and 
> draw a clone of itself.
> You may also need own TCanvas and TRootEmbeddedCanvas for using the customized classes 
instead of regular TPad and TCanvas.
> 
> If you are satisfied with the first method, please try the example.
> The second method with TGTextButton must not be very difficult.
> 
> If you prefer the second (using TBox or TMarker) and third method, I will investigate if it is actually 
possible.
> For the two methods, I think you need to write your own classes.
> 
> Best regards,
> 
> Ryu
> 
> > Dear Colleagues,
> > 
> > We are succesfully running a ROME executable both online and offline with an 
> > ARGUS display with a canvas that has multiple pads on it. We have also 
> > implemented a "Save" button which one can click on and save the _entire_ canvas 
> > (containing all the pads) and saves it to pdf.
> > 
> > I was wondering how one would go about making the following modification :
> > 
> > When a user moves a mouse over to a particular pad and clicks on it - then only 
> > the histogram on that pad is displayed on a separate canvas (so the user can 
> > examine it closely) and also save just this one histogram - with a save button 
> > similar to the one we've already written.
> > 
> > many thanks for any insight
> > 
> > Farrukh 
Entry  04 Sep 2015, SUDESHNA GANGULY, Bug Fix, TMTT3.cpp -offset in index of the pads  
Hi Ryu,

I fixed the problem about the offset in the indexing of the pads. It's just in
the TMTT3.cpp source code, 
Instead of wrtiting:
 case TMWindow::M_T3_Open_Pad1:
      OpenPad(0);
      break;
one should write:

 case TMWindow::M_T3_Open_Pad1:
      OpenPad(1);
      break;
    Reply  07 Sep 2015, Ryu Sawada, Bug Fix, TMTT3.cpp -offset in index of the pads  
Thank you.

You are right.
I modified and pushed the code.

Ryu

> Hi Ryu,
> 
> I fixed the problem about the offset in the indexing of the pads. It's just in
> the TMTT3.cpp source code, 
> Instead of wrtiting:
>  case TMWindow::M_T3_Open_Pad1:
>       OpenPad(0);
>       break;
> one should write:
> 
>  case TMWindow::M_T3_Open_Pad1:
>       OpenPad(1);
>       break;
Entry  04 Sep 2015, SUDESHNA GANGULY, Bug Report, TMTT3.cpp -offset in index of the pads 
Hi Ryu,

I have been working with your /rome/examples/argus/menu/tab/TMTT3.cpp cpde and
I've run your menu.xml with a dummy midas file run0001.mid in the offline mode,
and in the AREGUS monitor, when I click on "open and save" menu, it shows
options for 4 pads. But if you click on the first pad, it is empty, if you click
on pad 2, it will have hist1, pad3 has hist2, and pad4 is hist3 and there is no
hist4.
So there is an offset of 1. 

In case of my 55 histograms I am getting the same error. I am getting only upto
hist54 (my first hist is called hist00).

Could you please help me with this issue?
Entry  09 Jun 2015, Farrukh Azfar, Bug Report, Problems 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
    Reply  11 Jun 2015, Ryu Sawada, Bug Report, Problems 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
Entry  09 Jun 2015, Farrukh Azfar, Info, ROME examples : histoGUI 
Dear Colleagues,

I have succesfully written a ROME application for monitoring MIDAS events and 
understand that the appearance of a new MIDAS event record triggers the calling 
of the event method in the Fill Histogram task.

My two questions are however about the example in $ROMESYS/example/histoGUI - 

1) In this example there is no MIDAS event nor event record - what then is 
triggering the calling of the event method 

2) Is it possible to regulate the frequency that the event method is called in 
this example ?

best wishes
Farrukh Azfar
    Reply  11 Jun 2015, Ryu Sawada, Info, ROME examples : histoGUI 
Dear Farrukh

The 'histoGUI' example was prepared as an example for displaying histograms.
And the data are generated randomly in FillHisto task instead of reading from an input file.
So the example is using 'none' DAQ as written in romeConfig.xml in the example; the DAQ class is 
implemented in include/ROMENoDAQSystem.h, and it actually does nothing.

With 'none' DAQ, the program simply call Event method continuously without any control of the frequency.

When you run the example, the frequency is not so fast because the CPU is used for updating the display.
If you change <UpdateFrequency>, for example, to 10000, you will find the frequency of events through 
the task is increased because you update the display with a less frequency (thus lower CPU power is 
needed).

If you are going to use ROME for non-event based application, there are two ways to call some functions 
defined in tabs.
1) With GUI parts, like buttons, menus, sliders and so on
2) With calling a function periodically.

1) is suitable if you want to actively control the GUI; a user needs to, for example, click a button for 
operate the tab.

2) is suitable if you want to update the display without any operations.
You can see examples/argus/timer/ and examples/argus/thread as examples.

Best regards,

Ryu

> Dear Colleagues,
> 
> I have succesfully written a ROME application for monitoring MIDAS events and 
> understand that the appearance of a new MIDAS event record triggers the calling 
> of the event method in the Fill Histogram task.
> 
> My two questions are however about the example in $ROMESYS/example/histoGUI - 
> 
> 1) In this example there is no MIDAS event nor event record - what then is 
> triggering the calling of the event method 
> 
> 2) Is it possible to regulate the frequency that the event method is called in 
> this example ?
> 
> best wishes
> Farrukh Azfar
       Reply  11 Jun 2015, Ryu Sawada, Info, ROME examples : histoGUI 
Dear Farrukh

If you want to control the frequency of update of all tabs, maybe, you could use the same method (namely using 'none' DAQ') for calling event methods of tasks and tabs also for non-event based
application.
You may add a task in which you only call 'sleep' function for controlling the frequency.
For allowing you to use GUI buttons also during the sleep, you need to call the sleep function like following.
ProcessEvents function allows you to use GUI parts also during the sleep.
   Int_t sec = GetSP()->GetSleepTime();

   if (sec > 0) {
      struct timespec req, rem;
      req.tv_sec = 0;
      req.tv_nsec = 100000000; // sleep time in loop

      struct timeval endTime, currentTime;
      gettimeofday(&currentTime, 0);
      endTime.tv_sec = currentTime.tv_sec + sec;
      endTime.tv_usec = currentTime.tv_usec;

      int ret;

      while(1) {
         memset(&rem, 0, sizeof(rem));
         ret = nanosleep(&req, &rem);

         gettimeofday(&currentTime, 0);
         if (currentTime.tv_sec > endTime.tv_sec ||
             (currentTime.tv_sec == endTime.tv_sec && currentTime.tv_usec > endTime.tv_usec)) {
            break;
         }

         gSystem->ProcessEvents();
      }
   }

gettimeofday is defined in sys/time.h header file in UNIX-like OS.
gSystem is in TSystem.h

For controlling the frequency, in this example, I added a new steering parameter for the task, which is defined like,
     <Task>
  ... other definition of tasks ...
        <SteeringParameters>
          <SteeringParameterField>
            <SPFieldName>SleepTime</SPFieldName>
            <SPFieldType>Int_t</SPFieldType>
            <SPFieldInitialization>10</SPFieldInitialization>
            <SPFieldComment>Sleep time in sec</SPFieldComment>
          </SteeringParameterField>
        </SteeringParameters>
     </Task>

Best regards,

Ryu

> Dear Farrukh
>
> The 'histoGUI' example was prepared as an example for displaying histograms.
> And the data are generated randomly in FillHisto task instead of reading from an input file.
> So the example is using 'none' DAQ as written in romeConfig.xml in the example; the DAQ class is
> implemented in include/ROMENoDAQSystem.h, and it actually does nothing.
>
> With 'none' DAQ, the program simply call Event method continuously without any control of the frequency.
>
> When you run the example, the frequency is not so fast because the CPU is used for updating the display.
> If you change <UpdateFrequency>, for example, to 10000, you will find the frequency of events through
> the task is increased because you update the display with a less frequency (thus lower CPU power is
> needed).
>
> If you are going to use ROME for non-event based application, there are two ways to call some functions
> defined in tabs.
> 1) With GUI parts, like buttons, menus, sliders and so on
> 2) With calling a function periodically.
>
> 1) is suitable if you want to actively control the GUI; a user needs to, for example, click a button for
> operate the tab.
>
> 2) is suitable if you want to update the display without any operations.
> You can see examples/argus/timer/ and examples/argus/thread as examples.
>
> Best regards,
>
> Ryu
>
> > Dear Colleagues,
> >
> > I have succesfully written a ROME application for monitoring MIDAS events and
> > understand that the appearance of a new MIDAS event record triggers the calling
> > of the event method in the Fill Histogram task.
> >
> > My two questions are however about the example in $ROMESYS/example/histoGUI -
> >
> > 1) In this example there is no MIDAS event nor event record - what then is
> > triggering the calling of the event method
> >
> > 2) Is it possible to regulate the frequency that the event method is called in
> > this example ?
> >
> > best wishes
> > Farrukh Azfar
          Reply  13 Jun 2015, Farrukh Azfar, Info, ROME examples : histoGUI 
Dear Ryu,

many thanks for your reply that's very useful.

For my knowledge and for the sake of understanding the basics.

1) Its the line : gSystem->ProcessEvents(); that calls all the event methods in the Fill classes and the Tabs classes yes ?

2) This way I am controlling the filling of the tabs at an interval regulated by "sleep" then what has happened to the program itself calling ProcessEvents ? Have I overriden that call by calling ProcessEvents or will it continue to be called - perhaps I just set the <UpdateFrequency> 0</UpdateFrequency> to disable the programs own calling and only use mine ?

I hope I've been clear. Thanks very much for your continued help.

-Farrukh




Ryu Sawada wrote:
Dear Farrukh

If you want to control the frequency of update of all tabs, maybe, you could use the same method (namely using 'none' DAQ') for calling event methods of tasks and tabs also for non-event based
application.
You may add a task in which you only call 'sleep' function for controlling the frequency.
For allowing you to use GUI buttons also during the sleep, you need to call the sleep function like following.
ProcessEvents function allows you to use GUI parts also during the sleep.
   Int_t sec = GetSP()->GetSleepTime();

   if (sec > 0) {
      struct timespec req, rem;
      req.tv_sec = 0;
      req.tv_nsec = 100000000; // sleep time in loop

      struct timeval endTime, currentTime;
      gettimeofday(&currentTime, 0);
      endTime.tv_sec = currentTime.tv_sec + sec;
      endTime.tv_usec = currentTime.tv_usec;

      int ret;

      while(1) {
         memset(&rem, 0, sizeof(rem));
         ret = nanosleep(&req, &rem);

         gettimeofday(&currentTime, 0);
         if (currentTime.tv_sec > endTime.tv_sec ||
             (currentTime.tv_sec == endTime.tv_sec && currentTime.tv_usec > endTime.tv_usec)) {
            break;
         }

         gSystem->ProcessEvents();
      }
   }

gettimeofday is defined in sys/time.h header file in UNIX-like OS.
gSystem is in TSystem.h

For controlling the frequency, in this example, I added a new steering parameter for the task, which is defined like,
     <Task>
  ... other definition of tasks ...
        <SteeringParameters>
          <SteeringParameterField>
            <SPFieldName>SleepTime</SPFieldName>
            <SPFieldType>Int_t</SPFieldType>
            <SPFieldInitialization>10</SPFieldInitialization>
            <SPFieldComment>Sleep time in sec</SPFieldComment>
          </SteeringParameterField>
        </SteeringParameters>
     </Task>

Best regards,

Ryu

> Dear Farrukh
>
> The 'histoGUI' example was prepared as an example for displaying histograms.
> And the data are generated randomly in FillHisto task instead of reading from an input file.
> So the example is using 'none' DAQ as written in romeConfig.xml in the example; the DAQ class is
> implemented in include/ROMENoDAQSystem.h, and it actually does nothing.
>
> With 'none' DAQ, the program simply call Event method continuously without any control of the frequency.
>
> When you run the example, the frequency is not so fast because the CPU is used for updating the display.
> If you change <UpdateFrequency>, for example, to 10000, you will find the frequency of events through
> the task is increased because you update the display with a less frequency (thus lower CPU power is
> needed).
>
> If you are going to use ROME for non-event based application, there are two ways to call some functions
> defined in tabs.
> 1) With GUI parts, like buttons, menus, sliders and so on
> 2) With calling a function periodically.
>
> 1) is suitable if you want to actively control the GUI; a user needs to, for example, click a button for
> operate the tab.
>
> 2) is suitable if you want to update the display without any operations.
> You can see examples/argus/timer/ and examples/argus/thread as examples.
>
> Best regards,
>
> Ryu
>
> > Dear Colleagues,
> >
> > I have succesfully written a ROME application for monitoring MIDAS events and
> > understand that the appearance of a new MIDAS event record triggers the calling
> > of the event method in the Fill Histogram task.
> >
> > My two questions are however about the example in $ROMESYS/example/histoGUI -
> >
> > 1) In this example there is no MIDAS event nor event record - what then is
> > triggering the calling of the event method
> >
> > 2) Is it possible to regulate the frequency that the event method is called in
> > this example ?
> >
> > best wishes
> > Farrukh Azfar
             Reply  15 Jun 2015, Ryu Sawada, Info, ROME examples : histoGUI 
Dear Farrukh

ProcessEvents is nothing to do with ROME.
It is a ROOT function to process events called by timer, click, sockets etc.
"event" is not MIDAS event, but for example, an event where someone clicked a button.
For example, if you click an "update" button, ROOT needs to call a function connected to the button; ProcessEvents does the job.
So if you want to use the GUI during the sleep of a task, you need to call ProcessEvents sometimes.

https://root.cern.ch/root/html604/TSystem.html#TSystem:ProcessEvents

You need not to overwrite ProcessEvents.

Best regards,

Ryu


Farrukh Azfar wrote:
Dear Ryu,

many thanks for your reply that's very useful.

For my knowledge and for the sake of understanding the basics.

1) Its the line : gSystem->ProcessEvents(); that calls all the event methods in the Fill classes and the Tabs classes yes ?

2) This way I am controlling the filling of the tabs at an interval regulated by "sleep" then what has happened to the program itself calling ProcessEvents ? Have I overriden that call by calling ProcessEvents or will it continue to be called - perhaps I just set the <UpdateFrequency> 0</UpdateFrequency> to disable the programs own calling and only use mine ?

I hope I've been clear. Thanks very much for your continued help.

-Farrukh




Ryu Sawada wrote:
Dear Farrukh

If you want to control the frequency of update of all tabs, maybe, you could use the same method (namely using 'none' DAQ') for calling event methods of tasks and tabs also for non-event based
application.
You may add a task in which you only call 'sleep' function for controlling the frequency.
For allowing you to use GUI buttons also during the sleep, you need to call the sleep function like following.
ProcessEvents function allows you to use GUI parts also during the sleep.
   Int_t sec = GetSP()->GetSleepTime();

   if (sec > 0) {
      struct timespec req, rem;
      req.tv_sec = 0;
      req.tv_nsec = 100000000; // sleep time in loop

      struct timeval endTime, currentTime;
      gettimeofday(&currentTime, 0);
      endTime.tv_sec = currentTime.tv_sec + sec;
      endTime.tv_usec = currentTime.tv_usec;

      int ret;

      while(1) {
         memset(&rem, 0, sizeof(rem));
         ret = nanosleep(&req, &rem);

         gettimeofday(&currentTime, 0);
         if (currentTime.tv_sec > endTime.tv_sec ||
             (currentTime.tv_sec == endTime.tv_sec && currentTime.tv_usec > endTime.tv_usec)) {
            break;
         }

         gSystem->ProcessEvents();
      }
   }

gettimeofday is defined in sys/time.h header file in UNIX-like OS.
gSystem is in TSystem.h

For controlling the frequency, in this example, I added a new steering parameter for the task, which is defined like,
     <Task>
  ... other definition of tasks ...
        <SteeringParameters>
          <SteeringParameterField>
            <SPFieldName>SleepTime</SPFieldName>
            <SPFieldType>Int_t</SPFieldType>
            <SPFieldInitialization>10</SPFieldInitialization>
            <SPFieldComment>Sleep time in sec</SPFieldComment>
          </SteeringParameterField>
        </SteeringParameters>
     </Task>

Best regards,

Ryu

> Dear Farrukh
>
> The 'histoGUI' example was prepared as an example for displaying histograms.
> And the data are generated randomly in FillHisto task instead of reading from an input file.
> So the example is using 'none' DAQ as written in romeConfig.xml in the example; the DAQ class is
> implemented in include/ROMENoDAQSystem.h, and it actually does nothing.
>
> With 'none' DAQ, the program simply call Event method continuously without any control of the frequency.
>
> When you run the example, the frequency is not so fast because the CPU is used for updating the display.
> If you change <UpdateFrequency>, for example, to 10000, you will find the frequency of events through
> the task is increased because you update the display with a less frequency (thus lower CPU power is
> needed).
>
> If you are going to use ROME for non-event based application, there are two ways to call some functions
> defined in tabs.
> 1) With GUI parts, like buttons, menus, sliders and so on
> 2) With calling a function periodically.
>
> 1) is suitable if you want to actively control the GUI; a user needs to, for example, click a button for
> operate the tab.
>
> 2) is suitable if you want to update the display without any operations.
> You can see examples/argus/timer/ and examples/argus/thread as examples.
>
> Best regards,
>
> Ryu
>
> > Dear Colleagues,
> >
> > I have succesfully written a ROME application for monitoring MIDAS events and
> > understand that the appearance of a new MIDAS event record triggers the calling
> > of the event method in the Fill Histogram task.
> >
> > My two questions are however about the example in $ROMESYS/example/histoGUI -
> >
> > 1) In this example there is no MIDAS event nor event record - what then is
> > triggering the calling of the event method
> >
> > 2) Is it possible to regulate the frequency that the event method is called in
> > this example ?
> >
> > best wishes
> > Farrukh Azfar
    Reply  11 Jun 2015, Konstantin Olchanski, Info, ROME examples : histoGUI 
> I have succesfully written a ROME application ...

For the record, at TRIUMF we have moved away from ROME towards the ROOTANA ROOT-based analyzer 
package which has some simple C++ classes for reading midas raw data, some simple classes and examples for 
working with midas data in ROOT, and some fairly advanced graphical example applications.

https://bitbucket.org/tmidas/rootana

K.O.
Entry  06 Jun 2008, Todd Bredeweg, Forum, Rome License 
I was wondering what type of license, if any, applies to the Rome distribution.
Midas is using GPL and Root is using LGPL.
    Reply  09 Jun 2008, Stefan Ritt, Forum, Rome License 
> I was wondering what type of license, if any, applies to the Rome distribution.
> Midas is using GPL and Root is using LGPL.

Midas uses GPL because when I started that project, the LGPL was not yet in
existence. If anybody want Midas under the LGPL, I could consider switching that.
ROME is under the LGPL.
Entry  18 Apr 2007, Ryu Sawada, Info, I/O system change 
I changed default type of dictionaries. By this change we use new I/O system introduced at ROOT version 3.

A newly generated program can not read old files created by old programs by default. Error messages like following will be shown.
Error in <TBuffer::CheckByteCount>: object of class PMTData read too few bytes: 21 instead of 169

There is one flag to avoid this problem. When <DictionaryType> in <Experiment> is 0, romebuilder will
generate a program with old dictionary type.
<Experiment>
   <ExperimentName>MEG Analysis and monitor.</ExperimentName>
   <ExperimentShortCut>MEG</ExperimentShortCut>
   <ProgramName>Analyzer</ProgramName>
   <ProgramDefinitionVersion>3</ProgramDefinitionVersion>
   <FrameworkDescription>MEGAnalyzer is an analysis framework for MEG. It works as monitor as well.</FrameworkDescription>
   <DictionaryType>0</DictionaryType>   <!-- Add this line -->
</Experiment>

During development stage of version 2.9, we will check if there are problems in the new I/O system.
If we don't find any problems, The new I/O system will be the default of ROME version 2.9.
Even if we change the default, users can continue using the old I/O by using the flag.
Entry  20 Feb 2007, Todd Bredeweg, , Duplicate header file 
I just started using Rome v2.7 and Root v5.14.00. I have run into a rather
interesting issue trying to compile my analyzer. I tracked the problem to the
fact that both Root and Rome are loading their own version of a header file
called TArrayL64.h. The content of the two files are essentially identical. I
solved the problem by changing the conditional at the start of the file
$ROMESYS/include/TArrayL64.h from

#ifndef TArrayL64_H
#define TArrayL64_H

to

#ifndef ROOT_TArrayL64
#define ROOT_TArrayL64

The latter is what I found in the Root version of the file. Now it only gets
loaded once. I looked at the svn sources that I just updated and it also uses
TArrayL64_H.

Question, why are there two copies.

UPDATE 2-21-07:
It seems that Root was the cause of this. Rome has used this header for some
time, but earlier versions of Root did not include it.
    Reply  23 Feb 2007, Matthias Schneebeli, Forum, Duplicate header file 
> I just started using Rome v2.7 and Root v5.14.00. I have run into a rather
> interesting issue trying to compile my analyzer. I tracked the problem to the
> fact that both Root and Rome are loading their own version of a header file
> called TArrayL64.h. The content of the two files are essentially identical. I
> solved the problem by changing the conditional at the start of the file
> $ROMESYS/include/TArrayL64.h from
> 
> #ifndef TArrayL64_H
> #define TArrayL64_H
> 
> to
> 
> #ifndef ROOT_TArrayL64
> #define ROOT_TArrayL64
> 
> The latter is what I found in the Root version of the file. Now it only gets
> loaded once. I looked at the svn sources that I just updated and it also uses
> TArrayL64_H.
> 
> Question, why are there two copies.
> 
> UPDATE 2-21-07:
> It seems that Root was the cause of this. Rome has used this header for some
> time, but earlier versions of Root did not include it.


As you already mentioned the older root version didn't include this header. But we
needed to include it in rome earlier. Now we still have it in the rome
distribution to be compatible with the older root versions.

There should not be any problem with this header in the current rome version. If
you have compilation problems do a  make distclean  and try again.
       Reply  23 Feb 2007, Konstantin Olchanski, Forum, Duplicate header file 
> > I just started using Rome v2.7 and Root v5.14.00. I have run into a rather
> > interesting issue trying to compile my analyzer. I tracked the problem to the
> > fact that both Root and Rome are loading their own version of a header file
> > called TArrayL64.h.

I have just run into the TArrayL64.h problem myself. I recommend that we resolve
the clashing header files. We could ask Rene Brun to rename his file or we could
rename the clashing file in Rome.

K.O.
          Reply  28 Feb 2007, Ryu Sawada, Forum, Duplicate header file 
> > > I just started using Rome v2.7 and Root v5.14.00. I have run into a rather
> > > interesting issue trying to compile my analyzer. I tracked the problem to the
> > > fact that both Root and Rome are loading their own version of a header file
> > > called TArrayL64.h.
> 
> I have just run into the TArrayL64.h problem myself. I recommend that we resolve
> the clashing header files. We could ask Rene Brun to rename his file or we could
> rename the clashing file in Rome.
> 
> K.O.

As Matthias mensioned, this problem is solved in SVN version of ROME.
I propose to release ROME version 2.8, which will not have this problem.

If there are users who want to continue to use 2.7, we could also release patch release of 2.7. (2.7.1), in which only compatibility problems 
are fixed.

Ryu
             Reply  28 Feb 2007, Ryu Sawada, Forum, Duplicate header file 
> > > > I just started using Rome v2.7 and Root v5.14.00. I have run into a rather
> > > > interesting issue trying to compile my analyzer. I tracked the problem to the
> > > > fact that both Root and Rome are loading their own version of a header file
> > > > called TArrayL64.h.
> > 
> > I have just run into the TArrayL64.h problem myself. I recommend that we resolve
> > the clashing header files. We could ask Rene Brun to rename his file or we could
> > rename the clashing file in Rome.
> > 
> > K.O.
> 
> As Matthias mensioned, this problem is solved in SVN version of ROME.
> I propose to release ROME version 2.8, which will not have this problem.
> 
> If there are users who want to continue to use 2.7, we could also release patch release of 2.7. (2.7.1), in which only compatibility problems 
> are fixed.

I prepared a new release 2.8. It can be downloaded from http://midas.psi.ch/rome/download.html

The new release works with also ROOT 5.14 or 5.15.

At this release, style of configuration file was changed. Please see following message for details. 
https://ladd00.triumf.ca/elog/Rome/129
Entry  20 Nov 2006, Matthias Schneebeli, Info, *** Important *** : Format of configuration file changed 
The format of the configuration file has changed starting with rev. 1545. The
configuration files produced by an older version of rome are not anymore
compatible with the new versions of rome.

Please convert your configuration files with the converter program added under
/rome/tools/ConvertConfig/


Matthias
Entry  29 Jun 2006, Steven Sheets, Forum, ROME analyzer crashes on reading midas file.  
Hello,

So I'm stuck on this problem. The ROME based analyzer I use crashes everytime it attempts to open a midas file giving me this error:

Reading Midas-File /home/sheets4/run04750.mid.gz

*** Break *** segmentation violation
Generating stack trace...
0x00002b93efa9cd5c in gzread + 0xfc from /home/sheets4/root/lib/libCore.so
0x00000000004c47d9 in ROMEMidasDAQ::Event(long long) + 0x165 from ./danceanalyzer.exe
0x00000000004c452e in ROMEMidasDAQ::BeginOfRun() + 0x534 from ./danceanalyzer.exe
0x00000000004bf3da in ROMEDAQSystem::BeginOfRunDAQ() + 0x32 from ./danceanalyzer.exe
0x00000000004c1555 in ROMEEventLoop::DAQBeginOfRun(long long) + 0x15d from ./danceanalyzer.exe
0x00000000004c0721 in ROMEEventLoop::ExecuteTask(char const*) + 0x2d5 from ./danceanalyzer.exe
0x00000000004bb395 in ROMEAnalyzer::Start(int, char**) + 0x35d from ./danceanalyzer.exe
0x00000000005d121d in main + 0x2b1 from ./danceanalyzer.exe
0x000000363331c4bb in __libc_start_main + 0xdb from /lib64/tls/libc.so.6
0x00000000004b2e1a in TApplicationImp::ShowMembers(TMemberInspector&, char*) + 0x82 from ./danceanalyzer.exe
Aborted


I'd guess the problem is connected with ROOT but I'm not sure how to fix it.

I run ROOT v5.10.00
ROME v2.4
on a machine with Dual AMD opterons, 64 Bit with Red Hat Enterprise.

Any help would be appreciated.

thanks,
Steven
    Reply  04 Jul 2006, Matthias Schneebeli, Forum, ROME analyzer crashes on reading midas file.  
From the error message I don't see where the problem is.
Are you sure that your midas file is ok?

You can send me the xml definition file, all source files of your project and the midas file. Then I will take a look at it.

Matthias




Steven Sheets wrote:
Hello,

So I'm stuck on this problem. The ROME based analyzer I use crashes everytime it attempts to open a midas file giving me this error:

Reading Midas-File /home/sheets4/run04750.mid.gz

*** Break *** segmentation violation
Generating stack trace...
0x00002b93efa9cd5c in gzread + 0xfc from /home/sheets4/root/lib/libCore.so
0x00000000004c47d9 in ROMEMidasDAQ::Event(long long) + 0x165 from ./danceanalyzer.exe
0x00000000004c452e in ROMEMidasDAQ::BeginOfRun() + 0x534 from ./danceanalyzer.exe
0x00000000004bf3da in ROMEDAQSystem::BeginOfRunDAQ() + 0x32 from ./danceanalyzer.exe
0x00000000004c1555 in ROMEEventLoop::DAQBeginOfRun(long long) + 0x15d from ./danceanalyzer.exe
0x00000000004c0721 in ROMEEventLoop::ExecuteTask(char const*) + 0x2d5 from ./danceanalyzer.exe
0x00000000004bb395 in ROMEAnalyzer::Start(int, char**) + 0x35d from ./danceanalyzer.exe
0x00000000005d121d in main + 0x2b1 from ./danceanalyzer.exe
0x000000363331c4bb in __libc_start_main + 0xdb from /lib64/tls/libc.so.6
0x00000000004b2e1a in TApplicationImp::ShowMembers(TMemberInspector&, char*) + 0x82 from ./danceanalyzer.exe
Aborted


I'd guess the problem is connected with ROOT but I'm not sure how to fix it.

I run ROOT v5.10.00
ROME v2.4
on a machine with Dual AMD opterons, 64 Bit with Red Hat Enterprise.

Any help would be appreciated.

thanks,
Steven
    Reply  07 Jul 2006, Ryu Sawada, Forum, ROME analyzer crashes on reading midas file.  
I have tested midas file reading on 64 bit CPU. And there was no problem.

My environment is

-- Wring
Linux 2.6.9 SMP pentium4 32bit
ROOT v5.11/06 32 bit
MIDAS rev.3165 32 bit
midas files was written by frontend in midas/examples/experiment

-- Reading
Linux 2.6.17 SMP x86_64 AMD dual-core Athlon 64bit
ROME rev.1223 64 bit
ROOT v5.08/00b 64 bit

midas file was compressed with gzip 1.3.3
Entry  08 Jun 2006, Todd Bredeweg, Bug Report, Unable 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
    Reply  08 Jun 2006, Konstantin Olchanski, Bug Report, Unable 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]
       Reply  09 Jun 2006, Ryu Sawada, Bug Fix, Unable to run rome analyzer from crontab 
I have made modification on batch mode and daemon mode at rev.1129, 1136 and 1137.
The difference of daemon and batch mode is written in ROME homepage
http://midas.psi.ch/rome/usersGuide.html#fwcommandline

You can disable all graphics with -ng option explicitly. And when ROME failed to open display, it goes into 
no graphics mode automatically.

Please try. And please report when you still have a problem.

> (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]
Entry  09 Jun 2006, Matthias Schneebeli, Info, ChangeableClassFile in Definition XML removed 
We removed the <ChangeableClassFile> under <Task> in the project definition XML file. ROME will always make a user editable class file.

This change does not affect your project.

You may get errors when validating the xml file. This can simply be fixed by removing all <ChangeableClassFile> tags under <Task> in your project definition file.
Entry  08 Mar 2006, Giovanni Signorelli, Bug Report, gAnalyzer->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; }
    Reply  02 Apr 2006, Matthias Schneebeli, Bug Report, gAnalyzer->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.
Entry  22 Feb 2006, Giovanni Signorelli, Suggestion, Text database suggestion 
This is maybe a bug report that happens reading long lines in a text database.
I am currently handling large data base files for linear fit analysis, basically I have to handle a 828 x 828 
matrix. Writing in the text db 828 lines containing each 828 comma separated values with a single 
new-line at the end does not work, maybe the read buffer is too large. 
So I propose the following modification to ROMETextDataBase.cpp:
Suppose you have a field named "coefficients" which is declared "array", say of four numbers,  in the 
xml file. In the text data base it appears as:

<coefficients>
one,two,three,four
one,two,three,four
one,two,three,four
...
</coefficients>

One should be able to write the same code as follows:

<coefficients>
one,
two,
three,
four                  <----- note there is NO COMMA here!
one,
two,
three,
four
one,two,three,four
...
</coefficients>

or

<coefficients>
one,two,
three,four
one,two,three,
four
one,
two,three,four
...
</coefficients>

In this way I can write a single column of (comma separated) values. Can somebody (Ryu?) take care of 
this (I hope simple) modification?
Thanks.

 
    Reply  22 Feb 2006, Stefan Ritt, Suggestion, Text database suggestion 
> This is maybe a bug report that happens reading long lines in a text database.

This does not only affect ROME, but also the MXML library which has to read the long lines. I haven't carefully
checked, but I presume that MXML can handle long lines. So it might maybe be better to keep the long lines in a
text database, and modify ROME such that there is no buffer overflow. This maybe makes it easier to read the
database and to import it in programs like a spreadsheet.
    Reply  22 Feb 2006, Ryu Sawada, Suggestion, Text database suggestion 
I improved TextDataBase as Giovanni suggested.
Entry  08 Feb 2006, Ryu Sawada, Bug Report, ROMENetFolderServer 
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.
    Reply  09 Feb 2006, Ryu Sawada, Bug Report, ROMENetFolderServer 
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;
}  
------
Entry  08 Feb 2006, Ryu Sawada, Bug Report, ROMEEventLoop: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.
Entry  09 Jan 2006, Ryu Sawada, Suggestion, Quit mode 
Sometimes I hear that going to interactive session after end of analysis is uncomfortable. In fact it is possible to quit program immediately with -b option.
But -b is not only for that, It suppresses print. So I propose to make QuidMode in which program exit without going interactive session.
-q option is good, because ROOT has same option which means quit program just after macro is executed.
    Reply  13 Jan 2006, Ryu Sawada, Suggestion, Quit mode 
done.
Users can specify quit mode with option -q or configuration file.
ELOG V3.1.4-2e1708b5