CbmRoot
Loading...
Searching...
No Matches
CbmAddress.h
Go to the documentation of this file.
1/* Copyright (C) 2013-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
10#ifndef CBMADDRESS_H
11#define CBMADDRESS_H 1
12
13#include <cstdint>
14
28public:
31
32
34 virtual ~CbmAddress() {};
35
36
40 static int32_t GetNofSystemBits() { return fgkSystemBits; }
41
42
47 static int32_t GetSystemId(uint32_t address) { return address & ((1 << fgkSystemBits) - 1); }
48
49
50protected:
52 static const int32_t fgkSystemBits = 4;
53};
54
55#endif /* CBMADDRESS_H */
Base class for interfaces to the unique address.
Definition CbmAddress.h:27
static int32_t GetNofSystemBits()
Definition CbmAddress.h:40
static int32_t GetSystemId(uint32_t address)
Definition CbmAddress.h:47
static const int32_t fgkSystemBits
Definition CbmAddress.h:52
virtual ~CbmAddress()
Definition CbmAddress.h:34