29c475943a3372ce54cb139be3b881a62f5677aa
[u/mrichter/AliRoot.git] / PHOS / testreconRecParticles.C
1 #include "AliPHOSPID.h"
2 #include "AliPHOSGetter.h"
3 #include "AliPHOSPIDv1.h"
4 #include "TSystem.h"
5
6 void testreconRecParticles(Int_t nevent = 1, const char *config="testconfig.C")
7
8
9
10   const Float_t maxRecParticles = 1 ;
11   const Float_t widRecParticles = TMath::Sqrt(maxRecParticles) ;
12   TString name = "test suite" ;
13
14
15   AliPHOSPID * pid = new AliPHOSPIDv1("testPHOS.root",name.Data());
16   AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
17   pid->ExecuteTask("deb");   
18   Float_t nRecParticles =  (Float_t) (gime->PID(name.Data())->GetRecParticlesInRun())/gime->MaxEvent();
19  
20  
21  if ( nRecParticles < maxRecParticles-0.25 || nRecParticles > maxRecParticles+0.25 ) {
22     cerr<<"__________________________________________________________________"<<endl;
23     cerr<<" "<<endl;
24     cerr<<"             MESS ==> Error detected in the RecParticles process. Sending error file to PHOS director."<<endl;
25     cerr<<"__________________________________________________________________"<<endl;
26    // gSystem->Exec("uuencode $ALICE_ROOT/PHOS/testPHOS.root testPHOS.root | mail -s 'PHOS INSTALLATION ERROR' schutz@in2p3.fr");
27  }
28   cerr<<"__________________________________________________________________"<<endl;
29   cerr<<" "<<endl;
30   cerr<<"             MESS ==> RecParticles process ended successfully."<<endl;
31   cerr<<"__________________________________________________________________"<<endl;
32
33  cerr<<"_____________________________________________________________________"<<endl;
34   cerr<<" "<<endl;
35   cerr<<"             MESS ==> reconstruction ended successfully."<<endl;
36   cerr<<"_____________________________________________________________________"<<endl;
37
38 }