18 Mar 2005, Ryu Sawada, Info, xmlwriter.h
|
I realized that some unix system distribution does not provide xmlwriter.h in standard libxml2-devel
package.
For instance, scientific linux (also PSI linux) does not.
I installed it from source.
Macintosh has xmlreader.h by default, and does not xmlwriter.h.
I installed it by using FINK.
(FINK is a unix package porter like CYGWIN.)
Someone may ask about it someday.
A problem is that compiler will find xmlwriter.h even if the system does not have it, because ROME has.
This may make it hard that users find out the problem.
How to install libxml2.
---- UNIX OS ----
In most cases, to use standard way of the system is good. But some system does not provide xmlwriter.h. In this case you may need to
install it from source.
1. download source from http://xmlsoft.org/.
2. decompress it and go to created directory.
3. % ./configure [options as you like];
4. % make;
5. become super user, if you are going to install it in system.
6. % make install
---- MacOSX ----
By default, Macintosh does not have xmlwriter.h. You can follow the same way as other UNIX OS. And other way is to use FINK. (I hope
many users already installed it.)
1. install FINK (http://fink.sourceforge.net)
2. become super user.
3. apt-get update;
4. apt-get install libxml2 libxml2-shlibs libxml2-bin
If you are goint to use also MySQL.
5. apt-get install mysql12-dev mysql12-shlibs
(* package name can be changed in future, you may find it with "apt-cache search libxml2" or "apt-cache search mysql") |
23 Mar 2005, Matthias Schneebeli, Info, xmlwriter.h
|
> I realized that some unix system distribution does not provide xmlwriter.h in standard libxml2-devel
> package.
>
> For instance, scientific linux (also PSI linux) does not.
> I installed it from source.
>
> Macintosh has xmlreader.h by default, and does not xmlwriter.h.
> I installed it by using FINK.
> (FINK is a unix package porter like CYGWIN.)
>
> Someone may ask about it someday.
> A problem is that compiler will find xmlwriter.h even if the system does not have it, because ROME has.
> This may make it hard that users find out the problem.
>
>
> How to install libxml2.
> ---- UNIX OS ----
> In most cases, to use standard way of the system is good. But some system does not provide xmlwriter.h. In this case you may need to
> install it from source.
> 1. download source from <a href="http://xmlsoft.org/">http://xmlsoft.org/</a>.
> 2. decompress it and go to created directory.
> 3. % ./configure [options as you like];
> 4. % make;
> 5. become super user, if you are going to install it in system.
> 6. % make install
>
> ---- MacOSX ----
> By default, Macintosh does not have xmlwriter.h. You can follow the same way as other UNIX OS. And other way is to use FINK. (I hope
> many users already installed it.)
> 1. install FINK (<a href="http://fink.sourceforge.net">http://fink.sourceforge.net</a>)
> 2. become super user.
> 3. apt-get update;
> 4. apt-get install libxml2 libxml2-shlibs libxml2-bin
> If you are goint to use also MySQL.
> 5. apt-get install mysql12-dev mysql12-shlibs
> (* package name can be changed in future, you may find it with "apt-cache search libxml2" or "apt-cache search mysql")
I have replaced libxml with mxml (written by Stefan) which is now included in the rome distribution.
So there's no install problem on linux anymore. |
05 Oct 2004, Jan Wouters, Suggestion, xml 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. |
08 Oct 2004, Matthias Schneebeli, Suggestion, xml 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. |
08 Oct 2004, Matthias Schneebeli, Suggestion, xml 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. |
10 Dec 2015, SUDESHNA GANGULY, Suggestion, writing 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! |
11 Dec 2015, Ryu Sawada, Suggestion, writing data to mySQL via ROME
|
Dear Sudeshna
Yes, you can write,
There is an example project for showing the access to databases.
$ROMESYS/examples/dbexample/
For writing, an example is
$ROMESYS/examples/dbexample/src/tasks/RDBTWriteFolders.cpp
If you prefer to use normal SQL queries rather than using the ROME DB path. An example is,
$ROMESYS/examples/dbexample/src/tasks/RDBTMakeQuery.cpp
By using SQL query, you can do anything about DB.
More information is in wiki,
https://bitbucket.org/muegamma/rome3/wiki/Database
Best regards,
Ryu
> I need some suggestions on how to write some data to a mySQL database via ROME.
>
> I am calculating a quantity CTag and making a TGraph of CTag/event in ROME. Now
> if I want to write it to a mySQL what shall I do?
>
> From the manual I found that we can read from a database DAQ (SQL) system. That
> it reads the main input data from a database. And I looked into the example
> under'rome/examples/stepbystepdbdaq'.
>
> But is there any way I can write the calculated CTags and Event Numbers to a SQL
> database?
>
> Thanks for any suggestion! |
16 Jan 2005, Ryu Sawada, Bug Report, user input
|
After change of ROMEEventLoop.cpp 1.39, Program steerings don't work on Linux. |
17 Jan 2005, Matthias Schneebeli, Bug Report, user input
|
> After change of ROMEEventLoop.cpp 1.39, Program steerings don't work on Linux.
Sorry. |
06 Jan 2005, Ryu Sawada, Suggestion, user 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). |
11 Jan 2005, Matthias Schneebeli, Suggestion, user 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. |
03 Apr 2005, Ryu Sawada, Suggestion, user defined command line options
|
This is not strong request, just a proposal because the same thing can be done by configuration file.
It may be useful if users can have his command line options.
For instance.
<CommandOptions>
<CommandOption>
<OptionFlag>m<OptionFlag>
<OptionName>isMC<OptionName>
<OptionType>Bool_t<OptionType>
<OptionInitialization>false<OptionInitialization>
</CommandOption>
<CommandOption>
<OptionFlag>t<OptionFlag>
<OptionName>TriggerType<OptionName>
<OptionType>Int_t<OptionType>
<OptionInitialization>0<OptionInitialization>
</COmmandOption>
</CommandOptions>
Then user can change the variable with command line option like
./megframework -m -t 2;
Then builder creates new method.
(Bool_t) MEGAnalyzer::GetisMC()
(Int_t) MEGAnalyzer::GetTriggerType() |
22 Apr 2005, Ryu Sawada, Suggestion, user defined command line options
|
> Then user can change the variable with command line option like
> ./megframework -m -t 2;
>
> Then builder creates new method.
> (Bool_t) MEGAnalyzer::GetisMC()
> (Int_t) MEGAnalyzer::GetTriggerType()
I realized better way. In this way users can add or remove command line options without changing their
task files. And it is not necessary to add new object in ROME.
What I propose is to make it in steering parameter. That is <SPCOmmandOption> in steering parameter's
properties.
<SteeringParameterField>
<SPFieldName>isMC</SPFieldName>
<SPFieldType>Bool_t</SPFieldType>
<SPCommandOption>m</SPCommandOption>
</SteeringParameterField>
<SteeringParameterField>
<SPFieldName>TriggerType</SPFieldName>
<SPFieldType>Int_t</SPFieldType>
<SPCommandOption>t</SPCommandOption>
</SteeringParameterField>
Then user can change the variable with command line option like
./megframework -m -t 2;
when -m is typed, isMC becomes true.
Trigger type will be 2.
They can specify the value both with config file and command line option just same as run numbers.
Values in config file will be overwritten by command line option.
|
22 Apr 2005, Ryu Sawada, Suggestion, user defined command line options
|
>
> > Then user can change the variable with command line option like
> > ./megframework -m -t 2;
> >
> > Then builder creates new method.
> > (Bool_t) MEGAnalyzer::GetisMC()
> > (Int_t) MEGAnalyzer::GetTriggerType()
>
> I realized better way. In this way users can add or remove command line options without changing their
> task files. And it is not necessary to add new object in ROME.
>
> What I propose is to make it in steering parameter. That is <SPCOmmandOption> in steering parameter's
> properties.
>
> <SteeringParameterField>
> <SPFieldName>isMC</SPFieldName>
> <SPFieldType>Bool_t</SPFieldType>
> <SPCommandOption>m</SPCommandOption>
> </SteeringParameterField>
> <SteeringParameterField>
> <SPFieldName>TriggerType</SPFieldName>
> <SPFieldType>Int_t</SPFieldType>
> <SPCommandOption>t</SPCommandOption>
> </SteeringParameterField>
>
> Then user can change the variable with command line option like
> ./megframework -m -t 2;
> when -m is typed, isMC becomes true.
> Trigger type will be 2.
>
> They can specify the value both with config file and command line option just same as run numbers.
> Values in config file will be overwritten by command line option.
>
>
done. |
28 Jun 2005, Ryu Sawada, Bug Report, support folder object in folder.
|
When one makes a support folder type field in folder, pointer to the support folder or pointer of
TClonesArray is in the folder.
But There is no "new" statement to create the object. |
27 Nov 2004, Ryu Sawada, Bug Report, ss_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. |
06 Dec 2004, Matthias Schneebeli, Bug Report, ss_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 |
21 Mar 2016, Farrukh Azfar, Info, speeding up ROME
|
|
24 Jan 2005, Ryu Sawada, Info, small problems
|
These are not critical, but someone may complain some day.
1. ROMEBuilder.cpp:2315
I wonder if maxNumberOfTasks should be maxNumberOfSteering.
// count steering parameters
2316 numOfSteering[iTask]++;
2317 currentNumberOfSteerings = numOfSteering[iTask];
2318 if (numOfSteering[iTask]>=maxNumberOfTasks+1) {
2319 cout << "Maximal number of steering parameters reached : " << (max 2319
NumberOfTasks+1) << " !" << endl;
2320 cout << "Terminating program." << endl;
2321 return false;
2322 }
2. ROMEBuilder.cpp:2437
I wonder if maxNumberOfSteering should be maxNumberOfSteeringField.
if (numOfSteerFields[iTask][actualSteerIndex]>=maxNumberOfSteer
2437 ing) {
2438 cout << "Maximal number of steering parameter fields in task 2438 '" <<
taskName[iTask].Data() << "' reached : " << maxNumberOfSteering < 2438 < " !" << endl;
2439 cout << "Terminating program." << endl;
2440 return false;
2441 }
3. ROMEBuilder.cpp:6327
I wonder if ROOTSYS should be ROOTSYS/include.
6327 #if defined( _MSC_VER )
6328 buffer.AppendFormatted("-I%%ROMESYS%%/include ");
6329 buffer.AppendFormatted("-I%%ROOTSYS%% ");
6330 #endif
6331 #if defined ( __linux__ ) || defined ( __APPLE__ )
6332 buffer.AppendFormatted("-I$ROMESYS/include ");
6333 buffer.AppendFormatted("-I$ROOTSYS ");
6334 #endif
4. ROMEBuilder.cpp:6806
in ROMEBuilder::isNumber, there are some missing number types such as.
Double32_t,Long64_t,ULong64_t
5. ROMEBuilder.cpp:6821
in ROMEBuilder::isFloatingType, there are some missing floating types such as.
Double32_t |
25 Jan 2005, Matthias Schneebeli, Info, small problems
|
> These are not critical, but someone may complain some day.
>
> 1. ROMEBuilder.cpp:2315
> I wonder if maxNumberOfTasks should be maxNumberOfSteering.
> // count steering parameters
> 2316 numOfSteering[iTask]++;
> 2317 currentNumberOfSteerings = numOfSteering[iTask];
> 2318 if (numOfSteering[iTask]>=maxNumberOfTasks+1) {
> 2319 cout << "Maximal number of steering parameters reached : " << (max 2319
> NumberOfTasks+1) << " !" << endl;
> 2320 cout << "Terminating program." << endl;
> 2321 return false;
> 2322 }
>
> 2. ROMEBuilder.cpp:2437
> I wonder if maxNumberOfSteering should be maxNumberOfSteeringField.
> if (numOfSteerFields[iTask][actualSteerIndex]>=maxNumberOfSteer
> 2437 ing) {
> 2438 cout << "Maximal number of steering parameter fields in task 2438 '" <<
> taskName[iTask].Data() << "' reached : " << maxNumberOfSteering < 2438 < " !" << endl;
> 2439 cout << "Terminating program." << endl;
> 2440 return false;
> 2441 }
>
>
> 3. ROMEBuilder.cpp:6327
> I wonder if ROOTSYS should be ROOTSYS/include.
> 6327 #if defined( _MSC_VER )
> 6328 buffer.AppendFormatted("-I%%ROMESYS%%/include ");
> 6329 buffer.AppendFormatted("-I%%ROOTSYS%% ");
> 6330 #endif
> 6331 #if defined ( __linux__ ) || defined ( __APPLE__ )
> 6332 buffer.AppendFormatted("-I$ROMESYS/include ");
> 6333 buffer.AppendFormatted("-I$ROOTSYS ");
> 6334 #endif
>
> 4. ROMEBuilder.cpp:6806
> in ROMEBuilder::isNumber, there are some missing number types such as.
> Double32_t,Long64_t,ULong64_t
>
> 5. ROMEBuilder.cpp:6821
> in ROMEBuilder::isFloatingType, there are some missing floating types such as.
> Double32_t
Thanks |