1 |
<?xml version="1.0" encoding="UTF-8"?> <!-- Prologo XML --> |
2 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- Dichiarazione del documento XSLT --> |
3 |
<!-- <xsl:stylesheet version="1.0" |
4 |
xmlns:xsl="http://www.w3.org/TR/WD-xsl"> --> |
5 |
|
6 |
<!-- |
7 |
===================================================================================== |
8 |
Stylesheet: PhysEndRunTemplate.xsl |
9 |
Version: 1.0 (2005-03-14) |
10 |
Author: Maurizio Nagni |
11 |
Descr.: Format the output of the PhysEndRunToXml.c script to generate a human |
12 |
readble verion of the PhysEndRun packet |
13 |
===================================================================================== |
14 |
--> |
15 |
|
16 |
<!--Contains some utility to converts dec/hex/bin numbers--> |
17 |
<xsl:include href="numberutils_lib.xsl"/> |
18 |
|
19 |
<!--Contains all the customer specific parameters--> |
20 |
<!--<xsl:include href="Configure.xsl"/>--> |
21 |
|
22 |
<!-- Define which a key called "varDes" |
23 |
which will search inside the node "var" of the reference |
24 |
ArrDumpInfo.xml (or whatever file instead of the is used) |
25 |
all values values of the node "idx" matching the valued passed when |
26 |
the key "fileName" is called --> |
27 |
<!-- No xml file is defined here because the xsl:key is absolutely generic --> |
28 |
<!-- <xsl:key name="arrDes" match="arr" use="idx"/> |
29 |
|
30 |
<xsl:template match="/" name="ArrDumpReference"> |
31 |
<xsl:param name="code"/> |
32 |
<xsl:param name="arrval"/> |
33 |
<xsl:for-each select="document('./compilationInfo/PRH_ParamHandler_INFN_auto.arr.xml')"> |
34 |
<xsl:for-each select="key('arrDes', $code)"> |
35 |
<td> <th align="left"><xsl:value-of select="name"/><xsl:text>(</xsl:text><xsl:value-of select="idx"/><xsl:text>)</xsl:text> </th> </td> |
36 |
<td> <th align="left"><xsl:copy-of select="$arrval"/></th> </td> |
37 |
<td> <th align="left"><xsl:value-of select="comment"/></th> </td> |
38 |
</xsl:for-each> |
39 |
</xsl:for-each> |
40 |
</xsl:template> |
41 |
--> |
42 |
<xsl:template match="/" name="PhysEndRunTemplate"> |
43 |
<html> |
44 |
<body STYLE="font-family:Arial, helvetica, sans-serif; font-size:10pt"> |
45 |
<h2>PhysEndRun Event (all values are hex except OBT and PktNumber)</h2> |
46 |
<xsl:for-each select="//PHYSER_EVENT"> |
47 |
<hr size = '1' color = '#ff0000'/> |
48 |
<table border='1' width = '100%' height = '5'> |
49 |
<tr bgcolor="#ff0000" > |
50 |
<th align="left">Packet OBT</th> |
51 |
<th align="left">Packet Num</th> |
52 |
<th width = '100%'></th> |
53 |
</tr> |
54 |
<tr> |
55 |
<td align="center"><xsl:value-of select="PACKET_OBT"/></td> |
56 |
<td align="center"><xsl:value-of select="PACKET_NUM"/></td> |
57 |
<td width = '100%'></td> |
58 |
</tr> |
59 |
</table> |
60 |
<table border="1" width = '100%'> |
61 |
<tr bgcolor="#7777FF"> |
62 |
<th align="left" colspan = '99'>CALO EndRun Section</th> |
63 |
</tr> |
64 |
<xsl:for-each select="CALOENDRUN_RECORDS/CALOENDRUN_RECORD"> |
65 |
<tr bgcolor="#1acd32"> |
66 |
<th align="center">Board Id HK</th> |
67 |
<th align="center">Board Status HK</th> |
68 |
<th align="center">Board Id REG</th> |
69 |
<th align="center">Board Status REG</th> |
70 |
<td rowspan = '2' colspan = '99'> |
71 |
<table border = '1' width = '100%'> |
72 |
<tr> |
73 |
<th align="center">HK0</th> |
74 |
<xsl:for-each select="HK0/HK0_ITEM"> |
75 |
<td bgcolor="#ffffff"> |
76 |
<xsl:call-template name="Dec2Hex"> |
77 |
<xsl:with-param name="value" select="."/> |
78 |
</xsl:call-template> |
79 |
</td> |
80 |
</xsl:for-each> |
81 |
</tr> |
82 |
<tr> |
83 |
<th bgcolor="#1acd32" align="center">HK1</th> |
84 |
<xsl:for-each select="HK1/HK1_ITEM"> |
85 |
<td bgcolor="#ffffff"> |
86 |
<xsl:call-template name="Dec2Hex"> |
87 |
<xsl:with-param name="value" select="."/> |
88 |
</xsl:call-template> |
89 |
</td> |
90 |
</xsl:for-each> |
91 |
</tr> |
92 |
<tr> |
93 |
<th bgcolor="#1acd32" align="center">REG</th> |
94 |
<xsl:for-each select="CALO_REG/CALO_REG_ITEM"> |
95 |
<td bgcolor="#ffffff"> |
96 |
<xsl:call-template name="Dec2Hex"> |
97 |
<xsl:with-param name="value" select="."/> |
98 |
</xsl:call-template> |
99 |
</td> |
100 |
</xsl:for-each> |
101 |
</tr> |
102 |
</table> |
103 |
</td> |
104 |
</tr> |
105 |
<tr> |
106 |
<td> |
107 |
<xsl:call-template name="Dec2Hex"> |
108 |
<xsl:with-param name="value" select="BOARD_ID_HK"/> |
109 |
</xsl:call-template> |
110 |
</td> |
111 |
<td> |
112 |
<xsl:call-template name="Dec2Hex"> |
113 |
<xsl:with-param name="value" select="BOARD_ST_HK"/> |
114 |
</xsl:call-template> |
115 |
</td> |
116 |
<td> |
117 |
<xsl:call-template name="Dec2Hex"> |
118 |
<xsl:with-param name="value" select="BOARD_ID_REG"/> |
119 |
</xsl:call-template> |
120 |
</td> |
121 |
<td> |
122 |
<xsl:call-template name="Dec2Hex"> |
123 |
<xsl:with-param name="value" select="BOARD_ST_REG"/> |
124 |
</xsl:call-template> |
125 |
</td> |
126 |
</tr> |
127 |
</xsl:for-each> |
128 |
<xsl:for-each select="TBENDRUN"> |
129 |
<tr bgcolor="#7777FF"> |
130 |
<th align="left" colspan = '99'>TriggerBoard EndRun Section</th> |
131 |
</tr> |
132 |
<tr bgcolor="#1acd32"> |
133 |
<table border="1" width = '100%'> |
134 |
<tr> |
135 |
<th align="center">Alarm Mask</th> |
136 |
<th align="center">S3 Mask</th> |
137 |
<th align="center">S2 Mask</th> |
138 |
<th align="center">S21 Mask</th> |
139 |
<th align="center">S11 Mask</th> |
140 |
<th align="center">S4 Mask</th> |
141 |
<th align="center">Calo Mask</th> |
142 |
<th align="center">Busy Mask</th> |
143 |
<th align="center">Calib Flag</th> |
144 |
<th align="center">S4 Trig</th> |
145 |
<th align="center">Calo Trig</th> |
146 |
<th align="center">Tof Trig</th> |
147 |
</tr> |
148 |
<tr> |
149 |
<td> |
150 |
<xsl:call-template name="Dec2Hex"> |
151 |
<xsl:with-param name="value" select="ALARM_MASK"/> |
152 |
</xsl:call-template> |
153 |
</td> |
154 |
<td> |
155 |
<xsl:call-template name="Dec2Hex"> |
156 |
<xsl:with-param name="value" select="PMT_MASK_S3"/> |
157 |
</xsl:call-template> |
158 |
</td> |
159 |
<td> |
160 |
<xsl:call-template name="Dec2Hex"> |
161 |
<xsl:with-param name="value" select="PMT_MASK_S2"/> |
162 |
</xsl:call-template> |
163 |
</td> |
164 |
<td> |
165 |
<xsl:call-template name="Dec2Hex"> |
166 |
<xsl:with-param name="value" select="PMT_MASK_S21"/> |
167 |
</xsl:call-template> |
168 |
</td> |
169 |
<td> |
170 |
<xsl:call-template name="Dec2Hex"> |
171 |
<xsl:with-param name="value" select="PMT_MASK_S11"/> |
172 |
</xsl:call-template> |
173 |
</td> |
174 |
<td> |
175 |
<xsl:call-template name="Dec2Hex"> |
176 |
<xsl:with-param name="value" select="S4_MASK"/> |
177 |
</xsl:call-template> |
178 |
</td> |
179 |
<td> |
180 |
<xsl:call-template name="Dec2Hex"> |
181 |
<xsl:with-param name="value" select="CALO_MASK"/> |
182 |
</xsl:call-template> |
183 |
</td> |
184 |
<td> |
185 |
<xsl:call-template name="Dec2Hex"> |
186 |
<xsl:with-param name="value" select="BUSY_MASK"/> |
187 |
</xsl:call-template> |
188 |
</td> |
189 |
<td> |
190 |
<xsl:call-template name="Dec2Hex"> |
191 |
<xsl:with-param name="value" select="CALIB_FLAG"/> |
192 |
</xsl:call-template> |
193 |
</td> |
194 |
<td> |
195 |
<xsl:call-template name="Dec2Hex"> |
196 |
<xsl:with-param name="value" select="S4_TRIG"/> |
197 |
</xsl:call-template> |
198 |
</td> |
199 |
<td> |
200 |
<xsl:call-template name="Dec2Hex"> |
201 |
<xsl:with-param name="value" select="CALO_TRIG"/> |
202 |
</xsl:call-template> |
203 |
</td> |
204 |
<td> |
205 |
<xsl:call-template name="Dec2Hex"> |
206 |
<xsl:with-param name="value" select="TOF_TRIG"/> |
207 |
</xsl:call-template> |
208 |
</td> |
209 |
</tr> |
210 |
</table> |
211 |
</tr> |
212 |
</xsl:for-each> |
213 |
</table> |
214 |
</xsl:for-each> |
215 |
<!-- |
216 |
<td> |
217 |
<xsl:text>0x</xsl:text> |
218 |
<xsl:call-template name="Dec2Hex"> |
219 |
<xsl:with-param name="value" select="INFO1"/> |
220 |
</xsl:call-template> |
221 |
<xsl:value-of select="INFO1"/> |
222 |
</td> |
223 |
--> |
224 |
|
225 |
</body> |
226 |
</html> |
227 |
</xsl:template> |
228 |
|
229 |
</xsl:stylesheet> |