]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/STEER/AliGRPPreprocessor.cxx
Setting new FXS for DQM.
[u/mrichter/AliRoot.git] / STEER / STEER / AliGRPPreprocessor.cxx
index 15ed3cf75a225a047249b7114767eaaa28b1b265..159e9bce08a6918a0d0dac0bd5fba98eca336fa6 100644 (file)
@@ -66,8 +66,8 @@ class AliShuttleInterface;
 #include <AliCDBMetaData.h>
 #include <AliCDBId.h>
 #include <AliTriggerConfiguration.h>
-#include <AliCTPTimeParams.h>
-#include <AliLHCClockPhase.h>
+#include "AliCTPTimeParams.h"
+#include "AliLHCClockPhase.h"
 
 const Double_t kFitFraction = -1.;                 // Fraction of DCS sensor fits required
 
@@ -204,7 +204,8 @@ ClassImp(AliGRPPreprocessor)
                   "(DCS FXS Error for LHC Data)",
                   "(LHC Data Error)",
                   "(LHC Clock Phase Error (from LHC Data))",
-                  "(LTU Configuration Error)"
+                  "(LTU Configuration Error)",
+                  "(DQM Failure)"
   };
 
 //_______________________________________________________________
@@ -283,6 +284,7 @@ void AliGRPPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
        
        fPressure = new AliDCSSensorArray(GetStartTimeDCSQuery(), GetEndTimeDCSQuery(), array);
 
+       ffailedDPs->Clear(); // cleaning ffailedDPs for current run
        for (Int_t iDP=0; iDP < fgknDCSDP; iDP++){
                TObjString* dp = new TObjString(fgkDCSDataPoints[iDP]);
                ffailedDPs->AddAt(dp,iDP);
@@ -659,6 +661,20 @@ UInt_t AliGRPPreprocessor::Process(TMap* valueMap)
                Log("SPD Mean Vertex not processed since runType != PHYSICS");
        }
 
+       //=================//
+       // DQM FXS         //
+       //=================//
+
+       Log("*************** Processing DQM FXS");
+
+       UInt_t iDqmFxs = ProcessDqmFxs();
+       if( iDqmFxs == 1 ) {
+               Log(Form("DQM FXS, successful!"));
+       } else {
+               Log(Form("DQM FXS failed!!!"));
+               error |= 4096;
+       }
+
        // storing AliGRPObject in OCDB
 
        AliCDBMetaData md;
