]>
Commit | Line | Data |
---|---|---|
c335b3c5 | 1 | #ifndef AliPHOSDATreeEvent_H |
2 | #define AliPHOSDATreeEvent_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
e7386040 | 6 | /* $Id$ */ |
12f6dd57 | 7 | // -- |
8 | // -- | |
9 | // Implementation for TTree output in PHOS DA | |
10 | // for calibrating energy by pi0 and MIP. | |
11 | // -- | |
12 | // -- Author: Hisayuki Torii (Hiroshima Univ.) | |
13 | // -- | |
14 | ||
12f6dd57 | 15 | #include <iostream> |
16 | #include <Rtypes.h> | |
17 | #include <ctime> | |
18 | #include "AliPHOSDATreeCluster.h" | |
19 | ||
20 | class AliPHOSDATreeEvent{ | |
21 | ||
22 | friend std::ostream& operator<<(std::ostream& out,const AliPHOSDATreeEvent& event); | |
23 | ||
24 | public: | |
25 | ||
26 | AliPHOSDATreeEvent(): fTime(0), fNDigits(0), fDigits(0), fNClusters(0), fClusters(0){/* */}; | |
27 | AliPHOSDATreeEvent(const AliPHOSDATreeEvent& evt); | |
28 | AliPHOSDATreeEvent& operator=(const AliPHOSDATreeEvent& evt); | |
29 | virtual ~AliPHOSDATreeEvent(){ | |
30 | if( fNDigits > 0 ) delete[] fDigits; | |
31 | if( fNClusters > 0 ) delete[] fClusters; | |
32 | }; | |
33 | time_t GetTime() const{return fTime;}; | |
34 | void SetTime(time_t time){fTime=time;}; | |
35 | int GetNDigits() const{ return fNDigits; }; | |
36 | int GetNClusters() const{ return fNClusters; }; | |
37 | AliPHOSDATreeCluster& GetCluster(int nclusters){ | |
c335b3c5 | 38 | return fClusters[nclusters]; |
12f6dd57 | 39 | }; |
40 | AliPHOSDATreeDigit& GetDigit(int ndigits){ | |
c335b3c5 | 41 | return fDigits[ndigits]; |
12f6dd57 | 42 | }; |
43 | bool Fill(float fenergy,int row,int col); | |
44 | bool Fill(AliPHOSDATreeDigit& digit); | |
45 | bool ExecuteClustering(); | |
46 | void Reset(){ | |
47 | if( fNDigits > 0 ) delete[] fDigits; | |
48 | if( fNClusters > 0 ) delete[] fClusters; | |
49 | fTime = 0; | |
50 | fNDigits = 0; | |
51 | fNClusters = 0; | |
52 | }; | |
c335b3c5 | 53 | void Print(Option_t *option="") const; |
12f6dd57 | 54 | |
55 | private: | |
56 | bool Clusterize(AliPHOSDATreeDigit& digit); | |
57 | ||
58 | time_t fTime; // Time information | |
59 | int fNDigits; // Number of digits in event | |
60 | AliPHOSDATreeDigit* fDigits; //[fNDigits] | |
61 | int fNClusters; // Number of clusters in event | |
62 | AliPHOSDATreeCluster* fClusters; //[fNClusters] | |
63 | ||
64 | ClassDef(AliPHOSDATreeEvent,1) // Simple Event Structure for PHOS DA | |
65 | }; | |
66 | #endif | |
67 |