Back Midas Rome Roody Rootana
  Rome Analyzer Framework, Page 9 of 11  Not logged in ELOG logo
IDup Date Author Topic Subject
  162   21 Oct 2015 SUDESHNA GANGULYInfoAdding Trees and Branches in ROME
Hi,

I need to add a tree, the tree will have n branches. Each branch will refer to
one event. Now Each branch will have 5 leaves. Each leaf will have data from one
WFD channel. There are data from total 5 WFD channels per event in our midas bank.

I have seen some examples of trees and branches in ROME, but I don't know how I
can loop over one channel to another channel and save those data into each leaf.

Any help will be appreciated greatly.

Sudeshna Ganguly
  163   22 Oct 2015 Ryu SawadaInfoAdding Trees and Branches in ROME
Dear Sudeshna Ganguly

It might be my misunderstanding, but do you mean that you want to add a new branch every time when you take one
event ? (namely, the number of branches n equals to the number of events ?)

In ROME, ( and I guess in most of user applications), each entry in the tree (instead of each branch) refers to one
event. Namely, the number of branches n is independent of the number of events; and the number of entries
increases as you take more events.

In the ROME applications, there is a one to one relation between,
- ROME Folder and Branch in Tree
- ROME Field in Folder and Leave in Tree
ROME folder and field are supposed to be defined in an XML file and the implementation (i.e. conversion to C++ code)
is done by ROMEBuilder.

Folders and fileds can be arrays.

I think, in your case, ROME folder could be like one of the followings depending on your data structure and preference,
Since I guess WFD stands for Wave Form Digitizer and guess has many numbers (instead of one), I expect you may use the 2nd or 3rd example,

1) A single variable 'WFD' is in five 'Data' folder instances
            <FolderName>Data</FolderName>
            <ArraySize>5</ArraySize>
            <Field>
                <FieldName>WFD</FieldName>
                <FieldType>Double_t</FieldType>
                <FieldComment>WFD Values</FieldComment>
            </Field>

2) A variable-length array 'WFD' is in five 'Data' folder instances
            <FolderName>Data</FolderName>
            <ArraySize>5</ArraySize>
            <Field>
                <FieldName>WFD</FieldName>
                <FieldType>Double_t</FieldType>
                <ArraySize>vector</ArraySize>
                <FieldComment>WFD Values</FieldComment>
            </Field>

3) A fixed-length array 'WFD' is in five 'Data' folder instances
            <FolderName>Data</FolderName>
            <ArraySize>5</ArraySize>
            <Field>
                <FieldName>WFD</FieldName>
                <FieldType>Double_t</FieldType>
                <ArraySize>1024</ArraySize>
                <FieldComment>WFD Values</FieldComment>
            </Field>

4) An array 'WFD' is in one 'Data' folder instance, and the array size of 'WFD' is five.
            <FolderName>Data</FolderName>
            <Field>
                <FieldName>WFD</FieldName>
                <FieldType>Double_t</FieldType>
                <ArraySize>5</ArraySize>
                <FieldComment>WFD Values</FieldComment>
            </Field>


Once you add a relation between the 'Data' folder and a branch in a tree (as shown <Tree> section of $ROMESYS/examples/midas/midas.xml),
The generated application,
- reads the tree and copies data in to the folder before every event (if the <DAQSystem> in config XML is rome)
- fills the tree with copying data from the folder

So you don't need to write code to read/write tees.
Instead you need to access the folders.

The access method depends on the folder structure. For the example above,

1)
   Int_t nCh = 5;
   for (Int_t iCh = 0; iCh < nCh; iCh++) {
      gAnalyzer->GetDataAt(iCh)->SetWFD(some_number);
   }

2)
   Int_t nCh = 5;
   for (Int_t iCh = 0; iCh < nCh; iCh++) {
      gAnalyzer->GetDataAt(iCh)->SetWFDSize(1024);
      Int_t wfdSize = gAnalyzer->GetDataAt(iCh)->GetWFDSize();
      for (Int_t i = 0; i < wfdSize; i++) {
         gAnalyzer->GetDataAt(iCh)->SetWFDAt(i, some_number);
      }
   }

