Back Midas Rome Roody Rootana
  Rome Analyzer Framework, Page 4 of 11  Not logged in ELOG logo
ID Date Author Topic Subjectdown
  168   29 Oct 2015 Ryu SawadaForumTGraph objects
Hello,

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

Best regards,

Ryu

> Does anyone have an example of how to add TGraph objects in ROME? We often use these in our MIDAS analyzers to create plots of quantities vs. event number (i.e. bank size, number of triggers, etc). Thanks!
  97   29 Aug 2005 Ryu SawadaBug ReportTFile creation and TTree
When the filename base IO was added, it seems that TFile creation was moved from 
ROMEEventLoop::DAQInit to ROMEEventLoop:DAQEndOfRun.

So ROME makes TTrees without outputfile.

This is dangerous when a TTree becomes huge.
It can consume large amount of memory.
  98   30 Aug 2005 Matthias SchneebeliBug ReportTFile creation and TTree
> When the filename base IO was added, it seems that TFile creation was moved from 
> ROMEEventLoop::DAQInit to ROMEEventLoop:DAQEndOfRun.
> 
> So ROME makes TTrees without outputfile.
> 
> This is dangerous when a TTree becomes huge.
> It can consume large amount of memory.

Your right. I have changed it back.
  5   13 Oct 2004 ryuSuggestionTBranch compression
It seems that branchs in TTree which is created by ROME is not compressed. 

So I changed src/framework/XXEventLoop.cpp like

.
.
.
 tree = new TTree("Trigger","Trigger");
 tree->Branch("Info","ROMETreeInfo",&fTreeInfo,32000,99);
 tree->GetBranch("Info")->SetCompressionLevel(1);
 tree->Branch("LPADCData","TClonesArray",gAnalyzer->GetLPADCDataObjectsAddress(),32000,99);
 tree->GetBranch("LPADCData")->SetCompressionLevel(1);
.
.
.

After this change, file size which was 739MB became 235MB.
  8   13 Oct 2004 Matthias SchneebeliSuggestionTBranch compression
> It seems that branchs in TTree which is created by ROME is not compressed. 
> 
> So I changed src/framework/XXEventLoop.cpp like
> 
> .
> .
> .
>  tree = new TTree("Trigger","Trigger");
>  tree->Branch("Info","ROMETreeInfo",&fTreeInfo,32000,99);
>  tree->GetBranch("Info")->SetCompressionLevel(1);
>  tree->Branch("LPADCData","TClonesArray",gAnalyzer->GetLPADCDataObjectsAddress(),32000,99);
>  tree->GetBranch("LPADCData")->SetCompressionLevel(1);
> .
> .
> .
> 
> After this change, file size which was 739MB became 235MB.

Yes your right.

I added that.
  10   14 Oct 2004 Stefan RittSuggestionTBranch compression
> Yes your right.
> 
> I added that.

The compression level should not be "hard-wired" in the builder. Some people might consider not
using compression in favour of higher speed. So maybe an option in the XML File like

<Tree>
  <TreeName>Test</TreeName>
  <TreeTitle>Test Data</TreeTitle>
  <CompressionLevel>1</CompressionLevel>
  ...
</Tree>
  11   14 Oct 2004 Matthias SchneebeliSuggestionTBranch compression
> > Yes your right.
> > 
> > I added that.
> 
> The compression level should not be "hard-wired" in the builder. Some people might consider not
> using compression in favour of higher speed. So maybe an option in the XML File like
> 
> <Tree>
>   <TreeName>Test</TreeName>
>   <TreeTitle>Test Data</TreeTitle>
>   <CompressionLevel>1</CompressionLevel>
>   ...
> </Tree>

Ok, that's done.
  4   11 Oct 2004 Matthias SchneebeliInfoSchema evolution in root and rome
For your information:

ROOT has an automatic schema evolution implemented. That means, that all trees 
can be filled into a class from a file, even if the class definition has 
changed (take a look at the input/output section in the root manual).
This works also in the rome environment. All you have to do is to increment the 
version number of a folder, every time you change the folder.

This works for adding, removeing or changing fields. However, if you remove or 
change a field you will have to change your user code, because the Get and Set 
methods will be changed or removed too. So you better think twice about the 
contents of a folder.

Matthias
  151   03 Sep 2015 Farrukh AzfarBug ReportSaving 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);}

}
  160   07 Sep 2015 Ryu SawadaBug ReportSaving canvas as pdf via a button one vs many pads
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
Attachment 1: SampleCanvas.20150907.175151.pdf
SampleCanvas.20150907.175151.pdf
  161   07 Sep 2015 Farrukh AzfarBug ReportSaving 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
  195   05 Apr 2016 SUDESHNA GANGULYBug ReportRunning ROME remotely
Hi Ryu,

