1 /**************************************************************************
2 * Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
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
21 #include <Riostream.h>
24 #include <TObjArray.h>
26 #include <TDirectory.h>
27 #include <TParticle.h>
29 #include <AliRunLoader.h>
30 #include <AliLoader.h>
32 #include "AliRICHDigitizer.h"
36 #include "AliRunDigitizer.h"
38 ClassImp(AliRICHDigitizer)
40 //__________________________________________________________________________________________________
41 AliRICHDigitizer::AliRICHDigitizer()
42 {//default constructor
44 //__________________________________________________________________________________________________
45 AliRICHDigitizer::AliRICHDigitizer(AliRunDigitizer *pManager)
46 :AliDigitizer(pManager)
47 {//main ctor which should be used
49 //__________________________________________________________________________________________________
50 AliRICHDigitizer::~AliRICHDigitizer()
52 if(fManager->GetDebug())Info("dtor","Start.");
54 //__________________________________________________________________________________________________
55 void AliRICHDigitizer::Exec(Option_t*)
58 AliRunLoader *pInAL, *pOutAL;//in and out Run loaders
59 AliLoader *pInRL, *pOutRL;//in and out RICH loaders
61 pOutAL = AliRunLoader::GetRunLoader(fManager->GetOutputFolderName());
62 pOutRL = pOutAL->GetLoader("RICHLoader");
66 AliRICH *pRICH = (AliRICH *) gAlice->GetDetector("RICH");
68 if(!pOutRL->TreeD()) pOutRL->MakeTree("D"); pRICH->MakeBranch("D");
71 for(Int_t inputFile=0;inputFile<fManager->GetNinputs();inputFile++){//files loop
72 pInAL = AliRunLoader::GetRunLoader(fManager->GetInputFolderName(inputFile));
73 pInRL = pInAL->GetLoader("RICHLoader");
80 pOutRL->TreeD()->Fill();
83 pRICH->ResetDigits(); /// ??? should it be here???
85 pOutRL->WriteDigits("OVERWRITE");
88 pOutRL->UnloadDigits();