3)
   Int_t nCh = 5;
   for (Int_t iCh = 0; iCh < nCh; iCh++) {
      for (Int_t i = 0; i < 1024; i++) {
         gAnalyzer->GetDataAt(iCh)->SetWFDAt(i, some_number);
      }
   }

4)
   Int_t nCh = 5;
   for (Int_t iCh = 0; iCh < nCh; iCh++) {
      gAnalyzer->GetData()->SetWFDAt(iCh, some_number);
   }

You can read the variables by using GetWFD (or GetWFDAt if WFD is an array) function.


You can find more example of the folder structure in $ROMESYS/examples/argus/folders/folderEntries.xml.

Ryu

> Hi,
>
> I need to add a tree, the tree will have n branches. Each branch will refer to
> one event. Now Each branch will have 5 leaves. Each leaf will have data from one
> WFD channel. There are data from total 5 WFD channels per event in our midas bank.
>
> I have seen some examples of trees and branches in ROME, but I don't know how I
> can loop over one channel to another channel and save those data into each leaf.
>
> Any help will be appreciated greatly.
>
> Sudeshna Ganguly
  164   23 Oct 2015 Wes GohnForumTGraph objects
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!
  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
  166   24 Oct 2015 Robert PattieForumROME / Argus crashing between runs with MIDAS
I'm running ROME+Argus as an online analyzer and display for a MIDAS DAQ system.
 In our set up there is generally a few seconds between MIDAS runs.  ROME
handles the first run just fine, but always crashes when runs are taken in quick
succession like this.  When running in a slower mode, letting ROME finish
whatever run of end task exist, the online analyzer does not have this problem.
 I've suppressed writing all output files while in the online mode and I don't
have any end of run operations in any of the tasks.  What is happening at the
end of running that is causing ROME to crash?

Thanks for any help.
  167   26 Oct 2015 Konstantin OlchanskiForumROME / Argus crashing between runs with MIDAS
> I'm running ROME+Argus as an online analyzer and display for a MIDAS DAQ system.
>  In our set up there is generally a few seconds between MIDAS runs.  ROME
> handles the first run just fine, but always crashes when runs are taken in quick
> succession like this.  When running in a slower mode, letting ROME finish
> whatever run of end task exist, the online analyzer does not have this problem.
>  I've suppressed writing all output files while in the online mode and I don't
> have any end of run operations in any of the tasks.  What is happening at the
> end of running that is causing ROME to crash?
> 
> Thanks for any help.

You have to provide a stack trace from your crash. RTFM the gdb command "where".

K.O.
  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!
  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
  170   29 Oct 2015 Ryu SawadaForumROME / Argus crashing between runs with MIDAS
Hello,

You can try to set <MidasOnlineCommunicationThread>to be true in your config XML file.
By doing it, the communication with the midas system will be done in a dedicated thread so it runs independently 
of analysis tasks.

Ryu

> I'm running ROME+Argus as an online analyzer and display for a MIDAS DAQ system.
>  In our set up there is generally a few seconds between MIDAS runs.  ROME
> handles the first run just fine, but always crashes when runs are taken in quick
> succession like this.  When running in a slower mode, letting ROME finish
> whatever run of end task exist, the online analyzer does not have this problem.
>  I've suppressed writing all output files while in the online mode and I don't
> have any end of run operations in any of the tasks.  What is happening at the
> end of running that is causing ROME to crash?
> 
> Thanks for any help.
  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
  174   03 Dec 2015 SUDESHNA GANGULYSuggestionDrawing multiple histograms on the same pad and dispalying them in the online mode in ROME
I need some suggestions regarding drawing multiple histograms on the same pad in
ROME.
Here is what I have been doing.  I am making a summary histogram online dispaly
with ARGUS. The displays is gonna show multiple different types of histograms. 

