Back Midas Rome Roody Rootana
  Rome Analyzer Framework, Page 2 of 11  Not logged in ELOG logo
New entries since:Wed Dec 31 16:00:00 1969
ID Date Authordown 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
  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
  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!
  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.
  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
  184   07 Mar 2016 SUDESHNA GANGULYSuggestionProblem in adding two TGraphs in the same pad using <Argus> block in tabbing
I wanted to add two different TGraphs (Corresponding to two calorimeters) into
the same pad.
So in the xml file I did:
<Graph>
  <GraphName>MyGraph</GraphName>
  <GraphFolderName>mygraphs</GraphFolderName>
  <GraphType>TGraph</GraphType>
<GraphArraySize>2</GraphArraySize>
  <GraphXLabel>Event no.</GraphXLabel>
  <GraphYLabel>Island no.</GraphYLabel>
  <GraphXmin>0</GraphXmin>
  <GraphXmax>10000</GraphXmax>
  <GraphYmin>0</GraphYmin>
  <GraphYmax>100000</GraphYmax>
 <Argus>
<Tab>
      <TabName>SummaryFCBank</TabName>
    <ObjectArrayIndex>0-1</ObjectArrayIndex>
      <Index>1</Index>
 <DrawSamePad>true</DrawSamePad>
    </Tab>
  </Argus>
</Graph>


And in src/tasks:
in the HGUITFillHisto.cpp code I did:
 for(int icalo=1; icalo<3; icalo++)   [For each calorimeter there is one bank, and one n_islands value from that
bank per event.]                        
    {
GetMyGraphAt(icalo-1)->SetPoint(gAnalyzer->GetCurrentEventNumber(),gAnalyzer->GetCurrentEventNumber(),n_islands);

 GetMyGraphAt(0)->SetMarkerColor(2); 

 GetMyGraphAt(1)->SetMarkerColor(3);

 ArgusHistoDisplay::SetLimits(GetMyGraphAt(icalo-1));

}

But then I get an empty pad in the tab. 
It works when I create the TGraph for only one calorimeter, using GetMyGraph().

Any help would be much appreciated.

Thanks!
Sudeshna
  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
  197   11 Apr 2016 SUDESHNA GANGULYInfoGetting an error while compiling a code with <ARGUS> tabs for 2-D histograms
Hi Ryu,

I am trying to display a 2-D histogram with the <Argus> tab in the user xml file.
Here is what I have in the xml:


 <Histogram>
      <HistName>h2_Exy</HistName>
      <HistFolderName>CT</HistFolderName>
      <HistArraySize>2</HistArraySize>
      <HistType>TH2F</HistType>
      <HistXLabel>xseg</HistXLabel>
      <HistYLabel>yseg</HistYLabel>
      <HistXNbins>9</HistXNbins>
      <HistXmin>0.5</HistXmin>
      <HistXmax>9.5</HistXmax>
      <HistYNbins>6</HistYNbins>
      <HistYmin>0.5</HistYmin>
      <HistYmax>6.5</HistYmax>

<Argus>                                                                        
                                            
<Tab>                                                                          
                                               <TabName>Summary</TabName>      
                                                                               
               <ObjectArrayIndex>0</ObjectArrayIndex>                          
                                                                <Index>0</Index>
                                                                               
                           </Tab>                                              
                                                                        
</Argus>                                                                       
                                                
</Histogram>

But when I compile the code it throws the following error message:

src/generated/HGUITSummary_Base.cpp:87: error: cannot convert ‘TH1F*’ to ‘TH2F*’
in assignment

I am getting this error when ever I am trying to display 2-D histograms with
<Argus> tabs.

Any help will be much appreciated.

Sudeshna
  198   13 Apr 2016 SUDESHNA GANGULYBug ReportError with maximum number of tabs in Argus section
Hi Ryu,

I am trying to use <Argus> for tabbing like this:
  <Argus>
          <Tab>
            <TabName>Tab1</TabName>
            <ObjectArrayIndex>0</ObjectArrayIndex>

            <Index>0</Index>
 </Tab>
   <Tab>
            <TabName>Tab1</TabName>
            <ObjectArrayIndex>1</ObjectArrayIndex>
            <Index>1</Index>
          </Tab>
   <Tab>
            <TabName>Tab1</TabName>
            <ObjectArrayIndex>2</ObjectArrayIndex>

            <Index>2</Index>
          </Tab>




