Back Midas Rome Roody Rootana
  Rome Analyzer Framework, Page 1 of 11  Not logged in ELOG logo
ID Date Authorup Topic Subject
  71   09 Apr 2005 Daniele BarbareschiBug ReportCompiling 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.
  138   09 Jun 2015 Farrukh AzfarInfoROME examples : histoGUI
Dear Colleagues,

I have succesfully written a ROME application for monitoring MIDAS events and 
understand that the appearance of a new MIDAS event record triggers the calling 
of the event method in the Fill Histogram task.

My two questions are however about the example in $ROMESYS/example/histoGUI - 

1) In this example there is no MIDAS event nor event record - what then is 
triggering the calling of the event method 

2) Is it possible to regulate the frequency that the event method is called in 
this example ?

best wishes
Farrukh Azfar
  139   09 Jun 2015 Farrukh AzfarBug ReportProblems with programming tabs when using TGraph
Dear Colleagues,
 
I have been using the ROME framework and have succesfully implemented a program 
to run on MIDAS input and plot histograms.

Not satisfied with the default settings of the Canvas, pads and text sizes etc I 
consulted Ryu who kindly showed me how to implement the event and init and update 
methods in the Tabs to bring the display closer to what I needed.

This has worked fine with histograms. However not with TGraphs:

I noticed that if I implemented the plotting of the TGraphs in the tab class then 
after setting points in the TGraph in the Fill tasks the Tab classes plot was 
empty -> is there something peculiar about TGraph ? Any tips would be great !

many thanks
Farrukh Azfar
  144   13 Jun 2015 Farrukh AzfarInfoROME examples : histoGUI
Dear Ryu,

many thanks for your reply that's very useful.

For my knowledge and for the sake of understanding the basics.

1) Its the line : gSystem->ProcessEvents(); that calls all the event methods in the Fill classes and the Tabs classes yes ?

2) This way I am controlling the filling of the tabs at an interval regulated by "sleep" then what has happened to the program itself calling ProcessEvents ? Have I overriden that call by calling ProcessEvents or will it continue to be called - perhaps I just set the <UpdateFrequency> 0</UpdateFrequency> to disable the programs own calling and only use mine ?

I hope I've been clear. Thanks very much for your continued help.

-Farrukh




Ryu Sawada wrote:
Dear Farrukh

