The Gain DA executable for FMD
[u/mrichter/AliRoot.git] / FMD / FMDGainda.cxx
CommitLineData
0e9547f1 1/*
2
3 FMD DA for online calibration of conditions
4
5 Contact: canute@nbi.dk
6 Link: fmd.nbi.dk/fmd/offline
7 Run Type: GAIN
8 DA Type: GAIN
9 Number of events needed: usually 102400
10 Input Files: raw data
11 Output Files: gains.csv
12 Trigger types used: GAIN
13*/
14#include <TSystem.h>
15#include <AliFMDParameters.h>
16#include <AliRawReader.h>
17#include <TStopwatch.h>
18#include <AliFMDGainDA.h>
19#include <AliRawReaderDate.h>
20#include "TROOT.h"
21#include "TPluginManager.h"
22
23
24
25int main(int argc, char **argv)
26{
27
28#if 0
29 /* magic line from Rene - for future reference! */
30 gROOT->GetPluginManager()->AddHandler("TVirtualStreamerInfo",
31 "*",
32 "TStreamerInfo",
33 "RIO",
34 "TStreamerInfo()");
35#endif
36
37
38 Char_t* fileName = argv[1];
39
40 Bool_t old = kTRUE;
41
42 AliFMDParameters::Instance()->Init(kFALSE,0);
43 AliFMDParameters::Instance()->SetSampleRate(4);
44 AliFMDParameters::Instance()->UseRcuTrailer(!old);
45
46 //This will only work for FDR 1 data. When newer data becomes available the ! must be removed!
47 AliFMDParameters::Instance()->UseCompleteHeader(!old);
48
49
50
51
52 AliRawReader *reader = new AliRawReaderDate(fileName);
53 TStopwatch timer;
54 timer.Start();
55 AliFMDGainDA gainDA;
56
57 gainDA.Run(reader);
58
59 timer.Stop();
60 timer.Print();
61
62
63
64
65}