And I need to add 18 tabs with each tab having three pads.
Now I when ever I cross Tab6 with three pads on it, it gives me this error:

[sganguly@g2be1 rometest]$ /home/sganguly/dqm/rome/bin/romebuilder.exe -i
midas.xml -midas
Maximal number of Tabs in the Argus section of Histogram 'h1_wf' reached : 20 !

I have noticed that currently I can define 6 tabs and 5 pads on each tab maximum.

Could you please help me with this?

Thanks a lot!
Sudeshna
  199   14 Apr 2016 SUDESHNA GANGULYInfoError with maximum number of tabs in Argus section
I've fixed the problem of not being able to define 18 tabs. I edited
/argus/include/ArgusHistoDisplay.h file:
I changed the parameter values to:

class ArgusHistoDisplay : public ArgusTab
{
protected:
   enum {
      kMaxNumberOfPads = 360,
      kMaxNumberOfPadsX = 10,
      kMaxNumberOfPadsY = 20,
      kNumberOfDisplayViewSelections0 = 54,
      kNumberOfDisplayViewSelections1 = 10,
      kNumberOfDisplayViewSelections2 = 10,
      kMaxNumberOfLines = 81
   };

Now I can define 18 tabs with 3 pads in each.




> Hi Ryu,
> 
> I am trying to use <Argus> for tabbing like this:
>   <Argus>
>           <Tab>
>             <TabName>Tab1</TabName>
>             <ObjectArrayIndex>0</ObjectArrayIndex>
> 
>             <Index>0</Index>
>  </Tab>
>    <Tab>
>             <TabName>Tab1</TabName>
>             <ObjectArrayIndex>1</ObjectArrayIndex>
>             <Index>1</Index>
>           </Tab>
>    <Tab>
>             <TabName>Tab1</TabName>
>             <ObjectArrayIndex>2</ObjectArrayIndex>
> 
>             <Index>2</Index>
>           </Tab>
> 
> 
> 
> 
> And I need to add 18 tabs with each tab having three pads.
> Now I when ever I cross Tab6 with three pads on it, it gives me this error:
> 
> [sganguly@g2be1 rometest]$ /home/sganguly/dqm/rome/bin/romebuilder.exe -i
> midas.xml -midas
> Maximal number of Tabs in the Argus section of Histogram 'h1_wf' reached : 20 !
> 
> I have noticed that currently I can define 6 tabs and 5 pads on each tab maximum.
> 
> Could you please help me with this?
> 
> Thanks a lot!
> Sudeshna
  200   14 Apr 2016 SUDESHNA GANGULYInfoIs auto-update available for tabs with user-defined codes (not with <Argus>) ?
Is it possible to have the pads automatically updated with the update frequency
(set at romeConfig.xml) while using user-defined src/tabs codes? 
Suppose I write a tab code under src/tabs where I have created an "update" button. 
Now on the Argus display monitor, if I click on the "update" button, the display
will be updated. But what I've noticed is that clicking on the update button
introduces a delay. By the time the display is actually updated I've missed some
events already. 

Is there any way to sync the update button with the update frequency in the
romeConfig.xml? So that it keeps up with every event?

I would really appreciate if anyone have any suggestion for this situation.

Thanks a lot!
Sudeshna
  203   18 Apr 2016 SUDESHNA GANGULYInfoClear histogram/group of histograms at the beginning of run in ROME
Hi All,

Is there any way in ROME that I can clear histograms at:

    1)Run start.
    2) Clear by group (tab) ?


Thanks a lot!
Sudeshna
  206   06 May 2016 SUDESHNA GANGULYInfoCan we reset histograms at the middle of a run in ROME?
Hi All,

Suppose I want to pause a run, at the middle, and change some run conditions. So
I want to clear histograms at the middle of a run. Is that possible to do in ROME?

That when I pause the run, I want to clear histograms. So with the new run
conditions, when we resume that run, we will get clear pads and histograms will
be filled in new.


Thanks a lot!
Sudeshna
  13   16 Oct 2004 Ryu SawadaInfoMIDAS status update