If you want to control the frequency of update of all tabs, maybe, you could use the same method (namely using 'none' DAQ') for calling event methods of tasks and tabs also for non-event based
application.
You may add a task in which you only call 'sleep' function for controlling the frequency.
For allowing you to use GUI buttons also during the sleep, you need to call the sleep function like following.
ProcessEvents function allows you to use GUI parts also during the sleep.
   Int_t sec = GetSP()->GetSleepTime();

   if (sec > 0) {
      struct timespec req, rem;
      req.tv_sec = 0;
      req.tv_nsec = 100000000; // sleep time in loop

      struct timeval endTime, currentTime;
      gettimeofday(&currentTime, 0);
      endTime.tv_sec = currentTime.tv_sec + sec;
      endTime.tv_usec = currentTime.tv_usec;

      int ret;

      while(1) {
         memset(&rem, 0, sizeof(rem));
         ret = nanosleep(&req, &rem);

         gettimeofday(&currentTime, 0);
         if (currentTime.tv_sec > endTime.tv_sec ||
             (currentTime.tv_sec == endTime.tv_sec && currentTime.tv_usec > endTime.tv_usec)) {
            break;
         }

         gSystem->ProcessEvents();
      }
   }

gettimeofday is defined in sys/time.h header file in UNIX-like OS.
gSystem is in TSystem.h

For controlling the frequency, in this example, I added a new steering parameter for the task, which is defined like,
     <Task>
  ... other definition of tasks ...
        <SteeringParameters>
          <SteeringParameterField>
            <SPFieldName>SleepTime</SPFieldName>
            <SPFieldType>Int_t</SPFieldType>
            <SPFieldInitialization>10</SPFieldInitialization>
            <SPFieldComment>Sleep time in sec</SPFieldComment>
          </SteeringParameterField>
        </SteeringParameters>
     </Task>

Best regards,

Ryu

> Dear Farrukh
>
> The 'histoGUI' example was prepared as an example for displaying histograms.
> And the data are generated randomly in FillHisto task instead of reading from an input file.
> So the example is using 'none' DAQ as written in romeConfig.xml in the example; the DAQ class is
> implemented in include/ROMENoDAQSystem.h, and it actually does nothing.
>
> With 'none' DAQ, the program simply call Event method continuously without any control of the frequency.
>
> When you run the example, the frequency is not so fast because the CPU is used for updating the display.
> If you change <UpdateFrequency>, for example, to 10000, you will find the frequency of events through
> the task is increased because you update the display with a less frequency (thus lower CPU power is
> needed).
>
> If you are going to use ROME for non-event based application, there are two ways to call some functions
> defined in tabs.
> 1) With GUI parts, like buttons, menus, sliders and so on
> 2) With calling a function periodically.
>
> 1) is suitable if you want to actively control the GUI; a user needs to, for example, click a button for
> operate the tab.
>
> 2) is suitable if you want to update the display without any operations.
> You can see examples/argus/timer/ and examples/argus/thread as examples.
>
> Best regards,
>
> Ryu
>
> > Dear Colleagues,
> >
> > I have succesfully written a ROME application for monitoring MIDAS events and
> > understand that the appearance of a new MIDAS event record triggers the calling
> > of the event method in the Fill Histogram task.
> >
> > My two questions are however about the example in $ROMESYS/example/histoGUI -
> >
> > 1) In this example there is no MIDAS event nor event record - what then is
> > triggering the calling of the event method
> >
> > 2) Is it possible to regulate the frequency that the event method is called in
> > this example ?
> >
> > best wishes
> > Farrukh Azfar
  Draft   13 Jun 2015 Farrukh AzfarBug ReportProblems with programming tabs when using TGraph
Hi Ryu,

thanks for your reply. yes I am(was) using it.


Ryu Sawada wrote:
Dear Farrukh

I presume you implemented your tab which draws the graph.
Which option do you use for Draw function of the graph ?
I am afraid you might forget to add 'A' in the option.
For example, you need to use 'A' like,
  graph->Draw("APL");

Best regards,

Ryu

> Dear Colleagues,
>
> I have been using the ROME framework and have succesfully implemented a program
> to run on MIDAS input and plot histograms.
>
> Not satisfied with the default settings of the Canvas, pads and text sizes etc I
> consulted Ryu who kindly showed me how to implement the event and init and update
> methods in the Tabs to bring the display closer to what I needed.
>
> This has worked fine with histograms. However not with TGraphs:
>
> I noticed that if I implemented the plotting of the TGraphs in the tab class then
> after setting points in the TGraph in the Fill tasks the Tab classes plot was
> empty -> is there something peculiar about TGraph ? Any tips would be great !
>
> many thanks
> Farrukh Azfar
  148   02 Sep 2015 Farrukh AzfarForumARGUS 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 AzfarForumARGUS 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 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);}

}
  152   03 Sep 2015 Farrukh AzfarForumARGUS 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 AzfarForumARGUS 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 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
  185   10 Mar 2016 Farrukh AzfarForumOption 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 AzfarInfospeeding up ROME
  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
  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
  Draft   28 Feb 2018 Francesco RengaForumDB path
Dear all,
           I need to perform a DB query in ROME, where I have to select an array of 
  116   22 Feb 2006 Giovanni SignorelliSuggestionText database suggestion
This is maybe a bug report that happens reading long lines in a text database.
I am currently handling large data base files for linear fit analysis, basically I have to handle a 828 x 828 
matrix. Writing in the text db 828 lines containing each 828 comma separated values with a single 
new-line at the end does not work, maybe the read buffer is too large. 
So I propose the following modification to ROMETextDataBase.cpp:
Suppose you have a field named "coefficients" which is declared "array", say of four numbers,  in the 
xml file. In the text data base it appears as:

