Skip to content
Snippets Groups Projects
Commit 6463a47e authored by Felix Weiglhofer's avatar Felix Weiglhofer
Browse files

online: Add compat/RTypes.h header for compatability with root macros.

parent c92d4cdc
No related branches found
No related tags found
1 merge request!1782online: Add compat/RTypes.h header for compatability with root macros.
Pipeline #29043 passed
/* Copyright (C) 2024 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
SPDX-License-Identifier: GPL-3.0-only
Authors: Felix Weiglhofer [committer] */
#pragma once
/**
* @file RTypes.h
* @brief Compatibility header for basic ROOT macros.
**/
#if __has_include(<Rtypes.h>)
#include <Rtypes.h>
#else
#define BIT(n) (1ULL << (n))
#define SETBIT(n, i) ((n) |= BIT(i))
#define CLRBIT(n, i) ((n) &= ~BIT(i))
#define TESTBIT(n, i) ((bool) (((n) &BIT(i)) != 0))
#endif
......@@ -4,14 +4,11 @@
#pragma once
#include "compat/RTypes.h"
#include <cstdint>
#include <vector> // for vector
#define BIT(n) (1ULL << (n))
#define SETBIT(n, i) ((n) |= BIT(i))
#define CLRBIT(n, i) ((n) &= ~BIT(i))
#define TESTBIT(n, i) ((bool) (((n) &BIT(i)) != 0))
class CbmTrdDigi;
namespace cbm::algo::trd
......@@ -58,7 +55,7 @@ namespace cbm::algo::trd
/**
* \brief Add digi to cluster.
* \param[in] index Digi index in TClonesArray.
* \param[in] digi pointer to digi
* \param[in] digi pointer to digi
*/
void AddDigiIdxPair(int32_t index, const CbmTrdDigi* digi)
{
......@@ -116,7 +113,7 @@ namespace cbm::algo::trd
/** \brief Append digi to cluster
* \param[in] idx index of digi in TClonesArray
* \param[in] digi pointer to digi
* \param[in] digi pointer to digi
* \param[in] chT RO channel for digi (tilt pairing for FASP) default 0xffff (SPADIC)
* \param[in] chR RO channel for rect pairing (only for FASP)
* \param[in] dt update start time of cluster if current digi is prompt
......
......@@ -5,21 +5,17 @@
#pragma once
#include "CbmTrdDigi.h"
#define BIT(n) (1ULL << (n))
#define SETBIT(n, i) ((n) |= BIT(i))
#define CLRBIT(n, i) ((n) &= ~BIT(i))
#define TESTBIT(n, i) ((bool) (((n) &BIT(i)) != 0))
#include "compat/RTypes.h"
/** @class DigiRec
** @brief Extend the TRD(2D) digi class to incorporate FEE calibration.
** @brief Extend the TRD(2D) digi class to incorporate FEE calibration.
** @author Alexandru Bercucic <abercuci@niham.nipne.ro>
** @since 01.10.2021
** @date 01.10.2021
**
** The digi class contains the information as it is produced by the FEE (ASIC/GETS)
** The variation from channel to channel is captured by running the pulser on anode wires
** using various signal values, frequencies, etc. The calibrated baselines, gains, jitter,
** using various signal values, frequencies, etc. The calibrated baselines, gains, jitter,
** etc. are transported via the parameter files and are applied to the data within the digRec
** class which is in the end used to calculate the TRD hit parameters.
**/
......@@ -48,12 +44,12 @@ namespace cbm::algo::trd
/** \brief Return calibrated rect time [ns]*/
double GetRectTime() const { return GetTime(1); }
/** \brief Return calibrated signal
* \param[in] typ tilt [0], rect [1]
* \param[in] typ tilt [0], rect [1]
* \param[out] on flag signal exists
*/
double GetCharge(int typ, bool& on) const;
/** \brief Return calibrated time
* \param[in] typ tilt [0], rect [1]
* \param[in] typ tilt [0], rect [1]
*/
double GetTime(int typ) const;
bool HasRectOvf() const { return TESTBIT(fStatus, 1); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment