Project
Loading...
Searching...
No Matches
digit2raw.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14
15#include <boost/program_options.hpp>
16#include <string>
17#include "FT0Raw/RawWriterFT0.h"
18
20
21namespace bpo = boost::program_options;
22
23int main(int argc, char** argv)
24{
25 bpo::variables_map vm;
26 bpo::options_description opt_general("Usage:\n " + std::string(argv[0]) +
27 "Convert FT0 digits to CRU raw data\n");
28 bpo::options_description opt_hidden("");
29 bpo::options_description opt_all;
30 bpo::positional_options_description opt_pos;
31
32 try {
33 opt_general.add_options()("help,h", "Print this help message");
34 // config with FT0 defaults
35 o2::fit::DigitToRawConfig::configureExecOptions(opt_general, "ft0digits.root", "alio2-cr1-flp200");
36 // common part
37 opt_all.add(opt_general).add(opt_hidden);
38 bpo::store(bpo::command_line_parser(argc, argv).options(opt_all).positional(opt_pos).run(), vm);
39
40 if (vm.count("help")) {
41 std::cout << opt_general << std::endl;
42 exit(0);
43 }
44
45 bpo::notify(vm);
46 } catch (bpo::error& e) {
47 std::cerr << "ERROR: " << e.what() << std::endl
48 << std::endl;
49 std::cerr << opt_general << std::endl;
50 exit(1);
51 } catch (std::exception& e) {
52 std::cerr << e.what() << ", application will now exit" << std::endl;
53 exit(2);
54 }
55 const o2::fit::DigitToRawConfig cfg(vm);
56 if (!cfg.mEnablePadding) {
58 } else {
60 }
62 return 0;
63}
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
static void configureExecOptions(OptionsDescription &opt_general, const std::string &defaultInputFilename, const std::string &defaultFLP_name)
static void digit2raw(const DigitToRawConfig &cfg)
void print() const
Definition HBFUtils.h:134
#define main