|
@@ -81,16 +81,16 @@ double deltaR(const SimTrack& sim_track, const Track& gsf_track) {
|
|
|
pow(sim_track.phi() - gsf_track.phi(), 2.0));
|
|
|
}
|
|
|
|
|
|
-void run(bool silent){
|
|
|
+void run(){
|
|
|
using namespace std;
|
|
|
using namespace fv;
|
|
|
using namespace fv_root;
|
|
|
+ using namespace fv_util;
|
|
|
auto file_list = the_config->get_source_files();
|
|
|
string output_filename = the_config->get_output_filename();
|
|
|
TrackingDataSet tds(output_filename, file_list, "trackingNtuple/tree");
|
|
|
register_objects(tds);
|
|
|
|
|
|
-
|
|
|
auto hoe_cut = the_config->get("hoe_cut").as<float>(999);
|
|
|
|
|
|
bs = {
|
|
@@ -249,7 +249,7 @@ void run(bool silent){
|
|
|
|
|
|
auto& n_seeds = *tds.register_container<ContainerTH1<size_t>>("n_seeds", THParams::lookup("n_seeds"));
|
|
|
|
|
|
- while (tds.next(!silent)) {
|
|
|
+ while (tds.next()) {
|
|
|
|
|
|
for (const auto& sim_track : sim_tracks) {
|
|
|
if (!is_good_sim(sim_track)) continue;
|
|
@@ -470,15 +470,20 @@ void run(bool silent){
|
|
|
int main(int argc, char * argv[]){
|
|
|
using namespace fv_util;
|
|
|
ArgParser args(argc, argv);
|
|
|
- bool silent = args.cmd_option_exists("-s");
|
|
|
if(args.cmd_option_exists("-c")) {
|
|
|
init_config(args.get_cmd_option("-c"));
|
|
|
args.update_config();
|
|
|
+ if (args.cmd_option_exists("-s")) {
|
|
|
+ the_config->update_key("silent", true);
|
|
|
+ }
|
|
|
+ if (args.cmd_option_exists("-b")) {
|
|
|
+ the_config->update_key("batch", true);
|
|
|
+ }
|
|
|
init_log(LogPriority::kLogInfo);
|
|
|
|
|
|
- run(silent);
|
|
|
+ run();
|
|
|
} else {
|
|
|
- cout << "Usage: ./" << argv[0] << " (-s) -c config_file.yaml" << endl;
|
|
|
+ cout << "Usage: ./" << argv[0] << " (-s) (-b) -c config_file.yaml" << endl;
|
|
|
}
|
|
|
return 0;
|
|
|
}
|