/*
$Log$
+Revision 1.11 2001/03/13 09:30:35 cblume
+Update of digitization. Moved digit branch definition to AliTRD
+
+Revision 1.10 2001/01/26 19:56:57 hristov
+Major upgrade of AliRoot code
+
+Revision 1.9 2000/11/02 09:25:53 cblume
+Change also the dictionary to AliTRDdataArray
+
Revision 1.8 2000/11/01 15:20:13 cblume
Change AliTRDdataArrayI to AliTRDdataArray in MakeBranch()
// AliTRDdataArray objects. //
// //
///////////////////////////////////////////////////////////////////////////////
+
+#include <iostream.h>
+#include <TROOT.h>
#include <TTree.h>
+#include <TFile.h>
#include "AliRun.h"
#include "AliTRDdataArrayI.h"
#include "AliTRDdigit.h"
#include "AliTRDgeometry.h"
+#include "AliTRD.h"
ClassImp(AliTRDdigitsManager)
}
//_____________________________________________________________________________
-Bool_t AliTRDdigitsManager::MakeBranch()
+Bool_t AliTRDdigitsManager::MakeBranch(char *file)
{
//
// Creates the branches for the digits and the dictionary in the digits tree
Bool_t status = kTRUE;
+ //TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("TRD.Digits.root");
+
+ AliTRD * TRD = (AliTRD *) gAlice->GetDetector("TRD") ;
+
if (gAlice->TreeD()) {
// Make the branch for the digits
if (fDigits) {
- //const AliTRDdataArrayI *kDigits =
- // (AliTRDdataArrayI *) fDigits->At(0);
const AliTRDdataArray *kDigits =
(AliTRDdataArray *) fDigits->At(0);
if (kDigits) {
- gAlice->TreeD()->Branch("TRDdigits",kDigits->IsA()->GetName()
- ,&kDigits,buffersize,1);
+ TRD->MakeBranchInTree(gAlice->TreeD(),
+ "TRDdigits", kDigits->IsA()->GetName(),
+ &kDigits,buffersize, 1,file);
printf("AliTRDdigitsManager::MakeBranch -- ");
printf("Making branch TRDdigits\n");
}
Char_t branchname[15];
sprintf(branchname,"TRDdictionary%d",iDict);
if (fDictionary[iDict]) {
- //const AliTRDdataArrayI *kDictionary =
- // (AliTRDdataArrayI *) fDictionary[iDict]->At(0);
const AliTRDdataArray *kDictionary =
(AliTRDdataArray *) fDictionary[iDict]->At(0);
if (kDictionary) {
- gAlice->TreeD()->Branch(branchname,kDictionary->IsA()->GetName()
- ,&kDictionary,buffersize,1);
+ TRD->MakeBranchInTree(gAlice->TreeD(),
+ branchname,kDictionary->IsA()->GetName(),
+ &kDictionary,buffersize, 1,file);
printf("AliTRDdigitsManager::MakeBranch -- ");
printf("Making branch %s\n",branchname);
}
// Create the branches
if (!(gAlice->TreeD()->GetBranch("TRDdigits"))) {
+ printf("AliTRDdigitsManager::WriteDigits -- ");
+ printf("Call MakeBranch\n");
if (!MakeBranch()) return kFALSE;
}