BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnNdetEvent.h
Go to the documentation of this file.
1/** \file BmnNdetEvent.h
2 ** \author Nikolay Karpushkin <karpushkin@inr.ru>
3 ** \date 27.03.2022
4 **/
5
6/** \class BmnNdetEvent
7 ** \brief Class for Bmn Ndet data container in event
8 ** \version 1.0
9 **/
10
11#ifndef BMNNDETEVENT_H
12#define BMNNDETEVENT_H
13
14#include "BmnNdetCell.h"
15
16#include <TClonesArray.h>
17#include <TNamed.h>
18
19class BmnNdetEvent : public TNamed
20{
21 public:
22 /** @brief Default constructor. **/
24
25 /** Destructor **/
26 virtual ~BmnNdetEvent();
27
28 /** Copy constructor **/
30
31 /** Move constructor **/
32 BmnNdetEvent(BmnNdetEvent&&) noexcept;
33
34 /** Assignment operator **/
36
37 /** Move assignment operator **/
39
40 /** @brief Class name
41 ** @return BmnNdetEvent
42 **/
43 virtual const char* GetClassName() { return "BmnNdetEvent"; }
44
45 /** @brief Add a cell to the event.
46 ** @param cell Pointer to the BmnNdetCell.
47 **/
48 void AddCell(BmnNdetCell* cell);
49
50 /** @brief Get a cell based on its address.
51 ** @param address The unique address of the cell.
52 ** @return Pointer to the BmnNdetCell corresponding to the address.
53 **/
54 BmnNdetCell* GetCell(uint32_t address);
55
56 /** @brief Get a cell based on its arm, row, column, and layer indices.
57 ** @param ArmId Arm index.
58 ** @param RowId Row index.
59 ** @param ColumnId Column index.
60 ** @param LayerId Layer index.
61 ** @return Pointer to the BmnNdetCell corresponding to the indices.
62 **/
63 BmnNdetCell* GetCell(uint32_t ArmId, uint32_t RowId, uint32_t ColumnId, uint32_t LayerId);
64
65 /** @brief Get the total number of cells fired in event.
66 ** @return Total number of cells fired in event.
67 **/
68 Long64_t GetTotalCells() const { return fCells->GetEntriesFast(); }
69
70 /** @brief Interface to the cells set.
71 ** @return Cells set.
72 **/
73 TClonesArray* GetCells() const { return fCells; }
74
75 /** @brief Modifiable interface to the cells set.
76 ** @return Modifiable cells set.
77 **/
79
80 /** @brief Zero all fields
81 **/
82 void reset();
83
84 /** @brief Reset time and energy for all cells.
85 **/
86 void ResetCells();
87
88 private:
90
92};
93
94#endif /* BMNNDETEVENT_H */
long long Long64_t
#define ClassDef(name, id)
Long64_t GetTotalCells() const
Get the total number of cells fired in event.
virtual ~BmnNdetEvent()
Destructor.
TClonesArray * fCells
TClonesArray * GetCells() const
Interface to the cells set.
TClonesArray * GetModifiableCells()
Modifiable interface to the cells set.
BmnNdetEvent()
Default constructor.
virtual const char * GetClassName()
Class name.
BmnNdetCell * GetCell(uint32_t address)
Get a cell based on its address.
void reset()
Zero all fields.
void AddCell(BmnNdetCell *cell)
Add a cell to the event.
BmnNdetEvent & operator=(const BmnNdetEvent &)
Assignment operator.
void ResetCells()
Reset time and energy for all cells.
friend friend class TClonesArray