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