]>
Commit | Line | Data |
---|---|---|
b15de2d2 | 1 | ///////////////////////////////////////////////////////////////// |
2 | // Author: Henrik Tydesjo // | |
3 | // This class is used as a container online. // | |
4 | // One object for each half stave and step in a scan. It keeps // | |
5 | // the nr of events with at least one pixel hit in each chip. // | |
6 | // It also keeps the value for the all the 10 chips together. // | |
7 | // This class should only be used through the interface of the // | |
8 | // AliITSOnlineSPDscan class. // | |
9 | ///////////////////////////////////////////////////////////////// | |
10 | ||
11 | #include "AliITSOnlineSPDHitEvent.h" | |
12 | ||
13 | ClassImp(AliITSOnlineSPDHitEvent) | |
14 | ||
15 | AliITSOnlineSPDHitEvent::AliITSOnlineSPDHitEvent(){ | |
16 | // constructor, sets the nr of events hit for each chip to 0 | |
17 | for (Int_t i=0; i<11; i++) { | |
18 | fHitEvent[i]=0; | |
19 | } | |
20 | } | |
21 | ||
22 | AliITSOnlineSPDHitEvent* AliITSOnlineSPDHitEvent::CloneThis() const { | |
23 | // makes a copy of this object and returns it | |
24 | AliITSOnlineSPDHitEvent* returnpointer = new AliITSOnlineSPDHitEvent(); | |
25 | for (Int_t i=0; i<11; i++) { | |
26 | returnpointer->SetHitEvent(i,fHitEvent[i]); | |
27 | } | |
28 | return returnpointer; | |
29 | } | |
30 | ||
31 | void AliITSOnlineSPDHitEvent::IncrementHitEvent(UInt_t chip) { | |
32 | // increment the nr of hit events for chip 'chip' | |
33 | if (chip<=10) { | |
34 | fHitEvent[chip]++; | |
35 | } | |
36 | } | |
37 | void AliITSOnlineSPDHitEvent::SetHitEvent(UInt_t chip, UInt_t events) { | |
38 | // set the nr of hit events for chip 'chip' | |
39 | if (chip<=10) { | |
40 | fHitEvent[chip] = events; | |
41 | } | |
42 | } | |
43 | UInt_t AliITSOnlineSPDHitEvent::GetHitEvent(UInt_t chip) const { | |
44 | // get the nr of hit events for chip 'chip' | |
45 | if (chip<=10) { | |
46 | return fHitEvent[chip]; | |
47 | } | |
48 | else { | |
49 | return 0; | |
50 | } | |
51 | } |