ATLAS Offline Software
Loading...
Searching...
No Matches
run_AFP_PixelIdentifier.cxx
Go to the documentation of this file.
1// Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2
3
4#include <TROOT.h>
5#include <TFile.h>
6
7#include <string>
8#include <boost/program_options.hpp>
9
11
12
13int main(int argc, char *argv[])
14{
15
16 std::string input_file_name;
17 std::string output_file_name;
18 std::vector<std::string> pixel_tools_list;
19
20 boost::program_options::options_description main_options("main options");
21
22 main_options.add_options()
23 ("input_file",boost::program_options::value<std::string>(&input_file_name)->default_value("AFP_PixelHistoFiller.root"),"name of output root file")
24 ("output_file",boost::program_options::value<std::string>(&output_file_name)->default_value("AFP_PixelIdentifier.root"),"name of output root file")
25 ("pixel_tools_list",boost::program_options::value<std::vector<std::string> >(&pixel_tools_list)->multitoken(), "list of AFP pixel tools");
26 ;
27
28 boost::program_options::variables_map vm;
29
30 try
31 {
32 boost::program_options::store(boost::program_options::parse_command_line(argc, argv, main_options), vm);
33 boost::program_options::notify(vm);
34 }
35 catch(std::exception& e)
36 {
37 std::cerr << "Bad command line argument" << std::endl;
38 std::cerr << e.what() << std::endl;
39 return 1;
40 }
41
42 if(pixel_tools_list.empty())
43 {
44 pixel_tools_list.push_back("AFP_DeadPixel");
45 pixel_tools_list.push_back("AFP_NoisyPixel");
46 }
47
48 AFP_PixelIdentifier identifier(input_file_name, output_file_name, pixel_tools_list);
49 identifier.execute();
50
51 return 0;
52}
53
54
55
56
57
58
int main()
Definition hello.cxx:18