]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/testreconTrackSegments.C
stdlib.h included instead of cstdlib (needed on Alpha)
[u/mrichter/AliRoot.git] / PHOS / testreconTrackSegments.C
1 #include " AliPHOSTrackSegmentMaker.h"
2 #include " AliPHOSTrackSegmentMakerv1.h"
3 #include "AliPHOSGetter.h"
4 #include "TSystem.h"
5
6 void testreconTrackSegments(Int_t nevent = 1, const char *config="testconfig.C")
7
8
9   const Float_t maxTrackSegments = 1 ;
10   const Float_t widTrackSegments = TMath::Sqrt(maxTrackSegments) ;
11   TString name = "test suite" ;
12  
13   AliPHOSTrackSegmentMaker * tracks = new AliPHOSTrackSegmentMakerv1("testPHOS.root",name.Data());
14   AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
15   tracks->ExecuteTask("deb");
16   Float_t nTrackSegments =  (Float_t) (gime->TrackSegmentMaker(name.Data())->GetTrackSegmentsInRun()) / gime->MaxEvent();
17  
18    if ( nTrackSegments < maxTrackSegments-0.25 || nTrackSegments > maxTrackSegments+0.25 ) {
19     cerr<<"__________________________________________________________________"<<endl;
20     cerr<<" "<<endl;
21     cerr<<"             MESS ==> Error detected in the TrackSegments process. Sending error file to PHOS director."<<endl;
22     cerr<<"__________________________________________________________________"<<endl;
23    // gSystem->Exec("uuencode $ALICE_ROOT/PHOS/testPHOS.root testPHOS.root | mail -s 'PHOS INSTALLATION ERROR' schutz@in2p3.fr");
24  }
25   cerr<<"__________________________________________________________________"<<endl;
26   cerr<<" "<<endl;
27   cerr<<"             MESS ==> TrackSegments process ended successfully."<<endl;
28   cerr<<"__________________________________________________________________"<<endl;
29 }
30