Back Midas Rome Roody Rootana
  Rome Analyzer Framework, Page 1 of 11  Not logged in ELOG logo
ID Date Author Topicdown Subject
  1   05 Oct 2004 Jan WoutersSuggestionxml and ROME
After looking at the example xml document for the MEG detector I would like to make the following suggestion.  
Only a small portion of the power of XML is used with the MEG example i.e., the ability to express the data as a  
hierarchical tree.  Missing is the powerful feature of XML to establish a schema for the XML document specific 
to ROME that enforces a valid structure.

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

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

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

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

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

    <MidasBanks>
        <EventHeader>
            <Folder>Trigger</Folder>
            <EventId>ID</EventId>
            <TriggerMask>Mask</TriggerMask>
            <SerialNumber>EventNumber</SerialNumber>
            <TimeStamp>Time</TimeStamp>
        </EventHeader>
        <EventStructure>
            <EventName>TM01</EventName>
            <EventData>
                <DataName>Time</DataName>
                <DataType>DWORD</DataType>
            </EventData>
        </EventStructure>
        <EventStructure>
            <EventName>EV01</EventName>
            <EventData>
                <DataName>OCRgAreaHG</DataName>
                <DataType>DWORD</DataType>
            </EventData>
            <EventData>
                <DataName>OCRgAreaLG</DataName>
                <DataType>DWORD</DataType>
            </EventData>
            <EventData>
                <DataName>OCRgTimeHi</DataName>
                <DataType>DWORD</DataType>
            </EventData>
            <EventData>
                <DataName>OCRgDetId</DataName>
                <DataType>DWORD</DataType>
            </EventData>
        </EventStructure>
    </MidasBanks>
