]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCSelectorESD.cxx
Memory leak problems (TLinearFitter)- way around
[u/mrichter/AliRoot.git] / TPC / AliTPCSelectorESD.cxx
index 5bebfb6a2f2d4f20ba2a15329da392f91ed4d4f9..54e38d7fa82899e8f31f6441e172aa4c1dd88755 100644 (file)
@@ -57,6 +57,10 @@ AliTPCSelectorESD::AliTPCSelectorESD(TTree *tree) :
    fESDevent(0),
    fESD(0),
    fESDfriend(0),
+   fNtracks(0),       //! number of Tracks
+   fNtracksFriend(0), //! number of firend Tracks  
+   fNClusters(0),      //! number of clusters on track
+   fRegPath(0),       // path to store persistent data 
    fFileNo(0),
    fSysWatch(0),      // system info        
    fFileWatch(0),      // file watch - write the status of the analyzed files
@@ -83,6 +87,18 @@ void AliTPCSelectorESD::Begin(TTree * /*tree*/)
 
 }
 
+
+void    AliTPCSelectorESD::SetInputList(TList *input) { 
+  //
+  //
+  //
+  fInput = input; 
+  TNamed *regData = (TNamed*)input->FindObject("debugStreamPrefix");
+  if (regData) fRegPath = new TString(regData->GetTitle());
+
+}
+
+
 void AliTPCSelectorESD::SlaveBegin(TTree * tree)
 {
    // The SlaveBegin() function is called after the Begin() function.
@@ -255,8 +271,8 @@ void AliTPCSelectorESD::SlaveTerminate()
    // The SlaveTerminate() function is called after all entries or objects
    // have been processed. When running with PROOF SlaveTerminate() is called
    // on each slave server.
-    printf ("SlaveTerminate.. \n");
-    
+    printf ("SlaveTerminate.. \n");    
+    RegisterData();
 }
 
 void AliTPCSelectorESD::Terminate()
@@ -391,6 +407,21 @@ Bool_t AliTPCSelectorESD::Notify()
   return kTRUE;
 }
 
+void    AliTPCSelectorESD::RegisterData(){
+  //
+  // Register persistent data
+  //
+  if (fRegPath){
+    gSystem->Exec(Form("mkdir %s/%s",fRegPath->Data(), gSystem->HostName()));
+    printf("Register data to\t%s\n",fRegPath->Data());
+    char command[1000];
+    sprintf(command,"cp *.log %s/%s/",fRegPath->Data(), gSystem->HostName());
+    gSystem->Exec(command);
+    sprintf(command,"cp *.root %s/%s/",fRegPath->Data(), gSystem->HostName());
+    gSystem->Exec(command);
+  }
+}
+
 
 void   AliTPCSelectorESD::DumpSysInfo(Int_t entry){
   //