Fixes for FMD DAs
[u/mrichter/AliRoot.git] / FMD / DA / 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
8bd95799 8 DA Type: LDC
0e9547f1 9 Number of events needed: usually 102400
10 Input Files: raw data
11 Output Files: gains.csv
12 Trigger types used: GAIN
13*/
0e9547f1 14#include <AliFMDGainDA.h>
a31ea3ce 15#include <AliFMDParameters.h>
16#include "FMDUtilda.h"
f8022830 17#include <TROOT.h>
a31ea3ce 18#include <iostream>
f8022830 19#include <unistd.h>
0e9547f1 20
21int main(int argc, char **argv)
22{
a31ea3ce 23 AliFMDBaseDA::Runner r;
0e9547f1 24
a31ea3ce 25 Int_t ret = r.Init(argc, argv);
26 if (ret < 0) return -ret;
27 if (ret > 0) return 0;
0e9547f1 28
0e9547f1 29 AliFMDGainDA gainDA;
2a082c96 30#ifdef ALI_AMORE
31 gainDA.SetMakeSummaries(kTRUE);
32#endif
3490bd31 33 std::cout << "Running Gain DA" << std::endl;
a31ea3ce 34 r.Exec(gainDA);
0e9547f1 35
a31ea3ce 36 const char* files[] = { "conditions.csv",
37 "gains.csv",
38 0 };
39 const char* ids[] = { AliFMDParameters::Instance()->GetConditionsShuttleID(),
40 AliFMDParameters::Instance()->GetGainShuttleID(),
41 0 };
42 ret = UploadFiles(files, ids);
2a082c96 43
a31ea3ce 44 if(ret > 0) std::cerr << "Gain DA failed" << std::endl;
2a082c96 45
a31ea3ce 46 PostSummaries(gainDA, "gain", r.RunNumber());
2a082c96 47
3490bd31 48 std::cout << "End of FMD-Gain, return " << ret << std::endl;
f8022830 49
50 gROOT->SetMustClean(false);
51
52 std::cout << "Now calling _Exit(" << ret << ") to finish NOW!" << std::endl;
53 _exit(ret);
54
a31ea3ce 55 return ret;
0e9547f1 56}
2a082c96 57//
58// EOF
59//
60