]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - T0/AliT0.cxx
- fixed the format of the floats that become part of the output file name
[u/mrichter/AliRoot.git] / T0 / AliT0.cxx
index 10e1fa3f1aff9d878e8f236ca53ffd78bd3923ed..0b88c23083ff5b21db4b53bdeabbde84b3bb5bbd 100644 (file)
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
-//#include <Riostream.h>
-
-//#include <TFile.h>
-#include <TGeometry.h>
-//#include <TMath.h>
-#include <TNode.h>
-//#include <TParticle.h>
-//#include <TRandom.h>
-#include <TTUBE.h>
-//#include <TVirtualMC.h>
+#include "TClonesArray.h"
 
+#include "AliLoader.h"
+#include "AliLog.h"
 #include "AliLog.h"
 #include "AliMC.h"
-#include "AliLoader.h"
 #include "AliRun.h"
-#include "TClonesArray.h"
 #include "AliT0.h"
-//#include "AliT0Loader.h"
-#include "AliT0digit.h"
-#include "AliT0hit.h"
 #include "AliT0Digitizer.h"
 #include "AliT0RawData.h"
 #include "AliT0RecPoint.h"
-//#include "AliT0Parameters.h"
-#include "AliLog.h"
+#include "AliT0digit.h"
+#include "AliT0hit.h"
 
 ClassImp(AliT0)
 
@@ -197,6 +185,7 @@ void AliT0::MakeBranch(Option_t* option)
   const char *cH = strstr(option,"H");
   const char *cD = strstr(option,"D");
   const char *cR = strstr(option,"R");
+  const char *cS = strstr(option,"S");
 
     if (cH && fLoader->TreeH())
   {
@@ -210,14 +199,21 @@ 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,"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);
+      //   fLoader->TreeD()->Print();
     } 
   
 }    
@@ -265,6 +261,13 @@ void AliT0::SetTreeAddress()
     TBranch* branch = treeR->GetBranch ("T0");
     if (branch) branch->SetAddress(&fRecPoints);
   }
+  // SDigitizer for Federico
+  TTree *treeS = fLoader->TreeS();
+  if (treeS) {
+    if (fDigits == 0x0)  fDigits  = new AliT0digit();
+    TBranch* branch = treeS->GetBranch ("T0");
+    if (branch) branch->SetAddress(&fDigits);
+  }
  
 }
 
@@ -345,7 +348,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);