</Experiment>
Attachment 2: ROME.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:annotation>
        <xs:documentation>Described some enumerated types</xs:documentation>
    </xs:annotation>
    <xs:simpleType name="RootType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Float_t"/>
            <xs:enumeration value="ULong_t"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="HistTypeDesc">
        <xs:restriction base="xs:string">
            <xs:enumeration value="TH1C"/>
            <xs:enumeration value="TH1S"/>
            <xs:enumeration value="TH1F"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="MidasType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="DWORD"/>
            <xs:enumeration value="float"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:annotation>
        <xs:documentation>Describe general types</xs:documentation>
    </xs:annotation>
    <xs:complexType name="AuthorDesc">
        <xs:sequence>
            <xs:element name="AuthorName" type="xs:string"/>
            <xs:element name="AuthorInstitute" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="AuthorCollaboration" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="AuthorEmail" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:annotation>
        <xs:documentation>Describe types used by subfolders</xs:documentation>
    </xs:annotation>
    <xs:complexType name="FieldDesc">
        <xs:sequence>
            <xs:element name="FieldName" type="xs:string"/>
            <xs:element name="FieldType" type="RootType"/>
            <xs:element name="FieldComment" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="SubFolderDesc">
        <xs:sequence>
            <xs:element name="SubFolderName" type="xs:string"/>
            <xs:element name="SubFolderTitle" type="xs:string"/>
            <xs:element name="ArraySize" type="xs:integer"/>
            <xs:element name="Field" type="FieldDesc" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:annotation>
        <xs:documentation>Describe tasks</xs:documentation>
    </xs:annotation>
    <xs:complexType name="HistDesc">
        <xs:sequence>
            <xs:element name="HistFolder" type="xs:string"/>
            <xs:element name="HistTitle" type="xs:string"/>
            <xs:element name="HistType" type="HistTypeDesc"/>
            <xs:element name="HistArraySize" type="xs:integer" minOccurs="0" default="1"/>
            <xs:element name="HistSize" type="xs:integer"/>
            <xs:element name="xMin" type="xs:integer" minOccurs="0" default="0"/>
            <xs:element name="xMax" type="xs:integer"/>
        </xs:sequence>
    </xs:complexType>
    
    <xs:complexType name="HistogramsDesc">
        <xs:sequence>
            <xs:element name="Histogram" type="HistDesc" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    
    <xs:complexType name="SubTaskDesc">
        <xs:sequence>
            <xs:element name="TaskName" type="xs:string"/>
            <xs:element name="TaskEventId" type="xs:integer"/>
            <xs:element name="Author" type="AuthorDesc"/>
            <xs:element name="TaskVersion" type="xs:integer"/>
            <xs:element name="Histograms" type="HistogramsDesc" minOccurs="0" maxOccurs="1"/>
            <xs:element name="TaskDesc" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>
    <xs:annotation>
        <xs:documentation>Describe elements used by MidasBanks</xs:documentation>
    </xs:annotation>
    <xs:complexType name="EventHeaderDesc">
        <xs:sequence>
            <xs:element name="Folder" type="xs:string"/>
            <xs:element name="EventId" type="xs:string"/>
            <xs:element name="TriggerMask" type="xs:string"/>
            <xs:element name="SerialNumber" type="xs:string"/>
            <xs:element name="TimeStamp" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="EventDataDesc">
        <xs:sequence>
            <xs:element name="DataName" type="xs:string"/>
            <xs:element name="DataType" type="MidasType"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="EventStructDesc">
        <xs:sequence>
            <xs:element name="EventName" type="xs:string"/>
            <xs:element name="EventData" type="EventDataDesc" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:annotation>
        <xs:documentation>Describe overall document</xs:documentation>
    </xs:annotation>
    <xs:element name="Experiment">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="ExperimentName" type="xs:string"/>
                <xs:element name="Author" type="AuthorDesc"/>
                <xs:element name="Folder">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="SubFolder" type="SubFolderDesc" maxOccurs="unbounded"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="Task">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="SubTask" type="SubTaskDesc" maxOccurs="unbounded"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="MidasBanks">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="EventHeader" type="EventHeaderDesc"/>
                            <xs:element name="EventStructure" type="EventStructDesc" maxOccurs="unbounded"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
  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.
  5   13 Oct 2004 ryuSuggestionTBranch 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.
  6   13 Oct 2004 ryuSuggestionTTree 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 ?
  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.
  10   14 Oct 2004 Stefan RittSuggestionTBranch 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>
  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.
  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)
  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.
  22   02 Dec 2004 Ryu SawadaSuggestionMidas event definition
I finished Macintosh porting.
I checked it in offline mode , but not yet online mode.

I needed to add byte swapping code.
For bank swapping, if HAVE_MIDAS is defined it uses bk_swap in midas.h, in the other case it uses 
ROMEEventLoop::bk_swap.
Byte swapping will be done if cpu is PowerPC (MacOSX or Linux on Macintosh). Data should be written 
on little-endian machine like Intel.

Important point is If there is banks whose type is not MIDAS, rome may not work on Macintosh.
I want to propose a new MidasBanks scheme of xml file to fix this problem. Structure of EventDefinition 
is according to EVENT_DEF in mana.c.

When rome reads Midas file(offline) or ODB(odb), if the event ID is listed in xml configuration file and 
"Disabled" is false and Format is MIDAS, rome reads banks listed for the event ID, in the other case rome skips the event and goes to next 
event.

Probably this way will help statistics handling in online mode for also Intel platform. Because at this 
moment, rome assumes "Equipment" in ODB is always "Trigger" and "Scaler". But of coarse there can be 
other equipments. (There is possibility that ODB does not have "Scaler" too)

