FAQ:From Python or C++, how do I know the current execution cycle?

From Daya Bay
Jump to navigation Jump to search
Offline Documentation: [Offline Category] [FAQ] [Howto] [Reference] [Manual]

Offline Documentation
This article is part
of the Offline Documentation
Other pages...

Offline Category
How Tos
Getting Started
Software Installation

See also...

General Help on this Wiki

Using DybPython as your algorithm base class you need to keep count yourself. Do something like:

class MyAlg(DybPythonAlg):
    def __init__(self,name):
        self.count = 0

    def execute(self):
        self.count += 1

Using C++ and the DybAlgorithm as your algorithm's base class the count is available via:

int n = getExecNum();
Offline Software Documentation: [Offline Categories] [FAQ] [Offline Faq Category]