19 DOMDocument * loader = result -> getDocument();
33 DOMDocument * loader = doc -> getDocument();
34 DOMElement *
root = loader -> getDocumentElement();
37 DOMDocument * dataSet = dataSetDoc . getDocument();
78 DOMNode * cloneDataSet = loader -> importNode( dataSet -> getDocumentElement(),
true );
79 root -> appendChild( cloneDataSet );
87 DOMDocument * loader = result -> getDocument();
100 DOMDocument * loader = doc -> getDocument();
101 DOMElement *
root = loader -> getDocumentElement();
104 DOMDocument * dataSet = dataSetDoc . getDocument();
137 DOMNode * cloneDataSet = loader -> importNode( dataSet -> getDocumentElement(),
true );
138 root -> appendChild( cloneDataSet );
157 std::ifstream fcha(
"/afs/fnal.gov/files/home/room3/avetisya/public_html/HCAL/Maps/HCALmapHBEF_Feb.21.2008.txt");
158 std::ifstream fcho(
"/afs/fnal.gov/files/home/room3/avetisya/public_html/HCAL/Maps/HCALmapHO_Feb.21.2008.txt");
168 const int NCHA = 6912;
169 const int NCHO = 2160;
174 int sideC[NCHA], etaC[NCHA], phiC[NCHA], dphiC[NCHA], depthC[NCHA], wedgeC[NCHA], crateC[NCHA], rmC[NCHA], rm_fiC[NCHA], htrC[NCHA];
175 int htr_fiC[NCHA], fi_chC[NCHA], spigoC[NCHA], dccC[NCHA], dcc_slC[NCHA], fedidC[NCHA], pixelC[NCHA], qieC[NCHA], adcC[NCHA];
176 int slbC[NCHA], rctcraC[NCHA], rctcarC[NCHA], rctconC[NCHA];
177 std::string detC[NCHA], rbxC[NCHA], fpgaC[NCHA], slbinC[NCHA], slbin2C[NCHA], slnamC[NCHA], rctnamC[NCHA];
179 int sideO[NCHO], etaO[NCHO], phiO[NCHO], dphiO[NCHO], depthO[NCHO], sectorO[NCHO], crateO[NCHO], rmO[NCHO], rm_fiO[NCHO], htrO[NCHO];
180 int htr_fiO[NCHO], fi_chO[NCHO], spigoO[NCHO], dccO[NCHO], dcc_slO[NCHO], fedidO[NCHO], pixelO[NCHO], qieO[NCHO], adcO[NCHO];
181 int geoO[NCHO], blockO[NCHO], lcO[NCHO];
182 std::string detO[NCHO], rbxO[NCHO], fpgaO[NCHO], let_codeO[NCHO];
185 for (i = 0; i < NCHA; i++){
187 for (j = 0; j < 31; j++){
194 fcha>>etaC[
i]>>phiC[
i]>>dphiC[
i]>>depthC[
i]>>detC[
i];
195 fcha>>rbxC[
i]>>wedgeC[
i]>>rmC[
i]>>pixelC[
i]>>qieC[
i];
196 fcha>>adcC[
i]>>rm_fiC[
i]>>fi_chC[
i]>>crateC[
i]>>htrC[
i];
197 fcha>>fpgaC[
i]>>htr_fiC[
i]>>dcc_slC[
i]>>spigoC[
i]>>dccC[
i];
198 fcha>>slbC[
i]>>slbinC[
i]>>slbin2C[
i]>>slnamC[
i]>>rctcraC[
i]>>rctcarC[
i];
199 fcha>>rctconC[
i]>>rctnamC[
i]>>fedidC[
i];
202 for(i = 0; i < NCHA; i++){
203 aRow . side = sideC[
i];
204 aRow .
eta = etaC[
i];
205 aRow .
phi = phiC[
i];
206 aRow . dphi = dphiC[
i];
208 aRow . det = detC[
i];
209 aRow . rbx = rbxC[
i];
210 aRow . wedge = wedgeC[
i];
212 aRow . pixel = pixelC[
i];
213 aRow . qie = qieC[
i];
214 aRow .
adc = adcC[
i];
215 aRow . rm_fi = rm_fiC[
i];
216 aRow . fi_ch = fi_chC[
i];
217 aRow . crate = crateC[
i];
218 aRow . htr = htrC[
i];
219 aRow . fpga = fpgaC[
i];
220 aRow . htr_fi = htr_fiC[
i];
221 aRow . dcc_sl = dcc_slC[
i];
222 aRow . spigo = spigoC[
i];
223 aRow . dcc = dccC[
i];
224 aRow .
slb = slbC[
i];
225 aRow . slbin = slbinC[
i];
226 aRow . slbin2 = slbin2C[
i];
227 aRow . slnam = slnamC[
i];
228 aRow . rctcra = rctcraC[
i];
229 aRow . rctcar = rctcarC[
i];
230 aRow . rctcon = rctconC[
i];
231 aRow . rctnam = rctnamC[
i];
232 aRow . fedid = fedidC[
i];
238 for (i = 0; i < NCHO; i++){
240 for (j = 0; j < 27; j++){
247 if (sideO[i] != 1 && sideO[i] != -1){
251 fcho>>etaO[
i]>>phiO[
i]>>dphiO[
i]>>depthO[
i]>>detO[
i];
252 fcho>>rbxO[
i]>>sectorO[
i]>>rmO[
i]>>pixelO[
i]>>qieO[
i];
253 fcho>>adcO[
i]>>rm_fiO[
i]>>fi_chO[
i]>>let_codeO[
i]>>crateO[
i]>>htrO[
i];
254 fcho>>fpgaO[
i]>>htr_fiO[
i]>>dcc_slO[
i]>>spigoO[
i]>>dccO[
i];
255 fcho>>fedidO[
i]>>geoO[
i]>>blockO[
i]>>lcO[
i];
260 for(i = 0; i < NCHO; i++){
261 bRow . sideO = sideO[
i];
262 bRow . etaO = etaO[
i];
263 bRow . phiO = phiO[
i];
264 bRow . dphiO = dphiO[
i];
265 bRow . depthO = depthO[
i];
267 bRow . detO = detO[
i];
268 bRow . rbxO = rbxO[
i];
269 bRow . sectorO = sectorO[
i];
271 bRow . pixelO = pixelO[
i];
273 bRow . qieO = qieO[
i];
274 bRow . adcO = adcO[
i];
275 bRow . rm_fiO = rm_fiO[
i];
276 bRow . fi_chO = fi_chO[
i];
277 bRow . let_codeO = let_codeO[
i];
279 bRow . crateO = crateO[
i];
280 bRow . htrO = htrO[
i];
281 bRow . fpgaO = fpgaO[
i];
282 bRow . htr_fiO = htr_fiO[
i];
283 bRow . dcc_slO = dcc_slO[
i];
285 bRow . spigoO = spigoO[
i];
286 bRow . dccO = dccO[
i];
287 bRow . fedidO = fedidO[
i];
293 doc .
write(
"FullHCALmap.xml" );
296 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)
static std::atomic< unsigned int > counter
string root
initialization