<MidasBanks>
   <EventHeader>
      <Folder>Event</Folder>
      <EventId>ID</EventId>
      <TriggerMask>Mask</TriggerMask>
      <SerialNumber>Eventnumber</SerialNumber>
      <TimeStamp>Time</TimeStamp>
   </EventHeader>
   <EventDefinition>
      <EventName>Trigger</EventName>
      <EventId>1</EventId>
      <Format>MIDAS</Format>
      <Disabled>false</Disabled>
      <Banks>
         <Bank>
            <BankName>ADC0</BankName>
            <BankType>unsigned short</BankType>
         </Bank>
         <Bank>
            <BankName>TDC0</BankName>
            <BankType>unsigned short</BankType>
         </Bank>
      </Banks>
   </EventDefinition>
   <EventDefinition>
      <EventName>Scaler</EventName>
      <EventId>2</EventId>
         <Format>YBOS</Format>
         <Disabled>true</Disabled>
         <Banks>
            <Bank>
               <BankName>SCLR</BankName>
               <BankType>unsigned long</BankType>
            <Bank>
         </Banks>	
      </EventDefinition>
      <EventDefinition>
         <EventName>HV</EventName>
         <EventId>3</EventId>
         <Format>FIXED</Format>
         <Disabled>true</Disabled>
      </EventDefinition>
</MidasBanks>

P.S.
If there is no plan to support YBOS and FIXED format. <Format> is not needed definitly.
  31   06 Jan 2005 Ryu SawadaSuggestionuser defined link in html file
I was asked to put change log of my rome application(LPframewok). I think the best place to put it is the 
html file which builder created.  But of course to modify it is not good, because it will be overwritten by 
builder again.

So, I want to propose to allow user to add links in the html file with the way like followings.

(i) User defines links.
------   in LPframewok.xml   ------
<DocumentLinks>
	<DocumentLink>
		<Href>html/changelog.html</Href>
		<Text>Change log</Text>
	</DocumentLink>
</DocumentLinks>
-----------------------------------

(ii)And html files looks like
-----------------------------------
Table of Contents

  • Introduction
  • Objects in the LPframework
      ? Tasks
      ? Folders
      ? Trees
      ? Midas Banks
  • Access Methods to Objects in the LPframework
      ? Folders
      ? Data Base
      ? Steering Parameters
      ? Histograms
      ? Midas Banks
      ? General
  • Class Overview
  • Links
      ? Change log
-----------------------------------

(iii)Users must write the target(html/changelog.html).
  35   11 Jan 2005 Matthias SchneebeliSuggestionuser defined link in html file
> I was asked to put change log of my rome application(LPframewok). I think the best place to put it is the 
> html file which builder created.  But of course to modify it is not good, because it will be overwritten by 
> builder again.
> 
> So, I want to propose to allow user to add links in the html file with the way like followings.
> 
> (i) User defines links.
> ------   in LPframewok.xml   ------
> <DocumentLinks>
> 	<DocumentLink>
> 		<Href>html/changelog.html</Href>
> 		<Text>Change log</Text>
> 	</DocumentLink>
> </DocumentLinks>
> -----------------------------------
> 
> (ii)And html files looks like
> -----------------------------------
> Table of Contents
> 
>   • Introduction
>   • Objects in the LPframework
>       ? Tasks
>       ? Folders
>       ? Trees
>       ? Midas Banks
>   • Access Methods to Objects in the LPframework
>       ? Folders
>       ? Data Base
>       ? Steering Parameters
>       ? Histograms
>       ? Midas Banks
>       ? General
>   • Class Overview
>   • Links
>       ? Change log
> -----------------------------------
> 
> (iii)Users must write the target(html/changelog.html).

There will be a new link available "Additional Info" after "Class Overview".

This points to a file named "UserHTML.html" which can be modified by the user.
  39   19 Jan 2005 Ryu SawadaSuggestionheaders of midas,xml2 and mysql
This is not so strong suggestion. I am just wondering.

Currently ROME include headers of midas, xml2 and mysql.
There are libraries for windows but no libraries for linux.

I am afraid that there can be inconsequence between headers and libraries in futrue updates of these 
libraries, if compiler reads headers from rome/include instead of correct one.

So, my suggestion is that move midas.h,libxml2 and mysql outside of header files search path for linux.

