]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHDigitizer.cxx
old digits-clusters removed
[u/mrichter/AliRoot.git] / RICH / AliRICHDigitizer.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16
17 //Piotr.Skowronski@cern.ch :
18 //Corrections applied in order to compile (only) with new I/O and folder structure
19 //To be implemented correctly by responsible
20
21 #include <Riostream.h> 
22
23 #include <TTree.h> 
24 #include <TObjArray.h>
25 #include <TFile.h>
26 #include <TDirectory.h>
27 #include <TParticle.h>
28
29 #include <AliRunLoader.h>
30 #include <AliLoader.h>
31
32 #include "AliRICHDigitizer.h"
33 #include "AliRICH.h"
34 #include "AliRun.h"
35 #include "AliPDG.h"
36 #include "AliRunDigitizer.h"
37
38 ClassImp(AliRICHDigitizer)
39
40 //__________________________________________________________________________________________________
41 AliRICHDigitizer::AliRICHDigitizer(AliRunDigitizer *pManager) 
42                  :AliDigitizer(pManager)
43 {//main ctor which should be used
44 }//main ctor
45 //__________________________________________________________________________________________________
46 AliRICHDigitizer::~AliRICHDigitizer()
47 {//dtor
48   if(fManager->GetDebug())Info("dtor","Start.");
49 }//dtor
50 //__________________________________________________________________________________________________
51 void AliRICHDigitizer::Exec(Option_t*)
52 {
53
54   AliRunLoader *pInAL, *pOutAL;//in and out Run loaders
55   AliLoader    *pInRL, *pOutRL;//in and out RICH loaders
56  
57   pOutAL = AliRunLoader::GetRunLoader(fManager->GetOutputFolderName());
58   pOutRL = pOutAL->GetLoader("RICHLoader");
59
60   
61      
62   AliRICH *pRICH = (AliRICH *) gAlice->GetDetector("RICH");
63   
64   if(!pOutRL->TreeD()) pOutRL->MakeTree("D");  pRICH->MakeBranch("D");
65   
66   
67   for(Int_t inputFile=0;inputFile<fManager->GetNinputs();inputFile++){//files loop
68     pInAL = AliRunLoader::GetRunLoader(fManager->GetInputFolderName(inputFile));
69     pInRL = pInAL->GetLoader("RICHLoader");
70     
71     
72   }//files loop
73
74       
75       
76   pOutRL->TreeD()->Fill();
77
78     
79   pRICH->ResetDigits(); /// ??? should it be here???
80   
81   pOutRL->WriteDigits("OVERWRITE");
82
83   pOutRL->UnloadHits();
84   pOutRL->UnloadDigits();
85 }//Exec()