From f42c9d113aa90bce27ae3d639f1a21e26facf8ee Mon Sep 17 00:00:00 2001
From: Norbert Herrmann <n.herrmann@physi.uni-heidelberg.de>
Date: Sun, 19 Jul 2020 17:36:49 +0200
Subject: [PATCH] v14a addressing scheme

---
 core/data/tof/CbmTofAddress.cxx |  9 +++++++--
 core/data/tof/CbmTofAddress.h   | 33 +++++++++++++++++++++++++++------
 2 files changed, 34 insertions(+), 8 deletions(-)

diff --git a/core/data/tof/CbmTofAddress.cxx b/core/data/tof/CbmTofAddress.cxx
index 188b241e85..a078dbbfec 100644
--- a/core/data/tof/CbmTofAddress.cxx
+++ b/core/data/tof/CbmTofAddress.cxx
@@ -23,8 +23,13 @@ const Int_t CbmTofAddress::fgkChannelSideOffset =
 /** Offset in bits for Channel Id in the address field  **/
 const Int_t CbmTofAddress::fgkChannelIdOffset =
   CbmTofAddress::fgkChannelSideBits + CbmTofAddress::fgkChannelSideOffset;
+/** Offset in bits for Rpc Type in the address field  **/
+const Int_t CbmTofAddress::fgkRpcTypeOffset =
+  CbmTofAddress::fgkChannelIdBits + CbmTofAddress::fgkChannelIdOffset;
 
 const Int_t CbmTofAddress::fgkiModFullIdMask =
-  (((1 << fgkSystemBits) - 1)) + (((1 << fgkSmIdBits) - 1) << fgkSmIdOffset)
+    (((1 << fgkSystemBits) - 1))
+  + (((1 << fgkSmIdBits) - 1) << fgkSmIdOffset)
   + (((1 << fgkSmTypeBits) - 1) << fgkSmTypeOffset)
-  + (((1 << fgkRpcIdBits) - 1) << fgkRpcIdOffset);
+  + (((1 << fgkRpcIdBits) - 1) << fgkRpcIdOffset)
+  + (((1 << fgkRpcTypeBits) - 1) << fgkRpcTypeOffset);
diff --git a/core/data/tof/CbmTofAddress.h b/core/data/tof/CbmTofAddress.h
index e70c9b4cf7..482c6f987d 100644
--- a/core/data/tof/CbmTofAddress.h
+++ b/core/data/tof/CbmTofAddress.h
@@ -171,17 +171,36 @@ private:
        **/
 
   /** Sub-fields sizes in bits   **/
-  /** Number of bits for Super Module Id in the address field  **/
+
+  // v14a
+
+  // Number of bits for Super Module Id in the address field
   static const Int_t fgkSmIdBits = 8;
-  /** Number of bits for Super Module Type in the address field  **/
+  // Number of bits for Super Module Type in the address field
   static const Int_t fgkSmTypeBits = 4;
-  /** Number of bits for Rpc Id in the address field  **/
+  // Number of bits for Rpc Id in the address field
   static const Int_t fgkRpcIdBits = 7;
-  /** Number of bits for Channel Side in the address field  **/
+  // Number of bits for Channel Side in the address field
   static const Int_t fgkChannelSideBits = 1;
-  /** Number of bits for Channel Id in the address field  **/
+  // Number of bits for Channel Id in the address field
   static const Int_t fgkChannelIdBits = 8;
-
+  // Number of bits for Rpc Type in the address field
+  static const Int_t fgkRpcTypeBits = 0;
+  /*
+  // v20a
+  // Number of bits for Super Module Id in the address field
+  static const Int_t fgkSmIdBits = 7;
+  // Number of bits for Super Module Type in the address field
+  static const Int_t fgkSmTypeBits = 4;
+  // Number of bits for Rpc Id in the address field
+  static const Int_t fgkRpcIdBits = 6;
+  // Number of bits for Channel Side in the address field
+  static const Int_t fgkChannelSideBits = 1;
+  // Number of bits for Channel Id in the address field
+  static const Int_t fgkChannelIdBits = 4;
+  // Number of bits for Rpc Type in the address field
+  static const Int_t fgkRpcTypeBits = 4;
+*/
   /**
        ** To adapt the address sub-fields repartition in order,
        ** you just need to change the way the offset are calculated.
@@ -198,6 +217,8 @@ private:
   static const Int_t fgkRpcIdOffset;
   /** Offset in bits for Channel Id in the address field  **/
   static const Int_t fgkChannelIdOffset;
+  /** Offset in bits for Channel Id in the address field  **/
+  static const Int_t fgkRpcTypeOffset;
 
   /**
        ** For the module Full Id determination
-- 
GitLab