]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliSDigits2Digits.C
Macro to read the ESD event
[u/mrichter/AliRoot.git] / STEER / AliSDigits2Digits.C
CommitLineData
1b147a75 1////////////////////////////////////////////////////////////////////////
2//
3// name: AliSDigits2Digits
4// date: 4.4.2002
5// last update: 4.4.2002
6// author: Jiri Chudoba
7// version: 1.0
8//
9// description:
10// creates digits from sdigits for several detectors
1b147a75 11//
12// input:
8de97894 13// TString input ... galice input file
1b147a75 14// Int_t nEvents ... how many events to process
15// Int_t ITS, TPC, ... many flags for diff. detectors
16//
17// History:
18//
8de97894 19// 21.07.03 - changes for NewIO
20//
1b147a75 21// 04.04.02 - first version
22//
23////////////////////////////////////////////////////////////////////////
24
25#if !defined(__CINT__) || defined(__MAKECINT__)
88cb7938 26#include "iostream.h"
27#include "STEER/AliRun.h"
28#include "STEER/AliRunDigitizer.h"
29#include "ITS/AliITSDigitizer.h"
8de97894 30#include "ITS/AliITSFDigitizer.h"
88cb7938 31#include "TPC/AliTPCDigitizer.h"
32#include "TRD/AliTRDdigitizer.h"
33#include "PHOS/AliPHOSDigitizer.h"
34#include "MUON/AliMUONDigitizer.h"
35#include "RICH/AliRICHDigitizer.h"
36#include "TStopwatch.h"
1b147a75 37#endif
38
8de97894 39Int_t AliSDigits2Digits(TString input="galice.root",
40 Int_t nEvents = 1, Int_t iITS = 0, Int_t iTPC = 0,
88cb7938 41 Int_t iTRD = 0, Int_t iPHOS = 0, Int_t iMUON = 0,
8de97894 42 Int_t iRICH = 0)
1b147a75 43{
44// delete the current gAlice object, the one from input file
45// will be used
46
47 if(gAlice){
48 delete gAlice;
49 gAlice = 0;
50 } // end if gAlice
51 AliRunDigitizer * manager = new AliRunDigitizer(1,1);
88cb7938 52 manager->SetDebug(1000);
53 manager->SetInputStream(0,input);
88cb7938 54
1b147a75 55 manager->SetNrOfEventsToWrite(nEvents);
03f98c58 56 if (iITS == 1) AliITSDigitizer *dITS = new AliITSDigitizer(manager);
57 if (iITS == 2) AliITSFDigitizer *dITS = new AliITSFDigitizer(manager);
1b147a75 58 if (iTPC) AliTPCDigitizer *dTPC = new AliTPCDigitizer(manager);
59 if (iTRD) AliTRDdigitizer *dTRD = new AliTRDdigitizer(manager);
60 if (iPHOS) AliPHOSDigitizer *dPHOS = new AliPHOSDigitizer(manager);
61 if (iMUON) AliMUONDigitizer *dMUON = new AliMUONDigitizer(manager);
62 if (iRICH) AliRICHDigitizer *dRICH = new AliRICHDigitizer(manager);
63 TStopwatch timer;
64 timer.Start();
65 manager->Exec("deb all");
66 timer.Stop();
67 timer.Print();
68 delete manager;
69}
70