File indexing completed on 2024-04-06 12:05:35
0001 #include <iostream>
0002 #include <fstream>
0003
0004 #include "DetectorDescription/Parser/interface/DDLParser.h"
0005 #include "DetectorDescription/RegressionTest/src/DDCheck.h"
0006 #include "DetectorDescription/Core/interface/DDRoot.h"
0007 #include "DetectorDescription/Core/interface/DDException.h"
0008 #include "DetectorDescription/Core/interface/DDFilter.h"
0009 #include "DetectorDescription/Core/interface/DDFilteredView.h"
0010 #include "DetectorDescription/Core/interface/DDValue.h"
0011 #include "DetectorDescription/Core/interface/DDCompactView.h"
0012 #include "DetectorDescription/RegressionTest/src/ddstats.h"
0013
0014 using namespace std;
0015 int main(int argc, char *argv[])
0016 {
0017 try {
0018
0019
0020
0021 cout << "initialize DDL parser" << endl;
0022 DDLParser* myP = DDLParser::Instance();
0023
0024 cout << "about to set configuration" << endl;
0025
0026
0027
0028
0029
0030
0031
0032 if (argc==1) {
0033 myP->SetConfig("configuration.xml");
0034 } else
0035 myP->SetConfig(*(argv+1));
0036
0037
0038
0039
0040
0041 string nix;
0042 cout << "about to start parsing" << endl;
0043 cout << " check process size now, and press \'c\'+<return> to continue .." << endl;
0044 cin >> nix;
0045 int parserResult = myP->StartParsing();
0046 if (parserResult != 0) {
0047 cout << " problem encountered during parsing. exiting ... " << endl;
0048 exit(1);
0049 }
0050 cout << " parsing completed" << endl;
0051 cout << " check process size now, and press \'c\'+<return> to continue .." << endl;
0052 cin >> nix;
0053
0054 cout << endl << endl << "Start checking!" << endl << endl;
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065 DDCheck(cout);
0066
0067
0068 ddstats(cout);
0069 cout << " check process size now, and press \'c\'+<return> to continue .." << endl;
0070 cin >> nix;
0071 cout << "Clearing CompactView ..." << endl;
0072 DDCompactView cpv;
0073 cpv.clear();
0074 cout << " check process size now, and press \'c\'+<return> to continue .." << endl;
0075 cin >> nix;
0076
0077 return 0;
0078
0079 }
0080 catch (DDException& e)
0081 {
0082 cerr << "DDD-PROBLEM:" << endl
0083 << e << endl;
0084 }
0085
0086 }