+// cfr. TOF-TDR pag. 105 for Glossary
+// TARODA : TOF-ALICE Read Out and Data Acquisition system
+ fPadXSector = 8928; // number of pad per sector -with no holes-
+ // ((15+2*19+2*20)*(48*2))
+ fNRoc = 14; // number of Roc (Read Out Controller) (TARODA)
+ fNFec = 32; // number of Fec (Front-End electronic Card)
+ // (TARODA)
+ fNTdc = 32; // number of Tdc (Time to Digital Converter)
+ fNPadXRoc = (Int_t)fPadXSector/fNRoc; // number of pads for each ROC
+ /* fp 25 Sept 2001
+ // Create TOF Folder Structure
+ CreateTOFFolders();
+ */
+}
+
+//_____________________________________________________________________________
+void AliTOF::CreateTOFFolders()
+{
+ // create the ALICE TFolder
+ // create the ALICE TTasks
+ // create the ALICE main TFolder
+ // to be done by AliRun
+
+ TFolder * alice = new TFolder();
+ alice->SetNameTitle("FPAlice", "Alice Folder") ;
+ gROOT->GetListOfBrowsables()->Add(alice) ;
+
+ TFolder * aliceF = alice->AddFolder("folders", "Alice memory Folder") ;
+ // make it the owner of the objects that it contains
+ aliceF->SetOwner() ;
+ // geometry folder
+ TFolder * geomF = aliceF->AddFolder("Geometry", "Geometry objects") ;
+ TFolder * aliceT = alice->AddFolder("tasks", "Alice tasks Folder") ;
+ // make it the owner of the objects that it contains
+ aliceT->SetOwner() ;
+
+ TTask * aliceDi = new TTask("(S)Digitizer", "Alice SDigitizer & Digitizer") ;
+ aliceT->Add(aliceDi);
+
+ TTask * aliceRe = new TTask("Reconstructioner", "Alice Reconstructioner") ;
+ aliceT->Add(aliceRe);
+
+ char * tempo = new char[80] ;
+
+ // creates the TOF Digitizer and adds it to alice main (S)Digitizer task
+ sprintf(tempo, "%sDigitizers container",GetName() ) ;
+ fDTask = new TTask(GetName(), tempo);
+ aliceDi->Add(fDTask) ;
+
+ // creates the TOF reconstructioner and adds it to alice main Reconstructioner task
+ sprintf(tempo, "%sReconstructioner container",GetName() ) ;
+ fReTask = new TTask(GetName(), tempo);
+ aliceRe->Add(fReTask) ;
+
+ delete [] tempo ;
+
+ // creates the TOF geometry folder
+ geomF->AddFolder("TOF", "Geometry for TOF") ;
+}
+
+//_____________________________________________________________________________
+AliTOF::~AliTOF()
+{
+ // dtor:
+ // it remove also the alice folder
+ // and task that TOF creates instead of AliRun
+ /* PH Temporarily commented because of problems
+ TFolder * alice = (TFolder*)gROOT->GetListOfBrowsables()->FindObject("FPAlice") ;
+ delete alice;
+ alice = 0;
+ */
+ if (fHits)
+ {
+ fHits->Delete ();
+ delete fHits;
+ fHits = 0;
+ }
+ if (fDigits)
+ {
+ fDigits->Delete ();
+ delete fDigits;
+ fDigits = 0;
+ }
+ if (fSDigits)
+ {
+ fSDigits->Delete ();
+ delete fSDigits;
+ fSDigits = 0;
+ }
+ if (fReconParticles)
+ {
+ fReconParticles->Delete ();
+ delete fReconParticles;
+ fReconParticles = 0;
+ }
+