Skip to content
Snippets Groups Projects
Commit 2fb5d4be authored by Alexandru Bercuci's avatar Alexandru Bercuci Committed by Florian Uhlig
Browse files

add GetSize accessor to account for signal count in TRD2D

parent 1cf2ff67
No related branches found
No related tags found
1 merge request!1102add geo alignment support for the TRD system
......@@ -128,6 +128,25 @@ int32_t CbmTrdCluster::IsChannelInRange(int32_t ch) const
return 0;
}
//____________________________________________________________________
uint16_t CbmTrdCluster::GetSize() const
{
uint16_t size(0);
if (HasFaspDigis()) {
size = GetNCols() << 1;
if (HasOpenStart()) size--;
if (HasOpenStop()) size--;
if (size <= 0) {
LOG(warn) << GetName() << "::GetSize: Fasp cluster meta-info corrupt.";
std::cout << ToString();
return 0;
}
}
else
size = GetNCols();
return size;
}
//____________________________________________________________________
bool CbmTrdCluster::Merge(CbmTrdCluster* second, bool typ)
{
......
......@@ -69,6 +69,7 @@ public:
uint16_t GetNRows() const { return fNRows & 0x1f; }
uint16_t GetEndCh() const { return fStartCh + fNCols - 1; }
uint16_t GetRow() const { return GetNRows(); }
uint16_t GetSize() const;
uint16_t GetStartCh() const { return fStartCh; }
uint32_t GetStartTime() const { return fStartTime; }
bool HasFaspDigis() const { return TESTBIT(fNRows, kFasp); }
......
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