]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - T0/AliT0.cxx
Updates on pi0 analysis in p-Pb (Hongsheng)
[u/mrichter/AliRoot.git] / T0 / AliT0.cxx
index 9a760058f6139cb46085b7d9e9fbda1a37439ce0..46752954b1d8c35ba81425b0ed08fbd97a627324 100644 (file)
@@ -38,6 +38,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "TClonesArray.h"
+#include "TString.h"
 
 #include "AliLoader.h"
 #include "AliLog.h"
@@ -50,7 +51,6 @@
 #include "AliT0RecPoint.h"
 #include "AliT0digit.h"
 #include "AliT0hit.h"
-
 ClassImp(AliT0)
 
   //static  AliT0digit *digits; 
@@ -179,8 +179,10 @@ void AliT0::MakeBranch(Option_t* option)
   //
   //    R         Make a branch of  AliT0RecPoints
   //
-  char branchname[20];
-  sprintf(branchname,"%s",GetName());
+  //  char branchname[20];
+  // sprintf(branchname,"%s",GetName());
+  //  strncpy(branchname, GetName(), 20);
+  TString branchname = Form("%s", GetName());
 
   const char *cH = strstr(option,"H");
   const char *cD = strstr(option,"D");
@@ -199,21 +201,20 @@ void AliT0::MakeBranch(Option_t* option)
       if (fDigits == 0x0) fDigits  = new AliT0digit();
       //     MakeBranchInTree(fLoader->TreeD(), branchname,
       //                      &fDigits, 405, 0);
-      fLoader->TreeD()->Branch(branchname,"AliT0digit",&fDigits,405,1);
+      fLoader->TreeD()->Branch(branchname.Data(),"AliT0digit",&fDigits);
       //   fLoader->TreeD()->Print();
     } 
   if (cR && fLoader->TreeR())
     {
       if (fRecPoints == 0x0) fRecPoints  = new AliT0RecPoint();
-      MakeBranchInTree(fLoader->TreeR(), branchname,
-                      &fRecPoints, 405, 0);
+      MakeBranchInTree(fLoader->TreeR(), branchname, &fRecPoints);
     } 
   if (cS && fLoader->TreeS())
     {
       if (fDigits == 0x0) fDigits  = new AliT0digit();
       //     MakeBranchInTree(fLoader->TreeD(), branchname,
       //                      &fDigits, 405, 0);
-      fLoader->TreeS()->Branch(branchname,"AliT0digit",&fDigits,405,1);
+      fLoader->TreeS()->Branch(branchname,"AliT0digit",&fDigits);
       //   fLoader->TreeD()->Print();
     } 
   
@@ -280,18 +281,20 @@ void AliT0::MakeBranchInTreeD(TTree *treeD, const char *file)
     // Create TreeD branches for the FMD
     //
     const Int_t kBufferSize = 4000;
-    char branchname[20];
-    sprintf(branchname,"%s",GetName());
+    //   char branchname[20];
+    // strncpy(branchname, GetName(), 20);
+    TString branchname = Form("%s", GetName());
+ //   sprintf(branchname,"%s",GetName());
     if(treeD)
      {
-       MakeBranchInTree(treeD,  branchname,&fDigits, kBufferSize, file);
+       MakeBranchInTree(treeD,  branchname.Data(),&fDigits, kBufferSize, file);
      }
 }
 
 //_____________________________________________________________________________
-AliDigitizer* AliT0::CreateDigitizer(AliRunDigitizer* manager) const
+AliDigitizer* AliT0::CreateDigitizer(AliDigitizationInput* digInput) const
 {
-  return new AliT0Digitizer(manager);
+  return new AliT0Digitizer(digInput);
 }
 //____________________________________________________________________________
 void AliT0::Digits2Raw()
@@ -349,7 +352,7 @@ void AliT0::Raw2Digits(AliRawReader *rawReader,TTree* digitsTree)
 
 
    fDigits = new AliT0digit();
-   digitsTree->Branch("T0","AliT0digit",&fDigits,405,1);
+   digitsTree->Branch("T0","AliT0digit",&fDigits);
    
    
    TArrayI *timeLED = new TArrayI(24);