3 FMD DA for online calibration of conditions
6 Link: fmd.nbi.dk/fmd/offline
9 Number of events needed: depending on the run, being run-level
11 Output Files: conditions.csv
12 Trigger types used: PHYSICS_EVENT
19 #include <AliFMDParameters.h>
20 #include <AliRawReader.h>
21 #include <TStopwatch.h>
22 #include <AliFMDBaseDA.h>
23 #include <AliRawReaderDate.h>
24 #include <AliRawReaderRoot.h>
27 #include "TPluginManager.h"
31 int main(int argc, char **argv)
35 /* magic line from Rene - for future reference! */
36 gROOT->GetPluginManager()->AddHandler("TVirtualStreamerInfo",
44 const Char_t* tableSOD[] = {"ALL", "no", "SOD", "all", NULL, NULL};
47 monitorDeclareTable(const_cast<char**>(tableSOD));
49 AliFMDParameters::Instance()->Init(kFALSE,0);
50 AliFMDParameters::Instance()->UseCompleteHeader(old);
51 struct eventHeaderStruct *event;
53 /* define data source : this is argument 1 */
55 std::cout << "No monitor source set" << std::endl;
58 status=monitorSetDataSource( argv[1] );
60 printf("monitorSetDataSource() failed : %s\n",monitorDecodeError(status));
64 if (argc > 2) AliLog::SetModuleDebugLevel("FMD", atoi(argv[2]));
65 /* declare monitoring program */
66 status=monitorDeclareMp( __FILE__ );
68 printf("monitorDeclareMp() failed : %s\n",monitorDecodeError(status));
73 monitorSetNoWaitNetworkTimeout(1000);
75 AliRawReader *reader = 0;
79 Bool_t SODread = kFALSE;
80 while(!SODread && iev<1000) {
82 /* check shutdown condition */
83 if (daqDA_checkShutdown()) {break;}
85 /* get next event (blocking call until timeout) */
86 status=monitorGetEventDynamic((void **)&event);
87 if (status==MON_ERR_EOF) {
88 printf ("End of File detected\n");
89 break; /* end of monitoring file has been reached */
93 printf("monitorGetEventDynamic() failed : %s\n",monitorDecodeError(status));
97 /* retry if got no event */
104 switch (event->eventType){
107 reader = new AliRawReaderDate((void*)event);
111 daqDA_FES_storeFile("conditions.csv",
112 AliFMDParameters::Instance()->GetConditionsShuttleID());
113 if (retval != 0) std::cerr << "Base DA failed" << std::endl;