diff --git a/algo/data/CMakeLists.txt b/algo/data/CMakeLists.txt index d2c94ed56bd12bdff45daf4e2e11068d9c0d71d2..ddff59ad68a2c0922dd66e4a4a15141c187ca264 100644 --- a/algo/data/CMakeLists.txt +++ b/algo/data/CMakeLists.txt @@ -5,6 +5,19 @@ set(SRCS ${CMAKE_SOURCE_DIR}/core/data/sts/CbmStsDigi.cxx ${CMAKE_SOURCE_DIR}/core/data/sts/CbmStsAddress.cxx + + ${CMAKE_SOURCE_DIR}/core/data/rich/CbmRichDigi.cxx + + ${CMAKE_SOURCE_DIR}/core/data/much/CbmMuchDigi.cxx + ${CMAKE_SOURCE_DIR}/core/data/much/CbmMuchAddress.cxx + + ${CMAKE_SOURCE_DIR}/core/data/trd/CbmTrdDigi.cxx + + ${CMAKE_SOURCE_DIR}/core/data/tof/CbmTofDigi.cxx + ${CMAKE_SOURCE_DIR}/core/data/tof/CbmTofAddress.cxx + + ${CMAKE_SOURCE_DIR}/core/data/psd/CbmPsdDigi.cxx + ${CMAKE_SOURCE_DIR}/core/data/psd/CbmPsdAddress.cxx ) add_library(OnlineData SHARED ${SRCS}) @@ -13,6 +26,11 @@ target_include_directories(OnlineData PUBLIC ${CMAKE_SOURCE_DIR}/core/data PUBLIC ${CMAKE_SOURCE_DIR}/core/data/base PUBLIC ${CMAKE_SOURCE_DIR}/core/data/sts + PUBLIC ${CMAKE_SOURCE_DIR}/core/data/rich + PUBLIC ${CMAKE_SOURCE_DIR}/core/data/much + PUBLIC ${CMAKE_SOURCE_DIR}/core/data/trd + PUBLIC ${CMAKE_SOURCE_DIR}/core/data/tof + PUBLIC ${CMAKE_SOURCE_DIR}/core/data/psd PUBLIC ${CMAKE_SOURCE_DIR}/core/data/global PUBLIC ${CMAKE_SOURCE_DIR}/external/ipc/ipc/lib/fles_ipc ) diff --git a/core/data/much/CbmMuchDigi.cxx b/core/data/much/CbmMuchDigi.cxx index 083c78975eb8edd6610286bfacd22314c11113df..42adb42a208f7d6d9d25d771f1cee75d350ad13f 100644 --- a/core/data/much/CbmMuchDigi.cxx +++ b/core/data/much/CbmMuchDigi.cxx @@ -58,4 +58,6 @@ void CbmMuchDigi::SetAdc(int32_t adc) void CbmMuchDigi::SetTime(uint64_t time) { fTime = time; } // ------------------------------------------------------------------------- +#ifndef NO_ROOT ClassImp(CbmMuchDigi) +#endif diff --git a/core/data/much/CbmMuchDigi.h b/core/data/much/CbmMuchDigi.h index dabf02b971c213823ce177082e237ace1969203e..06129d763198734e28fd5974a668927ae1cea411 100644 --- a/core/data/much/CbmMuchDigi.h +++ b/core/data/much/CbmMuchDigi.h @@ -23,7 +23,9 @@ #include "CbmDefs.h" // for kMuch #include "CbmMuchAddress.h" // for CbmMuchAddress, kMuchModule +#ifndef NO_ROOT #include <Rtypes.h> // for ClassDef +#endif #include <boost/serialization/access.hpp> #include <boost/serialization/base_object.hpp> @@ -121,6 +123,8 @@ private: bool fSaturationFlag = 0; //If adc value crosses the Maximum Adc value of actual electronics then SaturationFlag will be set. - ClassDef(CbmMuchDigi, 4); +#ifndef NO_ROOT + ClassDefNV(CbmMuchDigi, 4); +#endif }; #endif diff --git a/core/data/psd/CbmPsdDigi.cxx b/core/data/psd/CbmPsdDigi.cxx index f4c72e2c512cdd338088644aaad34a553d60d92f..c790ae4b5ba3b2a60e1a30162a46364c5e338dd4 100644 --- a/core/data/psd/CbmPsdDigi.cxx +++ b/core/data/psd/CbmPsdDigi.cxx @@ -41,5 +41,6 @@ std::string CbmPsdDigi::ToString() const return string.Data(); } - +#ifndef NO_ROOT ClassImp(CbmPsdDigi) +#endif diff --git a/core/data/psd/CbmPsdDigi.h b/core/data/psd/CbmPsdDigi.h index 9e2b4519e42ab65e0ea2140f1e2a528f847b2b0c..403e65683be6314715be1c343121cb72494cd0e1 100644 --- a/core/data/psd/CbmPsdDigi.h +++ b/core/data/psd/CbmPsdDigi.h @@ -22,7 +22,9 @@ #include "CbmDefs.h" // for ECbmModuleId::kPsd #include "CbmPsdAddress.h" // for CbmPsdAddress -#include <Rtypes.h> // for THashConsistencyHolder, ClassDefNV +#ifndef NO_ROOT +#include <Rtypes.h> // for ClassDefNV +#endif #include <boost/serialization/access.hpp> #include <boost/serialization/base_object.hpp> @@ -163,7 +165,9 @@ private: ar& fdEdep; } +#ifndef NO_ROOT ClassDefNV(CbmPsdDigi, 5); +#endif }; #endif // CBMPSDDIGI_H diff --git a/core/data/rich/CbmRichDigi.cxx b/core/data/rich/CbmRichDigi.cxx index 78cd2bdec13d714a84ea62380bc2b4e9a901737e..590be77fb72b6153efaa9df24127cd7bed9486e6 100644 --- a/core/data/rich/CbmRichDigi.cxx +++ b/core/data/rich/CbmRichDigi.cxx @@ -25,4 +25,6 @@ CbmRichDigi::~CbmRichDigi() // TODO Auto-generated destructor stub } +#ifndef NO_ROOT ClassImp(CbmRichDigi) +#endif diff --git a/core/data/rich/CbmRichDigi.h b/core/data/rich/CbmRichDigi.h index 42c0d429c402ff3a9f6487092ab88e74b42daa00..cae69fe7618c1322313b9eb1164fd092e7c95abb 100644 --- a/core/data/rich/CbmRichDigi.h +++ b/core/data/rich/CbmRichDigi.h @@ -15,7 +15,9 @@ #include "CbmDefs.h" // for kRich +#ifndef NO_ROOT #include <Rtypes.h> // for ClassDef +#endif #include <boost/serialization/access.hpp> #include <boost/serialization/base_object.hpp> @@ -100,7 +102,7 @@ private: double fTime; /** - * \brief Time-over-threshold, pulse width. + * \brief Time-over-threshold, pulse width. * This variable is only used in real data analysis, for the simulation it is set to 0. */ double fToT; @@ -115,7 +117,9 @@ private: ar& fToT; } +#ifndef NO_ROOT ClassDefNV(CbmRichDigi, 3); +#endif }; #endif /* DATA_RICH_CBMRICHDIGI_H_ */ diff --git a/core/data/tof/CbmTofDigi.cxx b/core/data/tof/CbmTofDigi.cxx index f310ab2b3de72a7857e23f4b920cdc69ecd63632..3f31bcc0368c82fc0a592c4844e3e2934aa48874 100644 --- a/core/data/tof/CbmTofDigi.cxx +++ b/core/data/tof/CbmTofDigi.cxx @@ -51,5 +51,6 @@ void CbmTofDigi::SetAddress(uint32_t Sm, uint32_t Rpc, uint32_t Channel, uint32_ fuAddress = CbmTofAddress::GetUniqueAddress(Sm, Rpc, Channel, Side, SmType); } - +#ifndef NO_ROOT ClassImp(CbmTofDigi) +#endif diff --git a/core/data/tof/CbmTofDigi.h b/core/data/tof/CbmTofDigi.h index c412c7cee044ac302928e2e2243adba676c9103e..99febb4a8cec0d5233cf026824a253db6ed53d06 100644 --- a/core/data/tof/CbmTofDigi.h +++ b/core/data/tof/CbmTofDigi.h @@ -17,9 +17,9 @@ ** Calibrated Time [ps]: 32 bits double ** Calibrated Tot [ps]: 32 bits double ** - ** In triggered setup, the time is relative to the trigger time, which - ** is measured with a resolution of a few ns corresponding to the TDC - ** system clock cycle. + ** In triggered setup, the time is relative to the trigger time, which + ** is measured with a resolution of a few ns corresponding to the TDC + ** system clock cycle. ** In free-streaming setups, the time is relative to the last epoch. **/ @@ -29,7 +29,9 @@ #include "CbmDefs.h" // for kTof #include "CbmTofAddress.h" // for CbmTofAddress +#ifndef NO_ROOT #include <Rtypes.h> // for ClassDef +#endif #include <boost/serialization/access.hpp> #include <boost/serialization/base_object.hpp> @@ -168,6 +170,8 @@ private: ar& fdTot; } +#ifndef NO_ROOT ClassDefNV(CbmTofDigi, 3); +#endif }; #endif // CBMTOFDIGI_H diff --git a/core/data/trd/CbmTrdDigi.cxx b/core/data/trd/CbmTrdDigi.cxx index aadc37ae19ec97afd37e6a2047f5321543c367dd..736797eb11e5c23577e8a90b0347a20dcc0d83cf 100644 --- a/core/data/trd/CbmTrdDigi.cxx +++ b/core/data/trd/CbmTrdDigi.cxx @@ -15,6 +15,14 @@ #include <cmath> +#ifdef NO_ROOT +// Coming from Rtypes.h in ROOT mode +#define BIT(n) (1ULL << (n)) +#define SETBIT(n, i) ((n) |= BIT(i)) +#define CLRBIT(n, i) ((n) &= ~BIT(i)) +#define TESTBIT(n, i) ((Bool_t)(((n) &BIT(i)) != 0)) +#endif + using std::endl; using std::string; using std::stringstream; @@ -308,4 +316,6 @@ string CbmTrdDigi::ToString() const return ss.str(); } +#ifndef NO_ROOT ClassImp(CbmTrdDigi) +#endif diff --git a/core/data/trd/CbmTrdDigi.h b/core/data/trd/CbmTrdDigi.h index a0a06f7747ca79858ee9b337483a8261fd977713..2dee01c61e22b027e552df37b7b766f49fe06473 100644 --- a/core/data/trd/CbmTrdDigi.h +++ b/core/data/trd/CbmTrdDigi.h @@ -7,7 +7,9 @@ #include "CbmDefs.h" // for kTrd -#include <Rtypes.h> // for ClassDef +#ifndef NO_ROOT +#include <Rtypes.h> // for CLRBIT, SETBIT, TESTBIT, ClassDef +#endif #include <boost/serialization/access.hpp> #include <boost/serialization/base_object.hpp> @@ -81,14 +83,14 @@ public: /** * @brief Copy Construct a new Cbm Trd Digi - * + * */ CbmTrdDigi(const CbmTrdDigi&); /** * @brief Assignment operator - * - * @return CbmTrdDigi& + * + * @return CbmTrdDigi& */ CbmTrdDigi& operator=(const CbmTrdDigi&) = default; @@ -265,13 +267,13 @@ protected: /** * @brief clock length in ns for acquisition - * + * */ static const double fgClk[static_cast<size_t>(eCbmTrdAsicType::kNTypes) + 1]; /** * @brief Nr. of digits stored for ASIC - * + * */ static const float fgPrecission[static_cast<size_t>(eCbmTrdAsicType::kNTypes) + 1]; @@ -295,7 +297,9 @@ private: ar& fTime; } +#ifndef NO_ROOT ClassDefNV(CbmTrdDigi, 4); // Production ready TRD digit +#endif }; #endif