Presentation on theme: "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."— Presentation 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 Bar2 Detectors: Right side: R1 and R2 Left side: L1 and L2 With 1 and 2 and left-right arbitrary chosen (for the moment)
N42(2006) XML Structure XML 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 Result Time, Names and Values are random number…. Browser display: EXAMPLE HEADER Genova RPM INFN ed Ansaldo Prototype 1 List Mode User T14:36: :00 R R L L 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: R Translation: DETECTOR BACKGROUND COUNTS BETWEEN 100keV AND 200keV BACKGROUND COUNTS BETWEEN 200keV AND 1000keV Code: R1 => 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 T14:36: :00 PT1013.4S R R L L END of File Information of the alarm settings Count for Arm1-Bar1: TOT Gamma Neutrons Total Rates for Arm1-Bar1: Gamma Neutrons T14:36: :00 Total counts: TOT Gamma Neutrons 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) scheme 3)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 file 4)Start to write a code able to generate, starting from the ASCII data file, the XML one Final draft
Possible XML File structure Fisrt IdeaImplementedComments Header Place & DateDate MissingDate to be inserted in the central part Measurement TypeDoneTypes: Test, Measurement, Background Users: User & Superuser Environmental variablesMissingThere are no specific and predefined N42 elements to use (except use a note) N and gamma energy rangeMissingProperty of the RPM? If yes it is simple to implement Background levelsDone Central part DataMissingWe discussed how to do it, but not implemented End of file Measurement time rangeMissingTo be inserted in the central part (following the N42 element) N and gamma countsDone N and gamma ratesDoneThe total one, rates as a function of time to be inserted in the central part. Alarm settingsDoneWritten as a comment AlarmsMissingTo be inserted in the central part SummaryDoneSummary 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…