Back Midas Rome Roody Rootana
  Rome Analyzer Framework, Page 1 of 11  Not logged in ELOG logo
ID Date Author Topicup Subject
  130   20 Feb 2007 Todd Bredeweg Duplicate header file
I just started using Rome v2.7 and Root v5.14.00. I have run into a rather
interesting issue trying to compile my analyzer. I tracked the problem to the
fact that both Root and Rome are loading their own version of a header file
called TArrayL64.h. The content of the two files are essentially identical. I
solved the problem by changing the conditional at the start of the file
$ROMESYS/include/TArrayL64.h from

#ifndef TArrayL64_H
#define TArrayL64_H

to

#ifndef ROOT_TArrayL64
#define ROOT_TArrayL64

The latter is what I found in the Root version of the file. Now it only gets
loaded once. I looked at the svn sources that I just updated and it also uses
TArrayL64_H.

Question, why are there two copies.

UPDATE 2-21-07:
It seems that Root was the cause of this. Rome has used this header for some
time, but earlier versions of Root did not include it.
  124   09 Jun 2006 Ryu SawadaBug FixUnable to run rome analyzer from crontab
I have made modification on batch mode and daemon mode at rev.1129, 1136 and 1137.
The difference of daemon and batch mode is written in ROME homepage
http://midas.psi.ch/rome/usersGuide.html#fwcommandline

You can disable all graphics with -ng option explicitly. And when ROME failed to open display, it goes into 
no graphics mode automatically.

Please try. And please report when you still have a problem.

> (sorry for top-reply- I am trying to avoid elcode garbling my answer)
> 
> In the past, I have seen problems like yours, there are at least two issues:
> 
> 1) "non interactive" ROOT running from cron or some other incomplete user
> environment (no DISPLAY, no tty, no user)- a hello world script runs, but large
> app does not, because some silly class somewhere requires an X11 connection. I
> once had to fake it by running Xvnc and telling the cron jobs to use it as a
> DISPLAY. I know ROOT now have a "dummy" graphics module exactly for this
> purpose. I do not know how to activate it from the Rome environement, but I am
> sure it is documented somewhere on the ROOT web site.
> 
> 2) some programs coming from the MIDAS family assume existance of a keyboard and
> display. Sometimes they can be faked by using "program < /dev/null", sometimes
> not, I do not know what Rome does.
> 
> K.O.
> 
> 
> [quote="Todd Bredeweg"]I would like to use a bash script run from cron to
> analyze new midas event files automatically. Below is an abbreviated example
> script to test the way ROOT and ROME handle true batch mode
> 
> [CODE]
> #! /bin/bash
> 
> BASEDIR=/data/0/PostRunQA		# Base directory for output files
> ROMEDIR=${BASEDIR}/dance-rome		# Location of danceanalyzer
> 
> NRUN=7581
> ROMECFG="romeConfig_Continuous.xml";
> 
> # Set PATH and LD_LIBRARY_PATH for correct versions of ...
> # This also sets up the *SYS variables
> source /opt/wnr/new/bin/newVersion --new root rome wnr
> 
> cd ${ROMEDIR};
> 
> # Check that ROOT works correctly
> echo " Running ROOT batch mode test ";
> root -b -q ../jmodScript.C
> 
> # Check that ROME works correctly
> echo " Running danceanalyzer batch mode test ";
> ./danceanalyzer.exe -b -ns -q -i ${ROMECFG} -r ${NRUN}
> [/CODE]
> 
> The results for the ROOT section are the same when the script is run from the
> command line (full interactive environment) or when using at or crontab
> (non-interactive).
> 
> [CODE]
>  Running ROOT batch mode test
>   *******************************************
>   *                                         *
>   *        W E L C O M E  to  R O O T       *
>   *                                         *
>   *   Version   5.10/00      1 March 2006   *
>   *                                         *
>   *  You are welcome to visit our Web site  *
>   *          http://root.cern.ch            *
>   *                                         *
>   *******************************************
>                                                                                
>                                                   
> Compiled on 3 April 2006 for linux with thread support.
>                                                                                
>                                                   
> CINT/ROOT C/C++ Interpreter version 5.16.8, February 9, 2006
> Type ? for help. Commands must be C++ statements.
> Enclose multiple statements between { }.
>  Executing rootlogon.C (31-MAY-2006)...  Finished setup
>                                                                                
>                                                   
> Processing ../jmodScript.C...
> hello world
> This is the end of ROOT -- Goodbye
> [/CODE]
> 
> jmodScript.C is merely a classic "hello world" script. The ROME test, on the
> other hand, returns quite different results for the two cases. When run from the
> command line it works as expected
> 
> [CODE]
>  ...
>  Running danceanalyzer batch mode test
>  Executing rootlogon.C (31-MAY-2006)...  Finished setup
> reading configuration from romeConfig_Continuous.xml
> [bredeweg@enlil PostRunQA]$
> [/CODE]
> 
> but when run from at or crontab we get 
> 
> [CODE] Running danceanalyzer batch mode test
>  Executing rootlogon.C (31-MAY-2006)...  Finished setup
>                                                                                
>                                                   
>  *** Break *** segmentation violation
>  Generating stack trace...
>  0x081ec18b in main + 0x21b from ./danceanalyzer.exe
>  0x0734678a in __libc_start_main + 0xda from /lib/tls/libc.so.6
>  0x080dcd31 in TFile::TFile(char const*, char const*, char const*, int) + 0x51
> from ./danceanalyzer.exe
> /bin/bash: line 22: 28096 Aborted                 ./danceanalyzer.exe -b -ns -q
> -i ${ROMECFG} -r ${NRUN}[/CODE]
> 
> One question that we have been unable to answer as yet is whether rome is
> requiring a real TTY, which I do not believe is provided by cron.
> 
> We are using the following setup:
>     Redhat Enterprise Linux v3
>     ROOT v5.10.00
>     ROME RELEASE_2_4_R1004
> 
> I can provide additional information if needed.
> 
> Thanks in advance.
> 
> tab[/quote]
  157   04 Sep 2015 SUDESHNA GANGULYBug FixTMTT3.cpp -offset in index of the pads
