Changeset 19426 for trunk/FACT++
- Timestamp:
- 01/16/19 18:26:10 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/makeplots.cc
r19234 r19426 53 53 ("no-limits", po_switch(), "Switch off limits in plots") 54 54 ("no-ToO", po_switch(), "Skip all sources marked as target-of-opportunity (ToO)") 55 ("where", var<string>(), "Define a where clause (it will be concatenate to the xisting ones with AND for source selection)") 56 ("print-query", po_switch(), "Print query for source selection") 55 57 ; 56 58 … … 129 131 130 132 const string isToO = conf.Has("no-ToO") && conf.Get<bool>("no-ToO") ? " AND fIsToO=0" : ""; 133 const string where = conf.Has("where") ? " AND ("+conf.Get<string>("where")+")" : ""; 134 135 const string query = "SELECT fSourceName, fRightAscension, fDeclination FROM Source WHERE fSourceTypeKEY=1"+isToO+where; 136 137 if (conf.Get<bool>("print-query")) 138 cout << "\nQuery:\n" << query << "\n" << endl; 131 139 132 140 const mysqlpp::StoreQueryResult res = 133 Database(fDatabase).query( "SELECT fSourceName, fRightAscension, fDeclination FROM Source WHERE fSourceTypeKEY=1"+isToO).store();141 Database(fDatabase).query(query).store(); 134 142 135 143 // ------------- Create canvases and frames ---------------------
Note:
See TracChangeset
for help on using the changeset viewer.