Analysis Software
Documentation for sPHENIX simulation software
 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
2 #include "InttRawHitv1.h"
3 
4 #include <TClonesArray.h>
5 
6 static const int NINTTHITS = 100;
7 
9 {
10  InttRawHitsTCArray = new TClonesArray("InttRawHitv1",NINTTHITS);
11 }
12 
14 {
15  delete InttRawHitsTCArray;
16 }
17 
18 
20 {
21  InttRawHitsTCArray->Clear();
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 
37 {
38  return InttRawHitsTCArray->GetSize();
39 }
40 
42 {
43  return InttRawHitsTCArray->GetEntriesFast();
44 }
45 
47 {
48  InttRawHit *newhit = new ((*InttRawHitsTCArray)[InttRawHitsTCArray->GetLast()+1]) InttRawHitv1();
49  return newhit;
50 }
51 
53 {
54  InttRawHit *newhit = new ((*InttRawHitsTCArray)[InttRawHitsTCArray->GetLast()+1]) InttRawHitv1(intthit);
55  return newhit;
56 }
57 
59 {
60  return (InttRawHit *) InttRawHitsTCArray->At(index);
61 }