Contact: canute@nbi.dk
Link: fmd.nbi.dk/fmd/offline
Run Type: GAIN
- DA Type: GAIN
+ DA Type: LDC
Number of events needed: usually 102400
Input Files: raw data
Output Files: gains.csv
Trigger types used: GAIN
*/
-#include <TSystem.h>
-#include <AliFMDParameters.h>
-#include <AliRawReader.h>
-#include <TStopwatch.h>
#include <AliFMDGainDA.h>
-#include <AliRawReaderDate.h>
-#include "TROOT.h"
-#include "TPluginManager.h"
-
-
+#include <AliFMDParameters.h>
+#include "FMDUtilda.h"
+#include <iostream>
int main(int argc, char **argv)
{
-
-#if 0
- /* magic line from Rene - for future reference! */
- gROOT->GetPluginManager()->AddHandler("TVirtualStreamerInfo",
- "*",
- "TStreamerInfo",
- "RIO",
- "TStreamerInfo()");
-#endif
+ AliFMDBaseDA::Runner r;
-
- Char_t* fileName = argv[1];
-
- Bool_t old = kTRUE;
-
- AliFMDParameters::Instance()->Init(kFALSE,0);
- AliFMDParameters::Instance()->SetSampleRate(4);
- AliFMDParameters::Instance()->UseRcuTrailer(!old);
+ Int_t ret = r.Init(argc, argv);
+ if (ret < 0) return -ret;
+ if (ret > 0) return 0;
- //This will only work for FDR 1 data. When newer data becomes available the ! must be removed!
- AliFMDParameters::Instance()->UseCompleteHeader(!old);
-
-
-
-
- AliRawReader *reader = new AliRawReaderDate(fileName);
- TStopwatch timer;
- timer.Start();
AliFMDGainDA gainDA;
-
- gainDA.Run(reader);
-
- timer.Stop();
- timer.Print();
+#ifdef ALI_AMORE
+ gainDA.SetMakeSummaries(kTRUE);
+#endif
+ r.Exec(gainDA);
-
-
-
+ const char* files[] = { "conditions.csv",
+ "gains.csv",
+ 0 };
+ const char* ids[] = { AliFMDParameters::Instance()->GetConditionsShuttleID(),
+ AliFMDParameters::Instance()->GetGainShuttleID(),
+ 0 };
+ ret = UploadFiles(files, ids);
+
+ if(ret > 0) std::cerr << "Gain DA failed" << std::endl;
+
+ PostSummaries(gainDA, "gain", r.RunNumber());
+
+ return ret;
}
+//
+// EOF
+//
+