xml file structure. why and how xml data format? xml is a language generally used over internet. in...
TRANSCRIPT
XML file structure
Why and How XML data format?
XML is a language generally used over internet. In our case is one of the requirements of the American National Standard Data Format Standard for Radiation Detectors Used for Homeland Security and the JRC test used to represent our data
We decided to proceed having 2 different data formats. The first is the ASCII file used for the analysis and the second is the XML, which is an sub-ensemble of the first one. The procedure adopted is: decide the XML structure followed by the C++ macro which generates the XML file starting
from the ASCII file.
Possible XML File structure
Header
Place & Date
Measurement Type
Environmental variables
N and gamma energy range
Background levels
Central part
Data
End of file
Measurement time range
N and gamma counts
N and gamma rates
Alarm settings
Alarms
Summary
First idea of a possible data structure of the XML data file.
XML File: SUMMARY of the measurement results and NOT the data file used for the
analysis. I considered the detector structure for the file example:Portal with 2 arms of 2bars each and with each bar made by 4 detectors.Arms: Arm 1 and Arm 2 (We have now only 1 side of the “portal”)Bars: Bar1 and Bar2Detectors:Right side: R1 and R2Left side: L1 and L2With 1 and 2 and left-right arbitrary chosen (for the moment)
N42(2006) XML StructureXML is language with a hierarchical structure used to store&list data.
The following scheme is the specific structure of the N42 (2006) format
In our case (RPM) the spectrum and the NuclideAnalsysis element is not necessary. (They were developed for energy spectra)
I started to use to N42 (2006) format, but I will switch to the newest one (2011). The main differences are more specific number and higher number of elements to use
Header Example ResultTime, Names and Values are random number….
Browser display:
EXAMPLE HEADER Genova RPM INFN ed Ansaldo Prototype 1 List Mode User 2004-11-03T14:36:04.3-05:00 R1 100.5 150.5 R2 100.5 150.5 L1 100.5 150.5 L2 100.5 150.5
Real meaning:COMMENT COMMENT (TITLE OF THE 1° PART) PLACE EXPERIMENT MANIFACTURERS MODEL MEASUREMENT USER DATE BACKGROUND MEASUREMENT DETECTOR BACKGROUND COUNTS BETWEEN 100keV AND 200keV BACKGROUND COUNTS BETWEEN 200keV AND 1000keV and so on for R2, L1 and L2
All the info are in the code, but it seems that a normal browser is not enough to show the hierarchical structure of the code.
Displayed: R1 100.5 150.5 Translation: DETECTOR BACKGROUND COUNTS BETWEEN 100keV AND 200keV BACKGROUND COUNTS BETWEEN 200keV AND 1000keV Code: <DetectorMeasurement DetectorType="Arm 1" Detector="R1"> R1 <GrossCountMeasurement WindowStart="100" WindowEnd="200"> <!-- They are in keV --> <BackgroundCounts>100.5</BackgroundCounts> </GrossCountMeasurement> <GrossCountMeasurement WindowStart="200” WindowEnd="1000"> <BackgroundCounts>150.5</BackgroundCounts> </GrossCountMeasurement></DetectorMeasurement>
=> All the info are in the code, but it seems that a normal browser is not enough to show the hierarchical structure of the code
Zoom
The final printed draft of the XML file is:
EXAMPLE HEADER Genova RPM INFN ed Ansaldo Prototype 1 List Mode User 2004-11-03T14:36:04.3-05:00 PT1013.4S R1 100.5 150.5 R2 100.5 150.5 L1 100.5 150.5 L2 100.5 150.5 END of File Information of the alarm settings Count for Arm1-Bar1: TOT Gamma Neutrons 20 16 4 Total Rates for Arm1-Bar1: Gamma Neutrons 4 2 2004-11-03T14:36:04.3-05:00 Total counts: TOT Gamma Neutrons 30 16 4 Gamma alarm and Neutron alarm 1 0 Total Rates: Gamma Neutrons 4 2 Possible State: Probable NORM. Alarm active for gamma radiations: YES. Alarm active for neutron radiation: NO. Error messages: NO. Detector status: ACTIVE.
I am thinking to go further on these sides:1) I am thinking that it is mandatory 1 reader able to show the
hierarchical structure of the file, better if free Suggestions?2) Switch to the better N42(2011) scheme3) With Gabriele and Raffaella we were were talking about which data we
would like to use and how to organize them in the ASCII and XML file4) Start to write a code able to generate, starting from the ASCII data file,
the XML one
Final draft
Possible XML File structure Fisrt Idea Implemented Comments
Header
Place & Date Date Missing Date to be inserted in the central part
Measurement Type Done Types: Test, Measurement, Background Users: User & Superuser
Environmental variables Missing There are no specific and predefined N42 elements to use (except use a note)
N and gamma energy range Missing Property of the RPM? If yes it is simple to implement
Background levels Done
Central part
Data Missing We discussed how to do it, but not implemented
End of file
Measurement time range Missing To be inserted in the central part (following the N42 element)
N and gamma counts Done
N and gamma rates Done The total one, rates as a function of time to be inserted in the central part.
Alarm settings Done Written as a comment
Alarms Missing To be inserted in the central part
Summary Done Summary of the number of alarm, detector state and of the data
Header Already implemented• Detector: RPM• Measurement: Measure, Calibration, Test, Other• User:User, SuperUser
Other possible ideas…• UUID (Universally unique identifier)• N. of samples and precision used for the signal integral• Trigger parameters set for the measurement
Central part
End of File
Other info to consider…