<coefficients>
one,two,three,four
one,two,three,four
one,two,three,four
...
</coefficients>

One should be able to write the same code as follows:

<coefficients>
one,
two,
three,
four                  <----- note there is NO COMMA here!
one,
two,
three,
four
one,two,three,four
...
</coefficients>

or

<coefficients>
one,two,
three,four
one,two,three,
four
one,
two,three,four
...
</coefficients>

In this way I can write a single column of (comma separated) values. Can somebody (Ryu?) take care of 
this (I hope simple) modification?
Thanks.

 
  119   08 Mar 2006 Giovanni SignorelliBug ReportgAnalyzer->GetEventID() fails if EventID>127-48
This bug happened when reading a .MID file containing events with event_id=99.
The ReadMidas task is not able to read the event because it is not recognized.
This event_id, when recovered with GetEventID() method was transformed to a negative value. This probably happened because there is a +48 addition at some place (in SetEventID) and a -48 on GetEventID. This casuses the unsigned char to be recovered as a signed number (lots of FFFF in front of it).

Furthermore it is not writtenanywhere that EventID<0xFF.

I could solve the problem
1) by setting EventID = 16, for instance
2) by modifying ROMEAnalyzer.h as follows
// Event ID
Int_t GetEventID() { return (fEventID-48)&0xFF; }
char GetEventIDChar() { return (fEventID)&0xFF; }
  1   05 Oct 2004 Jan WoutersSuggestionxml and ROME
After looking at the example xml document for the MEG detector I would like to make the following suggestion.  
Only a small portion of the power of XML is used with the MEG example i.e., the ability to express the data as a  
hierarchical tree.  Missing is the powerful feature of XML to establish a schema for the XML document specific 
to ROME that enforces a valid structure.

XML uses the XML Schema language, which is in turn based on XML, to define a schema for a document.  I 
propose that a ROME schema be developed that defines an XML document that the ROME builder can read 
and process.  By having such a schema, general purpose XML editors can validate the XML document prior to 
invoking the ROME builder.  Thus the schema greatly simplifies a user's task of developing a ROME xml 
document describing their experiment.  In addition, a good XML editor uses the schema to indicate to the user 
the elements available at any particular point in the document so that the user doesn't have to remember all the 
entries, which are required or optional to describe an experiment.

With this e-mail I include two documents.  The first is an example schema for ROME.  This schema is 
incomplete, but  illustrates the major concepts of using a schema to specify the acceptable  format of the XML 
document and providing help to the user for building the document.  The second is an example XML document 
built using the ROME sample schema.  It is for an experiment currently in production at the Los Alamos 
National Laboratory.

To get this example to work you will have to change the second line of DANCESchema.xml so that it properly 
points to the ROME.xsd document.  For this example I used the Java based XML editor Oxygen.

Notes on Schema:
1) Every element in the schema has a fixed name.  All experimental data is included as either xml data or an 
xml attribute.
2) Based on the suggestion by http://www.xmlfiles.com/xml/xml_attributes.asp attributes are used sparingly or 
not at all.  Instead data is specified as XML data e.g. <data>the actual data</data>.

