Belle II Software development
DATCONHelpers.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <cmath>
11
12namespace Belle2 {
21 inline long convertFloatToInt(double value, int power)
22 {
23 long factor = (long)pow(10, power);
24 return round(factor * value);
25 }
26
28} // end namespace Belle2
long convertFloatToInt(double value, int power)
Convert float or double to long int for more similarity to the FPGA implementation.
Definition: DATCONHelpers.h:21
Abstract base class for different kinds of events.