corrections to obey coding conventions
[u/mrichter/AliRoot.git] / MONITOR / AliMonitorTPC.cxx
index 89251da..7cfca84 100644 (file)
 
 
 #include "AliMonitorTPC.h"
+#include "AliMonitorDataTPC.h"
+#include "AliMonitorHisto.h"
+#include "AliMonitorTrend.h"
+#include "AliTPCParam.h"
 #include "AliTPCRawStream.h"
 #include "AliTPCClustersRow.h"
 #include "AliTPCclusterMI.h"
 #include "AliTPCtrack.h"
+#include "AliRunLoader.h"
+#include <TFolder.h>
+#include <TTree.h>
 
 
-ClassImp(AliMonitorDataTPC) 
+ClassImp(AliMonitorTPC) 
 
 
 //_____________________________________________________________________________
-AliMonitorDataTPC::AliMonitorDataTPC()
+AliMonitorTPC::AliMonitorTPC(AliTPCParam* param)
 {
-  fPt = fEta = fPhi = NULL;
-  fSize = 0;
-}
+// create a TPC monitor object with the given parameters
 
-//_____________________________________________________________________________
-AliMonitorDataTPC::AliMonitorDataTPC(Int_t size)
-{
-  fPt = new Float_t[size];
-  fEta = new Float_t[size];
-  fPhi = new Float_t[size];
-  fSize = size;
+  fParam = param;
+  fData = new AliMonitorDataTPC(10000);
 }
 
 //_____________________________________________________________________________
-AliMonitorDataTPC::~AliMonitorDataTPC()
+AliMonitorTPC::AliMonitorTPC(const AliMonitorTPC& monitor) :
+  AliMonitor(monitor)
 {
-  delete[] fPt;
-  delete[] fEta;
-  delete[] fPhi;
+  Fatal("AliMonitorTPC", "copy constructor not implemented");
 }
 
 //_____________________________________________________________________________
-void AliMonitorDataTPC::SetSize(Int_t size)
+AliMonitorTPC& AliMonitorTPC::operator = (const AliMonitorTPC& /*monitor*/)
 {
-  if (size > fSize) {
-    delete[] fPt;
-    delete[] fEta;
-    delete[] fPhi;
-    fPt = new Float_t[size];
-    fEta = new Float_t[size];
-    fPhi = new Float_t[size];
-    fSize = size;
-  }
-}
-
-
-
-ClassImp(AliMonitorTPC) 
-
-
-//_____________________________________________________________________________
-AliMonitorTPC::AliMonitorTPC(AliTPCParam* param)
-{
-// create a TPC monitor object with the given parameters
-
-  fParam = param;
-  fData = new AliMonitorDataTPC(10000);
+  Fatal("operator =", "assignment operator not implemented");
+  return *this;
 }
 
 //_____________________________________________________________________________
@@ -209,10 +187,10 @@ void AliMonitorTPC::FillHistos(AliRunLoader* runLoader,
   AliTPCtrack* track = new AliTPCtrack;
   tracks->SetBranchAddress("tracks", &track);
 
-  fNTracks->Fill(tracks->GetEntries());
-  fData->fNTracks = (Int_t) tracks->GetEntries();
-  fData->SetSize(fData->fNTracks);
-  for (Int_t i = 0; i < tracks->GetEntries(); i++) {
+  Int_t nTracks = (Int_t) tracks->GetEntries();
+  fNTracks->Fill(nTracks);
+  fData->SetNTracks(nTracks);
+  for (Int_t i = 0; i < nTracks; i++) {
     tracks->GetEntry(i);
     fTrackPt->Fill(track->Pt());
     fTrackEta->Fill(track->Eta());
@@ -220,9 +198,8 @@ void AliMonitorTPC::FillHistos(AliRunLoader* runLoader,
     fTrackNCl->Fill(track->GetNumberOfClusters());
     fTrackDEdxVsP->Fill(track->P(), track->GetdEdx());
 
-    fData->fPt[i] = track->Pt();
-    fData->fEta[i] = track->Eta();
-    fData->fPhi[i] = track->Phi() * TMath::RadToDeg();
+    fData->SetData(i, track->Pt(), track->Eta(), 
+                  track->Phi() * TMath::RadToDeg());
   }
 
   delete track;