Move from the DAQ SOR/EOR time-stamps to the CTP ones. Should prevent the problem...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Nov 2011 12:17:59 +0000 (12:17 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Nov 2011 12:17:59 +0000 (12:17 +0000)
VZERO/AliVZERODataDCS.cxx
VZERO/AliVZERODataDCS.h
VZERO/AliVZEROPreprocessor.cxx

index 17a79f7..2894bad 100644 (file)
@@ -48,6 +48,8 @@ AliVZERODataDCS::AliVZERODataDCS():
        fEndTime(0),
        fDaqStartTime(0),
        fDaqEndTime(0),
+       fCtpStartTime(0),
+       fCtpEndTime(0),
     fGraphs("TGraph",kNGraphs),
        fFEEParameters(NULL),
        fIsProcessed(kFALSE)
@@ -63,13 +65,15 @@ AliVZERODataDCS::AliVZERODataDCS():
 }
 
 //_____________________________________________________________________________
-AliVZERODataDCS::AliVZERODataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime, UInt_t daqStartTime, UInt_t daqEndTime):
+AliVZERODataDCS::AliVZERODataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime, UInt_t daqStartTime, UInt_t daqEndTime, UInt_t ctpStartTime, UInt_t ctpEndTime):
        TObject(),
        fRun(nRun),
        fStartTime(startTime),
        fEndTime(endTime),
        fDaqStartTime(daqStartTime),
        fDaqEndTime(daqEndTime),
+       fCtpStartTime(ctpStartTime),
+       fCtpEndTime(ctpEndTime),
        fGraphs("TGraph",kNGraphs),
        fFEEParameters(new TMap()),
        fIsProcessed(kFALSE)
@@ -82,11 +86,14 @@ AliVZERODataDCS::AliVZERODataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime, U
         fMeanHV[i]      = 100.0;
      fWidthHV[i]     = 0.0; 
        }
-       AliInfo(Form("\n\tRun %d \n\tTime Created %s \n\tTime Completed %s \n\tDAQ start %s \n\tDAQ end %s  ", nRun,
+       AliInfo(Form("\n\tRun %d \n\tTime Created %s \n\tTime Completed %s \n\tDAQ start %s \n\tDAQ end %s \n\tCTP start %s \n\tCTP end %s   ", nRun,
                TTimeStamp(startTime).AsString(),
                TTimeStamp(endTime).AsString(),
                TTimeStamp(daqStartTime).AsString(),
-               TTimeStamp(daqEndTime).AsString()));
+               TTimeStamp(daqEndTime).AsString(),
+               TTimeStamp(ctpStartTime).AsString(),
+               TTimeStamp(ctpEndTime).AsString()
+               ));
        
        fFEEParameters->SetOwnerValue();
        Init();
@@ -143,7 +150,7 @@ Bool_t AliVZERODataDCS::ProcessData(TMap& aliasMap){
 
        while((aValue = (AliDCSValue*) iterarray.Next())) {
                        UInt_t currentTime = aValue->GetTimeStamp();
-                       if(currentTime>fDaqEndTime) break;
+                       if(currentTime>fCtpEndTime) break;
 
                        values[iValue] = aValue->GetFloat();
                        times[iValue] = (Double_t) (currentTime);
@@ -153,7 +160,7 @@ Bool_t AliVZERODataDCS::ProcessData(TMap& aliasMap){
                                if(variation > 0.01) fDeadChannel[GetOfflineChannel(iAlias)] = kTRUE;
                        }
                        fHv[iAlias]->Fill(values[iValue]);
-                       printf("%s %f Dead=%d\n",fAliasNames[iAlias].Data(),values[iValue],fDeadChannel[GetOfflineChannel(iAlias)]);
+                       printf("%s : %s : %f Dead=%d\n",fAliasNames[iAlias].Data(),TTimeStamp(currentTime).AsString(),values[iValue],fDeadChannel[GetOfflineChannel(iAlias)]);
                        iValue++;
        }      
        CreateGraph(iAlias, aliasArr->GetEntries(), times, values); // fill graphs 
index 2592367..53c7de9 100644 (file)
@@ -24,7 +24,7 @@ public:
   enum {kHvMin=0, kHvMax=3000};
   
   AliVZERODataDCS();
-  AliVZERODataDCS(Int_t nRun, UInt_t timeCreated, UInt_t timeCompleted, UInt_t daqStart, UInt_t daqEnd);
+  AliVZERODataDCS(Int_t nRun, UInt_t timeCreated, UInt_t timeCompleted, UInt_t daqStart, UInt_t daqEnd, UInt_t ctpStart, UInt_t ctpEnd);
   ~AliVZERODataDCS();
   
   void SetRun(Int_t run) {fRun = run;}
@@ -77,6 +77,8 @@ private:
   Int_t fEndTime;   // end time (time completed)
   UInt_t fDaqStartTime; // DAQ start time
   UInt_t fDaqEndTime;   // DAQ end time
+  UInt_t fCtpStartTime; // CTP start time
+  UInt_t fCtpEndTime;   // CTP end time
   
   TString fAliasNames[kNAliases];        // aliases for DCS data
   TClonesArray fGraphs;                         // Array containing  graphics
@@ -88,7 +90,7 @@ private:
     
   Bool_t fIsProcessed;                   // bool to know processing status
   
-  ClassDef(AliVZERODataDCS, 6);
+  ClassDef(AliVZERODataDCS, 7);
 };
 
 #endif
index aaeb814..9177210 100644 (file)
@@ -73,8 +73,10 @@ void AliVZEROPreprocessor::Initialize(Int_t run, UInt_t startTime,
    fEndTime   = GetEndTimeDCSQuery ();
    time_t daqStart = (time_t) (((TString)GetRunParameter("DAQ_time_start")).Atoi());
    time_t daqEnd   = (time_t) (((TString)GetRunParameter("DAQ_time_end")).Atoi());
+   time_t ctpStart = (time_t) (((TString)GetRunParameter("TRGTimeStart")).Atoi());
+   time_t ctpEnd   = (time_t) (((TString)GetRunParameter("TRGTimeEnd")).Atoi());
    
-       fData      = new AliVZERODataDCS(fRun, fStartTime, fEndTime,(UInt_t)daqStart, (UInt_t)daqEnd);
+       fData      = new AliVZERODataDCS(fRun, fStartTime, fEndTime,(UInt_t)daqStart, (UInt_t)daqEnd,(UInt_t)ctpStart, (UInt_t)ctpEnd);
        fFEEData   = new AliVZERODataFEE(fRun, fStartTime, fEndTime);           
    
 }