Previous topic

Tray segments

Next topic

icecube.icetray – icetray

This Page

I3Tray – icetray convenience interface

I3Tray.load(libname)

load the library (via dlopen) into the running tray. This is primarily used for libraries that don’t have python bindings (eventually all libraries should have at least stub python bindings, making them loadable via the standard python import, and this sould be obsolete.

Parameters:filename

should be the name of the file to load including the leading lib, but not including the trailing .so or .dylib, eg:

load(“libdataio”) load(“libexamples”)

class I3Tray.I3Tray

A convenience wrapper around the wrapped c++ class icetray.I3Tray. This class provides keyword-arguments to the AddModule and so forth.

__init__()

Creates an I3Tray.

AddModule(_type, _name=None, **kwargs)

Add a module to the tray’s processing stream.

Parameters:
  • _type – either a string (search for a registered c++ module in the module factory) or a python class (create a module of this type), or a python function (create a python module to wrap this function).
  • _name – instance name for this module, needed when connecting in/outboxes in unusual ways, otherwise just make this string unique among the set of name parameters passed to AddModule and AddService.
  • kwargs – parameter values forwarded to the added module

Example:

tray.AddModule("I3Reader", "reader",
               Filename = "/path/to/foo.i3",
               SkipKeys = ['I3DST', 'RecoPulses'])

See also

Passing python functions to I3Tray.AddModule()

More natural parameter-passing syntax to I3Tray

AddService(_type, _name=None, **kwargs)

Add a service factory to the tray.

Parameters:
  • _type – a string (search for a registered c++ service factory)
  • _name – instance name for this factory
  • kwargs – parameter values forwarded to the added module

Example:

tray.AddService("I3GSLRandomServiceFactory", "gslrng")
ConnectBoxes(*args)
Execute(*args)
Finish((I3Tray)arg1) → None :
C++ signature :
void Finish(I3Tray {lvalue})
SetParameter(module, param, value)
Usage((I3Tray)arg1) → map_string_I3PhysicsUsage :
C++ signature :
std::map<std::string, I3PhysicsUsage, std::less<std::string>, std::allocator<std::pair<std::string const, I3PhysicsUsage> > > Usage(I3Tray {lvalue})