Changeset 19136
- Timestamp:
- 08/03/18 20:53:39 (6 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/calcsource.cc
r19125 r19136 3 3 #include "pal.h" 4 4 #include "nova.h" 5 #include "tools.h" 5 6 #include "Time.h" 6 7 #include "Configuration.h" -
trunk/FACT++/src/fits2sql.cc
r19135 r19136 464 464 Database connection(uri); 465 465 466 if (verbose>0) 467 { 468 cout << "Client Version: " << connection.client_version() << '\n'; 469 cout << "Server Version: " << connection.server_version() << endl; 470 } 471 466 472 if (print_connection) 467 473 { … … 692 698 } 693 699 700 if (print_connection) 701 { 702 try 703 { 704 const auto &res1 = connection.query("SHOW STATUS LIKE 'Bytes_%'").store(); 705 cout << left << setw(16) << res1[0]["Variable_name"] << ' ' << Tools::Scientific(res1[0]["Value"]) << endl; 706 cout << left << setw(16) << res1[1]["Variable_name"] << ' ' << Tools::Scientific(res1[1]["Value"]) << endl; 707 cout << endl; 708 } 709 catch (const exception &e) 710 { 711 cerr << "\nSHOW STATUS LIKE 'Bytes_%'\n\n"; 712 cerr << "SQL query failed:\n" << e.what() << endl; 713 return 6; 714 } 715 } 716 694 717 return 0; 695 718 } -
trunk/FACT++/src/root2sql.cc
r19135 r19136 483 483 } 484 484 485 if (verbose>0) 486 { 487 cout << "Client Version: " << connection.client_version() << '\n'; 488 cout << "Server Version: " << connection.server_version() << endl; 489 } 490 485 491 if (print_connection) 486 492 { … … 680 686 } 681 687 688 if (print_connection) 689 { 690 try 691 { 692 const auto &res1 = connection.query("SHOW STATUS LIKE 'Bytes_%'").store(); 693 cout << left << setw(16) << res1[0]["Variable_name"] << ' ' << Tools::Scientific(res1[0]["Value"]) << endl; 694 cout << left << setw(16) << res1[1]["Variable_name"] << ' ' << Tools::Scientific(res1[1]["Value"]) << endl; 695 cout << endl; 696 } 697 catch (const exception &e) 698 { 699 cerr << "\nSHOW STATUS LIKE 'Bytes_%'\n\n"; 700 cerr << "SQL query failed:\n" << e.what() << endl; 701 return 6; 702 } 703 } 704 682 705 return 0; 683 706 } -
trunk/FACT++/src/rootifysql.cc
r19134 r19136 35 35 ("ignore", vars<string>(), "Ignore the given columns") 36 36 ("display,d", po_switch(), "Displays contents on the screen (most usefull in combination with mysql statements as SHOW or EXPLAIN)") 37 ("write ",var<string>(""), "Write output to an ascii file")37 ("write,w", var<string>(""), "Write output to an ascii file") 38 38 ("null,n", po_switch(), "Redirect the output file to /dev/null (mainly for debugging purposes, e.g. performance studies)") 39 39 ("no-fill", po_switch(), "Do not fill events into the root file (mainly for debugging purposes, e.g. performance studies)") … … 446 446 if (!l.empty() && l[0]!='#') 447 447 envs[ident].push_back(line); 448 } 448 449 449 450 if (verbose>0) … … 499 500 Database connection(uri); // Keep alive while fetching rows 500 501 502 if (verbose>0) 503 { 504 cout << "Client Version: " << connection.client_version() << '\n'; 505 cout << "Server Version: " << connection.server_version() << endl; 506 } 507 501 508 if (print_connection) 502 509 { … … 511 518 catch (const exception &e) 512 519 { 513 cerr << "\nSHOW STATUS LIKE COMPRESSION\n\n";520 cerr << "\nSHOW STATUS LIKE 'Compression'\n\n"; 514 521 cerr << "SQL query failed:\n" << e.what() << endl; 515 522 return 6; … … 650 657 651 658 if (verbose>0) 652 cout << "Opening file '" << path << "' [compression=" << compression << "]..." << endl; 659 { 660 cout << "Opening file '" << path << "' [compression=" << compression << "]...\n"; 661 cout << "Writing data to tree '" << tree << "'" << endl; 662 } 653 663 654 664 // ----------------------------- Open output file -------------------------- … … 931 941 } 932 942 943 if (print_connection) 944 { 945 try 946 { 947 const auto &res1 = connection.query("SHOW STATUS LIKE 'Bytes_%'").store(); 948 cout << left << setw(16) << res1[0]["Variable_name"] << ' ' << Tools::Scientific(res1[0]["Value"]) << endl; 949 cout << left << setw(16) << res1[1]["Variable_name"] << ' ' << Tools::Scientific(res1[1]["Value"]) << endl; 950 cout << endl; 951 } 952 catch (const exception &e) 953 { 954 cerr << "\nSHOW STATUS LIKE 'Bytes_%'\n\n"; 955 cerr << "SQL query failed:\n" << e.what() << endl; 956 return 6; 957 } 958 } 959 933 960 return 0; 934 961 }
Note:
See TracChangeset
for help on using the changeset viewer.