BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnScWallEvent.h
Go to the documentation of this file.
1/** \file BmnScWallEvent.h
2 ** \author
3 ** \date 09.09.2022
4 **/
5
6/** \class BmnScWallEvent
7 ** \brief Class for Bmn ScWall data container in event
8 ** \version 0.1
9 **/
10
11#ifndef BMNSCWALLEVENT_H
12#define BMNSCWALLEVENT_H
13
14#include "BmnScWallCell.h"
15
16#include <TClonesArray.h>
17#include <TNamed.h>
18#include <iostream>
19#include <vector>
20
21class BmnScWallEvent : public TNamed
22{
23 public:
24 /** @brief Default constructor.
25 **/
27 : TNamed()
28 , fCellsArr()
29 {
30 reset();
31 }
32
33 /** Destructor **/
35
36 /** @brief Class name
37 ** @return BmnScWallEvent
38 **/
39 virtual const char* GetClassName() { return "BmnScWallEvent"; }
40
41 /** @brief Cell info
42 ** @return BmnScWallCell object with index cell_id = {1 to 174}
43 **/
44 BmnScWallCell* GetCell(uint8_t cell_id) { return &fCellsArr.at(cell_id - 1); };
45
46 /** @brief Set CellsArrtor
47 ** @return Set Vector of BmnScWallCell objects
48 **/
49 void SetCell(uint8_t cell_id, BmnScWallCell Cell) { fCellsArr.at(cell_id - 1) = Cell; };
50
51 /** @brief Zero all fields
52 ** @return Set All fields to zero
53 **/
54 void reset() { fCellsArr.fill({}); }
56 {
57 int sci = 1;
58 for (auto& it : fCellsArr) {
59 it.SetCellId(sci);
60 it.SetSignal(0.);
61 sci++;
62 }
63 }
64
66 virtual void Print(Option_t* option = "") const {};
67
68 static const int fgkMaxCells = 174; // 174 modules numbered from 1 to 174 inclusively
69
70 private:
71 std::array<BmnScWallCell, fgkMaxCells> fCellsArr;
72
74};
75
76#endif /* BMNSCWALLEVENT_H */
const char Option_t
#define ClassDef(name, id)
Class for Bmn ScWall module data container in event.
Class for Bmn ScWall data container in event.
void SetCell(uint8_t cell_id, BmnScWallCell Cell)
Set CellsArrtor.
virtual void Print(Option_t *option="") const
BmnScWallCell * GetCell(uint8_t cell_id)
Cell info.
void SummarizeEvent()
BmnScWallEvent()
Default constructor.
static const int fgkMaxCells
std::array< BmnScWallCell, fgkMaxCells > fCellsArr
void reset()
Zero all fields.
virtual const char * GetClassName()
Class name.
~BmnScWallEvent()
Destructor.