So I made a module with four different types of histograms all on the same canvas,
so that I can look at them in real time in an online run.

Now in one of the histograms, I am looping over multiple banks, so in one of the
pads, I want to see two different lines of different colors (to indicate two
different histograms of the same type from two banks). 
So I used histoGUI.xml (from examples/histoGUI) and used this way of histogram
and tab declarations:
  <Tasks>
                <Task>
                        <TaskName>FillHisto</TaskName>
        <Histogram>
                                <HistName>h1_Esum</HistName>


                                <HistArraySize>2</HistArraySize>
                                <HistFolderName>myhistos</HistFolderName>
                                <HistType>TH1F</HistType>

                                <HistXLabel>ESum</HistXLabel>
                                <HistYLabel>Entries</HistYLabel>
                                <HistXNbins>300</HistXNbins>
                                <HistXmin>0</HistXmin>
                                <HistXmax>3.1</HistXmax>
</Histogram>               




<Histogram>
                                <HistName>h1_amplitude</HistName>
                                <HistFolderName>myotherhistos</HistFolderName>
                                 <HistArraySize>108</HistArraySize>


                                <HistType>TH1F</HistType>
                                <HistXLabel>Amplitude</HistXLabel>
                                <HistYLabel>Entries</HistYLabel>
                                <HistXNbins>4096</HistXNbins>
                                <HistXmin>-0.5</HistXmin>
                                <HistXmax>4095.5</HistXmax>
                                <Argus>
                                        <Tab>
                                                <TabName>GeneratedHisto</TabName>
                                              
<ObjectArrayIndex>0</ObjectArrayIndex>

                                                <Index>1</Index>
                                        </Tab>
                                </Argus>
                        </Histogram>

etc. and two other histograms have been defined in the same way.

And then in the src/task: HGUITFillHisto.cpp
I added this: (to draw two histograms on the same pad)

          if(icalo==1)
            {
          Geth1_EsumAt(0)->Fill(0.00009118*sum);

          Geth1_EsumAt(0)->SetLineColor(3);

             }

          Geth1_EsumAt(0)->Draw();

          if(icalo==2)
            {
          Geth1_EsumAt(1)->Fill(0.00009118*sum);

            }

          Geth1_EsumAt(1)->Draw("same");

And attached is the screen shot from ARGUS.

Now the problem is: when I add the Draw() and Draw("same") codes in the src/task
code, it always creates two copies of the same pad. The 0th pad and the very last
pad. So what ever is on the last pad in the attachment is being replaced by the
same copy of the 0th pad. I kept chaning the Index number in histoGUI.xml, but what
ever I do, if I try to draw two histograms on the same pad and add those codes in
the srdc/task .cpp file, it always creates two copies.

I don't know where to look at to fix the problem.

Is there any other way I can add multiple histograms on a pad, while keeping the
other pads on the canvas intact?

Any help on this issue will be much appreciated.
Attachment 1: Screenshot-11.png
Screenshot-11.png
  175   07 Dec 2015 Ryu SawadaSuggestionDrawing multiple histograms on the same pad and dispalying them in the online mode in ROME
Hello,

First of all, the histograms are supposed to be drawn by the automatically generated code.

You don't need (and should not) draw them from a task.
If you do so, the histograms are drawn on the active pad (gPad) which is, in your case, the last pad on a tab.


I added a new feature to ROME development branch.
For using the feature, you can try
 cd $ROMESYS
 git checkout develop
 git pull
 make
 cd your_project
 make build
 make

As you can see in the updated examples/histoGUI/histoGUI.xml, a new option <DrawSamePad>true</DrawSamePad> is 
available.
When it is true, the array of histograms are drawn on the same pad.

If you have any problems, please let me know.

Best regards,

Ryu


