O2-DQ User Interface 1.0.0
Loading...
Searching...
No Matches
converterManager.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 logging
20
21
22def converterManager(ttreeList: list, deps: list):
23 """This function checks in your AO2D and produces converter tasks automatically if they needed
24
25 Args:
26 ttreeList (list): TTree list in AO2D file
27 deps (list): Dependency List for running analysis task
28 """
29
30 logging.info("Converter Manager initialize")
31 ttreeList = list(ttreeList) # checking
32
33 if ("O2track_iu" in ttreeList):
34 logging.info("o2-analysis-track-propagation will added your workflow")
35 deps.append("o2-analysis-track-propagation")
36
37 if ("O2fdd" in ttreeList) and ("O2fdd_001" not in ttreeList):
38 logging.info("o2-analysis-fdd-converter will added your workflow")
39 deps.append("o2-analysis-fdd-converter")
40
41 # Need to be checked
42 if ("O2v0" in ttreeList) and ("O2v0_001" not in ttreeList):
43 logging.info("o2-analysis-weak-decay-indices will added your workflow")
44 deps.append("o2-analysis-weak-decay-indices")
45
46 if ("O2mcparticle" in ttreeList) and ("O2mcparticle_001" not in ttreeList):
47 logging.info("o2-analysis-mc-converter will added your workflow")
48 deps.append("o2-analysis-mc-converter")
49
50 logging.info("Process done")