ID |
Date |
Author |
Topic |
Subject |
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 |
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 |
151
|
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 |
Attachment 1: MIDTBCTab.cpp
|
////////////////////////////////////////////////////////////////////////////////
// //
// MIDTBCTab //
// //
// Begin_Html <!--
/*-->
<!--*/
// --> End_Html
// //
// //
////////////////////////////////////////////////////////////////////////////////
/* Generated header file containing necessary includes */
#include "generated/MIDTBCTabGeneratedIncludes.h"
////////////////////////////////////////////////////////////////////////////////
/* This header was generated by ROMEBuilder. Manual changes above the *
* following line will be lost next time ROMEBuilder is executed. */
/////////////////////////////////////----///////////////////////////////////////
#include "generated/MIDWindow.h"
#include "generated/MIDAnalyzer.h"
#include "tabs/MIDTBCTab.h"
#include "tasks/MIDTFillHistogram.h"
#include "TAxis.h"
#include "TLatex.h"
#include <TGClient.h>
#include <TCanvas.h>
#include <TRandom.h>
#include <TGButton.h>
#include <TGFrame.h>
#include <TRootEmbeddedCanvas.h>
#include <RQ_OBJECT.h>
#include<TString.h>
#include<TDatime.h>
// uncomment if you want to include headers of all folders
//#include "MIDAllFolders.h"
ClassImp(MIDTBCTab)
using namespace std;
//______________________________________________________________________________
void MIDTBCTab::Init()
{
// Create style for this tab
TStyle *orgStyle = gStyle;
fStyle = new TStyle(*orgStyle); // copy the original style
fStyle->SetOptTitle(1);
fStyle->SetTitleOffset(0.18, "y");
fStyle->SetPadGridX(1);
fStyle->SetPadGridY(1);
fStyle->SetPadTickX(1);
fStyle->SetPadTickY(1);
fStyle->SetFrameBorderSize(0);
fStyle->SetFrameBorderMode(0);
fStyle->SetFrameFillStyle(0);
fStyle->SetTitleSize(0.06, "t");
fStyle->SetStatH(0.09);
fStyle->SetStatW(0.09);
fStyle->cd();
// Create a vertical frame containing buttons and canvas
fVert = new TGVerticalFrame(this, (UInt_t) (700 * gAnalyzer->GetWindow()->GetWindowScale()), (UInt_t) (700 *gAnalyzer->GetWindow()->GetWindowScale()));
// Create an embedded canvas and add to the main frame, centered in x and y
// TString canvasname = "Sample Canvas";
// set data member
fCanvasName = new TString ("Sample Canvas");
fCanvas = new TRootEmbeddedCanvas(fCanvasName->Data(), fVert, (UInt_t) (600 * gAnalyzer->GetWindow()->GetWindowScale()), (UInt_t) (600 * gAnalyzer->GetWindow()->GetWindowScale()));
fCanvas->GetCanvas()->Divide(1,1);
TLatex title;
title.SetTextFont(12);
title.SetTextSize(0.03);
title.SetNDC();
//Create save button
ULong_t green;
gClient->GetColorByName("Green",green);
fSaveCanvas = new TGTextButton(fVert, "SaveCanvas");
fSaveCanvas->ChangeBackground(green);
fSaveCanvas->Associate(this);
fVert->AddFrame(fSaveCanvas, new TGLayoutHints(kLHintsCenterX, 5, 5, 3, 4));
/// Create "Update" button
ULong_t yellow;
gClient->GetColorByName("Yellow",yellow);
fBUpdate = new TGTextButton(fVert, "Update");
fBUpdate->ChangeBackground(yellow);
fBUpdate->Associate(this);
// fVert->AddFrame(fCanvas, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 4, 4, 4, 4));
fVert->AddFrame(fBUpdate, new TGLayoutHints(kLHintsCenterX, 4, 4, 4, 4));
// AddFrame(fVert, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 4, 4, 4, 4));
//Create Exit button
ULong_t red;
gClient->GetColorByName("Red",red);
fExit = new TGTextButton(fVert,"&Exit", "gApplication->Terminate(0)");
fExit->ChangeBackground(red);
fExit->Associate(this);
// fVert->AddFrame(fCanvas, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 4, 4, 4, 4));
fVert->AddFrame(fExit, new TGLayoutHints(kLHintsCenterX, 5, 5, 3, 4));
fVert->AddFrame(fCanvas, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 5, 5, 3, 4));
AddFrame(fVert, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 4, 4, 4, 4));
ConnectAll();
orgStyle->cd();
}
//______________________________________________________________________________
void MIDTBCTab::EndInit()
{
}
//______________________________________________________________________________
void MIDTBCTab::EventHandler()
{
}
//______________________________________________________________________________
void MIDTBCTab::MenuClicked(TGPopupMenu * /* menu */, Long_t /* param */)
{
}
//______________________________________________________________________________
void MIDTBCTab::TabSelected()
{
}
//______________________________________________________________________________
void MIDTBCTab::TabUnSelected()
{
}
// Save Canvas:
// you'll need a function of the same signature in your .h -> also make sure that TString is included in your .h
void MIDTBCTab::SaveCanvas()
{
TString * fileName = new TString (fCanvasName->Data());
//replace all spaces in your canvas name
fileName->ReplaceAll(" ", "");
//generate data and time stamp -> Recall you'll have to make sure TDatime is included
TDatime dateTime; // time and date remain frozen when this function was called
TString dateAsString = Form("%d", dateTime.GetDate());
TString timeAsString = Form("%d", dateTime.GetTime());
// append time date etc to canvas name
(*fileName) += ".";
(*fileName) += dateAsString;
(*fileName) += ".";
(*fileName) += timeAsString;
(*fileName) += ".pdf"; // pdf for now maybe think about png and other options for user later ?
// debug
// cout << " This is the filename " << fileName->Data() << endl;
// now print it and hope it works ....
fCanvas->GetCanvas()->Print(fileName->Data());
//cout << " Already attempted to print this file " << fileName->Data() << endl;
}
void MIDTBCTab::Update()
{
TLatex title;
title.SetTextFont(12);
title.SetTextSize(0.03);
title.SetNDC();
TStyle *orgStyle = gStyle;
fStyle->cd();
TH2 *histo;
for (Int_t i = 0; i < 1; i++) {
fCanvas->GetCanvas()->cd(i + 1);
histo = (TH2D *) gAnalyzer->GetFillHistogramTask()->Geth2_dt_tcpgotheaderAt(i);
if (!histo) {
cout << "Histo h2_dt_tcpgotheader not available." << endl;
} else {
histo->SetMarkerColor(1);
histo->GetXaxis()->SetRangeUser(-20000,100000);
histo->Draw("COLZ");
title.SetTextColor(2);
title.SetTextColor(2);
title.DrawLatex(0.01,0.32,"tcp header #rightarrow");
title.SetTextColor(3);
title.DrawLatex(0.01,0.4,"tcp data #rightarrow");
title.SetTextColor(4);
title.DrawLatex(0.01,0.48,"copy to GPU #rightarrow");
title.SetTextColor(5);
title.DrawLatex(0.01,0.56,"GPU processing #rightarrow");
title.SetTextColor(6);
title.DrawLatex(0.01,0.64,"MFE start #rightarrow");
title.SetTextColor(7);
title.DrawLatex(0.01,0.72,"MFE stop #rightarrow");
}
}
fCanvas->GetCanvas()->cd(0);
fCanvas->GetCanvas()->Modified();
fCanvas->GetCanvas()->Update();
orgStyle->cd();
return;
}
//______________________________________________________________________________
void MIDTBCTab::ConnectAll()
{
fBUpdate->Connect("Pressed()", "MIDTBCTab", this, "Update()");
fExit->Connect("Pressed()", "MIDTBCTab", this, "&Exit()");
fSaveCanvas->Connect("Pressed()","MIDTBCTab", this, "SaveCanvas()");
}
//______________________________________________________________________________
void MIDTBCTab::DisconnectAll()
{
if (fBUpdate) { fBUpdate->Disconnect(this); }
if (fExit) { fExit->Disconnect(this); }
if(fSaveCanvas) { fSaveCanvas->Disconnect(this);}
}
|
Attachment 2: MIDTRCTab.cpp
|
////////////////////////////////////////////////////////////////////////////////
// //
// MIDTRCTab //
// //
// Begin_Html <!--
/*-->
<!--*/
// --> End_Html
// //
// //
////////////////////////////////////////////////////////////////////////////////
/* Generated header file containing necessary includes */
#include "generated/MIDTRCTabGeneratedIncludes.h"
////////////////////////////////////////////////////////////////////////////////
/* This header was generated by ROMEBuilder. Manual changes above the *
* following line will be lost next time ROMEBuilder is executed. */
/////////////////////////////////////----///////////////////////////////////////
#include "generated/MIDWindow.h"
#include "generated/MIDAnalyzer.h"
#include "tabs/MIDTRCTab.h"
#include "tasks/MIDTFillHistogramraw.h"
#include "TAxis.h"
#include "TLatex.h"
#include <TGClient.h>
#include <TCanvas.h>
#include <TRandom.h>
#include <TGButton.h>
#include <TGFrame.h>
#include <TRootEmbeddedCanvas.h>
#include <RQ_OBJECT.h>
#include<TString.h>
#include<TDatime.h>
// uncomment if you want to include headers of all folders
#include "MIDAllFolders.h"
ClassImp(MIDTRCTab)
using namespace std;
//______________________________________________________________________________
void MIDTRCTab::Init()
{
// Create style for this tab
TStyle *orgStyle = gStyle;
fStyle = new TStyle(*orgStyle); // copy the original style
fStyle->SetOptTitle(1);
fStyle->SetTitleOffset(0.38, "y");
fStyle->SetPadGridX(1);
fStyle->SetPadGridY(1);
fStyle->SetPadTickX(1);
fStyle->SetPadTickY(1);
fStyle->SetFrameBorderSize(0);
fStyle->SetFrameBorderMode(0);
fStyle->SetFrameFillStyle(0);
fStyle->SetTitleSize(0.06, "t");
fStyle->SetStatH(0.30);
fStyle->SetStatW(0.30);
fStyle->cd();
// Create a vertical frame containing buttons and canvas
fVert = new TGVerticalFrame(this, (UInt_t) (700 * gAnalyzer->GetWindow()->GetWindowScale()), (UInt_t) (700 * gAnalyzer->GetWindow()->GetWindowScale()));
// Create an embedded canvas and add to the main frame, centered in x and y
// set data member
fCanvasName = new TString ("Sample Canvas");
fCanvas = new TRootEmbeddedCanvas("Sample Canvas", fVert, (UInt_t) (600 * gAnalyzer->GetWindow()->GetWindowScale()), (UInt_t) (600 * gAnalyzer->GetWindow()->GetWindowScale()));
fCanvas->GetCanvas()->Divide(5, 11);
// Create "Update" button
ULong_t yellow;
gClient->GetColorByName("Yellow",yellow);
fBUpdate = new TGTextButton(fVert, "Update");
fBUpdate->ChangeBackground(yellow);
fBUpdate->Associate(this);
// fVert->AddFrame(fCanvas, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 4, 4, 4, 4));
fVert->AddFrame(fBUpdate, new TGLayoutHints(kLHintsCenterX, 10, 10, 4, 4));
AddFrame(fVert, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10, 10, 4, 4));
//create Exit button
ULong_t red;
gClient->GetColorByName("Red",red);
fExit = new TGTextButton(fVert, "&Exit", "gApplication->Terminate(0)");
fExit->ChangeBackground(red);
fExit->Associate(this);
fVert->AddFrame(fExit, new TGLayoutHints(kLHintsCenterX, 10, 10, 4, 4));
//create save button
ULong_t green;
gClient->GetColorByName("Green",green);
fSaveCanvas = new TGTextButton(fVert, "SaveCanvas");
fSaveCanvas->ChangeBackground(green);
fSaveCanvas->Associate(this);
fVert->AddFrame(fSaveCanvas, new TGLayoutHints(kLHintsCenterX, 10, 10, 4, 4));
fVert->AddFrame(fCanvas, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 4, 4, 4, 4));
// AddFrame(fVert, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 4, 4, 4, 4));
ConnectAll();
orgStyle->cd();
}
//______________________________________________________________________________
void MIDTRCTab::EndInit()
{
}
//______________________________________________________________________________
void MIDTRCTab::EventHandler()
{
}
//______________________________________________________________________________
void MIDTRCTab::MenuClicked(TGPopupMenu * /* menu */, Long_t /* param */)
{
}
//______________________________________________________________________________
void MIDTRCTab::TabSelected()
{
}
//______________________________________________________________________________
void MIDTRCTab::TabUnSelected()
{
}
// Save Canvas:
// you'll need a function of the same signature in your .h -> also make sure that TString is included in your .h
void MIDTRCTab::SaveCanvas()
{
// if following doesn't work blame Sabato Leo
TString * fileName = new TString (fCanvasName->Data());
//replace all spaces in your canvas name
fileName->ReplaceAll(" ", "");
//generate data and time stamp -> Recall you'll have to make sure TDatime is included
TDatime dateTime; // time and date remain frozen when this function was called
TString dateAsString = Form("%d", dateTime.GetDate());
TString timeAsString = Form("%d", dateTime.GetTime());
// append time date etc to canvas name
(*fileName) += ".";
(*fileName) += dateAsString;
(*fileName) += ".";
(*fileName) += timeAsString;
(*fileName) += ".pdf"; // pdf for now maybe think about png and other options for user later ?
// debug
//cout << " This is the filename " << fileName->Data() << endl;
// now print it and hope it works ....
fCanvas->GetCanvas()->Print(fileName->Data());
// cout << " Already attempted to print this file " << fileName->Data() << endl;
}
void MIDTRCTab::Update()
{
TStyle *orgStyle = gStyle;
fStyle->cd();
TH1 *histo;
for (Int_t i = 0; i < 55; i++) { //loop over all 55 pads
fCanvas->GetCanvas()->cd(i + 1);
histo = (TH1F *) gAnalyzer->GetFillHistogramrawTask()->Geth1_wfAt(i);
if (!histo) {
cout << "Histo ADC not available." << endl;
} else {
histo->Draw();
}
}
fCanvas->GetCanvas()->cd(0);
fCanvas->GetCanvas()->Modified();
fCanvas->GetCanvas()->Update();
orgStyle->cd();
return;
}
//_____________________________________________________________________________\
_
void MIDTRCTab::ConnectAll()
{
fBUpdate->Connect("Pressed()", "MIDTRCTab", this, "Update()");
fExit->Connect("Pressed()", "MIDTRCTab", this, "&Exit()");
fSaveCanvas->Connect("Pressed()","MIDTRCTab", this, "SaveCanvas()");
}
//_____________________________________________________________________________\
_
void MIDTRCTab::DisconnectAll()
{
if (fBUpdate) { fBUpdate->Disconnect(this); }
if (fExit) { fExit->Disconnect(this); }
if(fSaveCanvas) { fSaveCanvas->Disconnect(this);}
}
|
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 |
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 |
161
|
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 |
185
|
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 |
Draft
|
21 Mar 2016 |
Farrukh Azfar | Info | speeding up ROME | |
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 |
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 |
|
71
|
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. |
|