BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
XercesBuilder.cxx
Go to the documentation of this file.
1// $Header: /bes/bes/BossCvs/Calibration/rdbModel/src/Management/XercesBuilder.cxx,v 1.2 2011/02/22 06:16:29 maqm Exp $
14#include "facilities/Util.h"
15#include "xmlBase/XmlParser.h"
16#include "xmlBase/Dom.h"
17#include <iostream>
18#include <cstdlib>
19
20// Following are what code expects:
21#define SCHEMA_MAJOR_VERSION 2
22#define SCHEMA_MINOR_VERSION 0
23namespace rdbModel {
24 using XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument;
25 using XERCES_CPP_NAMESPACE_QUALIFIER DOMElement;
26
27 XercesBuilder::XercesBuilder() : Builder(), m_doc(0), m_rdb(0) {
28 }
29
30 unsigned int XercesBuilder::parseInput(const std::string& filename) {
31 xmlBase::XmlParser parser;
32
33 parser.doSchema(true);
34
35 // m_doc = parser.parse(filename.c_str(), "rdbms");
36 m_doc = parser.parse(filename.c_str());
37
38 return (m_doc == 0) ? 0xffffffff : 0;
39 }
40
42 using xmlBase::Dom;
43
45
46 if (m_doc == 0 ) return 0;
47 m_rdb = man->getRdb();
48 DOMElement* docElt = m_doc->getDocumentElement();
49
50
51 // save attribute information associated with outermost (rdbms) element.
52 m_rdb->m_dbName = Dom::getAttribute(docElt, "dbs");
53 m_rdb->m_majorVersion = 0;
54 m_rdb->m_minorVersion = 0;
55
56 std::string versionString = Dom::getAttribute(docElt, "SchemaVersion");
57 if (!versionString.size()) {
58 versionString = Dom::getAttribute(docElt, "DTDversion");
59 }
60
61 unsigned dotPos = versionString.find('.');
62
63 std::string minorStr = std::string(versionString, dotPos+1);
64 // versionString.size() - (dotPos+1));
65 versionString.resize(dotPos); // now contains just major #
66
67 try {
68 m_rdb->m_majorVersion = facilities::Util::stringToInt(versionString);
69 m_rdb->m_minorVersion = facilities::Util::stringToInt(minorStr);
70 }
71 catch (facilities::WrongType ex) {
72 std::cerr << "rdbModel::XercesBuilder: Bad version string " << std::endl;
73 }
74 m_rdb->m_CVSid = Dom::getAttribute(docElt, "CVSid");
75 if (m_rdb->m_majorVersion != SCHEMA_MAJOR_VERSION) {
76 std::cerr << "Schema major version " << m_rdb->m_majorVersion
77 << " doesn't match expected " << SCHEMA_MAJOR_VERSION
78 << std::endl;
79 std::cerr << "Bye for now";
80 std::cerr.flush();
81 exit(1);
82 }
83
84 // Get vector of table elements.
85 std::vector<DOMElement*> tables;
86 Dom::getChildrenByTagName(docElt, "table", tables);
87 unsigned int nTable = tables.size();
88 unsigned int processed = 0;
89
90 for (unsigned int iTable = 0; iTable < nTable; iTable++) {
91 Table* newTable = buildTable(tables[iTable]);
92
93 if (newTable) {
94 m_rdb->addTable(newTable);
95 processed++;
96 }
97 }
98 return nTable - processed;
99 }
100
101 Table* XercesBuilder::buildTable(DOMElement* tableElt) {
102 using xmlBase::Dom;
103
104 Table* newTable = new Table;
105 newTable->m_name = Dom::getAttribute(tableElt, "name");
106 newTable->m_version = Dom::getAttribute(tableElt, "version");
107 newTable->m_comment = Dom::getAttribute(tableElt, "comment");
108
109 std::vector<DOMElement* > children;
110 Dom::getChildrenByTagName(tableElt, "col", children);
111 unsigned int nChild = children.size();
112
113 // Delegate handling of columns associated with this table
114 for (unsigned int iCol = 0; iCol < nChild; iCol++) {
115 Column* newCol = buildColumn(children[iCol], newTable);
116
117 if (newCol) {
118 newTable->addColumn(newCol);
119 }
120 }
121
122 newTable->sortColumns();
123
124 // Look for primary key element, if any
125 DOMElement* primaryKey =
126 Dom::findFirstChildByName(tableElt, "primary");
127 if (primaryKey != 0) {
128 Index* newIndex = buildIndex(primaryKey, true, newTable);
129 if (newIndex) {
130 newIndex->m_myTable = newTable;
131 newTable->addIndex(newIndex);
132 }
133 }
134 newTable->setPrimaryKeyCol();
135
136 // Handle any other indices
137 Dom::getChildrenByTagName(tableElt, "index", children);
138 nChild = children.size();
139
140 for (unsigned int iIndex = 0; iIndex < nChild; iIndex++) {
141 Index* newIndex = buildIndex(children[iIndex], false, newTable);
142 if (newIndex) {
143 newTable->addIndex(newIndex);
144 }
145 }
146
147 // Check that there is at most one primary key??
148
149 // Handle assertion elements
150 Dom::getChildrenByTagName(tableElt, "assert", children);
151 nChild = children.size();
152
153 for (unsigned int iAssert = 0; iAssert < nChild; iAssert++) {
154 Assertion* newAssert = buildAssertion(children[iAssert], newTable);
155 if (newAssert) {
156 newTable->addAssert(newAssert);
157 }
158 }
159 // If there was a 'validRow' assertion, make that explicit
160 Assertion* v = newTable->getAssertionByName("validRow");
161 newTable->setValidRow(v);
162
163 DOMElement* iNewElt = Dom::findFirstChildByName(tableElt, "insertNew");
164 if (iNewElt) {
165 newTable->m_iNew = buildInsertNew(iNewElt, newTable);
166 }
167 DOMElement* supElt = Dom::findFirstChildByName(tableElt, "supersede");
168 if (supElt) {
169 newTable->m_sup = buildSupersede(supElt, newTable);
170 }
171
172 return newTable;
173 }
174
175 Column* XercesBuilder::buildColumn(DOMElement* e, Table* myTable) {
176 using xmlBase::Dom;
177
178 Column* newCol = new Column(myTable);
179 // m_default.clear();
180 newCol->m_name = Dom::getAttribute(e, "name");
181 DOMElement* com = Dom::findFirstChildByName(e, "comment");
182 newCol->m_comment = Dom::getTextContent(com);
183
184 DOMElement* src = Dom::findFirstChildByName(e, "src");
185
186 newCol->m_null = (Dom::getAttribute(src, "null") == "true");
187 newCol->m_stickyInsert =
188 (Dom::getAttribute(src, "stickyInsert") == "true");
189
190 DOMElement* child = Dom::getFirstChildElement(src);
191 if (Dom::checkTagName(child, "default")) {
192 newCol->m_from = Column::FROMdefault;
193 newCol->m_default = Dom::getAttribute(child, "value");
194 }
195 else if (Dom::checkTagName(child, "from")) {
196 std::string agent = Dom::getAttribute(child, "agent");
197 if (agent == "auto_increment") {
198 newCol->m_from = Column::FROMautoIncrement;
199 }
200 else if (agent == "now") {
201 newCol->m_from = Column::FROMnow;
202 }
203 else if (agent == "enduser") {
204 newCol->m_from = Column::FROMendUser;
205 }
206 else if (agent == "service") {
207 newCol->m_from = Column::FROMprogram;
208 std::string contents = Dom::getAttribute(child, "contents");
209 if (contents == "service_name") {
210 newCol->m_contents = Column::CONTENTSserviceName;
211 }
212 else if (contents == "username") {
213 newCol->m_contents = Column::CONTENTSusername;
214 }
215 else if (contents == "insert_time") {
216 newCol->m_contents = Column::CONTENTSinsertTime;
217 }
218 else if (contents == "update_time") {
219 newCol->m_contents = Column::CONTENTSupdateTime;
220 }
221 // otherwise just stick with default value of CONTENTSunspecified
222 }
223 // shouldn't be anything else
224 }
225
226 DOMElement* dtype = Dom::findFirstChildByName(e, "type");
227 newCol->m_type = buildDatatype(dtype);
228
229 return newCol;
230 }
231
232 Datatype* XercesBuilder::buildDatatype(DOMElement* e) {
233 using xmlBase::Dom;
234
235 Datatype* newType = new Datatype;
236 newType->setType(Dom::getAttribute(e, "typename"));
237
238 if (Dom::hasAttribute(e, "size")) {
239 try {
240 newType->m_outputSize = Dom::getIntAttribute(e, "size");
241 }
242 catch (xmlBase::DomException ex) {
243 std::cerr << "Error in rdb database description file" << std::endl;
244 std::cerr << ex.getMsg() << std::endl;
245 std::cerr << "Ignoring column size specification " << std::endl;
246 newType->m_outputSize = -1; // treat as unspecified
247 }
248 }
249 else newType->m_outputSize = -1;
250 if ((newType->m_outputSize == -1) &&
251 (newType->getType() == Datatype::TYPEchar) ) newType->m_outputSize = 1;
252 if ((newType->m_outputSize == -1) &&
253 (newType->getType() == Datatype::TYPEvarchar) ) { // not allowed
254 std::cerr << "Error in rdb database description file: " << std::endl;
255 std::cerr << "Missing size spec. for varchar field " << std::endl;
256 delete newType;
257 newType = 0;
258 return newType;
259 }
260
261
262 DOMElement* restrict = Dom::getFirstChildElement(e);
263
264 if (restrict != 0) {
265 DOMElement* rtype = Dom::getFirstChildElement(restrict);
266 std::string tagname = Dom::getTagName(rtype);
267 if ((newType->m_type == Datatype::TYPEenum) &&
268 (tagname != std::string("enum") ) ) {
269 std::cerr << "From rdbMode::XercesBuilder::buildDatatype" << std::endl;
270 std::cerr << "Bad enum type. Missing value list " << std::endl;
271 delete newType;
272 newType = 0;
273 return newType;
274 }
275
276 if (tagname == std::string("nonnegative")) {
277 newType->m_restrict = Datatype::RESTRICTnonneg;
278 if (newType->m_isInt) newType->m_minInt = 0;
279 }
280 else if (tagname == std::string("positive")) {
281 newType->m_restrict = Datatype::RESTRICTpos;
282 if (newType->m_isInt) newType->m_minInt = 1;
283 }
284 else if (tagname == std::string("interval")) {
285 newType->setInterval(Dom::getAttribute(rtype, "min"),
286 Dom::getAttribute(rtype, "max"));
287 }
288 else if (tagname == std::string("file")) {
289 newType->m_restrict = Datatype::RESTRICTfile;
290 }
291 else if (tagname == std::string("enum")) {
292 newType->m_restrict = Datatype::RESTRICTenum;
293 Enum* newEnum = new Enum();
294 newEnum->m_required =
295 (Dom::getAttribute(rtype, "use") == "require");
296 if (!(newEnum->m_required) &&
297 (newType->m_type == Datatype::TYPEenum)) { //improper enum decl.
298 delete newEnum;
299 delete newType;
300 std::cerr << "From rdbMode::XercesBuilder::buildDatatype"
301 << std::endl;
302 std::cerr << "Bad enum type. List must be 'required' " << std::endl;
303 newType = 0;
304 return newType;
305 } // end improprer enum decl.
306
307 std::string enums = Dom::getAttribute(rtype, "values");
308
309 unsigned int start = 0;
310 std::string::size_type blankLoc = enums.find(std::string(" "), start);
311
312 while (blankLoc != std::string::npos) {
313 newEnum->m_choices.push_back(enums.substr(start, blankLoc-start));
314 start = blankLoc + 1;
315 blankLoc = enums.find(std::string(" "), start);
316 } // parsing enum list
317 newEnum->m_choices.push_back(enums.substr(start));
318 newType->m_enum = newEnum;
319 } // end processing of enum restriction
320 }
321 else { // no restriction specified
322 newType->m_restrict = Datatype::RESTRICTnone;
323 if (newType->m_type == Datatype::TYPEenum) {
324 std::cerr << "From rdbMode::XercesBuilder::buildDatatype"
325 << std::endl;
326 std::cerr << "Bad enum type. Missing value list " << std::endl;
327 delete newType;
328 newType = 0;
329 }
330 }
331 return newType;
332 }
333
334 Index* XercesBuilder::buildIndex(DOMElement* e, bool primaryElt,
335 Table* myTable) {
336 using xmlBase::Dom;
337
338 Index* newIndex = new Index(myTable);
339
340 if (primaryElt) { // DOMElement* is a <primary>
341 newIndex->m_primary = true;
342 std::string col = newIndex->m_name = Dom::getAttribute(e, "col");
343 newIndex->m_indexCols.push_back(newIndex->m_name);
344 Column* myCol = myTable->getColumnByName(col);
345 myCol->m_isPrimaryKey = true;
346 }
347 else { // DOMElement* is <index>
348 newIndex->m_name = Dom::getAttribute(e, "name");
349
350 std::string primaryVal =
351 Dom::getAttribute(e, "primary");
352 newIndex->m_primary = (primaryVal == "yes");
353
354 // Value of "cols" attribute is a blank-separated list of column names
355 std::string cols = Dom::getAttribute(e, "cols");
356
357 // Could make this more robust by checking there is really just one below
358 if (newIndex->m_primary) { // had better be just one column
359 Column* myCol = myTable->getColumnByName(cols);
360 myCol->m_isPrimaryKey = true;
361 }
362
363 unsigned int start = 0;
364 std::string::size_type blankLoc = cols.find(std::string(" "), start);
365
366 while (blankLoc != std::string::npos) {
367 newIndex->m_indexCols.push_back(cols.substr(start, blankLoc-start));
368 start = blankLoc + 1;
369 blankLoc = cols.find(std::string(" "), start);
370 }
371 newIndex->m_indexCols.push_back(cols.substr(start));
372
373 }
374 return newIndex;
375 }
376
377 Assertion* XercesBuilder::buildAssertion(DOMElement* e, Table* myTable) {
378
379
380 // std::string when = xmlBase::Dom::getAttribute(e, "case");
381
382 // Assertion::WHEN whenType = (when == "globalCheck") ?
383 // Assertion::WHENglobalCheck : Assertion::WHENchangeRow;
384 std::string name = xmlBase::Dom::getAttribute(e, "name");
385 DOMElement* opElt = xmlBase::Dom::getFirstChildElement(e);
386 Assertion::Operator* op = buildOperator(opElt, myTable);
387
388 Assertion* newAssert = new Assertion(op, myTable);
389
390 newAssert->setName(name);
391 return newAssert;
392 }
393
394
395 Assertion::Operator* XercesBuilder::buildOperator(DOMElement* e,
396 Table* myTable) {
397 using xmlBase::Dom;
398
399 std::string opName = Dom::getTagName(e);
400 OPTYPE opType = OPTYPEisNull;
401 if ((opName == "isNull") || (opName == "isEmpty")) {
402 if (opName == "isEmpty") opType = OPTYPEisEmpty;
403 DOMElement* child = Dom::getFirstChildElement(e);
405 std::string which = Dom::getAttribute(child, "which");
406 valType = (which == std::string("old")) ? FIELDTYPEold
408
409 return new Assertion::Operator(opType,
410 Dom::getAttribute(child, "col"),
411 std::string(""),
413
414 // std::string(""), false, false);
415 }
416 else if (opName == "compare") {
417 std::string relation = Dom::getAttribute(e, "relation");
418 if (relation == "lessThan") opType = OPTYPElessThan;
419 else if (relation == "greaterThan") {
420 opType = OPTYPEgreaterThan;
421 }
422 else if (relation == "equal") opType = OPTYPEequal;
423 else if (relation == "notEqual")
424 opType = OPTYPEnotEqual;
425 else if (relation == "lessOrEqual") {
426 opType = OPTYPElessOrEqual;
427 }
428 else if (relation == "greaterOrEqual") {
429 opType = OPTYPEgreaterOrEqual;
430 }
431 DOMElement* child[2];
432 child[0] = Dom::getFirstChildElement(e);
433 child[1] = Dom::getSiblingElement(child[0]);
434
435 std::string compareArgs[2];
436 // bool isLit[2];
437 FIELDTYPE valueType[2];
438 for (unsigned iChild = 0; iChild < 2; iChild++) {
439 /* Do
440 compareArgs[iChild] =
441 xmlBase::Dom::getAttribute(child[iChild], "val");
442 */
443
444 // Element is either a <colRef> or a <value>
445 if (Dom::checkTagName(child[iChild], "value")) {
446 valueType[iChild] = FIELDTYPElit;
447 compareArgs[iChild] = /* content of <value> */
448 Dom::getTextContent(child[iChild]);
449 }
450 else { // get compareArgs from 'col' attribute
451 compareArgs[iChild] =
452 Dom::getAttribute(child[iChild], "col");
453 // need to look at 'which' attribute
454 std::string which = Dom::getAttribute(child[iChild],
455 "which");
456 if (which == std::string("old")) {
457 valueType[iChild] = FIELDTYPEold;
458 } else if (which == std::string("toBe")) {
459 valueType[iChild] = FIELDTYPEtoBe;
460 }
461 else valueType[iChild] = FIELDTYPEask;
462 }
463 }
464 Assertion::Operator* newOp =
465 new Assertion::Operator(opType, compareArgs[0], compareArgs[1],
466 valueType[0], valueType[1]);
467 if (!newOp->validCompareOp(myTable)) {
468 delete newOp;
469 return 0;
470 }
471 return newOp;
472 }
473
474 // All other cases have other operators as children
475 else if (opName == "exists") {
476 std::string tableName;
477 opType = OPTYPEexists;
478 if (Dom::hasAttribute(e, "tableName") ) {
479 tableName =
480 Dom::getAttribute(e, "tableName");
481 }
482 else tableName = myTable->getName();
483 DOMElement* child = Dom::getFirstChildElement(e);
484 Assertion::Operator* childOp = buildOperator(child, myTable);
485 return new Assertion::Operator(opType, tableName, childOp);
486 }
487
488 else if (opName == "or") opType = OPTYPEor;
489 else if (opName == "and") opType = OPTYPEand;
490 else if (opName == "not") opType = OPTYPEnot;
491
492 // Recursively handle child operators
493 std::vector<DOMElement*> children;
494 std::vector<Assertion::Operator*> childOps;
495 Dom::getChildrenByTagName(e, "*", children);
496 unsigned nChild = children.size();
497 for (unsigned iChild = 0; iChild < nChild; iChild++) {
498 Assertion::Operator* childOp = buildOperator(children[iChild], myTable);
499 if (childOp) {
500 childOps.push_back(childOp);
501 }
502 else { // one bad apple and we're dead
503 return 0;
504 }
505 }
506 return new Assertion::Operator(opType, childOps);
507 }
508
509 Set* XercesBuilder::buildSet(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e,
510 Table* t) {
511 using xmlBase::Dom;
512
513 std::string destCol = Dom::getAttribute(e, "destCol");
514
515 std::string destRow = Dom::getAttribute(e, "destRow");
516 FIELDTYPE destType = (destRow == std::string("old") ) ? FIELDTYPEold :
518
519 // Now find out what kind of source there is for the <set>
520 FIELDTYPE srcType;
521 std::string srcValue;
522 std::string interp("");
523 DOMElement* srcElt = Dom::findFirstChildByName(e, "*");
524 std::string tag = Dom::getTagName(srcElt);
525 if (tag == std::string("ask")) {
526 srcType = FIELDTYPEask;
527 srcValue = "";
528 }
529 else if (tag == std::string("value") ) {
530 srcType = FIELDTYPElit;
531 srcValue = Dom::getTextContent(srcElt);
532 interp = Dom::getAttribute(srcElt, "interp");
533 }
534 else { // it's a setColRef element
535 std::string forceStr= Dom::getAttribute(srcElt, "force");
536 bool force = (forceStr == std::string("true"));
537 srcValue = Dom::getAttribute(srcElt, "col");
538 std::string which = Dom::getAttribute(srcElt, "which");
539 srcType = (which == std::string("old")) ? FIELDTYPEold
541 if (!force) {
542 if (srcType == FIELDTYPEold) srcType = FIELDTYPEoldDef;
543 else srcType = FIELDTYPEtoBeDef;
544 }
545 }
546 return new Set(t, destCol, destType, srcValue, srcType, interp);
547 }
548
549
550 Supersede*
551 XercesBuilder::buildSupersede(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e,
552 Table* t) {
553 using xmlBase::Dom;
554
555 // <supersede> has an optional attribute which is a reference to
556 // an assertion. If the attribute is there, it refers to an
557 // assertion which will already have been processed by XercesBuilder,
558 // so we can look it up by name.
559 std::string onlyIfStr = Dom::getAttribute(e, "onlyIf");
560 Assertion* onlyIf = t->getAssertionByName(onlyIfStr);
561 Supersede* super = new Supersede(t, onlyIf);
562
563 // Now handle child elements: a bunch of <set>s. Sort into two
564 // lists, depending on whether destination is old row or new
565 e = Dom::findFirstChildByName(e, "*");
566 while (e != 0) {
567 Set* s = buildSet(e, t);
568 super->addSet(s);
569 e = Dom::getSiblingElement(e);
570 }
571 super->normalize();
572 return super;
573 }
574
575 Query*
576 XercesBuilder::buildQuery(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e,
577 Table* t) {
578 using xmlBase::Dom;
579 std::string whereStr = Dom::getAttribute(e, "assertRef");
580 Assertion* where = t->getAssertionByName(whereStr);
581
582 Query* q = new Query(t, 0, where);
583 e = Dom::findFirstChildByName(e, "*");
584 while (e != 0) {
585 q->addSelect(Dom::getTextContent(e));
586 e = Dom::getSiblingElement(e);
587 }
588 return q;
589 }
590
591 InsertNew*
592 XercesBuilder::buildInsertNew(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e,
593 Table* t) {
594 using xmlBase::Dom;
595
596 std::string internalStr = Dom::getAttribute(e, "internalCond");
597 Assertion* internal = t->getAssertionByName(internalStr);
598
599 std::string officialStr = Dom::getAttribute(e, "official");
600 Assertion* official = t->getAssertionByName(officialStr);
601
602 InsertNew* in = new InsertNew(t, internal, official);
603 e = Dom::findFirstChildByName(e, "*");
604 while (e != 0) { // process <interRow>
605 InterRow* ir = buildInterRow(e, t);
606
607 in->addInterRow(ir);
608 e = Dom::getSiblingElement(e);
609 }
610 return in;
611 }
612
613 InterRow*
614 XercesBuilder::buildInterRow(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e,
615 Table* t) {
616 using xmlBase::Dom;
617
618
619 XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* queryElt =
620 Dom::findFirstChildByName(e, "*");
621 Query* q = buildQuery(queryElt, t);
622
623 XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* sib =
624 Dom::getSiblingElement(queryElt);
625 bool quit = Dom::checkTagName(sib, "quit");
626
627 InterRow* inter = new InterRow(t, q, quit);
628 if (quit) return inter;
629
630 // else we have one or more <set>
631 while (sib != 0) {
632 Set* s = buildSet(sib, t);
633 inter->addSet(*s);
634 sib = Dom::getSiblingElement(sib);
635
636 }
637 return inter;
638 }
639}
XmlRpcServer s
Definition: HelloServer.cpp:11
****INTEGER imax DOUBLE PRECISION m_pi *DOUBLE PRECISION m_amfin DOUBLE PRECISION m_Chfin DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_sinw2 DOUBLE PRECISION m_GFermi DOUBLE PRECISION m_MfinMin DOUBLE PRECISION m_ta2 INTEGER m_out INTEGER m_KeyFSR INTEGER m_KeyQCD *COMMON c_Semalib $ !copy of input $ !CMS energy $ !beam mass $ !final mass $ !beam charge $ !final charge $ !smallest final mass $ !Z mass $ !Z width $ !EW mixing angle $ !Gmu Fermi $ alphaQED at q
Definition: KKsem.h:33
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35
std::map< int, double >::value_type valType
Definition: MdcCalibData.h:12
#define SCHEMA_MAJOR_VERSION
TTree * t
Definition: binning.cxx:23
static int stringToInt(const std::string &InStr)
Exception class used when converting from string to numeric type.
@ FROMautoIncrement
Definition: Column.h:32
@ CONTENTSupdateTime
Definition: Column.h:44
@ CONTENTSserviceName
Definition: Column.h:41
@ CONTENTSinsertTime
Definition: Column.h:43
@ CONTENTSusername
Definition: Column.h:42
Rdb * getRdb()
Definition: Manager.h:48
static Manager * getManager()
Definition: Manager.cxx:24
Assertion * getAssertionByName(const std::string &name) const
Definition: Table.cxx:91
void sortColumns()
Definition: Table.cxx:129
virtual unsigned int parseInput(const std::string &inputPath)
Base exception class for Dom.
Definition: Dom.h:29
virtual std::string getMsg()
Definition: Dom.h:34
static std::string getAttribute(const DOMElement *elt, const char *attName)
Definition: Dom.cxx:222
static DOMElement * getFirstChildElement(const DOMNode *parent)
Get first child which is an element node, if any.
Definition: Dom.cxx:115
DOMDocument * parse(const char *const filename, const std::string &docType=std::string(""))
Parse an xml file, returning document node if successful.
Definition: XmlParser.cxx:108
void doSchema(bool doit)
Call this method to turn on schema processing (else it's off)
Definition: XmlParser.cxx:92
FIELDTYPE
Definition: Rdb.h:21
@ FIELDTYPEtoBe
Definition: Rdb.h:24
@ FIELDTYPEold
Definition: Rdb.h:23
@ FIELDTYPElit
Definition: Rdb.h:22
@ FIELDTYPEtoBeDef
Definition: Rdb.h:28
@ FIELDTYPEoldDef
Definition: Rdb.h:27
@ FIELDTYPEask
Definition: Rdb.h:25