BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
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
21
class
BmnScWallEvent
:
public
TNamed
22
{
23
public
:
24
/** @brief Default constructor.
25
**/
26
BmnScWallEvent
()
27
:
TNamed
()
28
,
fCellsArr
()
29
{
30
reset
();
31
}
32
33
/** Destructor **/
34
~BmnScWallEvent
() {
reset
(); }
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({}); }
55
void
ResetCells
()
56
{
57
int
sci = 1;
58
for
(
auto
& it :
fCellsArr
) {
59
it.SetCellId(sci);
60
it.SetSignal(0.);
61
sci++;
62
}
63
}
64
65
void
SummarizeEvent
();
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
73
ClassDef
(
BmnScWallEvent
, 2);
74
};
75
76
#endif
/* BMNSCWALLEVENT_H */
Option_t
const char Option_t
ClassDef
#define ClassDef(name, id)
TClonesArray.h
TNamed.h
BmnScWallCell
Class for Bmn ScWall module data container in event.
Definition
BmnScWallCell.h:22
BmnScWallEvent
Class for Bmn ScWall data container in event.
Definition
BmnScWallEvent.h:22
BmnScWallEvent::SetCell
void SetCell(uint8_t cell_id, BmnScWallCell Cell)
Set CellsArrtor.
Definition
BmnScWallEvent.h:49
BmnScWallEvent::Print
virtual void Print(Option_t *option="") const
Definition
BmnScWallEvent.h:66
BmnScWallEvent::GetCell
BmnScWallCell * GetCell(uint8_t cell_id)
Cell info.
Definition
BmnScWallEvent.h:44
BmnScWallEvent::SummarizeEvent
void SummarizeEvent()
BmnScWallEvent::ResetCells
void ResetCells()
Definition
BmnScWallEvent.h:55
BmnScWallEvent::BmnScWallEvent
BmnScWallEvent()
Default constructor.
Definition
BmnScWallEvent.h:26
BmnScWallEvent::fgkMaxCells
static const int fgkMaxCells
Definition
BmnScWallEvent.h:68
BmnScWallEvent::fCellsArr
std::array< BmnScWallCell, fgkMaxCells > fCellsArr
Definition
BmnScWallEvent.h:71
BmnScWallEvent::reset
void reset()
Zero all fields.
Definition
BmnScWallEvent.h:54
BmnScWallEvent::GetClassName
virtual const char * GetClassName()
Class name.
Definition
BmnScWallEvent.h:39
BmnScWallEvent::~BmnScWallEvent
~BmnScWallEvent()
Destructor.
Definition
BmnScWallEvent.h:34
TNamed
TNamed::TNamed
TNamed()
BmnScWallCell.h
install
include
BmnScWallEvent.h
Generated on
for BmnRoot by
1.17.0