]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
DA & preprocessor
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Feb 2008 18:53:25 +0000 (18:53 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Feb 2008 18:53:25 +0000 (18:53 +0000)
T0/AliT0Preprocessor.cxx
T0/AliT0Preprocessor.h
T0/T0Laserda.cxx
T0/T0Physda.cxx

index f55572d6c996055e4cad788bd8a5ca2a7dc8bd7a..eee1d9e574b58069b21e541b8531216ceaf1d64c 100644 (file)
@@ -30,6 +30,12 @@ Preprocessor storing data to OCDB (T.Malkiewicz)
 Version 1.1  2006/10   
 Preliminary test version (T.Malkiewicz)
 */   
+// T0 preprocessor:
+// 1) takes data from DCS and passes it to the class AliTOFDataDCS 
+// for processing and writes the result to the Reference DB.
+// 2) takes data form DAQ (both from Laser Calibration and Physics runs), 
+// processes it, and stores either to OCDB or to Reference DB.
+
 
 #include "AliT0Preprocessor.h"
 #include "AliT0DataDCS.h"
@@ -46,17 +52,13 @@ Preliminary test version (T.Malkiewicz)
 #include <TNamed.h>
 #include "AliT0Dqclass.h"
 
-// T0 preprocessor:
-// 1) takes data from DCS and passes it to the class AliTOFDataDCS 
-// for processing and writes the result to the Reference DB.
-// 2) takes data form DAQ (both from Laser Calibration and Physics runs), 
-// processes it, and stores either to OCDB or to Reference DB.
-
 
 ClassImp(AliT0Preprocessor)
 
 //____________________________________________________
-AliT0Preprocessor::AliT0Preprocessor(AliShuttleInterface* shuttle) : AliPreprocessor("T00", shuttle), fData(0)
+AliT0Preprocessor::AliT0Preprocessor(AliShuttleInterface* shuttle) : 
+  AliPreprocessor("T00", shuttle), 
+  fData(0)
 {
   //constructor
 }
@@ -103,7 +105,7 @@ UInt_t AliT0Preprocessor::Process(TMap* dcsAliasMap )
         }
         else
         {
-         
+         /*
           resultDCSMap=fData->ProcessData(*dcsAliasMap);
           if(!resultDCSMap)
           {
@@ -112,26 +114,29 @@ UInt_t AliT0Preprocessor::Process(TMap* dcsAliasMap )
           }
           else
           {
+           Float_t *meanScaler[24] = fData->GetScalerMean();
+               
             AliCDBMetaData metaDataDCS;
             metaDataDCS.SetBeamPeriod(0);
             metaDataDCS.SetResponsible("Tomasz Malkiewicz");
             metaDataDCS.SetComment("This preprocessor fills an AliTODataDCS object.");
             AliInfo("Storing DCS Data");
-            resultDCSStore = StoreReferenceData("Calib","DCSData", fData, &metaDataDCS);
+            resultDCSStore = Store("Calib","DCSData",meanScaler, &metaDataDCS);
             if (!resultDCSStore)
             {
               Log("Some problems occurred while storing DCS data results in ReferenceDB");
-              //return 2;// return error Code for processed DCS data not stored
+              return 2;// return error Code for processed DCS data not stored
             }
 
           }
+         */
         }
 
         // processing DAQ
 
         TString runType = GetRunType();
 
-        if(runType == "T0_STANDALONE_LASER")
+        if(runType == "STANDALONE")
         {
           TList* list = GetFileSources(kDAQ, "LASER");
           if (list)
@@ -150,7 +155,6 @@ UInt_t AliT0Preprocessor::Process(TMap* dcsAliasMap )
                 metaData.SetBeamPeriod(0);
                 metaData.SetResponsible("Tomek&Michal");
                 metaData.SetComment("Walk correction from laser runs.");
-               //TObjArray* arrLaser = laser->GetfWalk();
                resultLaser=Store("Calib","Slewing_Walk", laser, &metaData, 0, 1);
                 delete laser;
               }
