O2-DQ User Interface 1.0.0
Loading...
Searching...
No Matches
converters.py
Go to the documentation of this file.
1#!/usr/bin/env python
2# PYTHON_ARGCOMPLETE_OK
3# -*- coding: utf-8 -*-
4
5# Copyright 2019-2020 CERN and copyright holders of ALICE O2.
6# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
7# All rights not expressly granted are reserved.
8#
9# This software is distributed under the terms of the GNU General Public
10# License v3 (GPL Version 3), copied verbatim in the file "COPYING".
11#
12# In applying this license CERN does not waive the privileges and immunities
13# granted to it by virtue of its status as an Intergovernmental Organization
14# or submit itself to any jurisdiction.
15
16# \Author: ionut.cristian.arsene@cern.ch
17# \Interface: cevat.batuhan.tolon@cern.ch
18
19import argparse
20
21from extramodules.choicesCompleterList import ChoicesCompleterList
22
23
24class O2Converters(object):
25
26 """
27 Class for Add Converters to workflows
28
29 Args:
30 object (parser_args() object): Converter task adder arguments
31 """
32
33 def __init__(self, parserO2Converters = argparse.ArgumentParser(add_help = False)):
34 super(O2Converters, self).__init__()
35 self.parserO2Converters = parserO2Converters
36
37 def addArguments(self):
38 """
39 This function allows to add arguments for parser_args() function
40 """
41
42 # Interface
43 groupO2Converters = self.parserO2Converters.add_argument_group(title = "Additional Task Adding Options")
44 groupO2Converters.add_argument(
45 "--add_mc_conv",
46 help = "Add the converter from mcparticle to mcparticle+001 (Adds your workflow o2-analysis-mc-converter task)",
47 action = "store_true",
48 )
49 groupO2Converters.add_argument(
50 "--add_fdd_conv", help = "Add the fdd converter (Adds your workflow o2-analysis-fdd-converter task)", action = "store_true",
51 )
52 groupO2Converters.add_argument(
53 "--add_track_prop",
54 help = "Add track propagation to the innermost layer (TPC or ITS) (Adds your workflow o2-analysis-track-propagation task)",
55 action = "store_true",
56 )
57 groupO2Converters.add_argument(
58 "--add_weakdecay_ind",
59 help = "Add Converts V0 and cascade version 000 to 001 (Adds your workflow o2-analysis-weak-decay-indices task)",
60 action = "store_true",
61 )
62
63 def parseArgs(self):
64 """
65 This function allows to save the obtained arguments to the parser_args() function
66
67 Returns:
68 Namespace: returns parse_args()
69 """
70
71 return self.parserO2Converters.parse_args()
def __init__(self, parserO2Converters=argparse.ArgumentParser(add_help=False))
Definition: converters.py:33