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">S3S2S11 Mask</th> |
137 |
<th align="center">S11CRC Mask</th> |
138 |
<th align="center">S4CAL Mask</th> |
139 |
<th align="center">Busy Mask</th> |
140 |
<th align="center">Trig Conf</th> |
141 |
</tr> |
142 |
<tr> |
143 |
<td> |
144 |
<xsl:call-template name="Dec2Hex"> |
145 |
<xsl:with-param name="value" select="ALARM_MASK"/> |
146 |
</xsl:call-template> |
147 |
</td> |
148 |
<td> |
149 |
<xsl:call-template name="Dec2Hex"> |
150 |
<xsl:with-param name="value" select="PMT_MASK_S3S2S12"/> |
151 |
</xsl:call-template> |
152 |
</td> |
153 |
<td> |
154 |
<xsl:call-template name="Dec2Hex"> |
155 |
<xsl:with-param name="value" select="PMT_MASK_S11CRC"/> |
156 |
</xsl:call-template> |
157 |
</td> |
158 |
<td> |
159 |
<xsl:call-template name="Dec2Hex"> |
160 |
<xsl:with-param name="value" select="PMT_MASK_S4CAL"/> |
161 |
</xsl:call-template> |
162 |
</td> |
163 |
<td> |
164 |
<xsl:call-template name="Dec2Hex"> |
165 |
<xsl:with-param name="value" select="BUSY_MASK"/> |
166 |
</xsl:call-template> |
167 |
</td> |
168 |
<td> |
169 |
<xsl:call-template name="Dec2Hex"> |
170 |
<xsl:with-param name="value" select="TRIG_CONF"/> |
171 |
</xsl:call-template> |
172 |
</td> |
173 |
</tr> |
174 |
</table> |
175 |
</tr> |
176 |
</xsl:for-each> |
177 |
</table> |
178 |
</xsl:for-each> |
179 |
<!-- |
180 |
<td> |
181 |
<xsl:text>0x</xsl:text> |
182 |
<xsl:call-template name="Dec2Hex"> |
183 |
<xsl:with-param name="value" select="INFO1"/> |
184 |
</xsl:call-template> |
185 |
<xsl:value-of select="INFO1"/> |
186 |
</td> |
187 |
--> |
188 |
|
189 |
</body> |
190 |
</html> |
191 |
</xsl:template> |
192 |
|
193 |
</xsl:stylesheet> |