@@ -184,7 +188,7 @@ UInt_t AliT0Preprocessor::Process(TMap* dcsAliasMap )
               {
                 AliT0CalibTimeEq *online = new AliT0CalibTimeEq();
                 online->Reset();
-                online->ComputeOnlineParams("CFD", 20, 4., filePhys);
+                online->ComputeOnlineParams(filePhys);
                 AliCDBMetaData metaData;
                 metaData.SetBeamPeriod(0);
                 metaData.SetResponsible("Tomek&Michal");
index 5f74eda82941e79030ce8cd47b8f7af701cfba28..02bda09d316a6ad117a459b653737ffb9dcd5073 100644 (file)
@@ -6,22 +6,22 @@
 
 /* $Id$ */
 
-#include "AliPreprocessor.h"
 
 // T0 preprocessor. 
 // Takes data from DCS and passes it to the class AliTOFDataDCS for processing and writes the result to the Reference DB.
 // Takes data form DAQ (both from Laser Calibration and Physics runs), processes it, and stores either to OCDB or to Reference DB.
 
+#include "AliPreprocessor.h"
+
 class AliT0DataDCS;
 
 class AliT0Preprocessor: public AliPreprocessor 
 {
   public:
-        AliT0Preprocessor(): AliPreprocessor("T00",0),
-         fData(0) { }
+        AliT0Preprocessor(): AliPreprocessor("T00",0),  
+         fData(0)
+ { }
         AliT0Preprocessor(AliShuttleInterface* shuttle);
-       AliT0Preprocessor& operator= (const AliT0Preprocessor &) { return *this;};
-
        virtual ~AliT0Preprocessor();
   
   protected:
@@ -30,8 +30,10 @@ class AliT0Preprocessor: public AliPreprocessor
 
   private:
        AliT0Preprocessor(const AliT0Preprocessor & proc); // copy constructor  
-       AliT0DataDCS *fData;                    // Data member to process DCS data      
-       ClassDef(AliT0Preprocessor, 1)
+       AliT0Preprocessor& operator=(const AliT0Preprocessor&); //operator
+       AliT0DataDCS *fData;                    // Data member to process DCS data      
+       ClassDef(AliT0Preprocessor, 2)
 };
 
 typedef AliT0Preprocessor AliSTARTPreprocessor; // for backward compatibility
index 18e2fb4f52568160861df8b638f0c52f8e83bfbe..4896ada55b207f2823310a59de30019a3ee38f8b 100644 (file)
@@ -43,7 +43,7 @@ Trigger types used: PHYSICS_EVENT
 #include "TF1.h"
 #include "TSpectrum.h"
 #include "TVirtualFitter.h"
-#include "TProfile.h"
+//#include "TProfile.h"
 int cqbx,cqby,clbx,clby,cbx;
 float cqlx,cqmx,cqly,cqmy,cllx,clmx,clly,clmy,clx,cmx;
 /* Main routine
@@ -189,18 +189,12 @@ int main(int argc, char **argv) {
       if(iev==1){
            printf("First event - %i\n",iev);
       }
-//      if((iev<10) || (iev>11000)){ 
-//           printf(" event number = %i \n",iev);
-//      }
-
 
       // Initalize raw-data reading and decoding
       AliRawReader *reader = new AliRawReaderDate((void*)event);
           
       // Enable the following two lines in case of real-data
-   //       reader->LoadEquipmentIdsMap("T0map.txt");
-    //     reader->RequireHeader(kFALSE);
-     //          reader->RequireHeader(kTRUE);
+         reader->RequireHeader(kTRUE);
       AliT0RawReader *start = new AliT0RawReader(reader, kTRUE);
 
       // Read raw data
@@ -247,7 +241,6 @@ int main(int argc, char **argv) {
                  hCFDvsLED[cc]->Fill(allData[cc+57][iHt]-allData[cc+45][iHt],allData[cc+45][iHt]-allData[0][0]+5000);
                 }
        }
-
        
      delete start;
        start = 0x0;
@@ -256,8 +249,6 @@ int main(int argc, char **argv) {
 
     }
 
-
-
     /* free resources */
     free(event);
     
@@ -283,7 +274,7 @@ int main(int argc, char **argv) {
   status=0;
 
   /* export file to FXS */
-  if (daqDA_FES_storeFile(FILE_OUT, FILE_OUT)) {
+  if (daqDA_FES_storeFile(FILE_OUT, "LASER")) {
     status=-2;
   }
 
index 6f0889c7e8356bed9a13e2a4530066a398e16568..2b60066b71a8b47adf2bf2b1791aa7c77cd26ff0 100644 (file)
@@ -181,15 +181,11 @@ int main(int argc, char **argv) {
            printf("First event - %i\n",iev);
       }
 
-//      printf(" event number = %i \n",iev);
-
       // Initalize raw-data reading and decoding
       AliRawReader *reader = new AliRawReaderDate((void*)event);
           
       // Enable the following two lines in case of real-data
-   //       reader->LoadEquipmentIdsMap("T0map.txt");
-    //     reader->RequireHeader(kFALSE);
-     //          reader->RequireHeader(kTRUE);
+         reader->RequireHeader(kTRUE);
       AliT0RawReader *start = new AliT0RawReader(reader, kTRUE);
 
       // Read raw data
@@ -197,7 +193,6 @@ int main(int argc, char **argv) {
       for(Int_t i0=0;i0<105;i0++)
        for(Int_t j0=0;j0<5;j0++)
                allData[i0][j0] = 0;
      
       if(start->Next())
       for (Int_t i=0; i<105; i++) {
@@ -224,7 +219,6 @@ int main(int argc, char **argv) {
                }
        }
 
-
      delete start;
        start = 0x0;
      reader->Reset();
@@ -232,8 +226,6 @@ int main(int argc, char **argv) {
 
     }
 
-
-
     /* free resources */
     free(event);
     
@@ -258,7 +250,7 @@ int main(int argc, char **argv) {
   status=0;
 
   /* export file to FXS */
-  if (daqDA_FES_storeFile(FILE_OUT, FILE_OUT)) {
+  if (daqDA_FES_storeFile(FILE_OUT, "PHYSICS")) {
     status=-2;
   }