After following your instructions to run ROME remotely, using run mode 3 on the
client machine, and mode 0 on the server machine, we can see ARGUS display
appearing on the client machine.
But that does not work if we have the <ARGUS> block for tabbing in the user xml
file. I see a bunch of error messages and then ROME crashes on the client machine.
There might be some conflict with using ARGUS and using run mode 3?

If I take off the <ARGUS> tab block and write my own src/tabs/tab codes, then on
my client machine, using run mode 3 works, the display appears with histograms
without a crash.

Any thought on this issue will be much appreciated.

Thanks,
Sudeshna
  196   08 Apr 2016 Ryu SawadaBug ReportRunning ROME remotely
Dear Sudeshna

I modified ROME to try to fix problems related <ARGUS> block histograms in run-mode 3.
Could you please pull ROME and use the 'develop' branch ?
(You can switch branches with "git checkout develop' command)

There is an example, examples/argus/histogram.
I tested with the example and it works.

'romeproject' in the directory works as a server.

What you need to use the example for the test is,
0) 'make' in $ROMESYS
1) Build and compile both  examples/argus/histogram and  examples/argus/histogram/romeproject
2) Start analyzer in romeproject with using romeConfig.xml
3) Start monitor with using argusConfig.xml

In the second tab, you must see an <ARGUS> block histogram updated periodically.

Ryu


> Hi Ryu,
> 
> After following your instructions to run ROME remotely, using run mode 3 on the
> client machine, and mode 0 on the server machine, we can see ARGUS display
> appearing on the client machine.
> But that does not work if we have the <ARGUS> block for tabbing in the user xml
> file. I see a bunch of error messages and then ROME crashes on the client machine.
> There might be some conflict with using ARGUS and using run mode 3?
> 
> If I take off the <ARGUS> tab block and write my own src/tabs/tab codes, then on
> my client machine, using run mode 3 works, the display appears with histograms
> without a crash.
> 
> Any thought on this issue will be much appreciated.
> 
> Thanks,
> Sudeshna
  165   23 Oct 2015 Joe GrangeForumRunning ROME in online mode
Hi folks,

I've been a happy and successful user of rome in the offline mode for some time,
and now when I try and connect it to a current run the analyzer does not find
the current file.  I attach a screenshot - you can see when I run the analyzer
instead of reporting a successful connection to a midas file it says it starts Run
#-1.  I use a file path specified in romeConfig.xml which is successful when I run
in offline mode but not in online mode, even when I specify the file path with the
run-time argument -pi.  Any ideas what may be the trouble? 

I did verify that my romeConfig.xml file specifies the online mode run configuration. 

Thanks very much,
Joe
Attachment 1: Screen_Shot_2015-10-23_at_11.56.12_AM.png
Screen_Shot_2015-10-23_at_11.56.12_AM.png
  169   29 Oct 2015 Ryu SawadaForumRunning ROME in online mode
Dear Joe

In the online mode, the analyzer does not read midas files.
Instead, it connects to a midas experiment over the network or to the local shared memory.

Same as other midas online applications, you may need to specify the hostname of the midas system and the 
experiment name.
You can set the parameters in the <Online> section of your configuration XML file.

Of course, the midas system has to be ready to accept the connection.
You can check it, for example, using 'odbedit' command.

Best regards,

Ryu

> Hi folks,
> 
> I've been a happy and successful user of rome in the offline mode for some time,
> and now when I try and connect it to a current run the analyzer does not find
> the current file.  I attach a screenshot - you can see when I run the analyzer
> instead of reporting a successful connection to a midas file it says it starts Run
> #-1.  I use a file path specified in romeConfig.xml which is successful when I run
> in offline mode but not in online mode, even when I specify the file path with the
> run-time argument -pi.  Any ideas what may be the trouble? 
> 
> I did verify that my romeConfig.xml file specifies the online mode run configuration. 
> 
> Thanks very much,
> Joe
  171   05 Nov 2015 Joe GrangeForumRunning ROME in online mode
Dear Ryu,

Thanks for your response.  Unfortunately setting these parameters in the XML file does not change the apparent
behavior and I still cannot connect to the experiment in online mode.  I also notice that other colleagues
working with independent experiments successfully run ROME in the online mode without setting the parameters
in the <online> section of the XML file.    

Can you tell me how I can verify the system is ready to accept the connection with the odbedit command?  I can
verify all basic information such as experiment name, run number, are as expected but I wonder if you mean
something more specific.

Thank you,
Joe
  172   08 Nov 2015 Ryu SawadaForumRunning ROME in online mode
Dear Joe,

Did you run ROMEBuilder for your application with -midas option ?
With this option, MIDAS library is linked to the application for communicating with MIDAS experiments.

