]>
Commit | Line | Data |
---|---|---|
b762c2f6 | 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 | ||
b9d0a01d | 16 | |
88cb7938 | 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 | |
30f2451c | 20 | |
7118aef0 | 21 | #include <Riostream.h> |
b762c2f6 | 22 | |
23 | #include <TTree.h> | |
24 | #include <TObjArray.h> | |
25 | #include <TFile.h> | |
26 | #include <TDirectory.h> | |
27 | #include <TParticle.h> | |
28 | ||
aed240d4 | 29 | #include <AliRunLoader.h> |
30 | #include <AliLoader.h> | |
88cb7938 | 31 | |
b762c2f6 | 32 | #include "AliRICHDigitizer.h" |
b762c2f6 | 33 | #include "AliRICH.h" |
b762c2f6 | 34 | #include "AliRun.h" |
35 | #include "AliPDG.h" | |
36 | #include "AliRunDigitizer.h" | |
37 | ||
38 | ClassImp(AliRICHDigitizer) | |
39 | ||
f3afb52f | 40 | //__________________________________________________________________________________________________ |
41 | AliRICHDigitizer::AliRICHDigitizer() | |
42 | {//default constructor | |
43 | }//default ctor | |
c60862bf | 44 | //__________________________________________________________________________________________________ |
45 | AliRICHDigitizer::AliRICHDigitizer(AliRunDigitizer *pManager) | |
46 | :AliDigitizer(pManager) | |
47 | {//main ctor which should be used | |
c60862bf | 48 | }//main ctor |
49 | //__________________________________________________________________________________________________ | |
b762c2f6 | 50 | AliRICHDigitizer::~AliRICHDigitizer() |
c60862bf | 51 | {//dtor |
543d5224 | 52 | if(fManager->GetDebug())Info("dtor","Start."); |
c60862bf | 53 | }//dtor |
54 | //__________________________________________________________________________________________________ | |
aed240d4 | 55 | void AliRICHDigitizer::Exec(Option_t*) |
b762c2f6 | 56 | { |
b762c2f6 | 57 | |
c60862bf | 58 | AliRunLoader *pInAL, *pOutAL;//in and out Run loaders |
59 | AliLoader *pInRL, *pOutRL;//in and out RICH loaders | |
88cb7938 | 60 | |
c60862bf | 61 | pOutAL = AliRunLoader::GetRunLoader(fManager->GetOutputFolderName()); |
62 | pOutRL = pOutAL->GetLoader("RICHLoader"); | |
88cb7938 | 63 | |
88cb7938 | 64 | |
65 | ||
b762c2f6 | 66 | AliRICH *pRICH = (AliRICH *) gAlice->GetDetector("RICH"); |
88cb7938 | 67 | |
c60862bf | 68 | if(!pOutRL->TreeD()) pOutRL->MakeTree("D"); pRICH->MakeBranch("D"); |
543d5224 | 69 | |
70 | ||
aed240d4 | 71 | for(Int_t inputFile=0;inputFile<fManager->GetNinputs();inputFile++){//files loop |
c60862bf | 72 | pInAL = AliRunLoader::GetRunLoader(fManager->GetInputFolderName(inputFile)); |
73 | pInRL = pInAL->GetLoader("RICHLoader"); | |
88cb7938 | 74 | |
b762c2f6 | 75 | |
c60862bf | 76 | }//files loop |
b762c2f6 | 77 | |
b762c2f6 | 78 | |
79 | ||
c60862bf | 80 | pOutRL->TreeD()->Fill(); |
b762c2f6 | 81 | |
b762c2f6 | 82 | |
88cb7938 | 83 | pRICH->ResetDigits(); /// ??? should it be here??? |
84 | ||
c60862bf | 85 | pOutRL->WriteDigits("OVERWRITE"); |
88cb7938 | 86 | |
543d5224 | 87 | pOutRL->UnloadHits(); |
88 | pOutRL->UnloadDigits(); | |
c60862bf | 89 | }//Exec() |