Back Midas Rome Roody Rootana
  Rome Analyzer Framework, Page 11 of 11  Not logged in ELOG logo
ID Date Author Topic Subjectdown
  159   07 Sep 2015 Ryu SawadaForumARGUS 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 
  75   15 Apr 2005 Ryu SawadaSuggestion<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.
  23   03 Dec 2004 Ryu SawadaBug 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 SchneebeliBug 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
  129   20 Nov 2006 Matthias SchneebeliInfo*** 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
  189   23 Mar 2016 Farrukh AzfarInfo 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 SawadaInfo 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 AzfarInfo 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 SawadaInfo 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 GohnInfo 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 SawadaInfo 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
ELOG V3.1.4-2e1708b5