Changeset 19986 for trunk/FACT++/src
- Timestamp:
- 08/17/20 13:37:22 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/spectrum.cc
r19985 r19986 153 153 ("analysis", var<string>("analysis.sql"), "File with the analysis query. A default file is created automatically in the <prefix> directory it does not exist.") 154 154 ("source-key", var<uint16_t>(5), "Source key to be used in data file selection.") 155 ("selector", vars<string>() ,"WHERE clause to be used in data file selection.")155 ("selector", vars<string>()->required(),"WHERE clause to be used in data file selection.") 156 156 ("selsim", vars<string>(), "WHERE clause to be used in monte carlo file selection.") 157 157 ("estimator", var<string>()->required(), "Energy estimator to be used.") … … 648 648 649 649 const uint16_t source_key = conf.Get<uint16_t>("source-key"); 650 const string where = boost::join(conf.Vec<string>("selector"), " AND\n");651 const string where_sim = boost::join(conf.Vec<string>("selsim"), " AND\n");650 const string where = boost::join(conf.Vec<string>("selector"), ") AND\n ("); 651 const string where_sim = boost::join(conf.Vec<string>("selsim"), ") AND\n ("); 652 652 const string estimator = conf.Get<string>("estimator"); 653 653 const string spectrum = conf.Get<string>("spectrum"); … … 787 787 " WHERE\n" 788 788 " fRunTypeKEY=1 AND fSourceKEY=%100:source AND\n" 789 " %101:where\n"789 " (%101:where)\n" 790 790 " ORDER BY\n" 791 791 " FileId\n" // In order: faster … … 906 906 // query3.template_defaults[it->first.c_str()] = it->second.c_str(); 907 907 908 query3.template_defaults["where"] = where_sim.empty()? "" : ("AND\n "+where_sim).c_str();908 query3.template_defaults["where"] = where_sim.empty()? "" : ("AND\n ("+where_sim+")").c_str(); 909 909 910 910 if (print_queries)
Note:
See TracChangeset
for help on using the changeset viewer.