Back Midas Rome Roody Rootana
  Rome Analyzer Framework, Page 2 of 11  Not logged in ELOG logo
ID Date Authorup Topic Subject
  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
  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
  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
  122   08 Jun 2006 Konstantin OlchanskiBug ReportUnable to run rome analyzer from crontab
(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]
  132   23 Feb 2007 Konstantin OlchanskiForumDuplicate 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.

I have just run into the TArrayL64.h problem myself. I recommend that we resolve
the clashing header files. We could ask Rene Brun to rename his file or we could
rename the clashing file in Rome.

K.O.
  142   11 Jun 2015 Konstantin OlchanskiInfoROME examples : histoGUI
> I have succesfully written a ROME application ...

For the record, at TRIUMF we have moved away from ROME towards the ROOTANA ROOT-based analyzer 
package which has some simple C++ classes for reading midas raw data, some simple classes and examples for 
working with midas data in ROOT, and some fairly advanced graphical example applications.

https://bitbucket.org/tmidas/rootana

K.O.
  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.
  2   08 Oct 2004 Matthias SchneebeliSuggestionxml 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 <a 
href="http://www.xmlfiles.com/xml/xml_attributes.asp">http://www.xmlfiles.com/xml/xml_attributes.asp</a> 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.


Thank you for your advice.

I have implemented the suggested xml format in rome. I have also inluded a rome.xsd schema file in the rome 
distribution under ROMESYS/.

Now, the current cvs version of rome expects the new format.
The samples are updated.

The documentation is not yet updated.
Is there any way of using the .xsd file for documentation?

For example I'd like to have somting like this:
I would like to have a docu attribute in the xsd file :

<xs:element name="Folders" minOccurs="1" maxOccurs="1" docu="Defines all folder of the framework">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="Folder" type="FolderDesc" minOccurs="1" maxOccurs="unbounded" 
                  docu="Defines a folder of the framework"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

The xsd file should then be translated into an html file, that documents the structure of my xml file with comments 
on every field.

Is there any tool, that provides a documentation mechanism like that.

If not I will write that by myself.
  3   08 Oct 2004 Matthias SchneebeliSuggestionxml 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 <a 
> href="<a 
href="http://www.xmlfiles.com/xml/xml_attributes.asp">http://www.xmlfiles.com/xml/xml_attributes.asp</a>">http://www.xml
files.com/xml/xml_attributes.asp"><a 
href="http://www.xmlfiles.com/xml/xml_attributes.asp</a>">http://www.xmlfiles.com/xml/xml_attributes.asp</a></a></a> 
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.
> 
> 
> Thank you for your advice.
> 
> I have implemented the suggested xml format in rome. I have also inluded a rome.xsd schema file in the rome 
> distribution under ROMESYS/.
> 
> Now, the current cvs version of rome expects the new format.
> The samples are updated.
> 
> The documentation is not yet updated.
> Is there any way of using the .xsd file for documentation?
> 
> For example I'd like to have somting like this:
> I would like to have a docu attribute in the xsd file :
> 
> <xs:element name="Folders" minOccurs="1" maxOccurs="1" docu="Defines all folder of the framework">
>   <xs:complexType>
>     <xs:sequence>
>       <xs:element name="Folder" type="FolderDesc" minOccurs="1" maxOccurs="unbounded" 
>                   docu="Defines a folder of the framework"/>
>     </xs:sequence>
>   </xs:complexType>
> </xs:element>
> 
> The xsd file should then be translated into an html file, that documents the structure of my xml file with comments 
> on every field.
> 
> Is there any tool, that provides a documentation mechanism like that.
> 
> If not I will write that by myself.


For get my question, I have found some schema documentation generators.
  4   11 Oct 2004 Matthias SchneebeliInfoSchema evolution in root and rome
For your information:

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

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

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

Yes your right.

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

Ok, that's done.
  12   14 Oct 2004 Matthias SchneebeliSuggestionTTree filling in online mode.
> In my case, in online mode, I don't need to wirte TTree.
> But I want to fill it, because we use it to see data with using TSocket connection.
> 
> How do you think about filling TTree even if write flag is not toggled ?

I implemented a fill flag for the trees in the romeConfig file.

However, if your fill flag is true and your write flag false, then the tree will be 
filled in memory completely. Which means that, if the tree is large, a memory overflow 
occurs. Therefore you should only do this for circular trees.
  19   18 Nov 2004 Matthias SchneebeliBug ReportGlobalSteering
> When I define several "SteeringParameterGroup"s, builder maked nesting classes instead to make each 
> classes.

done
  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
  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
  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
  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.
ELOG V3.1.4-2e1708b5