If you have any questions concerning this example please e-mail jwouters@lanl.gov.
Attachment 1: DANCESchema.xml
<?xml version="1.0" encoding="UTF-8"?>
<Experiment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:/Users/jwouters/Dev/DANCE/ROME/DANCE.xsd">
    <ExperimentName>DANCE</ExperimentName>
    <Author>
        <AuthorName>Jan M. Wouters</AuthorName>
        <AuthorInstitute>LANL</AuthorInstitute>
        <AuthorCollaboration>DANCE</AuthorCollaboration>
        <AuthorEmail>jwouters@lanl.gov</AuthorEmail>
    </Author>
    <Folder>
        <SubFolder>
            <SubFolderName>OEDDanceEvent</SubFolderName>
            <SubFolderTitle>Dance Event</SubFolderTitle>
            <ArraySize>2</ArraySize>
            <Field>
                <FieldName>OEDgGammaEnergy</FieldName>
                <FieldType>Float_t</FieldType>
                <FieldComment>Total Gamma Energy</FieldComment>
            </Field>
            <Field>
                <FieldName>OEDgNeutronEnergy</FieldName>
                <FieldType>Float_t</FieldType>
            </Field>
        </SubFolder>
        <SubFolder>
            <SubFolderName>OCDOneDanceCrystal</SubFolderName>
            <SubFolderTitle>Crystal</SubFolderTitle>
            <ArraySize>1</ArraySize>
            <Field>
                <FieldName>OCDgHiGainRaw</FieldName>
                <FieldType>ULong_t</FieldType>
                <FieldComment>Hi gain raw value"</FieldComment>
            </Field>
            <Field>
                <FieldName>OCDgLoGainRaw</FieldName>
                <FieldType>ULong_t</FieldType>
                <FieldComment>Lo gain raw value</FieldComment>
            </Field>
            <Field>
                <FieldName>OCDgHiGainCalib</FieldName>
                <FieldType>Float_t</FieldType>
                <FieldComment>Hi gain calib value</FieldComment>
            </Field>
        </SubFolder>
    </Folder>
        <Task>
        <SubTask>
            <TaskName>ReadData</TaskName>
            <TaskEventId>1</TaskEventId>
            <Author>
              <AuthorName>Jan M. Wouters</AuthorName>
            </Author>
            <TaskVersion>1</TaskVersion>
            <TaskDesc>reads data</TaskDesc>
        </SubTask>
        <SubTask>
            <TaskName>CalibData</TaskName>
            <TaskEventId>1</TaskEventId>
            <Author>
                <AuthorName>Jan M. Wouters</AuthorName>
            </Author>
            <TaskVersion>1</TaskVersion>
            <Histograms>
                <Histogram>
                <HistFolder>RawData</HistFolder>
                <HistTitle>Raw Histograms</HistTitle>
                <HistType>TH1S</HistType>
                    <HistArraySize>160</HistArraySize>
                <HistSize>1024</HistSize>
                <xMax>1024</xMax>
                </Histogram>
                <Histogram>
                    <HistFolder>CalibData</HistFolder>
                    <HistTitle>Calib Histograms</HistTitle>
                    <HistType>TH1F</HistType>
                    <HistArraySize>160</HistArraySize>
                    <HistSize>2048</HistSize>
                    <xMax>2047</xMax>
                </Histogram>                
            </Histograms>
            <TaskDesc>Calibrates the raw data</TaskDesc>
         </SubTask>
    </Task>

    <MidasBanks>
        <EventHeader>
            <Folder>Trigger</Folder>
            <EventId>ID</EventId>
            <TriggerMask>Mask</TriggerMask>
            <SerialNumber>EventNumber</SerialNumber>
            <TimeStamp>Time</TimeStamp>
        </EventHeader>
        <EventStructure>
            <EventName>TM01</EventName>
            <EventData>
                <DataName>Time</DataName>
                <DataType>DWORD</DataType>
            </EventData>
        </EventStructure>
        <EventStructure>
            <EventName>EV01</EventName>
            <EventData>
                <DataName>OCRgAreaHG</DataName>
                <DataType>DWORD</DataType>
            </EventData>
            <EventData>
                <DataName>OCRgAreaLG</DataName>
                <DataType>DWORD</DataType>
            </EventData>
            <EventData>
                <DataName>OCRgTimeHi</DataName>
                <DataType>DWORD</DataType>
            </EventData>
            <EventData>
                <DataName>OCRgDetId</DataName>
                <DataType>DWORD</DataType>
            </EventData>
        </EventStructure>
    </MidasBanks>
