///////////////////////////////////////////////////////////////////////////////
#include "TClonesArray.h"
+#include "TString.h"
#include "AliLoader.h"
#include "AliLog.h"
#include "AliT0RecPoint.h"
#include "AliT0digit.h"
#include "AliT0hit.h"
-
ClassImp(AliT0)
//static AliT0digit *digits;
//
// 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");
const char *cR = strstr(option,"R");
+ const char *cS = strstr(option,"S");
if (cH && fLoader->TreeH())
{
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);
+ // fLoader->TreeD()->Print();
}
}
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);
+ }
}
// 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()
fDigits = new AliT0digit();
- digitsTree->Branch("T0","AliT0digit",&fDigits,405,1);
+ digitsTree->Branch("T0","AliT0digit",&fDigits);
TArrayI *timeLED = new TArrayI(24);