Hi Ryu,

I fixed the problem about the offset in the indexing of the pads. It's just in
the TMTT3.cpp source code, 
Instead of wrtiting:
 case TMWindow::M_T3_Open_Pad1:
      OpenPad(0);
      break;
one should write:

 case TMWindow::M_T3_Open_Pad1:
      OpenPad(1);
      break;
  158   07 Sep 2015 Ryu SawadaBug FixTMTT3.cpp -offset in index of the pads
Thank you.

You are right.
I modified and pushed the code.

Ryu

> Hi Ryu,
> 
> I fixed the problem about the offset in the indexing of the pads. It's just in
> the TMTT3.cpp source code, 
> Instead of wrtiting:
>  case TMWindow::M_T3_Open_Pad1:
>       OpenPad(0);
>       break;
> one should write:
> 
>  case TMWindow::M_T3_Open_Pad1:
>       OpenPad(1);
>       break;
  7   13 Oct 2004 ryuBug Reportserial number and event ID
In "ROMEEventLoop.cpp"
in function "ReadEvent(Int_t event)"
after "if (gROME->isOnline()&&gROME->isMidas()) {"

gROME should get serial_number and event ID from event header. 
There should be following 2 lines

  gROME->SetCurrentEventNumber(((EVENT_HEADER*)mEvent)->serial_number);
  gROME->SetEventID(((EVENT_HEADER*)mEvent)->event_id);
  9   13 Oct 2004 Matthias SchneebeliBug Reportserial number and event ID
> In "ROMEEventLoop.cpp"
> in function "ReadEvent(Int_t event)"
> after "if (gROME->isOnline()&&gROME->isMidas()) {"
> 
> gROME should get serial_number and event ID from event header. 
> There should be following 2 lines
> 
>   gROME->SetCurrentEventNumber(((EVENT_HEADER*)mEvent)->serial_number);
>   gROME->SetEventID(((EVENT_HEADER*)mEvent)->event_id);

done
  17   12 Nov 2004 Ryu SawadaBug ReportGlobalSteering