"Analyzed" fields in MIDAS status display are always 0.0% as you can see in the attached file.
Is it possible to implement function to update this field ?
Attachment 1: midas_status.jpg
midas_status.jpg
  14   09 Nov 2004 Ryu SawadaSuggestionBank size check
in ROMEEventLoop::ReadEvent(), if  gROME->isOffline() and gROME->isMidas(),
ROME checks if bank size is greater than 0.

But It can happen that the bank size is 0 in normal file.
(Actually in my midas file bank size of "environment data" is 0 at this moment)

---------------------------------------------
 else if (gROME->isOffline()&&gROME->isMidas()) {
      // read event header
      EVENT_HEADER *pevent = (EVENT_HEADER*)gROME->GetMidasEvent();
      bool readError = false;
               .
               .
               .
         if (pevent->data_size <= 0) readError = true;
         else {
            n = read(fMidasFileHandle, pevent+1, pevent->data_size);
            if (n != (int) pevent->data_size) readError = true;
	    if ((int) ((BANK_HEADER*)(pevent+1))->data_size < 0) readError = true;    <-- I changed here
         }
      }
      // check input
      if (readError) {
         if (n > 0) cout << "Unexpected end of file\n";
         this->SetEndOfRun();
         return true;
  15   10 Nov 2004 Ryu SawadaSuggestionBank size check
> in ROMEEventLoop::ReadEvent(), if  gROME->isOffline() and gROME->isMidas(),
> ROME checks if bank size is greater than 0.
> 
> But It can happen that the bank size is 0 in normal file.
> (Actually in my midas file bank size of "environment data" is 0 at this moment)

Point may be that data format of "environment data" in my midas file is "FIXED".
According to MIDAS document, MIDAS analyzer cannnot work with this format too.
I guess it can happen that bank size seems negative when ROME reads FIXED data.
  16   12 Nov 2004 Ryu SawadaSuggestionMakefile
In Makefile xmlibs and sqllibs is defined like this. 
xmllibs := -lxml2 -lz
sqllibs := -lmysql
But this is not correct sometimes.
Actually sqllibs for my environment should be -L'/usr/lib/mysql' -lmysqlclient

If you use the same way as rootlibs. It may be better.

xmllibs := $(shell xml2-config --libs)
xmlcflags := $(shell xml2-config --cflags)
sqllibs := $(shell mysql_config --libs)
sqlcflags := $(shell mysql_config --cflags)
  17   12 Nov 2004 Ryu SawadaBug ReportGlobalSteering
When I define several "SteeringParameterGroup"s, builder maked nesting classes instead to make each 
classes.
  18   17 Nov 2004 Ryu SawadaSuggestionReverse sorting of database
User may want to read database in inverse order.

To add new rule to specify wheather the order is normal or opposit may be useful.

For instance following path gives the latest version of pedestal in database.
"/LPPedestal(id=%d)/version;LPPedestal/version(-)",gAnalyzer->GetCurrentRunNumber()

Concerning SQL database. To sort opposite is easy. Just put keyword "DESC" after "ORDER BY" phrase.
  20   19 Nov 2004 Ryu SawadaBug ReportGlobalSteering
> > When I define several "SteeringParameterGroup"s, builder maked nesting classes instead to make each 
> > classes.
> 
> done
It is still not fixed. In case of following configuration.
"InvalidValue" was in "Switch" class.
Is it invalid to put a SteeringParameterField after SteeringParameterGroup ?

<GlobalSteeringParameters>
  <SteeringParameterGroup>
    <SPGroupName>Switch</SPGroupName>
    <SteeringParameterField>
      <SPFieldName>Piedi</SPFieldName>
      <SPFieldType>Bool_t</SPFieldType>
      <SPFieldInitialization>0</SPFieldInitialization>
      <SPFieldComment>Switch for pedestal calculation</SPFieldComment>
    </SteeringParameterField>
  </SteeringParameterGroup>
  <SteeringParameterField>
    <SPFieldName>InvalidValue</SPFieldName>
    <SPFieldType>Float_t</SPFieldType>
    <SPFieldInitialization>-1000</SPFieldInitialization>
    <SPFieldComment>Invalid value</SPFieldComment>
  </SteeringParameterField>
</GlobalSteeringParameters>
ELOG V3.1.4-2e1708b5