| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Namespaces | Functions
GaudiKernel Namespace Reference

## Namespaces
| Configurable
| ConfigurableDb
| ConfigurableMeta
| Constants
| DataObjectHandleBase
| GaudiHandles
| PhysicalConstants
| ProcessJobOptions
| PropertyProxy
| Proxy
| RootMap
| SystemOfUnits

## Functions
def | ROOT6WorkAroundEnabled (id=None)

## Function Documentation

def GaudiKernel.ROOT6WorkAroundEnabled | ( |  | id = `None` | ) |

    Helper function to easily exclude ROOT6 work-arounds for testing.

    >>> os.environ['ROOT6_WORK_AROUND'] = 'all'
    >>> ROOT6WorkAroundEnabled()
    True
    >>> os.environ['ROOT6_WORK_AROUND'] = 'none'
    >>> ROOT6WorkAroundEnabled('JIRA-XYZ')
    False
    >>> os.environ['ROOT6_WORK_AROUND'] = 'JIRA-X'
    >>> ROOT6WorkAroundEnabled('JIRA-X')
    True
    >>> ROOT6WorkAroundEnabled('JIRA-Y')
    True
    >>> os.environ['ROOT6_WORK_AROUND'] = 'JIRA-X,-JIRA-Y'
    >>> ROOT6WorkAroundEnabled('JIRA-X')
    True
    >>> ROOT6WorkAroundEnabled('JIRA-Y')
    False
    >>> os.environ['ROOT6_WORK_AROUND'] = '-JIRA-Y'
    >>> ROOT6WorkAroundEnabled('JIRA-X')
    True
    >>> ROOT6WorkAroundEnabled('JIRA-Y')
    False

Definition at line 3 of file __init__.py.

3 def ROOT6WorkAroundEnabled(id=None):
4 '''
5 Helper function to easily exclude ROOT6 work-arounds for testing.
6
7 >>> os.environ['ROOT6_WORK_AROUND'] = 'all'
8 >>> ROOT6WorkAroundEnabled()
9 True
10 >>> os.environ['ROOT6_WORK_AROUND'] = 'none'
11 >>> ROOT6WorkAroundEnabled('JIRA-XYZ')
12 False
13 >>> os.environ['ROOT6_WORK_AROUND'] = 'JIRA-X'
14 >>> ROOT6WorkAroundEnabled('JIRA-X')
15 True
16 >>> ROOT6WorkAroundEnabled('JIRA-Y')
17 True
18 >>> os.environ['ROOT6_WORK_AROUND'] = 'JIRA-X,-JIRA-Y'
19 >>> ROOT6WorkAroundEnabled('JIRA-X')
20 True
21 >>> ROOT6WorkAroundEnabled('JIRA-Y')
22 False
23 >>> os.environ['ROOT6_WORK_AROUND'] = '-JIRA-Y'
24 >>> ROOT6WorkAroundEnabled('JIRA-X')
25 True
26 >>> ROOT6WorkAroundEnabled('JIRA-Y')
27 False
28 '''
29 enabled = os.environ.get('ROOT6_WORK_AROUND', 'all').lower()
30 if enabled == 'all':
31 return True
32 if enabled in ('none', 'no', 'off', 'false', '0'):
33 return False
34 if id is None: # unnamed work-arounds can only be disabled globally
35 return True
36 enabled = set(map(str.strip, enabled.split(',')))
37 disabled = set([ e[1:] for e in enabled if e.startswith('-') ])
38 id = id.lower()
39 # the w-a is enabled if in the enabled list or not explicitly disabled
40 return id in enabled or id not in disabled
41
GaudiKernel.ROOT6WorkAroundEnabled
def ROOT6WorkAroundEnabled(id=None)
Definition: __init__.py:3
Containers::map
struct GAUDI_API map
Parametrisation class for map-like implementation.
Definition: KeyedObjectManager.h:25