O2-DQ User Interface 1.0.0
Loading...
Searching...
No Matches
dqExceptions.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# This script includes some exceptions for DQ Workflows
17
18
20
21 """Exception raised if taskname not found in json config file.
22
23 Attributes:
24 taskName: input main task name
25 """
26
27 def __init__(self, taskName):
28 self.taskName = taskName
29 super().__init__()
30
31 def __str__(self):
32 return f"The JSON config does not include {self.taskName} task"
33
34
35class CfgInvalidFormatError(Exception):
36
37 """Exception raised for Invalid format json file
38
39 Attributes:
40 config: input provided config json file
41 """
42
43 def __init__(self, configjson):
44 self.configjson = configjson
45 super().__init__()
46
47 def __str__(self):
48 return f"Invalid Format for json config file! Your JSON config input: {self.configjson} After the script, you must define your json configuration file \
49 The command line should look like this:"
50
51
52class NotInAlienvError(Exception):
53
54 """Exception raised for O2Physics Alienv Loading
55
56 Attributes:
57 message: error message for forgetting loading alienv
58 """
59
60 def __init__(self, message = "You must load O2Physics with alienv"):
61 self.message = message
62 super().__init__(self.message)
63
64
65class ForgettedArgsError(Exception):
66
67 """Exception raised for forgetted args errors in parser args.
68
69 Attributes:
70 forgettedArgs: arguments whose configuration is forgotten
71 """
72
73 def __init__(self, forgettedArgs):
74 self.forgettedArgs = forgettedArgs
75 super().__init__()
76
77 def __str__(self):
78 return f"Your forget assign a value to for this parameters: {self.forgettedArgs}"
79
80
81class CentFilterError(Exception):
82
83 """Exception raised if you provide centrality process function for pp system in tableMaker/tableMakerMC"""
84
85 def __init__(self):
86 super().__init__()
87
88 def __str__(self):
89 return f"Collision System pp can't be include related task and process function about Centrality. misconfigure for process function in tableMaker/tableMakerMC!"
90
91
93
94 """Exception raised if Filter Selections and analysis cuts not in same order and same number"""
95
96 def __init__(self):
97 super().__init__()
98
99 def __str__(self):
100 return f"Event Filter selections and analysis cuts not in same order and same number"
101
102
104
105 """Exception raised for if mandatory arg not found
106
107 Attributes:
108 arg: mandatory argument
109 """
110
111 def __init__(self, arg):
112 self.arg = arg
113
114 def __str__(self):
115 return f"Mandatory args not found: {self.arg}"
def __init__(self, configjson)
Definition: dqExceptions.py:43
def __init__(self, forgettedArgs)
Definition: dqExceptions.py:73
def __init__(self, message="You must load O2Physics with alienv")
Definition: dqExceptions.py:60