+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+/* $Id:$*/
+
// --
// --
// Implementation for TTree output in PHOS DA
return *this;
}
//------------------------------------------------------------------------
-void AliPHOSDATreeCluster::Print(char* opt){
+void AliPHOSDATreeCluster::Print(Option_t *opt) const
+{
// Print out
std::cout<<" AliPHOSDATreeCluster:: Energy="<<fEnergy<<" NDigits="<<fNDigits
<<" (row,col)=("<<fRow<<","<<fCol<<")"<<std::endl;
+#ifndef AliPHOSDATreeCluster_H
+#define AliPHOSDATreeCluster_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id:$*/
+
// --
// --
// Implementation for TTree output in PHOS DA
// -- Author: Hisayuki Torii (Hiroshima Univ.)
// --
-#ifndef AliPHOSDATreeCluster_H
-#define AliPHOSDATreeCluster_H
-
#include <iostream>
#include "AliPHOSDATreeDigit.h"
bool CalculateProperty();
int GetNDigits() const{ return fNDigits; };
AliPHOSDATreeDigit& GetDigit(int ndigit){
- if( ndigit >= 0 && ndigit < fNDigits ) return fDigits[ndigit];
- else std::cout<<" AliPHOSDATreeCluster::GetDigit("<<ndigit<<")::Error. Out of range > "<<fNDigits<<std::endl;
+ return fDigits[ndigit];
};
AliPHOSDATreeDigit& GetMaxDigit(){
- if( fNDigits >= 0 ) return fDigits[0];
- else std::cout<<" AliPHOSDATreeCluster::GetMaxDigit()::Warning No digit information."<<std::endl;
+ return fDigits[0];
};
bool Append(AliPHOSDATreeDigit& digit);
bool Append(AliPHOSDATreeCluster& cluster);
bool IsNeighbor(const AliPHOSDATreeDigit& digit) const;
bool IsNeighbor(const AliPHOSDATreeCluster& cluster) const;
void Reset();
- void Print(char* opt="");
+ void Print(Option_t *option="") const;
private:
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+/* $Id:$*/
+
// --
// --
// Implementation for TTree output in PHOS DA
return false;
}
//------------------------------------------------------------------------
-void AliPHOSDATreeDigit::Print(char* opt){
+void AliPHOSDATreeDigit::Print(Option_t *opt) const
+{
// Print out
std::cout<<" AliPHOSDATreeDigit:: "<<opt<<" E="<<fEnergy<<" (row,col)=("
<<GetRow()<<","<<GetCol()<<") absid="<<fAbsId<<std::endl;
+#ifndef AliPHOSDATreeDigit_H
+#define AliPHOSDATreeDigit_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id:$*/
+
// --
// --
// Implementation for TTree output in PHOS DA
// -- Author: Hisayuki Torii (Hiroshima Univ.)
// --
-#ifndef AliPHOSDATreeDigit_H
-#define AliPHOSDATreeDigit_H
class AliPHOSDATreeDigit {
friend std::ostream& operator<<(std::ostream& out,const AliPHOSDATreeDigit& digit);
short GetDigitId() const{return fAbsId; };
bool IsValid() const { if( fAbsId>=0 && fAbsId < 3584 ) return true; return false; };
bool IsNeighbor(const AliPHOSDATreeDigit &digit) const;
- void Print(char* opt="");
+ void Print(Option_t *opt="") const;
//AliPHOSDATreeDigit(float energy,int mod,int row,int col):fEnergy(energy),fAbsId(mod*3584+row*56+col){/**/};
//void Set(float energy,int mod,int row,int col){
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+/* $Id:$*/
+
// --
// --
// Implementation for TTree output in PHOS DA
#include "AliPHOSDATreeEvent.h"
ClassImp(AliPHOSDATreeEvent)
//------------------------------------------------------------------------
-AliPHOSDATreeEvent::AliPHOSDATreeEvent(const AliPHOSDATreeEvent& evt){
+AliPHOSDATreeEvent::AliPHOSDATreeEvent(const AliPHOSDATreeEvent& evt)
+: fTime(0),
+ fNDigits(0),
+ fDigits(0),
+ fNClusters(0),
+ fClusters(0)
+{
// Copy Constructor
fNDigits = evt.fNDigits;
return true;
}
//------------------------------------------------------------------------
-void AliPHOSDATreeEvent::Print(char* opt){
+void AliPHOSDATreeEvent::Print(Option_t *opt) const
+{
// Print Out
char* when = ctime(&fTime);
+#ifndef AliPHOSDATreeEvent_H
+#define AliPHOSDATreeEvent_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id:$*/
// --
// --
// Implementation for TTree output in PHOS DA
// -- Author: Hisayuki Torii (Hiroshima Univ.)
// --
-#ifndef AliPHOSDATreeEvent_H
-#define AliPHOSDATreeEvent_H
#include <iostream>
#include <Rtypes.h>
#include <ctime>
int GetNDigits() const{ return fNDigits; };
int GetNClusters() const{ return fNClusters; };
AliPHOSDATreeCluster& GetCluster(int nclusters){
- if( nclusters < fNClusters ) return fClusters[nclusters];
+ return fClusters[nclusters];
};
AliPHOSDATreeDigit& GetDigit(int ndigits){
- if( ndigits < fNDigits ) return fDigits[ndigits];
+ return fDigits[ndigits];
};
bool Fill(float fenergy,int row,int col);
bool Fill(AliPHOSDATreeDigit& digit);
fNDigits = 0;
fNClusters = 0;
};
- void Print(char* opt="");
+ void Print(Option_t *option="") const;
private:
bool Clusterize(AliPHOSDATreeDigit& digit);
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+/* $Id:$*/
+
// --
// --
// Implementation for TTree output in PHOS DA
#include <stdio.h>
#include <iostream>
#include <math.h>
+#include "AliLog.h"
#include "AliPHOSDApi0mip.h"
ClassImp(AliPHOSDApi0mip)
//----------------------------------------------------------------
}
}
//-------------------------------------------------------------------
+AliPHOSDApi0mip& AliPHOSDApi0mip::operator= (const AliPHOSDApi0mip&)
+{
+ // Operator= is not implemented yet
+ AliFatal("Operator= is not implemented");
+ return *this;
+}
+//-------------------------------------------------------------------
AliPHOSDApi0mip::~AliPHOSDApi0mip(){
// Destructor
//
}
//-------------------------------------------------------------------
-void AliPHOSDApi0mip::Print(char* opt){
+void AliPHOSDApi0mip::Print(Option_t *option) const
+{
// Print Out
//fTFile->ls();
//fTTree->Print();
if( fEvent ){
//fEvent->ExecuteClustering();
- fEvent->Print(opt);
+ fEvent->Print(option);
}
}
//-------------------------------------------------------------------
+#ifndef AliPHOSDApi0mip_H
+#define AliPHOSDApi0mip_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id:$*/
+
// --
// --
// Implementation for TTree output in PHOS DA
// --
// -- Author: Hisayuki Torii (Hiroshima Univ.)
// --
-#ifndef AliPHOSDApi0mip_H
-#define AliPHOSDApi0mip_H
+
#include <time.h>
public:
AliPHOSDApi0mip(int module,int iterid=0,char* fopt="RECREATE");
AliPHOSDApi0mip(const AliPHOSDApi0mip& da);
+ AliPHOSDApi0mip& operator= (const AliPHOSDApi0mip&);
~AliPHOSDApi0mip();
void NewEvent();
time_t GetTime(){return fTime;};
void FillTree(AliPHOSDATreeEvent* event=0);
void FillHist(AliPHOSDATreeEvent* event=0);
- void Print(char* opt="");
+ void Print(Option_t *option="") const;
private:
- bool CreateTree();
- bool CreateHist();
- bool fCreateTree; //! Flag of tree initialization
- bool fCreateHist; //! Flag of hist initialization
- int fMod; // Module ID [0-4] ([2-4] for 2009)
- int fIterId; // Iteration step [0-*]
- //
- TFile* fTFile; //! output file
- TTree* fTTree; //! output TTree
- AliPHOSDATreeEvent* fEvent; //! Contents of TTree
- bool fEventClustered; //! Flag for
+ Bool_t CreateTree();
+ Bool_t CreateHist();
+ Bool_t fCreateTree; //! Flag of tree initialization
+ Bool_t fCreateHist; //! Flag of hist initialization
+ Int_t fMod; // Module ID [0-4] ([2-4] for 2009)
+ Int_t fIterId; // Iteration step [0-*]
+ TFile* fTFile; //! output file
+ TTree* fTTree; //! output TTree
+ AliPHOSDATreeEvent* fEvent; //! Contents of TTree
+ Bool_t fEventClustered; //! Flag for
time_t fTime; // time
- TH1I* fH1Time; // x:bin1=StartTime bin2=EndTime
- TH1F* fH1DigitNum; // x:Number of digits
- TH1F* fH1ClusterNum; // x:Number of clusters
- TH2F* fH2EneDigitId; // x:DigitId[0-3583] y:Digit Energy
- TH2F* fH2MipDigitId; // x:DigitId[0-3583] y:Cluster Energy
- TH2F* fH2Pi0DigitId; // x:DigitId[0-3583] y:Cluster Pair Mass
- TH3F* fH3Pi0AsymPt; // x:asym y:pT(GeV/c) z:Cluster Pair Mass
+ TH1I* fH1Time; // x:bin1=StartTime bin2=EndTime
+ TH1F* fH1DigitNum; // x:Number of digits
+ TH1F* fH1ClusterNum; // x:Number of clusters
+ TH2F* fH2EneDigitId; // x:DigitId[0-3583] y:Digit Energy
+ TH2F* fH2MipDigitId; // x:DigitId[0-3583] y:Cluster Energy
+ TH2F* fH2Pi0DigitId; // x:DigitId[0-3583] y:Cluster Pair Mass
+ TH3F* fH3Pi0AsymPt; // x:asym y:pT(GeV/c) z:Cluster Pair Mass
ClassDef(AliPHOSDApi0mip,1)
};