ID |
Date |
Author |
Topic |
Subject |
189
|
23 Mar 2016 |
Farrukh Azfar | Info | ROME in online mode using an intermediary machine | Dear Folks
Complete newby on online mode - hence this easy question :
I have three machines, A, B, and C.
A is where a MIDAS EventBuilder is running
B is a gateway machine
C is my local machine on which I want to run ROME analyser (in online mode)
A is not accessible from C. B is accesible from both A and C -
I want to utilize the fact that I have a gateway to run ROME analyser in online
mode reading data from A via B -
If someone could explain how to do this in detail - but in simple terms - I'd be
grateful
Thank you !
Farrukh |
190
|
27 Mar 2016 |
Ryu Sawada | Info | ROME in online mode using an intermediary machine | Hello,
I think you need to use SSH port forwarding,
On C, you open a terminal and type a command like, ssh -L 21175:A:1175 B 1175 is the MIDAS server port number.
For avoiding the connection being terminated, you may better to type a command to keep the communication, for
example, top
Then, on C, you configure ROME to connect to localhost and port number is 21175, and start the ROME analyzer.
Ryu
> Dear Folks
>
> Complete newby on online mode - hence this easy question :
>
> I have three machines, A, B, and C.
>
> A is where a MIDAS EventBuilder is running
> B is a gateway machine
> C is my local machine on which I want to run ROME analyser (in online mode)
>
> A is not accessible from C. B is accesible from both A and C -
>
> I want to utilize the fact that I have a gateway to run ROME analyser in online
> mode reading data from A via B -
>
> If someone could explain how to do this in detail - but in simple terms - I'd be
> grateful
>
> Thank you !
>
> Farrukh |
191
|
30 Mar 2016 |
Farrukh Azfar | Info | ROME in online mode using an intermediary machine | Hi Ryu
Thanks for your reply
so we did do that - it seems that the path to MIDASYS needs to be defined on the localhost too ? Anyhow the program does not run complaining that it is unable to read from the online database -
[HGUIExample,ERROR] [ROMEPrint.cpp:177:ROMEPrint::Error,ERROR] Can not read run status from the online database
So the ODB cannot be read through this port ? Do you have an example of running ROME through an ssh tunnel via an intermediary (gateway) machine ?
many thanks
Farrukh
Ryu Sawada wrote: | Hello,
I think you need to use SSH port forwarding,
On C, you open a terminal and type a command like, ssh -L 21175:A:1175 B 1175 is the MIDAS server port number.
For avoiding the connection being terminated, you may better to type a command to keep the communication, for
example, top
Then, on C, you configure ROME to connect to localhost and port number is 21175, and start the ROME analyzer.
Ryu
> Dear Folks
>
> Complete newby on online mode - hence this easy question :
>
> I have three machines, A, B, and C.
>
> A is where a MIDAS EventBuilder is running
> B is a gateway machine
> C is my local machine on which I want to run ROME analyser (in online mode)
>
> A is not accessible from C. B is accesible from both A and C -
>
> I want to utilize the fact that I have a gateway to run ROME analyser in online
> mode reading data from A via B -
>
> If someone could explain how to do this in detail - but in simple terms - I'd be
> grateful
>
> Thank you !
>
> Farrukh |
|
192
|
31 Mar 2016 |
Ryu Sawada | Info | ROME in online mode using an intermediary machine | The local port 21175 may be too large, please replace 21175 by, for example, 8175.
You can specify the host name and the port number in your config XML for your ROME program like, <Online>
<Host>localhost:8175</Host>
</Online>
Can you connect the MIDAS experiment from the host B with using other midas applications, e.g odbedit ?
Can you try odbedit -h A -e EXP (replace EXP with your experiment name)
If you can not connect, I think there is a problem which is not related to ROME.
Can you also check if you can connect the MIDAS experiment from the host C with using other midas applications, e.g odbedit, after establishing the SSH tunnel ?
Can you try odbedit -h localhost:8175 -e EXP (replace EXP with your experiment name)
Ryu
Farrukh Azfar wrote: | Hi Ryu
Thanks for your reply
so we did do that - it seems that the path to MIDASYS needs to be defined on the localhost too ? Anyhow the program does not run complaining that it is unable to read from the online database -
[HGUIExample,ERROR] [ROMEPrint.cpp:177:ROMEPrint::Error,ERROR] Can not read run status from the online database
So the ODB cannot be read through this port ? Do you have an example of running ROME through an ssh tunnel via an intermediary (gateway) machine ?
many thanks
Farrukh
Ryu Sawada wrote: | Hello,
I think you need to use SSH port forwarding,
On C, you open a terminal and type a command like, ssh -L 21175:A:1175 B 1175 is the MIDAS server port number.
For avoiding the connection being terminated, you may better to type a command to keep the communication, for
example, top
Then, on C, you configure ROME to connect to localhost and port number is 21175, and start the ROME analyzer.
Ryu
> Dear Folks
>
> Complete newby on online mode - hence this easy question :
>
> I have three machines, A, B, and C.
>
> A is where a MIDAS EventBuilder is running
> B is a gateway machine
> C is my local machine on which I want to run ROME analyser (in online mode)
>
> A is not accessible from C. B is accesible from both A and C -
>
> I want to utilize the fact that I have a gateway to run ROME analyser in online
> mode reading data from A via B -
>
> If someone could explain how to do this in detail - but in simple terms - I'd be
> grateful
>
> Thank you !
>
> Farrukh |
|
|
193
|
04 Apr 2016 |
Wes Gohn | Info | ROME in online mode using an intermediary machine |
Hi Ryu, here is the method we've followed. I tried to simplify things by connecting to the server directly, so we can skip the port tunnelling. On the server side, in the romeConfig.xml, I set
<SocketServer>
<Active>true</Active>
<PortNumber>9091</PortNumber>
</SocketServer>
I then started rome in batch mode
./midanalyzer.exe -i romeConfig.xml -b
It connects to a running experiment as expected, and is processing data.
On the client machine, I set in romeConfig.xml:
<SocketClient>
<Host>myhost</Host>
<Port>9091</Port>
</SocketClient>
I then start rome using the -R option:
./midanalyzer.exe -R myhost:9091
*****************************************
* *
* MIDAnalyzer *
* *
* generated by the ROME Environment *
* Version 3.2.6 *
* *
*****************************************
Remote session to myhost:9091
midanalyzer [0]
At which point it does establish the socket connection to the server side, but it just sits there (I can establish this because if I run commands at the prompt, I see some errors pop up on my server terminal). How do I open my Argus browser on the client side to see the plots?
Or is there something we're doing that is fundamentally wrong?
Thanks,
Wes |
194
|
05 Apr 2016 |
Ryu Sawada | Info | ROME in online mode using an intermediary machine | Dear Wes,
-R is used for starting an interactive session connected to a server.
If you want to see Argus windows, please change <ProgramMode> to 3 (or use "-p 3" comman-line option).
Ryu
Wes Gohn wrote: |
Hi Ryu, here is the method we've followed. I tried to simplify things by connecting to the server directly, so we can skip the port tunnelling. On the server side, in the romeConfig.xml, I set
<SocketServer>
<Active>true</Active>
<PortNumber>9091</PortNumber>
</SocketServer>
I then started rome in batch mode
./midanalyzer.exe -i romeConfig.xml -b
It connects to a running experiment as expected, and is processing data.
On the client machine, I set in romeConfig.xml:
<SocketClient>
<Host>myhost</Host>
<Port>9091</Port>
</SocketClient>
I then start rome using the -R option:
./midanalyzer.exe -R myhost:9091
*****************************************
* *
* MIDAnalyzer *
* *
* generated by the ROME Environment *
* Version 3.2.6 *
* *
*****************************************
Remote session to myhost:9091
midanalyzer [0]
At which point it does establish the socket connection to the server side, but it just sits there (I can establish this because if I run commands at the prompt, I see some errors pop up on my server terminal). How do I open my Argus browser on the client side to see the plots?
Or is there something we're doing that is fundamentally wrong?
Thanks,
Wes |
|
129
|
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 |
23
|
03 Dec 2004 |
Ryu Sawada | Bug Report | -e option | When I used "-e" option in generated framework. It stopped immediately after starting analysis.
When I commented out following two lines in ROMEEventLoop.cpp. It worked.
// check event numbers
int status = gROME->CheckEventNumber(event);
if (status==0) {
// this->SetContinue();
// return true;
} |
28
|
21 Dec 2004 |
Matthias Schneebeli | Bug Report | -e option | > When I used "-e" option in generated framework. It stopped immediately after starting analysis.
>
> When I commented out following two lines in ROMEEventLoop.cpp. It worked.
>
> // check event numbers
> int status = gROME->CheckEventNumber(event);
> if (status==0) {
> // this->SetContinue();
> // return true;
> }
the syntax is : -e 100-200,205,300-400 |
75
|
15 Apr 2005 |
Ryu Sawada | Suggestion | <Online> in configuration file | <Online> in configuration file is MIDAS specific thing. Non MIDAS users don't need it.
And it can be used when MIDAS is linked.
So it is better that <Online> appears only when MIDAS is linked. |
148
|
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 |
149
|
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 |
150
|
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 |
152
|
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 |
153
|
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 |
154
|
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 |
155
|
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 |
159
|
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 |
74
|
15 Apr 2005 |
Ryu Sawada | Suggestion | About parameters in definition and configuration file | At first there must be several opinions and discussions. Following is just my opinion.
Probably asking opinion some users before changing ROME is better.
There are some properties for histograms and databases.
* database name
* database type and connection
* field database name and path
* histogram properties
I assume that definition file is shared by several persons in experimental group and configuration files
are created for each users at the first execution. If you assume that we should share also configuration
file, story written below is different.
My basic concept is that
*Parameters which is complicated or will be shared among several users should be in definition file.
*Parameters which can be often changed at run time should be in configuration file.
The good point to specify values in definition file is that they are flexible, because we can use
ROMEString::SetFormatted.
It is outstanding point of ROME that we can design framework very flexibly due to builder.
Other point is that parameters in definition file will be written by programer while those in
configuration file can be written by non-experts. It is better that the application can work with few
changes of configuration file as possible. In my feeling, to specify database paths and histogram
parameters in configuration file correctly is too tough for normal users.
In my opinion, they are separated like,
Definition file:
* field database name and path
* histogram properties
Configuration file:
* database type and connection
* (histogram properties)
-- about database path
Normally, users share the same database structure. So I think it should be in definition file. I don't think
paths are changed so often.
-- about database type and connection
At first type and connection can be written in one line like,
xml://directory_of_database/database_name
mysql://[user_name]:[passwd]@[hostname]:[port]/database_name
none://
( odb://[host_name]/[experiment] or odb://experiment@host_name )
(parameters in [] are optional)
These parameters will be changed user by user, because they can have xml files in different place, and
they can use replicated SQL servers.
Password can be written in connection. So it should be in configuration file.
-- about histogram parameters
We can specify them with calculation if they are in definition file. I think it should be in definition file.
And to allow to overwrite in configuration file is also attractive. In my opinion overwriting with normal
type like Float_t,Int_t... is enough.
---------
In result, my opinion is like following.
Database name, database paths and histogram parameters are in definition file.
In default configuration file, config class writes database entries appeared in definition file.
Config class writes histogram parameters entries with empty values if the histogram is <Configurable>.
Only when
some value is written there, analyzer overwrite these parameters.
As I wrote above I think normal number like following are enough as values of histogram parameters in
configuration file.
<HistXmax>1000</HistXmax>
I don't think following is necessary.
</HistXmax>/GSP/parameter</HistXmax>
Definition file
<Folder>
<FolderName>foldername</FolderName>
<DataBaseAccess>true</DataBaseAccess>
<Field>
<FieldName>fieldname</FieldName>
<FieldType>Float_t</FieldType>
<DataBaseName>first_database</DataBaseName>
<DataBasePath>"/Path/to/record"</DataBasePath>
</Field>
<Field>
<FieldName>fieldname2</FieldName>
<FieldType>Float_t</FieldType>
<DataBaseName>second_database</DataBaseName>
<DataBasePath>"/Path/to/record2"</DataBasePath>
</Field>
</Folder>
...
<Histogram>
<HistName>histname</HistName>
<Configurable>true</Configurable>
<HistType>TH1F</HistType>
<HistTitle>ADC0 Bank</HistTitle>
<HistFolderTitle>ADC</HistFolderTitle>
<HistArraySize>gAnalyzer->GetGSP()->GetNumberOfADC()</HistArraySize>
<HistXNbins>4094</HistXNbins>
<HistXmin>1</HistXmin>
<HistXmax>4095</HistXmax>
</Histogram>
Default configuration file
<DataBases>
<DataBase>
<Name>first_database</Name>
<Connection>none://</Connection>
</DataBase>
<DataBase>
<Name>second_database</Name>
<Connection>none://</Connection>
</DataBase>
</DataBases>
...
<Histogram>
<HistName>histname</HistName>
<HistFolderTitle></HistFolderTitle>
<HistArraySize></HistArraySize>
<HistXNbins></HistXNbins>
<HistXmin></HistXmin>
<HistXmax></HistXmax>
</Histogram> |
162
|
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 |
|