ATLAS Offline Software
Loading...
Searching...
No Matches
TrigServicesHelper.cxx File Reference

Python bindings for calling HltEventLoopMgr methods directly from Python. More...

#include <sstream>
#include <string>
#include <memory>
#include <unistd.h>
#include <boost/python.hpp>
#include <boost/property_tree/ptree.hpp>
#include "GaudiKernel/ISvcLocator.h"
#include "GaudiKernel/IProperty.h"
#include "GaudiKernel/SmartIF.h"
#include "GaudiKernel/Bootstrap.h"
#include "Gaudi/Interfaces/IOptionsSvc.h"
#include "TrigKernel/ITrigEventLoopMgr.h"

Go to the source code of this file.

Classes

class  TrigServicesHelper
 Helper class to call ITrigEventLoopMgr methods from Python. More...

Functions

 BOOST_PYTHON_MODULE (libTrigServicesHelper)

Detailed Description

Python bindings for calling HltEventLoopMgr methods directly from Python.

This provides a way to call prepareForStart() and other ITrigEventLoopMgr methods from Python (e.g., athenaEF.py) without going through PSC/HLTMPPU.

Definition in file TrigServicesHelper.cxx.

Function Documentation

◆ BOOST_PYTHON_MODULE()

BOOST_PYTHON_MODULE ( libTrigServicesHelper )

Definition at line 268 of file TrigServicesHelper.cxx.

269{
270 using namespace boost::python;
271
272 class_<TrigServicesHelper>("TrigServicesHelper")
273 .def("prepareForStart", &TrigServicesHelper::prepareForStart,
274 (arg("run_number"),
275 arg("det_mask"),
276 arg("sor_time"),
277 arg("lb_number") = 0,
278 arg("beam_type") = 0,
279 arg("beam_energy") = 0,
280 arg("toroids_current") = 20400.0f,
281 arg("solenoid_current") = 7730.0f,
282 arg("run_type") = "Physics",
283 arg("trigger_type") = 0,
284 arg("recording_enabled") = false,
285 arg("event_loop_name") = "HltEventLoopMgr"),
286 "Call prepareForStart on HltEventLoopMgr with individual parameters")
287 .def("prepareForRun", &TrigServicesHelper::prepareForRun,
288 (arg("event_loop_name") = "HltEventLoopMgr"),
289 "Call prepareForRun on HltEventLoopMgr to initialize COOL folder helper and fire BeginRun incident. "
290 "Must be called after start() and before hltUpdateAfterFork().")
291 .def("hltUpdateAfterFork", &TrigServicesHelper::hltUpdateAfterFork,
292 (arg("worker_id") = 1,
293 arg("worker_pid") = -1,
294 arg("event_loop_name") = "HltEventLoopMgr"),
295 "Call hltUpdateAfterFork on HltEventLoopMgr to initialize the scheduler. "
296 "worker_id must be > 0 to avoid mother process behavior during stop().");
297}
bool hltUpdateAfterFork(int worker_id=1, int worker_pid=-1, const std::string &event_loop_name="HltEventLoopMgr")
Call hltUpdateAfterFork on the HltEventLoopMgr.
bool prepareForStart(uint32_t run_number, const std::string &det_mask, const std::string &sor_time, uint32_t lb_number=0, uint32_t beam_type=0, uint32_t beam_energy=0, float toroids_current=20400.0f, float solenoid_current=7730.0f, const std::string &run_type="Physics", uint32_t trigger_type=0, bool recording_enabled=false, const std::string &event_loop_name="HltEventLoopMgr")
Call prepareForStart on the HltEventLoopMgr.
bool prepareForRun(const std::string &event_loop_name="HltEventLoopMgr")
Call prepareForRun on the HltEventLoopMgr.