]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/scripts/TestPedestalDA.C
Debug msg
[u/mrichter/AliRoot.git] / FMD / scripts / TestPedestalDA.C
1 //____________________________________________________________________
2 //
3 // $Id: TestRawIO.C 13249 2006-03-24 16:09:36Z cholm $
4 //
5 // Test of AliFMDPedestalDA
6 //
7 /** @ingroup simple_script
8  */
9 #ifndef __CINT__
10 # include <TSystem.h>
11 # include <TStopwatch.h>
12 # include <AliCDBManager.h>
13 # include <AliRawReader.h>
14 # include <AliFMDPedestalDA.h>
15 # include <AliFMDParameters.h>
16 #endif
17 void TestPedestalDA(Char_t* fileName="data.raw", Int_t runNumber=1, 
18                     Bool_t  oldFormat=kTRUE, Bool_t diagnostics=kFALSE)
19 {
20   
21   //This script runs the pedestal DA using the class AliFMDPedestalDA
22 #ifdef __CINT__
23   // Load utility library
24   gSystem->Load("libFMDutil");
25 #endif
26
27   // Set-up CDB interface 
28   AliCDBManager* cdb = AliCDBManager::Instance();
29   cdb->SetRun(runNumber);
30   cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
31
32   // Set debug level
33   AliLog::SetModuleDebugLevel("FMD", 1);
34
35   // Set-up paramters 
36   AliFMDParameters* params = AliFMDParameters::Instance();
37   params->Init();
38   params->UseCompleteHeader(oldFormat);
39   
40   // Set-up raw readers 
41   AliRawReader *reader = AliRawReader::Create(fileName);
42
43
44   // Set-up timer 
45   TStopwatch timer;
46   timer.Start();
47   
48   // Make and run DA
49   AliFMDPedestalDA pedestalDA;
50   pedestalDA.SetSaveDiagnostics(diagnostics);
51   pedestalDA.Run(reader);
52
53   // Stop and print summary
54   timer.Stop();
55   timer.Print();
56 }
57 //
58 // EOF
59 //