XML file structure Why and How XML data

  • Slides: 9
Download presentation
XML file structure

XML file structure

Why and How XML data format? XML is a language generally used over internet.

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

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 2 bars 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: Bar 1 and Bar 2 Detectors: Right side: R 1 and R 2 Left side: L 1 and L 2 With 1 and 2 and left-right arbitrary chosen (for the moment)

N 42(2006) XML Structure XML is language with a hierarchical structure used to store&list

N 42(2006) XML Structure XML is language with a hierarchical structure used to store&list data. The following scheme is the specific structure of the N 42 (2006) format In our case (RPM) the spectrum and the Nuclide. Analsysis element is not necessary. (They were developed for energy spectra) I started to use to N 42 (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 Result Time, Names and Values are random number…. Browser display: EXAMPLE HEADER

Header Example Result Time, Names and Values are random number…. Browser display: EXAMPLE HEADER Genova RPM INFN ed Ansaldo Prototype 1 List Mode User 2004 -11 -03 T 14: 36: 04. 3 -05: 00 R 1 100. 5 150. 5 R 2 100. 5 150. 5 L 1 100. 5 150. 5 L 2 100. 5 150. 5 Real meaning: COMMENT (TITLE OF THE 1° PART) PLACE EXPERIMENT MANIFACTURERS MODEL MEASUREMENT USER DATE BACKGROUND MEASUREMENT DETECTOR BACKGROUND COUNTS BETWEEN 100 ke. V AND 200 ke. V BACKGROUND COUNTS BETWEEN 200 ke. V AND 1000 ke. V and so on for R 2, L 1 and L 2 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 Displayed: R 1 100. 5 150. 5 Translation: DETECTOR BACKGROUND COUNTS BETWEEN 100

Zoom Displayed: R 1 100. 5 150. 5 Translation: DETECTOR BACKGROUND COUNTS BETWEEN 100 ke. V AND 200 ke. V BACKGROUND COUNTS BETWEEN 200 ke. V AND 1000 ke. V Code: <Detector. Measurement Detector. Type="Arm 1" Detector="R 1"> R 1 <Gross. Count. Measurement Window. Start="100" Window. End="200"> <!-- They are in ke. V --> <Background. Counts>100. 5</Background. Counts> </Gross. Count. Measurement> <Gross. Count. Measurement Window. Start="200” Window. End="1000"> <Background. Counts>150. 5</Background. Counts> </Gross. Count. Measurement> </Detector. Measurement> => 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

Final draft The final printed draft of the XML file is: EXAMPLE HEADER Genova

Final draft The final printed draft of the XML file is: EXAMPLE HEADER Genova RPM INFN ed Ansaldo Prototype 1 List Mode User 2004 -1103 T 14: 36: 04. 3 -05: 00 PT 1013. 4 S R 1 100. 5 150. 5 R 2 100. 5 150. 5 L 1 100. 5 150. 5 L 2 100. 5 150. 5 END of File Information of the alarm settings Count for Arm 1 -Bar 1: TOT Gamma Neutrons 20 16 4 Total Rates for Arm 1 -Bar 1: Gamma Neutrons 4 2 2004 -11 -03 T 14: 36: 04. 305: 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 N 42(2011) scheme 3) With Gabriele and Raffaella we were talking about which data we would like to use and how to organize them in the ASCII and XML file 4) Start to write a code able to generate, starting from the ASCII data file, the XML one

Possible XML File structure Fisrt Idea Implemented Comments Place & Date Missing Date to

Possible XML File structure Fisrt Idea Implemented Comments Place & 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 N 42 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 Header Central part Data Missing We discussed how to do it, but not implemented Measurement time range Missing To be inserted in the central part (following the N 42 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 End of file

Other info to consider… Header Already implemented • Detector: RPM • Measurement: Measure, Calibration,

Other info to consider… Header Already implemented • Detector: RPM • Measurement: Measure, Calibration, Test, Other • User: User, Super. User 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