> I need some suggestions regarding drawing multiple histograms on the same pad in
> ROME.
> Here is what I have been doing.  I am making a summary histogram online dispaly
> with ARGUS. The displays is gonna show multiple different types of histograms. 
> 
> So I made a module with four different types of histograms all on the same canvas,
> so that I can look at them in real time in an online run.
> 
> Now in one of the histograms, I am looping over multiple banks, so in one of the
> pads, I want to see two different lines of different colors (to indicate two
> different histograms of the same type from two banks). 
> So I used histoGUI.xml (from examples/histoGUI) and used this way of histogram
> and tab declarations:
>   <Tasks>
>                 <Task>
>                         <TaskName>FillHisto</TaskName>
>         <Histogram>
>                                 <HistName>h1_Esum</HistName>
> 
> 
>                                 <HistArraySize>2</HistArraySize>
>                                 <HistFolderName>myhistos</HistFolderName>
>                                 <HistType>TH1F</HistType>
> 
>                                 <HistXLabel>ESum</HistXLabel>
>                                 <HistYLabel>Entries</HistYLabel>
>                                 <HistXNbins>300</HistXNbins>
>                                 <HistXmin>0</HistXmin>
>                                 <HistXmax>3.1</HistXmax>
> </Histogram>               
> 
> 
> 
> 
> <Histogram>
>                                 <HistName>h1_amplitude</HistName>
>                                 <HistFolderName>myotherhistos</HistFolderName>
>                                  <HistArraySize>108</HistArraySize>
> 
> 
>                                 <HistType>TH1F</HistType>
>                                 <HistXLabel>Amplitude</HistXLabel>
>                                 <HistYLabel>Entries</HistYLabel>
>                                 <HistXNbins>4096</HistXNbins>
>                                 <HistXmin>-0.5</HistXmin>
>                                 <HistXmax>4095.5</HistXmax>
>                                 <Argus>
>                                         <Tab>
>                                                 <TabName>GeneratedHisto</TabName>
>                                               
> <ObjectArrayIndex>0</ObjectArrayIndex>
> 
>                                                 <Index>1</Index>
>                                         </Tab>
>                                 </Argus>
>                         </Histogram>
> 
> etc. and two other histograms have been defined in the same way.
> 
> And then in the src/task: HGUITFillHisto.cpp
> I added this: (to draw two histograms on the same pad)
> 
>           if(icalo==1)
>             {
>           Geth1_EsumAt(0)->Fill(0.00009118*sum);
> 
>           Geth1_EsumAt(0)->SetLineColor(3);
> 
>              }
> 
>           Geth1_EsumAt(0)->Draw();
> 
>           if(icalo==2)
>             {
>           Geth1_EsumAt(1)->Fill(0.00009118*sum);
> 
>             }
> 
>           Geth1_EsumAt(1)->Draw("same");
> 
> And attached is the screen shot from ARGUS.
> 
> Now the problem is: when I add the Draw() and Draw("same") codes in the src/task
> code, it always creates two copies of the same pad. The 0th pad and the very last
> pad. So what ever is on the last pad in the attachment is being replaced by the
> same copy of the 0th pad. I kept chaning the Index number in histoGUI.xml, but what
> ever I do, if I try to draw two histograms on the same pad and add those codes in
> the srdc/task .cpp file, it always creates two copies.
> 
> I don't know where to look at to fix the problem.
> 
> Is there any other way I can add multiple histograms on a pad, while keeping the
> other pads on the canvas intact?
> 
> Any help on this issue will be much appreciated.
  176   10 Dec 2015 SUDESHNA GANGULYSuggestionwriting data to mySQL via ROME
I need some suggestions on how to write some data to a mySQL database via ROME.

I am calculating a quantity CTag and making a TGraph of CTag/event in ROME. Now
if I want to write it to a mySQL what shall I do?

From the manual I found that we can read from a database DAQ (SQL) system. That
it reads the main input data from a database. And I looked into the example 
under'rome/examples/stepbystepdbdaq'. 

But is there any way I can write the calculated CTags and Event Numbers to a SQL
database?

Thanks for any suggestion!
  177   11 Dec 2015 Ryu SawadaSuggestionwriting data to mySQL via ROME
Dear Sudeshna