@@ -673,7 +689,7 @@ UInt_t AliGRPPreprocessor::Process(TMap* valueMap)
                Log("GRP Preprocessor Success");
                return 0;
        } else {
-               Log( Form("GRP Preprocessor FAILS!!! %s%s%s%s%s%s%s%s%s%s%s%s",
+               Log( Form("GRP Preprocessor FAILS!!! %s%s%s%s%s%s%s%s%s%s%s%s%s",
                          kppError[(error&1)?1:0],
                          kppError[(error&2)?2:0],
                          kppError[(error&4)?3:0],
@@ -685,7 +701,8 @@ UInt_t AliGRPPreprocessor::Process(TMap* valueMap)
                          kppError[(error&256)?9:0],
                          kppError[(error&512)?10:0],
                          kppError[(error&1024)?11:0],
-                         kppError[(error&2048)?12:0]
+                         kppError[(error&2048)?12:0],
+                         kppError[(error&4096)?12:0]
                          ));
                return error;
        }
@@ -1222,6 +1239,8 @@ UInt_t AliGRPPreprocessor::ProcessLHCData(AliGRPObject *grpobj)
                        return 4;
                }                       
                AliLHCClockPhase *phaseObj = ProcessLHCClockPhase(beam1phase,beam2phase,timeEnd);
+               delete beam1phase;
+               delete beam2phase;
                if (phaseObj){
                        AliInfo(Form("LHC Phase found"));
                        AliCDBMetaData mdPhase;
@@ -1300,6 +1319,52 @@ UInt_t AliGRPPreprocessor::ProcessSPDMeanVertex()
 
        return storeResult;
 }
+//_______________________________________________________________
+
+UInt_t AliGRPPreprocessor::ProcessDqmFxs()
+{
+       //
+       // Processing DQM fxs information
+       //
+
+       TList* list = GetFileSources(kDQM, "TriggerClassesAndHistosToClone");
+       Bool_t storeResult = kTRUE;
+       if (list !=0x0 && list->GetEntries()!=0){
+               AliInfo("The following sources produced files with the id TriggerClassesAndHistosToClone for GRP");
+               list->Print();
+               for (Int_t jj=0;jj<list->GetEntries();jj++){
+                       TObjString * str = dynamic_cast<TObjString*> (list->At(jj)); 
+                       if (!str){
+                               AliError(Form("Expecting a TObjString in the list for the %d-th source, but something else was found.",jj));
+                               continue;
+                       }
+                       AliInfo(Form("found source %s", str->String().Data()));
+                       TString fileNameRun = GetFile(kDQM, "TriggerClassesAndHistosToClone", str->GetName());
+                       if (fileNameRun.Length()>0){
+                               AliInfo(Form("Got the file %s", fileNameRun.Data()));
+                               TFile dqmFile(fileNameRun.Data(),"READ");
+                               if (dqmFile.IsOpen()) {
+                                       dqmFile.ls();
+                               }
+                               else {
+                                       AliError("Can't open file");
+                                       storeResult = kFALSE;
+                               }
+                       }
+                       else{
+                               AliWarning("No file found for current source for DQM TriggerClassesAndHistosToClone");
+                       }
+               }
+       }
+       else {
+               AliWarning("No list found for DQM TriggerClassesAndHistosToClone");
+       }
+       
+       if (list) delete list;
+       
+       //      return storeResult;
+       return kTRUE;  // temporary!!
+}
 
 
 //_______________________________________________________________
@@ -1390,7 +1455,6 @@ Int_t AliGRPPreprocessor::ProcessDaqLB(AliGRPObject* grpObj)
 
        return nparameter;
 }
-
 //_______________________________________________________________
 
 UInt_t AliGRPPreprocessor::ProcessDaqFxs()
@@ -1399,6 +1463,7 @@ UInt_t AliGRPPreprocessor::ProcessDaqFxs()
        
        AliRawEventHeaderV3_9::Class()->IgnoreTObjectStreamer(); // to avoid trying reading TObject store in AliRawEventHeaderV3_9 - temporary fix 
        AliRawEventHeaderV3_11::Class()->IgnoreTObjectStreamer(); // to avoid trying reading TObject store in AliRawEventHeaderV3_11 - temporary fix 
+       AliRawEventHeaderV3_12::Class()->IgnoreTObjectStreamer(); // to avoid trying reading TObject store in AliRawEventHeaderV3_12 - temporary fix 
        TList* list = GetFileSources(kDAQ);  
        if (!list) {
                Log("No raw data tag list: connection problems with DAQ FXS logbook!");
@@ -1428,6 +1493,10 @@ UInt_t AliGRPPreprocessor::ProcessDaqFxs()
                        Log(Form("Number of ids: %d",list2->GetEntries()));
                        for(Int_t i = 0; i < list2->GetEntries(); i++) {
                                TObjString *idStr = (TObjString *)list2->At(i);
+                               if (idStr->String().CompareTo("QAThreshold") == 0 || idStr->String().CompareTo("TriggerClassesAndHistosToClone") == 0) {
+                                       Log(Form("Skipping file with Id %s",idStr->String().Data()));
+                                       continue; 
+                               }
                                TString fileName = GetFile(kDAQ,idStr->String().Data(),objStr->String().Data());
                                if (fileName.Length() > 0) {
                                        Log(Form("Adding file in the chain: %s",fileName.Data()));