Back Midas Rome Roody Rootana
  Rome Analyzer Framework, Page 2 of 11  Not logged in ELOG logo
New entries since:Wed Dec 31 16:00:00 1969
ID Date Author Topic Subjectdown
  47   05 Feb 2005 Ryu SawadaBug Reportsmall problem of XML definition file
About <EventHeader> in xml definition file.

In description page in ROME homepage, It is wirtten that <EventId> specifies the field.
But It seems that 'd' shoud be capital.
  56   21 Mar 2005 Matthias SchneebeliBug Reportsmall problem of XML definition file
> About <EventHeader> in xml definition file.
> 
> In description page in ROME homepage, It is wirtten that <EventId> specifies the field.
> But It seems that 'd' shoud be capital.

done
  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
  64   26 Mar 2005 Ryu SawadaBug Reportproblem after changing xml library
After changing xml library from libxml2 to mxml, examples (sample and MEG) can not be compiled.

My project does not work too. What is necessary to make it work?
  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.
  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.
  45   27 Jan 2005 Stefan RittSuggestionmessaging system
> I implemented the cm_msg calls.

You should implement a central "message dispatcher". So all errors etc. should go to someting linke
rome_msg(). If compiled with midas online support, rome_msg() should call cm_msg(). If rome is compiled
without midas libraries, a printf() there would be enough. If someone uses rome in a different
environment, only can function needs to be changed to reroute all messages to somewhere else.
  46   28 Jan 2005 Matthias SchneebeliSuggestionmessaging system
> > I implemented the cm_msg calls.
> 
> You should implement a central "message dispatcher". So all errors etc. should go to someting linke
> rome_msg(). If compiled with midas online support, rome_msg() should call cm_msg(). If rome is compiled
> without midas libraries, a printf() there would be enough. If someone uses rome in a different
> environment, only can function needs to be changed to reroute all messages to somewhere else.

Of course, that's the way I implemented that.
  53   11 Mar 2005 Ryu SawadaInfomake build
I added new make target "build" in ARGUS. It may be useful also for ROME users.

in WriteMakefile(char* xmlFile)
.
.
.
  int pdnameend = 0;
   int pbnamestart = 0;
   ROMEString xmlfile = xmlFile;
   while((pdnameend = xmlfile.Index("/",1,pbnamestart,TString::kExact))!=-1)
      pbnamestart = pdnameend+1;
   ROMEString xmlbasename = xmlfile(pbnamestart,xmlfile.Length());
   buffer.AppendFormatted("build::\n");
   buffer.AppendFormatted("     $(ROMESYS)/bin/romebuilder.exe -i %s -o .",xmlbasename.Data());
   if (makeOutput)
      buffer.AppendFormatted(" -v");
   if(noLink)
      buffer.AppendFormatted(" -nl");
   if(midas)
      buffer.AppendFormatted(" -midas");
   if(!sql)
      buffer.AppendFormatted(" -nosql");
   buffer.AppendFormatted("\n");
.
.
.
  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.
  36   12 Jan 2005 Ryu SawadaBug Reportinvalid header
When I built my application with romebuilder.
It complained like,
Error : File './/src/tasks/LPTXEGainCalib.cpp' has an invalid header !!!
Error : File './/src/tasks/LPTXETimeCalib.cpp' has an invalid header !!!
Error : File './/src/tasks/LPTUTTask.cpp' has an invalid header !!!

Headers looks like,
//// Author: Ryu Sawada
/////////////^@//////////////////////////////////////////////////////////////////
//                                                                            //

Thre first time to build Just after I removed ^@, builder stopped warning. 
But after that  ^@ appeared again and builder starts warning.

I have several task files, but builder adds ^@ always these three files.

My source files are here.
cvs -d :ext:pc4466.psi.ch:/usr/local/cvsroot co lpframework
  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.
  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/
  119   08 Mar 2006 Giovanni SignorelliBug ReportgAnalyzer->GetEventID() fails if EventID>127-48
This bug happened when reading a .MID file containing events with event_id=99.
The ReadMidas task is not able to read the event because it is not recognized.
This event_id, when recovered with GetEventID() method was transformed to a negative value. This probably happened because there is a +48 addition at some place (in SetEventID) and a -48 on GetEventID. This casuses the unsigned char to be recovered as a signed number (lots of FFFF in front of it).

Furthermore it is not writtenanywhere that EventID<0xFF.

I could solve the problem
1) by setting EventID = 16, for instance
2) by modifying ROMEAnalyzer.h as follows
// Event ID
Int_t GetEventID() { return (fEventID-48)&0xFF; }
char GetEventIDChar() { return (fEventID)&0xFF; }
  120   02 Apr 2006 Matthias SchneebeliBug ReportgAnalyzer->GetEventID() fails if EventID>127-48

Giovanni Signorelli wrote:
This bug happened when reading a .MID file containing events with event_id=99.
The ReadMidas task is not able to read the event because it is not recognized.
This event_id, when recovered with GetEventID() method was transformed to a negative value. This probably happened because there is a +48 addition at some place (in SetEventID) and a -48 on GetEventID. This casuses the unsigned char to be recovered as a signed number (lots of FFFF in front of it).

Furthermore it is not writtenanywhere that EventID<0xFF.

I could solve the problem
1) by setting EventID = 16, for instance
2) by modifying ROMEAnalyzer.h as follows
// Event ID
Int_t GetEventID() { return (fEventID-48)&0xFF; }
char GetEventIDChar() { return (fEventID)&0xFF; }




This should be fixed now.
  51   09 Mar 2005 Ryu SawadaBug Reportdefault values in romeConfig.xml
Recently, default values of steering parameters in romeConfig.xml are always 0. They are not as same 
as values in SPFieldInitialization of definition XML file.
  86   11 Jun 2005 Ryu SawadaSuggestionclass members in TTree
I think that fUniqueID and fBits in TObject is not useful to store in TTree.
I found in ROOT users guide that we can disable that with
MyClass::Class()->IgnoreTObjectStreamer(); 
.

If you also think these are useless information, please implement it in ROME.



second topic.
This is just a matter of favor.
We sometimes use TTree interactively. At that time, I feel fRunNumber, fEventNumber, fTimeStamp, 
fSequentialNumber are long to type.
I prefer shorter without upper case letter.
If many people agree it, I would like to ask to change them run,event,timestamp,number like MIDAS analyzer.
ELOG V3.1.4-2e1708b5