Yes, you can write,

There is an example project for showing the access to databases.
$ROMESYS/examples/dbexample/

For writing, an example is
$ROMESYS/examples/dbexample/src/tasks/RDBTWriteFolders.cpp

If you prefer to use normal SQL queries rather than using the ROME DB path. An example is,
$ROMESYS/examples/dbexample/src/tasks/RDBTMakeQuery.cpp
By using SQL query, you can do anything about DB.

More information is in wiki,
https://bitbucket.org/muegamma/rome3/wiki/Database

Best regards,

Ryu

> I need some suggestions on how to write some data to a mySQL database via ROME.
> 
> I am calculating a quantity CTag and making a TGraph of CTag/event in ROME. Now
> if I want to write it to a mySQL what shall I do?
> 
> From the manual I found that we can read from a database DAQ (SQL) system. That
> it reads the main input data from a database. And I looked into the example 
> under'rome/examples/stepbystepdbdaq'. 
> 
> But is there any way I can write the calculated CTags and Event Numbers to a SQL
> database?
> 
> Thanks for any suggestion!
  178   22 Jan 2016 SUDESHNA GANGULYSuggestionAdding texts on a histigram while using <Argus> block for tabbing
Hi,

I am defining a histogram in the xml file like this:

<Histogram>
  <HistName>h2_dt_tcpgotheader</HistName>
  <HistFolderName>BC</HistFolderName>
  <HistType>TH2D</HistType>
<HistXLabel>time(us)</HistXLabel>
  <HistYLabel>Entries</HistYLabel>
  <HistXNbins>300000</HistXNbins>
  <HistXmin>-20000</HistXmin>
  <HistXmax>100000</HistXmax>
  <HistYNbins>10</HistYNbins>
  <HistYmin>0.0</HistYmin>
  <HistYmax>10</HistYmax>-->
  <Argus>
    <Tab>
      <TabName>SummaryBCBank</TabName>
      <Index>0</Index>
    </Tab>
  </Argus>
<Histogram>
  <HistName>h2_dt_tcpgotheader</HistName>
  <HistFolderName>BC</HistFolderName>
  <HistType>TH2D</HistType>
<HistXLabel>time(us)</HistXLabel>
  <HistYLabel>Entries</HistYLabel>
  <HistXNbins>300000</HistXNbins>
  <HistXmin>-20000</HistXmin>
  <HistXmax>100000</HistXmax>
  <HistYNbins>10</HistYNbins>
  <HistYmin>0.0</HistYmin>
  <HistYmax>10</HistYmax>-->
  <Argus>
    <Tab>
      <TabName>SummaryBCBank</TabName>
      <Index>0</Index>
    </Tab>
  </Argus>
</Histogram>

Now I want to add few texts and arrows on the same pad where the histogram is
being written.

I want to add this piece of code:

  TLatex title;
  title.SetTextFont(12);
  title.SetTextSize(0.03);
  title.SetNDC();


      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");

The problem is that if I add this piece of code in the src/tasks, where I fill
in the histogram, then the problem is that this histogram replaces whatever is
on the last tab on the canvas.

As I recall that I am not supposed to add extra tabbing codes in the src codes
when I am using the <Argus> block for tabbing.

So where can I add these texts while still using <Argus> block for tabbing?

Any help might be very much appreciated.
  179   28 Jan 2016 Ryu SawadaSuggestionAdding texts on a histigram while using <Argus> block for tabbing
Dear Sudeshna

Unfortunately, with the current ROME, it is not possible to insert own code when you use <Argus> blocks for 
which the source code is supposed to be generated automatically (and not editable).

If you want to do more than the automatically generated code, you can use the normal type tabs although you 
need to program it by yourself (as you program tasks).

An example is $ROMESYS/examples/midas.
In midas.xml, you can find <Tabs> section where several normal tabs are defined.
Corresponding source files will be generated in src/tabs when you run romebuilder after modifying the 
definition 
XML.

