contact: basanta@phy.iitb.ac.in
Link:
Reference Run:/afs/cern.ch/user/b/bnandi/public/pedestaldata/run37820.raw
-Run Type: STANDALONE
+Run Type: PEDESTAL
DA Type: LDC
Number of events needed: 1000
Input Files:
#include "TROOT.h"
#include "TPluginManager.h"
-
-
/* Main routine
Arguments:
1- monitoring data source
monitorSetNoWaitNetworkTimeout(1000);
/* log start of process */
- printf("DA example case1 monitoring program started\n");
+ printf("PMD PED DA - started generating mean and rms of each channel\n");
/* init some counters */
break;
case PHYSICS_EVENT:
- printf(" event number = %i \n",iev);
- //if (iev == 10) break;
+
AliRawReader *rawReader = new AliRawReaderDate((void*)event);
TObjArray *pmdddlcont = new TObjArray();
calibped.ProcessEvent(rawReader,pmdddlcont);
/* exit when last event received, no need to wait for TERM signal */
+ // either END_OF_RUN or 1000 events
+
+ if (iev == 1000)
+ {
+ printf("-- 1000 pedestal events processed : terminating --\n");
+ printf("-- eventT is set to END_OF_RUN --\n");
+ eventT = END_OF_RUN;
+ break;
+ }
+
}
+ printf(" Total number of events processed = %i \n",iev);
+
ped = new TTree("ped","PMD Pedestal tree");
+
if (eventT==END_OF_RUN) {
printf("EOR event detected\n");
calibped.Analyse(ped);
delete ped;
ped = 0;
+/* store the pedestal file in database */
+
+ status = daqDA_DB_storeFile("PMD_PED.root","PMD_PED.root");
+
+ if (!status)
+ {
+ printf("--- PEDESTAL root FILE IS IN THE DAQ DATABASE\n");
+ }
+ else
+ {
+ printf("--- Storing the root file into the database failed\n");
+ }
+
+/* store the pedestal file on FES */
+
+ status = daqDA_FES_storeFile("PMD_PED.root","PMD_PED.root");
+ if (status) {
+ status = -2;
+ }
+
+
+
+
return status;
}