ID |
Date |
Author |
Topic |
Subject |
21
|
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. |
22
|
02 Dec 2004 |
Ryu Sawada | Suggestion | Midas 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. |
23
|
03 Dec 2004 |
Ryu Sawada | Bug 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;
} |
24
|
06 Dec 2004 |
Ryu Sawada | Info | Changeable folder as branch a tree |
I tried to make changeable folder a branch of tree.
I could process data. Rome succeeded to write the tree.
But when I tried to draw a leaf of the branch, root complains that the class name is invalid. |
26
|
06 Dec 2004 |
Ryu Sawada | Bug Report | ReadConfiguration |
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> |
29
|
01 Jan 2005 |
Ryu Sawada | Bug Report | Multiple 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; |
31
|
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). |
32
|
09 Jan 2005 |
Ryu Sawada | Bug Report | long 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;
} |
36
|
12 Jan 2005 |
Ryu Sawada | Bug Report | invalid 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 |
37
|
16 Jan 2005 |
Ryu Sawada | Bug Report | user input |
After change of ROMEEventLoop.cpp 1.39, Program steerings don't work on Linux. |
39
|
19 Jan 2005 |
Ryu Sawada | Suggestion | headers 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 Sawada | Suggestion | messaging 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 Sawada | Suggestion | headers 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/ |
42
|
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 |
47
|
05 Feb 2005 |
Ryu Sawada | Bug Report | small 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. |
48
|
28 Feb 2005 |
Ryu Sawada | Info | Run number in online mode |
We usually use ROME framework without specifying run number in romeConfig.xml and command line
in online mode.
Then it warns that "Error in <TArrayI::At>: index 0 out of bounds" when gROME-
>GetRunNumberStringAt(runNumberString,0) is called in ROMEEventLoop::Initialize. |
49
|
06 Mar 2005 |
Ryu Sawada | Suggestion | Cint mode on online |
We sometimes want to use trees in ROME.
One way is to read it by TSocket connection. But treees are larger than histograms in general, and it
takes time to download.
And I need to make shared library when I changed the structure of folders.
So, I want to propose is to prepare Cint mode with continueing analysis in background.
Currently, when user press "i", ROME stops analysis and goes into cint mode. This is good for offline
mode, but this is not good for online mode. So I propose that when user press "I", ROME goes cint
mode, and continue analysis in background.
Then we can see Trees at run time.
In addition, If you are going to implement this feature, please prepare short way to call trees in cint mode.
If I understand correctly, the way to call a tree is like,
gAnalyzer->GetTreeObjectAt(0)->GetTree()->Draw("");
but it is too long to use in interactively and we need to remeber the number of trees.
gAnalyzer->GetTree("trigger")->Draw(); is better. |
50
|
09 Mar 2005 |
Ryu Sawada | Bug Report | Unanalyzed events |
In online mode, ROME often stops before finishing to analyze all events of runs.
When it happens, gAnalyzer->GetCurrentEventNumber() starts not from 1 but from analyzed event
number at previous run. And unanalyzed events at the previous run are mixed with the new run.
In mana.c of MIDAS, I found a part to wait until all events in buffers are analyzed when analyzer gets
TR_STOP signal, while ROME does not have.
I personaly don't need that all events are analyzed, but it is really problem that data of two runs are
mixed.
One way is to take similar way as midas analyzer, and the another way is just discard unanalyzed
events. |
51
|
09 Mar 2005 |
Ryu Sawada | Bug Report | default 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. |
52
|
10 Mar 2005 |
Ryu Sawada | Bug Report | ResetFolders |
In ROMEEventLoop.cpp::ReadEvent
this->ResetFolders is called before fActiveDAQ->ReadEvent, so data in event headers are not updated
properly. |