When I define several "SteeringParameterGroup"s, builder maked nesting classes instead to make each 
classes.
  19   18 Nov 2004 Matthias SchneebeliBug ReportGlobalSteering
> When I define several "SteeringParameterGroup"s, builder maked nesting classes instead to make each 
> classes.

done
  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>
  21   27 Nov 2004 Ryu SawadaBug Reportss_getchar
When romeConfig.xml does not exist. Rome goes to infinite loop.

I think the problem is ss_getchar.
ROMEAnalyzer::ss_getchar does not seem to work on Linux ,because OS_UNIX is not defined.

"ends" is needed in following line.
cout << "Do you like the framework to generate a new configuration file ([y]/n) ? "<<ends;
otherwise this line does not appear before user hits keyboard.
  23   03 Dec 2004 Ryu SawadaBug Report-e option
When I used "-e" option in generated framework. It stopped immediately after starting analysis.

When I commented out following two lines in ROMEEventLoop.cpp. It worked.

  // check event numbers
      int status = gROME->CheckEventNumber(event);
      if (status==0) {
//	this->SetContinue();
//	return true;
      }
  25   06 Dec 2004 Matthias SchneebeliBug Reportss_getchar
> When romeConfig.xml does not exist. Rome goes to infinite loop.
> 
> I think the problem is ss_getchar.
> ROMEAnalyzer::ss_getchar does not seem to work on Linux ,because OS_UNIX is not defined.
> 
> "ends" is needed in following line.
> cout << "Do you like the framework to generate a new configuration file ([y]/n) ? "<<ends;
> otherwise this line does not appear before user hits keyboard.

done
  26   06 Dec 2004 Ryu SawadaBug ReportReadConfiguration
I can not change some global steering parameters.
In my LPConfig::ReadConfiguration in LPConfig.cpp which was generated by builder.

There is a line like
 xml->GetPathValue(path+"/GlobalSteeringParameters/child::SteeringParameterGroup[child::
SPGroupName='Switch']/child::SteeringParameterGroup[child::SPGroupName='RunMode']/child::
SteeringParameterField[child::SPName='Pedestal']/SPValue",fConfigData[index]->fGlobalSteering-
>fRunMode->fPedestal,"");

but it should be
 xml->GetPathValue(path+"/GlobalSteeringParameters/child::SteeringParameterGroup[child::
SPGroupName='RunMode']/child::SteeringParameterField[child::SPName='Pedestal']/
SPValue",fConfigData[index]->fGlobalSteering->fRunMode->fPedestal,"");


****
one small other bug.
when I start my framework with -h option, rome shows
  -i       Configuration file (default ROMEConfig.xml)
but default is romeConfig.xml
***

        <GlobalSteeringParameters>
                <SteeringParameterGroup>
                        <SPGroupName>Switch</SPGroupName>
                             <SteeringParameterField>
                                <SPFieldName>ADC1</SPFieldName>
                                <SPFieldType>Bool_t</SPFieldType>
                                <SPFieldInitialization>1</SPFieldInitialization>                                
                        </SteeringParameterField>
                        <SteeringParameterField>
                                <SPFieldName>WriteDataBase</SPFieldName>
                                <SPFieldType>Bool_t</SPFieldType>
                                <SPFieldInitialization>0</SPFieldInitialization>                                
                        </SteeringParameterField>
                </SteeringParameterGroup>
                <SteeringParameterGroup>
                        <SPGroupName>RunMode</SPGroupName>
                        <SteeringParameterField>
                                <SPFieldName>Pedestal</SPFieldName>
                                <SPFieldType>Short_t</SPFieldType>
                                <SPFieldInitialization>0</SPFieldInitialization>                                
                        </SteeringParameterField>
                        <SteeringParameterField>
                                <SPFieldName>Normal</SPFieldName>
                                <SPFieldType>Short_t</SPFieldType>
                                <SPFieldInitialization>1</SPFieldInitialization>                                
                        </SteeringParameterField>
                </SteeringParameterGroup>
        </GlobalSteeringParameters>
  27   21 Dec 2004 Matthias SchneebeliBug ReportReadConfiguration