Actual connection is done with using a function implemented in the MIDAS library.
This is the code where a ROME application connects to MIDAS.
(You can see this in $ROMESYS/src/ROMEMidasDAQ.cpp)
cm_connect_experiment is implemented in $MIDASSYS/src/midas.c
//______________________________________________________________________________
Bool_t ROMEMidasDAQ::ConnectExperiment(ROMEMidasDAQ *localThis)
{
   // Connect to the experiment
#if defined( HAVE_MIDAS )
   if (cm_connect_experiment(const_cast<char*>(gROME->GetOnlineHost()),
                             const_cast<char*>(gROME->GetOnlineExperiment()),
                             const_cast<char*>(gROME->GetOnlineAnalyzerName()), 0) != SUCCESS) {
      ROMEPrint::Error("\nCan not connect to experiment\n");
      return kFALSE;
   }

Can you check if this function is called by adding
cout<<"HERE"<<endl;
before the 'if' line and compile your application ?
If you didn't use -midas option when you run ROMEBuilder, HAVE_MIDAS will not be defined and cm_connect_experiment will not be called.

When nothing is written in <online> section of XML, I think the application tries to connect to the localhost with the experiment name defined in /etc/exptab.

I didn't mean anything specific about odbedit.
I guess if you can connect the MIDAS system with odbedit, then the system is ready to accept analyzer too.
But you could ask also MIDAS experts about this issue.

Ryu

> Dear Ryu,
>
> Thanks for your response. Unfortunately setting these parameters in the XML file does not change the apparent
> behavior and I still cannot connect to the experiment in online mode. I also notice that other colleagues
> working with independent experiments successfully run ROME in the online mode without setting the parameters
> in the <online> section of the XML file.
>
> Can you tell me how I can verify the system is ready to accept the connection with the odbedit command? I can
> verify all basic information such as experiment name, run number, are as expected but I wonder if you mean
> something more specific.
>
> Thank you,
> Joe
  173   16 Nov 2015 Joe GrangeForumRunning ROME in online mode
Dear Ryu,

Thanks very much, indeed it was user error and I did not set -midas option at the compilation stage.

Joe



Ryu Sawada wrote:
Dear Joe,

Did you run ROMEBuilder for your application with -midas option ?
With this option, MIDAS library is linked to the application for communicating with MIDAS experiments.

Actual connection is done with using a function implemented in the MIDAS library.
This is the code where a ROME application connects to MIDAS.
(You can see this in $ROMESYS/src/ROMEMidasDAQ.cpp)
cm_connect_experiment is implemented in $MIDASSYS/src/midas.c
//______________________________________________________________________________
Bool_t ROMEMidasDAQ::ConnectExperiment(ROMEMidasDAQ *localThis)
{
   // Connect to the experiment
#if defined( HAVE_MIDAS )
   if (cm_connect_experiment(const_cast<char*>(gROME->GetOnlineHost()),
                             const_cast<char*>(gROME->GetOnlineExperiment()),
                             const_cast<char*>(gROME->GetOnlineAnalyzerName()), 0) != SUCCESS) {
      ROMEPrint::Error("\nCan not connect to experiment\n");
      return kFALSE;
   }

Can you check if this function is called by adding
cout<<"HERE"<<endl;
before the 'if' line and compile your application ?
If you didn't use -midas option when you run ROMEBuilder, HAVE_MIDAS will not be defined and cm_connect_experiment will not be called.

When nothing is written in <online> section of XML, I think the application tries to connect to the localhost with the experiment name defined in /etc/exptab.

I didn't mean anything specific about odbedit.
I guess if you can connect the MIDAS system with odbedit, then the system is ready to accept analyzer too.
But you could ask also MIDAS experts about this issue.

Ryu

> Dear Ryu,
>
> Thanks for your response. Unfortunately setting these parameters in the XML file does not change the apparent
> behavior and I still cannot connect to the experiment in online mode. I also notice that other colleagues
> working with independent experiments successfully run ROME in the online mode without setting the parameters
> in the <online> section of the XML file.
>
> Can you tell me how I can verify the system is ready to accept the connection with the odbedit command? I can
> verify all basic information such as experiment name, run number, are as expected but I wonder if you mean
> something more specific.
>
> Thank you,
> Joe
  48   28 Feb 2005 Ryu SawadaInfoRun number in online mode
We usually use ROME framework without specifying run number in romeConfig.xml and command line 
in online mode.

Then it warns that "Error in <TArrayI::At>: index 0 out of bounds" when gROME-
>GetRunNumberStringAt(runNumberString,0) is called in ROMEEventLoop::Initialize.
  57   21 Mar 2005 Matthias SchneebeliInfoRun number in online mode
> We usually use ROME framework without specifying run number in romeConfig.xml and command line 
> in online mode.
> 
> Then it warns that "Error in <TArrayI::At>: index 0 out of bounds" when gROME-
> >GetRunNumberStringAt(runNumberString,0) is called in ROMEEventLoop::Initialize.

done
ELOG V3.1.4-2e1708b5