attempt to address new coverity reports for AliCalo stuff and QA checker
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALTriggerRawDigitMaker.cxx
index 10860bc..916632b 100644 (file)
@@ -45,6 +45,8 @@ Author: R. GUERNANE LPSC Grenoble CNRS/IN2P3
 
 #include "Riostream.h"
 
+#include "AliCaloRawAnalyzerFactory.h"
+
 namespace
 {
        const Int_t kSTUEqId = 4652;
@@ -77,8 +79,10 @@ fTriggerData(0x0)
       fGeometry =  AliEMCALGeometry::GetInstance(AliEMCALGeometry::GetDefaultGeometryName());
     }
   
-  fRawAnalyzer = new AliCaloRawAnalyzerFakeALTRO();
+  //  fRawAnalyzer = new AliCaloRawAnalyzerFakeALTRO ();
   
+  fRawAnalyzer =  (AliCaloRawAnalyzerFakeALTRO*)AliCaloRawAnalyzerFactory::CreateAnalyzer(kFakeAltro);
+
   fDCSConfig = AliEMCALTriggerDCSConfigDB::Instance();
   
   for (Int_t i=0; i<3072; i++) fRawDigitIndex[i] = -1;
@@ -307,9 +311,29 @@ void AliEMCALTriggerRawDigitMaker::PostProcess()
        
        if (STUin && fSTURawStream && fSTURawStream->ReadPayLoad())
        {
+               fTriggerData->SetL1DataDecoded(1);
+               
                fTriggerData->SetL1GammaThreshold(fSTURawStream->GetL1GammaThreshold());
                fTriggerData->SetL1JetThreshold(  fSTURawStream->GetL1JetThreshold()  );
                
+               Int_t v0[2] = {fSTURawStream->GetV0A(), fSTURawStream->GetV0C()};
+               
+               Int_t type[8] = 
+               {
+                       fSTURawStream->GetGA(),
+                       fSTURawStream->GetGB(),
+                       fSTURawStream->GetGC(),
+                       fSTURawStream->GetJA(),
+                       fSTURawStream->GetJB(),
+                       fSTURawStream->GetJC(),
+                       fSTURawStream->GetRegionEnable(), 
+                       fSTURawStream->GetFwVersion()
+               };              
+               
+               fTriggerData->SetL1FrameMask(fSTURawStream->GetFrameReceived());
+               fTriggerData->SetL1V0(v0);
+               fTriggerData->SetL1TriggerType(type);
+               
                Int_t iTRU, x, y;
 
                if (fSTURawStream->GetRawData())
@@ -447,9 +471,9 @@ void AliEMCALTriggerRawDigitMaker::PostProcess()
                        {
                                if (AliDebugLevel()) printf("| STU => Found L1 jet patch at (%2d , %2d)\n", x, y);
                                
-                               Int_t ix = sizeL1jsubr[0] * (11 - y - sizeL1jpatch[0] + 1);
+                               Int_t ix = sizeL1jsubr[0] * (11 - y - 4 + 1);
 
-                               Int_t iy = sizeL1jsubr[1] * (15 - x - sizeL1jpatch[1] + 1);
+                               Int_t iy = sizeL1jsubr[1] * (15 - x - 4 + 1);
                                
                                // FIXME: x = 0 || y = 0 (Olivier's CS) patches a lost?