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