Message: Re: How can we export data in .aida file into a spreadsheet? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: How can we export data in .aida file into a spreadsheet? 

Forum: Analysis
Re: None How can we export data in .aida file into a spreadsheet? (Fada Guan)
Date: 11 Apr, 2011
From: Guy Barrand <Guy Barrand>

   Hi Fada

  By "data stored in a .aida file", I assume that you mean a tuple, right ?

  If so, we could imagine to provide a "csv like" output file (known by Excel) only in the case
 of a "flat booking", that is to say for a tuple with a list of columns not involving
 sub tuples (only basic types as int,double, float). In OpenScientist I handle
 the "ascii" format for this kind of tuple. If you use OSC, and have only one "flat booking"
 tuple attached to an AIDA::ITree (then attached to a file), you  can try
 to use the "ascii" (or "hippodraw") file format string. In case of "ascii", in each
 row, data are "space separated". In case of "hippodraw" data are "tab separated"
 (then very close to a .csv format understood by Excel). (In both cases, I have a two
 lines header to save the Tuple title and the column string booking. For Excel, you may
 have to remove these two lines by hand).

  Else what you can do also is to write an AIDA program that read your today .aida file,
 find the AIDA::ITuple and loop on the AIDA::ITuple rows and row items and then write
 a new file at the .csv format by using the standard C / C++ file and stream tools. It should
 not resist too much. (Huum, I think that we can even write a very general / generic program
 "over the AIDA API and C/C++ standard libs" that can do that... (That would then work with
 all AIDA implementations). We have the AIDA::ITuple::columnType, that would permit
 to handle all columns data types in a generic way. Could be a good exercise... Moreover
 you would have the full control of the kind of separator to use, and on the choice to include
 or not a header).

   Cheers. Guy

 Add Message Add Message
to: "Re: How can we export data in .aida file into a spreadsheet?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]