</Experiment>
Attachment 2: ROME.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:annotation>
        <xs:documentation>Described some enumerated types</xs:documentation>
    </xs:annotation>
    <xs:simpleType name="RootType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Float_t"/>
            <xs:enumeration value="ULong_t"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="HistTypeDesc">
        <xs:restriction base="xs:string">
            <xs:enumeration value="TH1C"/>
            <xs:enumeration value="TH1S"/>
            <xs:enumeration value="TH1F"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="MidasType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="DWORD"/>
            <xs:enumeration value="float"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:annotation>
        <xs:documentation>Describe general types</xs:documentation>
    </xs:annotation>
    <xs:complexType name="AuthorDesc">
        <xs:sequence>
            <xs:element name="AuthorName" type="xs:string"/>
            <xs:element name="AuthorInstitute" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="AuthorCollaboration" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="AuthorEmail" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:annotation>
        <xs:documentation>Describe types used by subfolders</xs:documentation>
    </xs:annotation>
    <xs:complexType name="FieldDesc">
        <xs:sequence>
            <xs:element name="FieldName" type="xs:string"/>
            <xs:element name="FieldType" type="RootType"/>
            <xs:element name="FieldComment" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="SubFolderDesc">
        <xs:sequence>
            <xs:element name="SubFolderName" type="xs:string"/>
            <xs:element name="SubFolderTitle" type="xs:string"/>
            <xs:element name="ArraySize" type="xs:integer"/>
            <xs:element name="Field" type="FieldDesc" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:annotation>
        <xs:documentation>Describe tasks</xs:documentation>
    </xs:annotation>
    <xs:complexType name="HistDesc">
        <xs:sequence>
            <xs:element name="HistFolder" type="xs:string"/>
            <xs:element name="HistTitle" type="xs:string"/>
            <xs:element name="HistType" type="HistTypeDesc"/>
            <xs:element name="HistArraySize" type="xs:integer" minOccurs="0" default="1"/>
            <xs:element name="HistSize" type="xs:integer"/>
            <xs:element name="xMin" type="xs:integer" minOccurs="0" default="0"/>
            <xs:element name="xMax" type="xs:integer"/>
        </xs:sequence>
    </xs:complexType>
    
    <xs:complexType name="HistogramsDesc">
        <xs:sequence>
            <xs:element name="Histogram" type="HistDesc" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    
    <xs:complexType name="SubTaskDesc">
        <xs:sequence>
            <xs:element name="TaskName" type="xs:string"/>
            <xs:element name="TaskEventId" type="xs:integer"/>
            <xs:element name="Author" type="AuthorDesc"/>
            <xs:element name="TaskVersion" type="xs:integer"/>
            <xs:element name="Histograms" type="HistogramsDesc" minOccurs="0" maxOccurs="1"/>
            <xs:element name="TaskDesc" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>
    <xs:annotation>
        <xs:documentation>Describe elements used by MidasBanks</xs:documentation>
    </xs:annotation>
    <xs:complexType name="EventHeaderDesc">
        <xs:sequence>
            <xs:element name="Folder" type="xs:string"/>
            <xs:element name="EventId" type="xs:string"/>
            <xs:element name="TriggerMask" type="xs:string"/>
            <xs:element name="SerialNumber" type="xs:string"/>
            <xs:element name="TimeStamp" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="EventDataDesc">
        <xs:sequence>
            <xs:element name="DataName" type="xs:string"/>
            <xs:element name="DataType" type="MidasType"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="EventStructDesc">
        <xs:sequence>
            <xs:element name="EventName" type="xs:string"/>
            <xs:element name="EventData" type="EventDataDesc" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:annotation>
        <xs:documentation>Describe overall document</xs:documentation>
    </xs:annotation>
    <xs:element name="Experiment">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="ExperimentName" type="xs:string"/>
                <xs:element name="Author" type="AuthorDesc"/>
                <xs:element name="Folder">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="SubFolder" type="SubFolderDesc" maxOccurs="unbounded"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="Task">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="SubTask" type="SubTaskDesc" maxOccurs="unbounded"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="MidasBanks">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="EventHeader" type="EventHeaderDesc"/>
                            <xs:element name="EventStructure" type="EventStructDesc" maxOccurs="unbounded"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
  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
ELOG V3.1.4-2e1708b5