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