Reduced output (M.Ivanov)
[u/mrichter/AliRoot.git] / PHOS / Simulation.C
CommitLineData
baf5b427 1#include "AliSimulation.h"
2#include "TString.h"
3#include "AliPHOSGetter.h"
4#include "AliEMCALGetter.h"
5#include "Riostream.h"
6
7void simu(TString opt, TString name)
8{
9 AliSimulation sim ;
10 // Generation and simulation
11 if ( !opt.Contains("G") )
12 sim.SetRunGeneration(kFALSE) ;
13 // Making SDigits
14 if ( !opt.Contains("S") )
15 sim.SetMakeSDigits("") ;
16 else
17 sim.SetMakeSDigits(name.Data()) ;
18 // Making Digits
19 if ( !opt.Contains("D") )
20 sim.SetMakeDigits("") ;
21 else
22 sim.SetMakeDigits(name.Data()) ;
23 //Merging
24 // to implement
25 sim.Run() ;
26 // Checking result
27 if ( name.Contains("PHOS") ) {
28 cout << ">>>>>>>>>>>> PHOS " << endl ;
29 AliPHOSGetter * gime = AliPHOSGetter::Instance("galice.root") ;
30 Int_t event ;
31 for (event = 0; event < gime->MaxEvent(); event++) {
32 cout << "event # " << event << endl ;
33 gime->Event(event, "SD") ;
34 cout << " SDigits # " << gime->SDigits()->GetEntries() << endl ;
35 cout << " Digits # " << gime->Digits()->GetEntries() << endl ;
36 }
37 }
38 if ( name.Contains("EMCAL") ) {
39 cout << ">>>>>>>>>>>> EMCAL " << endl ;
40 AliEMCALGetter * gime = AliEMCALGetter::Instance("galice.root") ;
41 Int_t event ;
42 for (event = 0; event < gime->MaxEvent(); event++) {
43 cout << "event # " << event << endl ;
44 gime->Event(event, "SD") ;
45 cout << " SDigits # " << gime->SDigits()->GetEntries() << endl ;
46 cout << " Digits # " << gime->Digits()->GetEntries() << endl ;
47 }
48 }
49}