ChimeraTK-ApplicationCore 04.06.00
Loading...
Searching...
No Matches
PyDataConsistencyGroup.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2// SPDX-License-Identifier: LGPL-3.0-or-later
3#pragma once
4
5#include <pybind11/pybind11.h>
6// pybind11.h must come first
7
8#include "PyTransferElement.h"
9
10#include <ChimeraTK/DataConsistencyGroup.h>
11
12namespace py = pybind11;
13
14namespace ChimeraTK {
15
16 /********************************************************************************************************************/
17
19 public:
20 explicit PyDataConsistencyGroup(DataConsistencyGroup&& other) : _impl(std::move(other)) {}
21
22 explicit PyDataConsistencyGroup(const py::args& args, DataConsistencyGroup::MatchingMode mode, unsigned histLen)
23 : _impl(mode) {
24 for(const auto& acc : args) {
25 add(acc.cast<PyTransferElementBase&>(), histLen);
26 }
27 }
28
29 void add(PyTransferElementBase& acc, unsigned histLen = DataConsistencyGroup::defaultHistLen) {
30 _impl.add(acc.getTE(), histLen);
31 }
32
33 bool update(const TransferElementID& transferelementid) { return _impl.update(transferelementid); }
34
35 DataConsistencyGroup::MatchingMode getMatchingMode() const { return _impl.getMatchingMode(); };
36
37 static void bind(py::module& mod);
38
39 protected:
40 DataConsistencyGroup _impl;
41 };
42
43 /********************************************************************************************************************/
44
45} // namespace ChimeraTK
PyDataConsistencyGroup(const py::args &args, DataConsistencyGroup::MatchingMode mode, unsigned histLen)
PyDataConsistencyGroup(DataConsistencyGroup &&other)
void add(PyTransferElementBase &acc, unsigned histLen=DataConsistencyGroup::defaultHistLen)
DataConsistencyGroup::MatchingMode getMatchingMode() const
bool update(const TransferElementID &transferelementid)
virtual const TransferElementAbstractor & getTE() const =0
InvalidityTracer application module.
module_ module