]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliSDigits2Digits.C
Transition to NewIO
[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
11// stores sdigits in separate file (or in the source file
12// with sdigits). Stores gAlice object and copies TE to the
13// file with digits
14//
15// input:
16// TString fileNameSDigits ... input file with sdigits
17// TString fileNameDigits ... output file with digits
18// Int_t nEvents ... how many events to process
19// Int_t ITS, TPC, ... many flags for diff. detectors
20//
21// History:
22//
23// 04.04.02 - first version
24//
25////////////////////////////////////////////////////////////////////////
26
27#if !defined(__CINT__) || defined(__MAKECINT__)
88cb7938 28#include "iostream.h"
29#include "STEER/AliRun.h"
30#include "STEER/AliRunDigitizer.h"
31#include "ITS/AliITSDigitizer.h"
32#include "TPC/AliTPCDigitizer.h"
33#include "TRD/AliTRDdigitizer.h"
34#include "PHOS/AliPHOSDigitizer.h"
35#include "MUON/AliMUONDigitizer.h"
36#include "RICH/AliRICHDigitizer.h"
37#include "TStopwatch.h"
1b147a75 38#endif
39
40#include "AliHits2SDigits.C"
41
42void AliCopyN(TString inputFile, TString outputFile);
43
88cb7938 44Int_t AliSDigits2Digits(TString output="out/galice.root",
45 TString input="wrk/galice.root",
46 Int_t nEvents = 1, Int_t iITS = 0, Int_t iTPC = 1,
47 Int_t iTRD = 0, Int_t iPHOS = 0, Int_t iMUON = 0,
48 Int_t iRICH = 0, Int_t iCopy = 0)
1b147a75 49{
50// delete the current gAlice object, the one from input file
51// will be used
52
53 if(gAlice){
54 delete gAlice;
55 gAlice = 0;
56 } // end if gAlice
57 AliRunDigitizer * manager = new AliRunDigitizer(1,1);
88cb7938 58 manager->SetDebug(1000);
59 manager->SetInputStream(0,input);
60 if (iCopy)
61 {
62// AliCopyN(fileNameSDigits,fileNameDigits);
63 }
64
65 manager->SetOutputFile(output);
1b147a75 66 manager->SetNrOfEventsToWrite(nEvents);
03f98c58 67 if (iITS == 1) AliITSDigitizer *dITS = new AliITSDigitizer(manager);
68 if (iITS == 2) AliITSFDigitizer *dITS = new AliITSFDigitizer(manager);
1b147a75 69 if (iTPC) AliTPCDigitizer *dTPC = new AliTPCDigitizer(manager);
70 if (iTRD) AliTRDdigitizer *dTRD = new AliTRDdigitizer(manager);
71 if (iPHOS) AliPHOSDigitizer *dPHOS = new AliPHOSDigitizer(manager);
72 if (iMUON) AliMUONDigitizer *dMUON = new AliMUONDigitizer(manager);
73 if (iRICH) AliRICHDigitizer *dRICH = new AliRICHDigitizer(manager);
74 TStopwatch timer;
75 timer.Start();
76 manager->Exec("deb all");
77 timer.Stop();
78 timer.Print();
79 delete manager;
80}
81
82
83////////////////////////////////////////////////////////////////////////
84void AliCopyN(TString inputFileName, TString outputFileName) {
85// copy some objects
86
1b147a75 87}
88////////////////////////////////////////////////////////////////////////