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