]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/FMDBaseda.cxx
New version with the right DA Type field (LDC)
[u/mrichter/AliRoot.git] / FMD / FMDBaseda.cxx
CommitLineData
cb45bad5 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: PHYSICS
8bd95799 8 DA Type: LDC
cb45bad5 9 Number of events needed: depending on the run, being run-level
10 Input Files: raw data
11 Output Files: conditions.csv
12 Trigger types used: PHYSICS_EVENT
13*/
14#include <TSystem.h>
f05d667d 15#include <TString.h>
cb45bad5 16#include <AliFMDParameters.h>
17#include <AliRawReader.h>
18#include <TStopwatch.h>
19#include <AliFMDBaseDA.h>
20#include <AliRawReaderDate.h>
f05d667d 21#include <AliRawReaderRoot.h>
22#include "daqDA.h"
cb45bad5 23#include "TROOT.h"
24#include "TPluginManager.h"
25
26
27
28int main(int argc, char **argv)
29{
30
31#if 0
32 /* magic line from Rene - for future reference! */
33 gROOT->GetPluginManager()->AddHandler("TVirtualStreamerInfo",
34 "*",
35 "TStreamerInfo",
36 "RIO",
37 "TStreamerInfo()");
38#endif
39
40
41 Char_t* fileName = argv[1];
42
43 Bool_t old = kTRUE;
44
cb45bad5 45 AliFMDParameters::Instance()->Init(kFALSE,0);
cb45bad5 46 AliFMDParameters::Instance()->UseCompleteHeader(!old);
47
f05d667d 48 AliRawReader *reader = 0;
49 TString fileNam(fileName);
50 if (fileNam.EndsWith(".root")) reader = new AliRawReaderRoot(fileName);
51 else if (fileNam.EndsWith(".raw")) reader = new AliRawReaderDate(fileName);
52 if (!reader) {
53 std::cerr << "Don't know how to make reader for " << fileNam
54 << std::endl;
55 return -2;
56 }
57
cb45bad5 58 TStopwatch timer;
59 timer.Start();
60 AliFMDBaseDA baseDA;
61
62 baseDA.Run(reader);
63
64 timer.Stop();
65 timer.Print();
66
f05d667d 67 Int_t retval = daqDA_FES_storeFile("conditions.csv", AliFMDParameters::Instance()->GetConditionsShuttleID());
68 if (retval != 0) std::cerr << "Base DA failed" << std::endl;
cb45bad5 69
f05d667d 70 return retval;
cb45bad5 71}