> I can not change some global steering parameters.
> In my LPConfig::ReadConfiguration in LPConfig.cpp which was generated by builder.
> 
> There is a line like
>  xml->GetPathValue(path+"/GlobalSteeringParameters/child::SteeringParameterGroup[child::
> SPGroupName='Switch']/child::SteeringParameterGroup[child::SPGroupName='RunMode']/child::
> SteeringParameterField[child::SPName='Pedestal']/SPValue",fConfigData[index]->fGlobalSteering-
> >fRunMode->fPedestal,"");
> 
> but it should be
>  xml->GetPathValue(path+"/GlobalSteeringParameters/child::SteeringParameterGroup[child::
> SPGroupName='RunMode']/child::SteeringParameterField[child::SPName='Pedestal']/
> SPValue",fConfigData[index]->fGlobalSteering->fRunMode->fPedestal,"");
> 
> 
> ****
> one small other bug.
> when I start my framework with -h option, rome shows
>   -i       Configuration file (default ROMEConfig.xml)
> but default is romeConfig.xml
> ***
> 
>         <GlobalSteeringParameters>
>                 <SteeringParameterGroup>
>                         <SPGroupName>Switch</SPGroupName>
>                              <SteeringParameterField>
>                                 <SPFieldName>ADC1</SPFieldName>
>                                 <SPFieldType>Bool_t</SPFieldType>
>                                 <SPFieldInitialization>1</SPFieldInitialization>                                
>                         </SteeringParameterField>
>                         <SteeringParameterField>
>                                 <SPFieldName>WriteDataBase</SPFieldName>
>                                 <SPFieldType>Bool_t</SPFieldType>
>                                 <SPFieldInitialization>0</SPFieldInitialization>                                
>                         </SteeringParameterField>
>                 </SteeringParameterGroup>
>                 <SteeringParameterGroup>
>                         <SPGroupName>RunMode</SPGroupName>
>                         <SteeringParameterField>
>                                 <SPFieldName>Pedestal</SPFieldName>
>                                 <SPFieldType>Short_t</SPFieldType>
>                                 <SPFieldInitialization>0</SPFieldInitialization>                                
>                         </SteeringParameterField>
>                         <SteeringParameterField>
>                                 <SPFieldName>Normal</SPFieldName>
>                                 <SPFieldType>Short_t</SPFieldType>
>                                 <SPFieldInitialization>1</SPFieldInitialization>                                
>                         </SteeringParameterField>
>                 </SteeringParameterGroup>
>         </GlobalSteeringParameters>

done
  28   21 Dec 2004 Matthias SchneebeliBug Report-e option
> When I used "-e" option in generated framework. It stopped immediately after starting analysis.
> 
> When I commented out following two lines in ROMEEventLoop.cpp. It worked.
> 
>   // check event numbers
>       int status = gROME->CheckEventNumber(event);
>       if (status==0) {
> //	this->SetContinue();
> //	return true;
>       }

the syntax is : -e 100-200,205,300-400
  29   01 Jan 2005 Ryu SawadaBug ReportMultiple TTree writing
When I make two TTree's write flag true. Both TTrees is written in one file. And the other file is empty.

I added some lines to fix it in ROMEEventLoop.cpp

-------
This is other topic.
Probably, to close TFile after each run is good. 
Because, when program runs for several run, 
 even if program aborts after some runs, files of former runs are safe.



-------
  941    // Write non accumulative output tree files
    942    ROMEString filename;
    943    ROMETree *romeTree;
    944    TTree *tree;
    945    TFile *fTreeFile;
    946    ROMEString runNumberString;
    947    gROME->GetCurrentRunNumberString(runNumberString);
    948    for (int j=0;j<gROME->GetTreeObjectEntries();j++) {
    949       romeTree = gROME->GetTreeObjectAt(j);
    950       fTreeFile = fTreeFiles[j];
    951       if (romeTree->isWrite() && !gROME->isTreeAccumulation()) {
    952          tree = romeTree->GetTree();
    953          cout << "Writing Root-File " << tree->GetName() << runNumberString.Data() << ".root" 
<< endl;
    954          fTreeFile->cd();
    955          tree->Write("",TObject::kOverwrite);
    956       }
    957    }
    958    cout << endl;
  30   04 Jan 2005 Matthias SchneebeliBug ReportMultiple TTree writing
