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 |
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 |
03 Sep 2015, Farrukh Azfar, Bug Report, Saving canvas as pdf via a button one vs many pads 
|
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 |
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 |
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 |
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 |
10 Mar 2016, Farrukh Azfar, Forum, Option to analyse every Nth event
|
Dear Colleagues
I was wondering if there was an option to analyse only ever N events in ROME. If
this is doable via an xml switch I am guessing this would be the best and most
convenient solution.
Else any advice on how to do this in code would be great as well -
many thanks
Farrukh |
21 Mar 2016, Farrukh Azfar, Info, speeding up ROME
|
|
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 |
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 |
|
09 Apr 2005, Daniele Barbareschi, Bug Report, Compiling Builder
|
I am Daniele Barbareschi, I am a Corrado Gatto's student
I work to interfacing between ALIROOT and MYSQL for CONSTANT CALIBRATION of
subdetector.
There's a bug in compiling...
NAME of file "ROMEXML.h,ROMEXML.cpp" in the ultimate version ROME is lowercase.
The gmake program return error.
Maybe ROMESQL too.
See you those files and similar.
D.B. |
|