As for source files of tasks, you can edit the source files of tabs as you want.
ROMEbuilder will not overwrite the files.
You can draw any ROOT GUI objects in the tabs including text.

You can get the pointer of histograms associated to a task.
For example, in the midas example, src/tabs/MIDTADCTab.cpp, a pointer of a histogram 'ADC' of 
'FillHistogram' 
task is obtained by
  gAnalyzer->GetFillHistogramTask()->GetADCAt(i)

Please let me know if you have any problems to write code for your tabs.

Best regards,

Ryu



> Hi,
> 
> I am defining a histogram in the xml file like this:
> 
> <Histogram>
>   <HistName>h2_dt_tcpgotheader</HistName>
>   <HistFolderName>BC</HistFolderName>
>   <HistType>TH2D</HistType>
> <HistXLabel>time(us)</HistXLabel>
>   <HistYLabel>Entries</HistYLabel>
>   <HistXNbins>300000</HistXNbins>
>   <HistXmin>-20000</HistXmin>
>   <HistXmax>100000</HistXmax>
>   <HistYNbins>10</HistYNbins>
>   <HistYmin>0.0</HistYmin>
>   <HistYmax>10</HistYmax>-->
>   <Argus>
>     <Tab>
>       <TabName>SummaryBCBank</TabName>
>       <Index>0</Index>
>     </Tab>
>   </Argus>
> <Histogram>
>   <HistName>h2_dt_tcpgotheader</HistName>
>   <HistFolderName>BC</HistFolderName>
>   <HistType>TH2D</HistType>
> <HistXLabel>time(us)</HistXLabel>
>   <HistYLabel>Entries</HistYLabel>
>   <HistXNbins>300000</HistXNbins>
>   <HistXmin>-20000</HistXmin>
>   <HistXmax>100000</HistXmax>
>   <HistYNbins>10</HistYNbins>
>   <HistYmin>0.0</HistYmin>
>   <HistYmax>10</HistYmax>-->
>   <Argus>
>     <Tab>
>       <TabName>SummaryBCBank</TabName>
>       <Index>0</Index>
>     </Tab>
>   </Argus>
> </Histogram>
> 
> Now I want to add few texts and arrows on the same pad where the histogram is
> being written.
> 
> I want to add this piece of code:
> 
>   TLatex title;
>   title.SetTextFont(12);
>   title.SetTextSize(0.03);
>   title.SetNDC();
> 
> 
>       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");
> 
> The problem is that if I add this piece of code in the src/tasks, where I fill
> in the histogram, then the problem is that this histogram replaces whatever is
> on the last tab on the canvas.
> 
> As I recall that I am not supposed to add extra tabbing codes in the src codes
> when I am using the <Argus> block for tabbing.
> 
> So where can I add these texts while still using <Argus> block for tabbing?
> 
> Any help might be very much appreciated.
  180   18 Feb 2016 Joe GrangeForumOnline mode issue
Hello all,

I'm having an issue with getting rome to run in online mode in some cases only.
 That is, when I run the analyzer that accesses the INPT bank (standard for PSI
slow control buses) the online mode works just fine.  But when I access other
banks, when I run in online mode only blank canvases are updated and no data
appears.

I can run all of these analyzers in offline mode and they all work as expected
so this eliminates many common user bugs.  Any ideas how I might debug further?
 I also tried printing the data in the various tasks and indeed in online mode
no data is being accessed.

Thanks,
Joe
  181   01 Mar 2016 SUDESHNA GANGULYInfoAdding different tabs under a single parent tab
Hi Everyone,

Is there any way I can put different tabs under a single click-able menu in ROME?
Suppose I have tabs A, B, C, D. Each one of these tabs contains histograms. Can
I now, put A, B, C, D under another click-able menu called "calorimeters" ?

So that when I click on "calorimeters", I will see A, B, C, D. And then when I
click on A/B/C/D I will see the histograms.

Can that be done?
Is there any example available?

Thanks for any help!
Sudeshna
ELOG V3.1.4-2e1708b5