]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/PHOS/AliHLTPHOSClusterAnalyserComponent.cxx
- increased output buffer size
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSClusterAnalyserComponent.cxx
index 1b3c1687ac45748199a077c5ecff75a83c5d5eda..4f6b190baa277f7924b27ad50e5ee8eb639a48df 100644 (file)
@@ -17,6 +17,7 @@
 #include "AliHLTPHOSClusterAnalyserComponent.h"
 #include "AliHLTPHOSClusterAnalyser.h"
 #include "AliHLTPHOSRecPointHeaderStruct.h"
+#include "AliHLTPHOSDigitDataStruct.h"
 #include "AliHLTCaloClusterDataStruct.h"
 #include "AliPHOSGeoUtils.h"
 #include "TGeoManager.h"
@@ -152,9 +153,8 @@ AliHLTPHOSClusterAnalyserComponent::DoEvent(const AliHLTComponentEventData& evtD
          continue;
         }
       specification = specification|iter->fSpecification;
-      fClusterAnalyserPtr->SetRecPointDataPtr(reinterpret_cast<AliHLTPHOSRecPointHeaderStruct*>(iter->fPtr));
-      //      HLTDebug("Number of rec points: %d", (reinterpret_cast<AliHLTPHOSRecPointHeaderStruct*>(iter->fPtr))->fNRecPoints);
-
+      AliHLTPHOSDigitHeaderStruct *digitHeader = reinterpret_cast<AliHLTPHOSDigitHeaderStruct*>(iter->fPtr);
+      fClusterAnalyserPtr->SetRecPointDataPtr(reinterpret_cast<AliHLTPHOSRecPointHeaderStruct*>(reinterpret_cast<Long_t>(iter->fPtr) + sizeof(AliHLTPHOSDigitHeaderStruct) + digitHeader->fNDigits*sizeof(AliHLTPHOSDigitDataStruct)), digitHeader);
       if(fDoDeconvolution)
        {
          fClusterAnalyserPtr->DeconvoluteClusters();
@@ -263,13 +263,15 @@ AliHLTPHOSClusterAnalyserComponent::DoInit(int argc, const char** argv )
 
   //See headerfile for documentation
   
+  HLTError("Doing init...");
+
   fClusterAnalyserPtr = new AliHLTPHOSClusterAnalyser();
 
-  const char *path = "HLT/ConfigPHOS/ClusterAnalyserComponent";
+  //  const char *path = "HLT/ConfigPHOS/ClusterAnalyserComponent";
 
   GetGeometryFromCDB();
 
-  ConfigureFromCDBTObjString(path);
+  //  ConfigureFromCDBTObjString(path);
 
   for (int i = 0; i < argc; i++)
     {
@@ -282,11 +284,14 @@ AliHLTPHOSClusterAnalyserComponent::DoInit(int argc, const char** argv )
 int 
 AliHLTPHOSClusterAnalyserComponent::GetGeometryFromCDB()
 {
+  HLTError("Getting geometry...");
+
+  AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
 
   AliCDBPath path("GRP","Geometry","Data");
   if(path.GetPath())
     {
-      HLTInfo("configure from entry %s", path.GetPath());
+      //      HLTInfo("configure from entry %s", path.GetPath());
       AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path/*,GetRunNo()*/);
       if (pEntry) 
        {
@@ -297,14 +302,18 @@ AliHLTPHOSClusterAnalyserComponent::GetGeometryFromCDB()
            }
 
          gGeoManager = (TGeoManager*) pEntry->GetObject();
-  
-         fPHOSGeometry = new AliPHOSGeoUtils("PHOS", "noCPV");
-         fClusterAnalyserPtr->SetGeometry(fPHOSGeometry);
+         HLTError("gGeoManager = 0x%x", gGeoManager);
+         if(gGeoManager)
+           {
+             fPHOSGeometry = new AliPHOSGeoUtils("PHOS", "noCPV");
+             fClusterAnalyserPtr->SetGeometry(fPHOSGeometry);
+           }
 
        }
       else
        {
-         HLTError("can not fetch object \"%s\" from OCDB", path);
+         //      HLTError("can not fetch object \"%s\" from OCDB", path);
        }
     }
+  return 0;
 }