GaugiKernel package

Submodules

GaugiKernel.ComponentAccumulator module

class GaugiKernel.ComponentAccumulator.ComponentAccumulator(name, output)[source]

Bases: Logger

Parameters:
  • name (str)

  • output (str)

GetEntries()[source]
SetReader(reader)[source]
configure()[source]
run(events)[source]
Parameters:

events (List[int])

GaugiKernel.Cpp module

class GaugiKernel.Cpp.Cpp(core)[source]

Bases: Logger

core()[source]
getProperty(key)[source]
setProperty(key, value)[source]
GaugiKernel.Cpp.treatPropertyValue(value)[source]

GaugiKernel.Logger module

class GaugiKernel.Logger.Logger(d={}, **kw)[source]

Bases: object

Simple class for giving inherited classes logging capability as well as the possibility for being serialized by pickle. Logger will keep its logging level even after unpickled.

getLevel()[source]
getLoggerName()[source]
classmethod getModuleLogger(logName, logDefaultLevel=20)[source]

Retrieve logging stream handler using logName and add a handler to stdout if it does not have any handlers yet. Format logging stream handler to output in the same format used by Athena messages.

setLevel(value)[source]
class GaugiKernel.Logger.LoggingLevel[source]

Bases: EnumStringification

A wrapper for logging levels, which allows stringification of known log levels.

CRITICAL = 50
DEBUG = 10
ERROR = 40
FATAL = 50
INFO = 20
MUTE = 50
VERBOSE = 9
WARNING = 30
classmethod toC(val)[source]

GaugiKernel.MultiProcessing module

class GaugiKernel.MultiProcessing.Pool(func, inputs, maxJobs, output, dry_run)[source]

Bases: Logger

busy()[source]
generate()[source]
getAvailable()[source]
merge()[source]
run()[source]
class GaugiKernel.MultiProcessing.Slot[source]

Bases: object

isAvailable()[source]
lock()[source]
run(command, dry_run=False)[source]
unlock()[source]
update()[source]
GaugiKernel.MultiProcessing.chunks(lst, n)[source]

Yield successive n-sized chunks from lst.

GaugiKernel.constants module

GaugiKernel.enumerators module

class GaugiKernel.enumerators.EnumStringification[source]

Bases: object

Adds ‘enum’ static methods for conversion to/from string

classmethod fromstring(str_)[source]

Transforms string into enumeration.

classmethod intList()[source]
classmethod optionList()[source]
classmethod retrieve(val)[source]

Retrieve int value and check if it is a valid enumeration string or int on this enumeration class.

classmethod sretrieve(val)[source]

Return enumeration equivalent value in string if it is a valid enumeration code.

classmethod stringList()[source]
classmethod tostring(val)[source]

Transforms val into string.

GaugiKernel.macros module

GaugiKernel.macros.MSG_DEBUG(self, msg, *args)[source]
GaugiKernel.macros.MSG_ERROR(self, msg, *args)[source]
GaugiKernel.macros.MSG_FATAL(self, msg, *args)[source]
GaugiKernel.macros.MSG_INFO(self, msg, *args)[source]
GaugiKernel.macros.MSG_VERBOSE(self, msg, *args)[source]
GaugiKernel.macros.MSG_WARNING(self, msg, *args)[source]

Module contents

class GaugiKernel.ComponentAccumulator(name, output)[source]

Bases: Logger

Parameters:
  • name (str)

  • output (str)

GetEntries()[source]
SetReader(reader)[source]
configure()[source]
run(events)[source]
Parameters:

events (List[int])

class GaugiKernel.Cpp(core)[source]

Bases: Logger

core()[source]
getProperty(key)[source]
setProperty(key, value)[source]
class GaugiKernel.EnumStringification[source]

Bases: object

Adds ‘enum’ static methods for conversion to/from string

classmethod fromstring(str_)[source]

Transforms string into enumeration.

classmethod intList()[source]
classmethod optionList()[source]
classmethod retrieve(val)[source]

Retrieve int value and check if it is a valid enumeration string or int on this enumeration class.

classmethod sretrieve(val)[source]

Return enumeration equivalent value in string if it is a valid enumeration code.

classmethod stringList()[source]
classmethod tostring(val)[source]

Transforms val into string.

class GaugiKernel.Logger(d={}, **kw)[source]

Bases: object

Simple class for giving inherited classes logging capability as well as the possibility for being serialized by pickle. Logger will keep its logging level even after unpickled.

getLevel()[source]
getLoggerName()[source]
classmethod getModuleLogger(logName, logDefaultLevel=20)[source]

Retrieve logging stream handler using logName and add a handler to stdout if it does not have any handlers yet. Format logging stream handler to output in the same format used by Athena messages.

setLevel(value)[source]
class GaugiKernel.LoggingLevel[source]

Bases: EnumStringification

A wrapper for logging levels, which allows stringification of known log levels.

CRITICAL = 50
DEBUG = 10
ERROR = 40
FATAL = 50
INFO = 20
MUTE = 50
VERBOSE = 9
WARNING = 30
classmethod toC(val)[source]
GaugiKernel.check_for_unused_vars(d, fcn=None)[source]

Checks if dict @d has unused properties and print them as warnings

GaugiKernel.get_argparser_formatter(custom=True)[source]
Parameters:

custom (bool)

GaugiKernel.get_attributes(o, **kw)[source]

Return attributes from a class or object.

GaugiKernel.list2stdvector(vecType, l)[source]
GaugiKernel.stdvector2list(vec, size=None)[source]
GaugiKernel.treatPropertyValue(value)[source]