20 DOMDocument *
loader = result -> getDocument();
34 DOMDocument *
loader = doc -> getDocument();
35 DOMElement *
root = loader -> getDocumentElement();
38 DOMDocument * dataSet = dataSetDoc . getDocument();
79 DOMNode * cloneDataSet = loader -> importNode( dataSet -> getDocumentElement(),
true );
80 root -> appendChild( cloneDataSet );
88 DOMDocument *
loader = result -> getDocument();
101 DOMDocument *
loader = doc -> getDocument();
102 DOMElement *
root = loader -> getDocumentElement();
105 DOMDocument * dataSet = dataSetDoc . getDocument();
138 DOMNode * cloneDataSet = loader -> importNode( dataSet -> getDocumentElement(),
true );
139 root -> appendChild( cloneDataSet );
158 std::ifstream fcha(
"/afs/fnal.gov/files/home/room3/avetisya/public_html/HCAL/Maps/HCALmapHBEF_Feb.21.2008.txt");
159 std::ifstream fcho(
"/afs/fnal.gov/files/home/room3/avetisya/public_html/HCAL/Maps/HCALmapHO_Feb.21.2008.txt");
169 const int NCHA = 6912;
170 const int NCHO = 2160;
175 int sideC[NCHA], etaC[NCHA], phiC[NCHA], dphiC[NCHA], depthC[NCHA], wedgeC[NCHA], crateC[NCHA], rmC[NCHA], rm_fiC[NCHA], htrC[NCHA];
176 int htr_fiC[NCHA], fi_chC[NCHA], spigoC[NCHA], dccC[NCHA], dcc_slC[NCHA], fedidC[NCHA], pixelC[NCHA], qieC[NCHA], adcC[NCHA];
177 int slbC[NCHA], rctcraC[NCHA], rctcarC[NCHA], rctconC[NCHA];
178 std::string detC[NCHA], rbxC[NCHA], fpgaC[NCHA], slbinC[NCHA], slbin2C[NCHA], slnamC[NCHA], rctnamC[NCHA];
180 int sideO[NCHO], etaO[NCHO], phiO[NCHO], dphiO[NCHO], depthO[NCHO], sectorO[NCHO], crateO[NCHO], rmO[NCHO], rm_fiO[NCHO], htrO[NCHO];
181 int htr_fiO[NCHO], fi_chO[NCHO], spigoO[NCHO], dccO[NCHO], dcc_slO[NCHO], fedidO[NCHO], pixelO[NCHO], qieO[NCHO], adcO[NCHO];
182 int geoO[NCHO], blockO[NCHO], lcO[NCHO];
183 std::string detO[NCHO], rbxO[NCHO], fpgaO[NCHO], let_codeO[NCHO];
186 for (i = 0; i < NCHA; i++){
188 for (j = 0; j < 31; j++){
195 fcha>>etaC[
i]>>phiC[
i]>>dphiC[
i]>>depthC[
i]>>detC[
i];
196 fcha>>rbxC[
i]>>wedgeC[
i]>>rmC[
i]>>pixelC[
i]>>qieC[
i];
197 fcha>>adcC[
i]>>rm_fiC[
i]>>fi_chC[
i]>>crateC[
i]>>htrC[
i];
198 fcha>>fpgaC[
i]>>htr_fiC[
i]>>dcc_slC[
i]>>spigoC[
i]>>dccC[
i];
199 fcha>>slbC[
i]>>slbinC[
i]>>slbin2C[
i]>>slnamC[
i]>>rctcraC[
i]>>rctcarC[
i];
200 fcha>>rctconC[
i]>>rctnamC[
i]>>fedidC[
i];
203 for(i = 0; i < NCHA; i++){
204 aRow . side = sideC[
i];
205 aRow .
eta = etaC[
i];
206 aRow .
phi = phiC[
i];
207 aRow . dphi = dphiC[
i];
209 aRow . det = detC[
i];
210 aRow . rbx = rbxC[
i];
211 aRow . wedge = wedgeC[
i];
214 aRow . qie = qieC[
i];
215 aRow .
adc = adcC[
i];
216 aRow . rm_fi = rm_fiC[
i];
217 aRow . fi_ch = fi_chC[
i];
218 aRow . crate = crateC[
i];
219 aRow . htr = htrC[
i];
220 aRow . fpga = fpgaC[
i];
221 aRow . htr_fi = htr_fiC[
i];
222 aRow . dcc_sl = dcc_slC[
i];
223 aRow . spigo = spigoC[
i];
224 aRow . dcc = dccC[
i];
225 aRow .
slb = slbC[
i];
226 aRow . slbin = slbinC[
i];
227 aRow . slbin2 = slbin2C[
i];
228 aRow . slnam = slnamC[
i];
229 aRow . rctcra = rctcraC[
i];
230 aRow . rctcar = rctcarC[
i];
231 aRow . rctcon = rctconC[
i];
232 aRow . rctnam = rctnamC[
i];
233 aRow . fedid = fedidC[
i];
239 for (i = 0; i < NCHO; i++){
241 for (j = 0; j < 27; j++){
248 if (sideO[i] != 1 && sideO[i] != -1){
252 fcho>>etaO[
i]>>phiO[
i]>>dphiO[
i]>>depthO[
i]>>detO[
i];
253 fcho>>rbxO[
i]>>sectorO[
i]>>rmO[
i]>>pixelO[
i]>>qieO[
i];
254 fcho>>adcO[
i]>>rm_fiO[
i]>>fi_chO[
i]>>let_codeO[
i]>>crateO[
i]>>htrO[
i];
255 fcho>>fpgaO[
i]>>htr_fiO[
i]>>dcc_slO[
i]>>spigoO[
i]>>dccO[
i];
256 fcho>>fedidO[
i]>>geoO[
i]>>blockO[
i]>>lcO[
i];
261 for(i = 0; i < NCHO; i++){
262 bRow . sideO = sideO[
i];
263 bRow . etaO = etaO[
i];
264 bRow . phiO = phiO[
i];
265 bRow . dphiO = dphiO[
i];
266 bRow . depthO = depthO[
i];
268 bRow . detO = detO[
i];
269 bRow . rbxO = rbxO[
i];
270 bRow . sectorO = sectorO[
i];
272 bRow . pixelO = pixelO[
i];
274 bRow . qieO = qieO[
i];
275 bRow . adcO = adcO[
i];
276 bRow . rm_fiO = rm_fiO[
i];
277 bRow . fi_chO = fi_chO[
i];
278 bRow . let_codeO = let_codeO[
i];
280 bRow . crateO = crateO[
i];
281 bRow . htrO = htrO[
i];
282 bRow . fpgaO = fpgaO[
i];
283 bRow . htr_fiO = htr_fiO[
i];
284 bRow . dcc_slO = dcc_slO[
i];
286 bRow . spigoO = spigoO[
i];
287 bRow . dccO = dccO[
i];
288 bRow . fedidO = fedidO[
i];
294 doc .
write(
"FullHCALmap.xml" );
297 std::cout <<
"XML Test...done" << std::endl;
int adc(sample_type sample)
get the ADC sample (12 bits)
XMLDOMBlock * createLMapHBEFXMLBase(std::string templateFileName)
XMLDOMBlock * createLMapHOXMLBase(std::string templateFileName)
static int slb(const HcalTriggerPrimitiveSample &theSample)
int addLMapHODataset(XMLDOMBlock *doc, LMapRowHO *row, std::string templateFileName)
int addLMapHBEFDataset(XMLDOMBlock *doc, LMapRowHBEF *row, std::string templateFileName)
static XMLCh * _toXMLCh(std::string temp)