for instance
  Make new directory rome/include/win.
  Put midas.h,libxml2 and mysql into it.
  Add $ROMESYS/include/win into header files search path in case of Windows.


P.S.
If midas.h is already very different from midas.h in MIDAS. This may be difficult.
  40   19 Jan 2005 Ryu SawadaSuggestionmessaging system
About warnings,errors and informations output in online mode.

Probably we lauch ROME from web interface of MIDAS. And we don't see console of ROME.
But we need to hear what ROME is saying.

Normally midas analyzer and other applications use cm_msg function. This function shows messages 
proper place like web interface or ODBEdit windows and so on.

I do not have much knowledge about it. Stefan may know better way.
  41   20 Jan 2005 Ryu SawadaSuggestionheaders of midas,xml2 and mysql
> This is not so strong suggestion. I am just wondering.
> 
> Currently ROME include headers of midas, xml2 and mysql.
> There are libraries for windows but no libraries for linux.
> 
> I am afraid that there can be inconsequence between headers and libraries in futrue updates of these 
> libraries, if compiler reads headers from rome/include instead of correct one.
> 
> So, my suggestion is that move midas.h,libxml2 and mysql outside of header files search path for linux.
> 
> for instance
>   Make new directory rome/include/win.
>   Put midas.h,libxml2 and mysql into it.
>   Add $ROMESYS/include/win into header files search path in case of Windows.
> 
> 
> P.S.
> If midas.h is already very different from midas.h in MIDAS. This may be difficult.

I looked into gcc, then I found the header file which is found first is supposed to be used.
In ROME's case $(shell xml2-config --cflags) and $(shell mysql_config --cflags) are located before -I$(ROMESYS)/include/, so in principle 
it is safe.

But about midas.h there still can be inconsequence, because -I$(ROMESYS)/include/ is located before -I$(MIDASSYS)/include/.
It this done on purpose to enable special features for ROME ?


---
One more thing. about libpaths.
If libpaths will be used only for specify the place where midas libraries were put. Followings can also work and more simple.
And I added midascflags, because to use same way as root,xml2 and mysql seems more beautiful. 
And I moved -DHAVE_SQL and -DHAVE_MIDAS to sqlcflags and midascflags.

rootlibs := $(shell root-config --libs)
rootglibs := $(shell root-config --glibs)
rootcflags := $(shell root-config --cflags)
rootthreadlibs := -lThread
xmllibs :=  $(shell xml2-config --libs)
xmlcflags :=  $(shell xml2-config --cflags)
sqllibs := $(shell mysql_config --libs)
sqlcflags := $(shell mysql_config --cflags) -DHAVE_SQL
midaslibs := -L$(MIDASSYS)/lib -lmidas
midascflags := -I$(MIDASSYS)/include -DHAVE_MIDAS
clibs :=-lpthread -lHtml $(SYSLIBS)
clibs += -lutil

Libraries := $(libpaths) $(rootlibs) $(rootglibs) $(rootthreadlibs) $(xmllibs) $(clibs) $(sqllibs) $(midaslibs)
Flags := $(lpuserflags) $(rootcflags) $(xmlcflags) $(sqlcflags) $(midascflags)
Includes := -I$(ROMESYS)/include/ -I. -Iinclude/ -Iinclude/tasks/ -Iinclude/framework/
  44   27 Jan 2005 Matthias SchneebeliSuggestionmessaging system
> About warnings,errors and informations output in online mode.
> 
> Probably we lauch ROME from web interface of MIDAS. And we don't see console of ROME.
> But we need to hear what ROME is saying.
> 
> Normally midas analyzer and other applications use cm_msg function. This function shows messages 
> proper place like web interface or ODBEdit windows and so on.
> 
> I do not have much knowledge about it. Stefan may know better way.

I implemented the cm_msg calls.
ELOG V3.1.4-2e1708b5