

.. _sphx_glr_auto_examples_monitoring_io_monit.py:


==================
Monitoring Channel
==================

This application demonstrates how to access monitoring channel data.




.. code-block:: python

    # Author: Tamas Gal <tgal@km3net.de>
    # License: MIT
    #!/usr/bin/env python
    # coding=utf-8
    # vim: ts=4 sw=4 et
    from __future__ import print_function
    import io
    import km3pipe as kp

    __author__ = "Tamas Gal"
    __email__ = "tgal@km3net.de"


    def print_monitoring_data(blob):
        data = io.BytesIO(blob['CHData'])
        print(kp.io.daq.TMCHData(data))
        return blob


    pipe = kp.Pipeline()
    pipe.attach(kp.io.CHPump, host='localhost', tags='IO_MONIT')
    pipe.attach(print_monitoring_data)
    pipe.drain()

**Total running time of the script:** ( 0 minutes  0.000 seconds)



.. container:: sphx-glr-footer


  .. container:: sphx-glr-download

     :download:`Download Python source code: io_monit.py <io_monit.py>`



  .. container:: sphx-glr-download

     :download:`Download Jupyter notebook: io_monit.ipynb <io_monit.ipynb>`

.. rst-class:: sphx-glr-signature

    `Generated by Sphinx-Gallery <https://sphinx-gallery.readthedocs.io>`_
