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
MvtxRawHitContainerv1.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file MvtxRawHitContainerv1.cc
1
#include "
MvtxRawHitContainerv1.h
"
2
#include "
MvtxRawHitv1.h
"
3
4
#include <TClonesArray.h>
5
6
static
const
int
NMVTXHITS
= 100;
7
8
MvtxRawHitContainerv1::MvtxRawHitContainerv1
()
9
{
10
MvtxRawHitsTCArray
=
new
TClonesArray(
"MvtxRawHitv1"
,
NMVTXHITS
);
11
}
12
13
MvtxRawHitContainerv1::~MvtxRawHitContainerv1
()
14
{
15
delete
MvtxRawHitsTCArray
;
16
}
17
18
19
void
MvtxRawHitContainerv1::Reset
()
20
{
21
MvtxRawHitsTCArray
->Clear();
22
MvtxRawHitsTCArray
->Expand(
NMVTXHITS
);
23
}
24
25
void
MvtxRawHitContainerv1::identify
(std::ostream &
os
)
const
26
{
27
os <<
"MvtxRawHitContainerv1"
<< std::endl;
28
os <<
"containing "
<<
MvtxRawHitsTCArray
->GetEntriesFast() <<
" Mvtx hits"
<< std::endl;
29
MvtxRawHit
*mvtxhit =
static_cast<
MvtxRawHit
*
>
(
MvtxRawHitsTCArray
->At(0));
30
if
(mvtxhit)
31
{
32
os <<
"for beam clock: "
<< std::hex << mvtxhit->
get_bco
() << std::dec << std::endl;
33
}
34
}
35
36
int
MvtxRawHitContainerv1::isValid
()
const
37
{
38
return
MvtxRawHitsTCArray
->GetSize();
39
}
40
41
unsigned
int
MvtxRawHitContainerv1::get_nhits
()
42
{
43
return
MvtxRawHitsTCArray
->GetEntriesFast();
44
}
45
46
MvtxRawHit
*
MvtxRawHitContainerv1::AddHit
()
47
{
48
MvtxRawHit
*newhit =
new
((*MvtxRawHitsTCArray)[
MvtxRawHitsTCArray
->GetLast()+1])
MvtxRawHitv1
();
49
return
newhit;
50
}
51
52
MvtxRawHit
*
MvtxRawHitContainerv1::AddHit
(
MvtxRawHit
*mvtxhit)
53
{
54
MvtxRawHit
*newhit =
new
((*MvtxRawHitsTCArray)[
MvtxRawHitsTCArray
->GetLast()+1])
MvtxRawHitv1
(mvtxhit);
55
return
newhit;
56
}
57
58
MvtxRawHit
*
MvtxRawHitContainerv1::get_hit
(
unsigned
int
index
)
59
{
60
return
(
MvtxRawHit
*)
MvtxRawHitsTCArray
->At(index);
61
}
coresoftware
blob
master
offline
framework
ffarawobjects
MvtxRawHitContainerv1.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:04
using
1.8.2 with
sPHENIX GitHub integration