]>
Commit | Line | Data |
---|---|---|
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 | |
8 | DA Type: MON | |
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 | ||
28 | int 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); |
46 | AliFMDParameters::Instance()->UseRcuTrailer(!old); | |
47 | AliFMDParameters::Instance()->UseCompleteHeader(!old); | |
48 | ||
f05d667d | 49 | AliRawReader *reader = 0; |
50 | TString fileNam(fileName); | |
51 | if (fileNam.EndsWith(".root")) reader = new AliRawReaderRoot(fileName); | |
52 | else if (fileNam.EndsWith(".raw")) reader = new AliRawReaderDate(fileName); | |
53 | if (!reader) { | |
54 | std::cerr << "Don't know how to make reader for " << fileNam | |
55 | << std::endl; | |
56 | return -2; | |
57 | } | |
58 | ||
cb45bad5 | 59 | TStopwatch timer; |
60 | timer.Start(); | |
61 | AliFMDBaseDA baseDA; | |
62 | ||
63 | baseDA.Run(reader); | |
64 | ||
65 | timer.Stop(); | |
66 | timer.Print(); | |
67 | ||
f05d667d | 68 | Int_t retval = daqDA_FES_storeFile("conditions.csv", AliFMDParameters::Instance()->GetConditionsShuttleID()); |
69 | if (retval != 0) std::cerr << "Base DA failed" << std::endl; | |
cb45bad5 | 70 | |
f05d667d | 71 | return retval; |
cb45bad5 | 72 | } |