]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/TOFda.cxx
Typo fixed.
[u/mrichter/AliRoot.git] / TOF / TOFda.cxx
index 53e011e0f0dc1e5ffa28185321902836ca4ec81b..df296c60529f7393f0933cb72029c51972d6b481 100644 (file)
@@ -2,6 +2,15 @@
 
 TOF DA for online calibration
 
+Contact: Chiara.Zampolli@bo.infn.it
+Link: www.bo.infn.it/~zampolli
+Run Type: PHYSICS
+DA Type: MON
+Number of events needed: depending on the run, being run-level
+Input Files: TOFdaTotal.root, to be updated if existing
+Output Files: TOFdaRun.root, TOFdaTotal.root, both to be exported to the DAQ FXS
+Trigger types used: PHYSICS_EVENT
+
 */
 
 #define FILE_TOTAL "TOFdaTotal.root"
@@ -29,6 +38,8 @@ TOF DA for online calibration
 #include <TObject.h>
 #include <TMath.h>
 #include <TSystem.h>
+#include "TROOT.h"
+#include "TPluginManager.h"
 
 
 /* Main routine
@@ -38,9 +49,16 @@ TOF DA for online calibration
 
 int main(int argc, char **argv) {
   
+  /* magic line from Rene */
+  gROOT->GetPluginManager()->AddHandler("TVirtualStreamerInfo",
+                    "*",
+                    "TStreamerInfo",
+                    "RIO",
+                    "TStreamerInfo()");
+
   AliTOFGeometry * geom = new AliTOFGeometry();
 
-  static const Int_t size = AliTOFgeometry::NPadXSector()*AliTOFGeometry::NSectors();
+  static const Int_t size = AliTOFGeometry::NPadXSector()*AliTOFGeometry::NSectors();
   static const Int_t nbins = 500;
   static const Int_t binmin = -20;
   const Float_t c = 2.99792458E10; //speed of light
@@ -133,19 +151,23 @@ int main(int argc, char **argv) {
       AliT0RawReader *rawReaderT0 = new AliT0RawReader(rawReader,kTRUE);
       if (!rawReaderT0->Next()) {
         printf("T0: no raw data found!\n");
-      } else {
-        Int_t allData[110][5];
-        for (Int_t i=0; i<110; i++) {
+      } 
+      else {
+       /*
+        Int_t allData[105][5];
+        for (Int_t i=0; i<105; i++) {
          allData[i][0]=rawReaderT0->GetData(i,0);
-        }
+       }
         meantime = allData[49][0];
-        //printf("time zero (ns) = %i (%f) \n", meantime, meantime*25*1E-3-200);
+       */
+        meantime = rawReaderT0->GetData(49,0);
+       //        printf("time zero (ns) = %i (%f) \n", meantime, (meantime*24.4-200)*1E-3);   // debugging purpose
       }
       
       delete rawReaderT0;
       rawReaderT0 = 0x0;
       rawReader->Reset();
-
+      
       //TOF event
       Int_t dummy = -1;
       Int_t Volume[5];
@@ -304,10 +326,10 @@ int main(int argc, char **argv) {
   status=0;
 
   /* export file to FXS */
-  if (daqDA_FES_storeFile(FILE_RUN, FILE_RUN)) {
+  if (daqDA_FES_storeFile(FILE_RUN, "RUNLevel")) {
     status=-2;
   }
-  if (daqDA_FES_storeFile(FILE_TOTAL, FILE_TOTAL)) {
+  if (daqDA_FES_storeFile(FILE_TOTAL, "DELAYS")) {
     status=-2;
   }