> When I make two TTree's write flag true. Both TTrees is written in one file. And the other file is empty.
> 
> I added some lines to fix it in ROMEEventLoop.cpp
> 
> -------
> This is other topic.
> Probably, to close TFile after each run is good. 
> Because, when program runs for several run, 
>  even if program aborts after some runs, files of former runs are safe.
> 
> 
> 
> -------
>   941    // Write non accumulative output tree files
>     942    ROMEString filename;
>     943    ROMETree *romeTree;
>     944    TTree *tree;
>     945    TFile *fTreeFile;
>     946    ROMEString runNumberString;
>     947    gROME->GetCurrentRunNumberString(runNumberString);
>     948    for (int j=0;j<gROME->GetTreeObjectEntries();j++) {
>     949       romeTree = gROME->GetTreeObjectAt(j);
>     950       fTreeFile = fTreeFiles[j];
>     951       if (romeTree->isWrite() && !gROME->isTreeAccumulation()) {
>     952          tree = romeTree->GetTree();
>     953          cout << "Writing Root-File " << tree->GetName() << runNumberString.Data() << ".root" 
> << endl;
>     954          fTreeFile->cd();
>     955          tree->Write("",TObject::kOverwrite);
>     956       }
>     957    }
>     958    cout << endl;



Thanks
  32   09 Jan 2005 Ryu SawadaBug Reportlong task description
When I made task description longer than about 80 characters. The description was not written in html 
file propery. It was shorten.

I guess following lines in ROMEBuilder.cpp are relating to this.


-----------
      pos = (char*)taskDescription[iTask].Data();
      lenTot = taskDescription[iTask].Length();
      while (pos-taskDescription[iTask].Data() < lenTot) {
         if (lenTot+(taskDescription[iTask].Data()-pos)<74) 
            i=TMath::Min(75,lenTot);
         else for (i=74;pos[i]!=32&&i>0;i--) {}
         if (i<=0)
            i=TMath::Min(75,lenTot);
         pos[i] = 0;
         buffer.AppendFormatted("// %-74.74s   \n",pos);
         pos = pos+i+1;
      }
  33   10 Jan 2005 Matthias SchneebeliBug Reportlong task description
> When I made task description longer than about 80 characters. The description was not written in html 
> file propery. It was shorten.
> 
> I guess following lines in ROMEBuilder.cpp are relating to this.
> 
> 
> -----------
>       pos = (char*)taskDescription[iTask].Data();
>       lenTot = taskDescription[iTask].Length();
>       while (pos-taskDescription[iTask].Data() < lenTot) {
>          if (lenTot+(taskDescription[iTask].Data()-pos)<74) 
>             i=TMath::Min(75,lenTot);
>          else for (i=74;pos[i]!=32&&i>0;i--) {}
>          if (i<=0)
>             i=TMath::Min(75,lenTot);
>          pos[i] = 0;
>          buffer.AppendFormatted("// %-74.74s   \n",pos);
>          pos = pos+i+1;
>       }

done. thanks.
  34   10 Jan 2005 Matthias SchneebeliBug Reportlong task description
> When I made task description longer than about 80 characters. The description was not written in html 
> file propery. It was shorten.
> 
> I guess following lines in ROMEBuilder.cpp are relating to this.
> 
> 
> -----------
>       pos = (char*)taskDescription[iTask].Data();
>       lenTot = taskDescription[iTask].Length();
>       while (pos-taskDescription[iTask].Data() < lenTot) {
>          if (lenTot+(taskDescription[iTask].Data()-pos)<74) 
>             i=TMath::Min(75,lenTot);
>          else for (i=74;pos[i]!=32&&i>0;i--) {}
>          if (i<=0)
>             i=TMath::Min(75,lenTot);
>          pos[i] = 0;
>          buffer.AppendFormatted("// %-74.74s   \n",pos);
>          pos = pos+i+1;
>       }

done. thanks.
ELOG V3.1.4-2e1708b5