Skip to content
Snippets Groups Projects
Commit 291ed3f8 authored by Sergey Gorbunov's avatar Sergey Gorbunov Committed by Volker Friese
Browse files

add CbmLink interfaces to CbmMCEventInfo and CbmMCEventList

parent 002f1ec1
No related branches found
No related tags found
1 merge request!1066KF: fixes in KFParticleFinder according to the new TOF geometry
......@@ -10,7 +10,9 @@
#ifndef CBMMCEVENTINFO_H
#define CBMMCEVENTINFO_H 1
#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
#include "CbmLink.h"
#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
#include <cstdint>
#include <string> // for string
......@@ -60,6 +62,10 @@ public:
**/
double GetTime() const { return fTime; }
/** @brief Event file and event indices as CbmLink
** @value Event time [ns]
**/
CbmLink GetCbmLink() const { return CbmLink(0., -1, fEventId, fFileId); }
/** Status to string **/
std::string ToString() const;
......
......@@ -128,6 +128,15 @@ int32_t CbmMCEventList::GetFileIdByIndex(uint32_t index)
}
// ----------------------------------------------------------------------------
// ----- Get file number for event at index in list -----------------------
CbmLink CbmMCEventList::GetEventLinkByIndex(uint32_t index)
{
if (!fIsSorted) Sort();
if (index >= GetNofEvents()) return CbmLink();
return fEvents[index].GetCbmLink();
}
// ----------------------------------------------------------------------------
// ----- Insert an event --------------------------------------------------
bool CbmMCEventList::Insert(uint32_t event, uint32_t file, double time)
......
......@@ -106,6 +106,10 @@ public:
Int_t GetEventIndex(const CbmLink& link) { return GetEventIndex(link.GetEntry(), link.GetFile()); }
/** @brief Event file and event indices as CbmLink
**/
CbmLink GetEventLinkByIndex(uint32_t index);
/** @brief Number of events in the list
** @value Number of events
**/
......
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