1 /**************************************************************************
2 * Copyright(c) 1998-1999, 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 **************************************************************************/
16 //_________________________________________________________________________
17 // Macros checking what has been produced by Simulation.C and Reconstruction.C
19 // root> .L Checking.C++
20 // root> check("HSDRE", "PHOS EMCAL") --> checks how many hits, Sdigits, Digits and
21 // Reconstruction objects and ESD have been produced
22 // author : Yves Schutz (CERN/SUBATECH)
24 //_________________________________________________________________________
26 #include "AliPHOSGetter.h"
27 #include "AliEMCALGetter.h"
29 #include "Riostream.h"
32 void check(TString opt="HSDRE", TString name="all")
34 if ( name.Contains("PHOS") ) {
35 AliPHOSGetter * gime = AliPHOSGetter::Instance("galice.root") ;
36 cout << ">>>>>>>>>>>> PHOS:" ;
38 for (event = 0; event < gime->MaxEvent(); event++) {
40 cout << " event # " << event << endl ;
41 if ( opt.Contains("H") )
42 cout << " Hits # " << gime->Hits()->GetEntries() << endl ;
43 if ( opt.Contains("S") )
44 cout << " SDigits # " << gime->SDigits()->GetEntries() << endl ;
45 if ( opt.Contains("D") )
46 cout << " Digits # " << gime->Digits()->GetEntries() << endl ;
47 if ( opt.Contains("R") ){
48 cout << " EMC Recpoints # " << gime->EmcRecPoints()->GetEntries() << endl ;
49 cout << " CPV Recpoints # " << gime->CpvRecPoints()->GetEntries() << endl ;
50 cout << " Track Segments# " << gime->TrackSegments()->GetEntries() << endl ;
51 cout << " Rec Particles # " << gime->RecParticles()->GetEntries() << endl ;
55 if ( name.Contains("EMCAL") ) {
56 AliEMCALGetter * gime = AliEMCALGetter::Instance("galice.root") ;
57 cout << ">>>>>>>>>>>> EMCAL:" ;
59 for (event = 0; event < gime->MaxEvent(); event++) {
61 cout << " event # " << event << endl ;
62 if ( opt.Contains("H") )
63 cout << " Hits # " << gime->Hits()->GetEntries() << endl ;
64 if ( opt.Contains("S") )
65 cout << " SDigits # " << gime->SDigits()->GetEntries() << endl ;
66 if ( opt.Contains("D") )
67 cout << " Digits # " << gime->Digits()->GetEntries() << endl ;
68 if ( opt.Contains("R") ){
69 cout << " EMC Recpoints # " << gime->ECARecPoints()->GetEntries() << endl ;
70 cout << " Rec Particles # " << gime->RecParticles()->GetEntries() << endl ;
74 if ( opt.Contains("E") ) {
75 AliPHOSGetter * gime = AliPHOSGetter::Instance("galice.root") ;
76 Int_t nEvent = gime->MaxEvent() ;
79 for (event = 0 ; event < nEvent; event++) {
80 esd = gime->ESD(event) ;