Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
BbcPmtInfoContainerV1.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file BbcPmtInfoContainerV1.cc
1
#include "
BbcPmtInfoContainerV1.h
"
2
#include "
BbcPmtInfoV1.h
"
3
#include "
BbcDefs.h
"
4
5
#include <
phool/PHObject.h
>
6
#include <
phool/phool.h
>
7
8
#include <TClonesArray.h>
9
10
#include <cassert>
11
12
13
BbcPmtInfoContainerV1::BbcPmtInfoContainerV1
()
14
: _detector(
DETECTOR
::
MBD
)
15
{
16
const
int
nchannels =
BbcDefs::BBC_N_PMT
;
17
_clones
=
new
TClonesArray(
"BbcPmtInfoV1"
, nchannels);
18
_clones
->SetOwner();
19
_clones
->SetName(
"BbcPmtInfoContainerV1"
);
20
for
(
int
ipmt = 0; ipmt < nchannels; ipmt++)
21
{
22
// as tower numbers are fixed per event
23
// construct towers once per run, and clear the towers for first use
24
_clones
->ConstructedAt( ipmt );
25
}
26
}
27
28
BbcPmtInfoContainerV1::~BbcPmtInfoContainerV1
()
29
{
30
delete
_clones
;
31
}
32
33
void
BbcPmtInfoContainerV1::Reset
()
34
{
35
// clear content of towers in the container for the next event
36
//_clones->Clear();
37
for
(
int
ipmt = 0; ipmt <
BbcDefs::BBC_N_PMT
; ipmt++)
38
{
39
_clones
->ConstructedAt( ipmt )->Clear();
40
}
41
}
42
43
BbcPmtInfoV1
*
BbcPmtInfoContainerV1::get_tower_at_channel
(
int
pos
)
44
{
45
return
(
BbcPmtInfoV1
*)
_clones
->ConstructedAt( pos );
46
}
47
coresoftware
blob
master
offline
packages
mbd
BbcPmtInfoContainerV1.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:07
using
1.8.2 with
sPHENIX GitHub integration