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 */
9 // Implementation for TTree output in PHOS DA
10 // for calibrating energy by pi0 and MIP.
12 // -- Author: Hisayuki Torii (Hiroshima Univ.)
18 #include "AliPHOSDATreeCluster.h"
20 class AliPHOSDATreeEvent{
22 friend std::ostream& operator<<(std::ostream& out,const AliPHOSDATreeEvent& event);
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;
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){
38 return fClusters[nclusters];
40 AliPHOSDATreeDigit& GetDigit(int ndigits){
41 return fDigits[ndigits];
43 bool Fill(float fenergy,int row,int col);
44 bool Fill(AliPHOSDATreeDigit& digit);
45 bool ExecuteClustering();
47 if( fNDigits > 0 ) delete[] fDigits;
48 if( fNClusters > 0 ) delete[] fClusters;
53 void Print(Option_t *option="") const;
56 bool Clusterize(AliPHOSDATreeDigit& digit);
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]
64 ClassDef(AliPHOSDATreeEvent,1) // Simple Event Structure for PHOS DA