]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- fixing compilation errors/warnings
authorodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Nov 2009 01:58:32 +0000 (01:58 +0000)
committerodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Nov 2009 01:58:32 +0000 (01:58 +0000)
- changing from AliCaloRawStream to AliAltroRawStream, causing a speed up of a factor ~100
- small bug fixes

HLT/PHOS/AliHLTPHOSClusterAnalyserComponent.cxx
HLT/PHOS/AliHLTPHOSClusterAnalyserComponent.h
HLT/PHOS/AliHLTPHOSClusterizer.cxx
HLT/PHOS/AliHLTPHOSClusterizerComponent.cxx
HLT/PHOS/AliHLTPHOSClusterizerComponent.h
HLT/PHOS/AliHLTPHOSDigitMaker.cxx
HLT/PHOS/AliHLTPHOSDigitMakerComponent.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv3.cxx
HLT/PHOS/AliHLTPHOSSanityInspector.h

index b4a02b92abc9c04e7c563931b85ff9f923e1ea99..1b3c1687ac45748199a077c5ecff75a83c5d5eda 100644 (file)
@@ -18,6 +18,7 @@
 #include "AliHLTPHOSClusterAnalyser.h"
 #include "AliHLTPHOSRecPointHeaderStruct.h"
 #include "AliHLTCaloClusterDataStruct.h"
+#include "AliPHOSGeoUtils.h"
 #include "TGeoManager.h"
 #include "AliCDBEntry.h"
 #include "AliCDBManager.h"
@@ -203,31 +204,17 @@ AliHLTPHOSClusterAnalyserComponent::DoEvent(const AliHLTComponentEventData& evtD
 }
 
 int 
-AliHLTPHOSClusterAnalyserComponent::Reconfigure(const char *cdbEntry, const char *chainId)
+AliHLTPHOSClusterAnalyserComponent::Reconfigure(const char *cdbEntry, const char */*chainId*/)
 {
   // see header file for class documentation
 
   // configure from the specified entry or the default
 
-  ConfigureFromCDBObject(cdbEntry, chainId);
+  ConfigureFromCDBTObjString(cdbEntry);
   
   return 0;
 } 
 
-int 
-AliHLTPHOSClusterAnalyserComponent::ConfigureFromCDBObject(const char *cdbEntry, const char *chainId)
-{
-  const char* entry=cdbEntry;
-
-  if (!entry)
-    {
-      HLTDebug("No CDB path specified");
-      entry = fOCDBEntry; 
-    }
-
-  const char *path = cdbEntry;
-  
-}
 
 int 
 AliHLTPHOSClusterAnalyserComponent::ScanConfigurationArgument(int argc, const char **argv)
@@ -286,7 +273,7 @@ AliHLTPHOSClusterAnalyserComponent::DoInit(int argc, const char** argv )
 
   for (int i = 0; i < argc; i++)
     {
-      ScanConfigurationArgument(i, argv[i]);
+      ScanConfigurationArgument(i, argv);
     }
 
   return 0;
@@ -297,9 +284,9 @@ AliHLTPHOSClusterAnalyserComponent::GetGeometryFromCDB()
 {
 
   AliCDBPath path("GRP","Geometry","Data");
-  if(path)
+  if(path.GetPath())
     {
-      HLTInfo("configure from entry %s, chain id %s", path, (chainId!=NULL && chainId[0]!=0)?chainId:"<none>");
+      HLTInfo("configure from entry %s", path.GetPath());
       AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path/*,GetRunNo()*/);
       if (pEntry) 
        {
index 6ac900abd35ef69d96a7a097b20b1cabb0c71be4..f0c9365dc6d2ee57b2c743fff5c197c01e5583c7 100644 (file)
@@ -40,7 +40,7 @@
 #include "AliHLTPHOSProcessor.h"
 
 class AliHLTPHOSClusterAnalyser;
-
+class AliPHOSGeoUtils;
 /**
  * @class AliHLTPHOSClusterAnalyserComponent
  *
@@ -95,6 +95,15 @@ protected:
   /** interface function, see @ref AliHLTComponent for description */
   int Deinit();
 
+  /** interface function, see @ref AliHLTComponent for description */
+  int Reconfigure(const char* cdbEntry, const char* chainId);
+
+  /** interface function, see @ref AliHLTComponent for description */
+  int ScanConfigurationArgument(int argc, const char** argv);
+
+  /** Get the PHOS geometry from OCDB */
+  int GetGeometryFromCDB();
+
 private:
   /** Copy constructor */
   AliHLTPHOSClusterAnalyserComponent(const AliHLTPHOSClusterAnalyserComponent &);
@@ -112,7 +121,7 @@ private:
   
   /** The PHOS geometry */
   AliPHOSGeoUtils *fPHOSGeometry;                  //!transient
-  
+                   
 };
 
 #endif
index ace05deca670e2d8b00f841d92fcab519ea366ca..83159dfeb6114cdb7cd72718c4b48eee543d5444 100644 (file)
@@ -98,7 +98,7 @@ AliHLTPHOSClusterizer::ClusterizeEvent(UInt_t availableSize, UInt_t& totSize)
        {
          continue;
        }
-      if(fAvailableSize <=0)
+      if(fAvailableSize < (sizeof(AliHLTPHOSRecPointDataStruct)))
        {
          HLTError("Out of buffer, stopping clusterisation");
          return -1; 
@@ -113,12 +113,7 @@ AliHLTPHOSClusterizer::ClusterizeEvent(UInt_t availableSize, UInt_t& totSize)
       // Assigning digit data to the digit pointer
       fRecPointDataPtr->fDigits = fDigitContainerPtr->fDigitDataStruct[i];
 
-      fAvailableSize -= sizeof(AliHLTPHOSRecPointDataStruct) + sizeof(AliHLTPHOSDigitDataStruct);
-      if(fAvailableSize <=0)
-       {
-         HLTError("Out of buffer, stopping clusterisation");
-         return -1; 
-       }
+      fAvailableSize -= (sizeof(AliHLTPHOSRecPointDataStruct));
 
       // Incrementing the pointer to be ready for new entry
       fDigitDataPtr++;
@@ -135,6 +130,8 @@ AliHLTPHOSClusterizer::ClusterizeEvent(UInt_t availableSize, UInt_t& totSize)
        }
 
       totSize += sizeof(AliHLTPHOSRecPointDataStruct) + (fDigitsInCluster-1)*sizeof(AliHLTPHOSDigitDataStruct);   
+      HLTDebug("Initial available size: %d, used size: %d, remaining available size: %d, should be: %d", availableSize, totSize, fAvailableSize, availableSize-totSize);
+      
       fRecPointDataPtr->fMultiplicity = fDigitsInCluster;     
 
       fRecPointDataPtr = reinterpret_cast<AliHLTPHOSRecPointDataStruct*>(fDigitDataPtr);
@@ -162,14 +159,15 @@ AliHLTPHOSClusterizer::ScanForNeighbourDigits(Int_t index, AliHLTPHOSRecPointDat
                               &(fDigitContainerPtr->fDigitDataStruct[j])))
                {
                  // Assigning value to digit ptr
-                 *fDigitDataPtr = fDigitContainerPtr->fDigitDataStruct[j];
-                 // Incrementing digit pointer to be ready for new entry
-                 fAvailableSize -= sizeof(AliHLTPHOSRecPointDataStruct) + sizeof(AliHLTPHOSDigitDataStruct);
-                 if(fAvailableSize <=0)
+                 if(fAvailableSize < sizeof(AliHLTPHOSDigitDataStruct))
                    {
                      HLTError("Out of buffer, stopping clusterisation");
                      return -1; 
                    }
+                 fAvailableSize -= sizeof(AliHLTPHOSDigitDataStruct);
+
+                 *fDigitDataPtr = fDigitContainerPtr->fDigitDataStruct[j];
+                 // Incrementing digit pointer to be ready for new entry
 
                  fDigitDataPtr++;
 
index a2f4e221802a741d80245a01dea1e11e3c31155d..bdba0b0d69bc4d662ddf2195e1ae02c50bfbe0a4 100644 (file)
@@ -117,6 +117,8 @@ AliHLTPHOSClusterizerComponent::DoEvent(const AliHLTComponentEventData& evtData,
                                         std::vector<AliHLTComponentBlockData>& outputBlocks)
 {
   //See headerfile for documentation
+
+  if(blocks == 0) return 0;
   
   UInt_t offset           = 0;
   UInt_t mysize           = 0;
@@ -247,11 +249,11 @@ AliHLTPHOSClusterizerComponent::DoInit(int argc, const char** argv )
 
   const char *path = "HLT/ConfigPHOS/ClusterizerComponent";
 
-  ConfigureFromCDBTObjString(path);
+  //  ConfigureFromCDBTObjString(path);
 
   for (int i = 0; i < argc; i++)
     {
-      ScanConfigurationArgument(i, argv[i]);
+      ScanConfigurationArgument(i, argv);
     }
 
   return 0;
index 3b251bdb267244127d70b3780f0a5e20b740ed26..ae4eb17890ede9ea029875ae10a75f02ab6188e3 100644 (file)
@@ -122,7 +122,6 @@ class AliHLTPHOSClusterizerComponent: public AliHLTPHOSProcessor
     fClusterizerPtr(0),
     fRecPointStructArrayPtr(0),
     fDigitCount(0),
-    fModuleClusterizationMode(0),
     fNoCrazyness(0)
   {
     //Copy constructor not implemented
@@ -165,6 +164,12 @@ protected:
   /** interface function, see @ref AliHLTComponent for description */
   int Deinit();
 
+  /** interface function, see @ref AliHLTComponent for description */
+  int Reconfigure(const char* cdbEntry, const char* chainId);
+
+  /** interface function, see @ref AliHLTComponent for description */
+  int ScanConfigurationArgument(int argc, const char** argv);
+
  private:
 
   /** All digits in the event */
index 0f12e2768de5ef1f629ff398a8821b1055cdfc98..7abb28b93ee4bd44656b78a46b5cfead84268b73 100644 (file)
@@ -103,7 +103,7 @@ AliHLTPHOSDigitMaker::MakeDigits(AliHLTPHOSChannelDataHeaderStruct* channelDataH
   
   while(currentchannel != 0)
     {
-        if(availableSize < totSize) return -1;
+      if(availableSize < totSize) return -1;
 
       AliHLTPHOSMapper::GetChannelCoord(currentchannel->fChannelID, coord1);
       
@@ -192,7 +192,6 @@ AliHLTPHOSDigitMaker::MakeDigits(AliHLTPHOSChannelDataHeaderStruct* channelDataH
                        }
                      else // Oh well, better use the low gain channel then
                        {
-                         //                      cout << "Reverse: Overflow!" << endl;
                          AliHLTPHOSMapper::GetLocalCoord(currentchannel->fChannelID, locCoord);
                          AddDigit(currentchannelLG, coord1, locCoord);
                          j++;
index db977ce0afe6c767b789d39114f59e2340bb24e9..6cfb61d97465d141f32ed1e4d0e125be302601ba 100644 (file)
@@ -145,7 +145,7 @@ AliHLTPHOSDigitMakerComponent::DoEvent(const AliHLTComponentEventData& evtData,
   
   mysize += digitCount*sizeof(AliHLTPHOSDigitDataStruct);
 
-  HLTDebug("# of digits: %d, used memory size: %d, available size: %d", digitCount, mysize, size);
+  //  HLTDebug("# of digits: %d, used memory size: %d, available size: %d", digitCount, mysize, size);
 
 
   if(mysize > 0) 
index 60ae69247f159b8bcd8bf4241ee5229dad41f169..8f982deab50c06792d4eaa92c2b9e206cc4e357b 100644 (file)
@@ -50,7 +50,7 @@ AliHLTPHOSRawAnalyzerComponentv3::AliHLTPHOSRawAnalyzerComponentv3():
   fRawReaderMemoryPtr = new AliRawReaderMemory();
 
   fAltroRawStreamPtr = new AliAltroRawStreamV3(fRawReaderMemoryPtr);
-
+  //  fAltroRawStreamPtr = new AliCaloRawStreamV3(fRawReaderMemoryPtr, TString("PHOS"));
   fSanityInspectorPtr = new AliHLTPHOSSanityInspector();
 
   if( fDoPushRawData == true  )
@@ -197,17 +197,18 @@ AliHLTPHOSRawAnalyzerComponentv3::DoIt(const AliHLTComponentBlockData* iter, Ali
   fRawReaderMemoryPtr->Reset();
   fRawReaderMemoryPtr->NextEvent();
   
-  if( fDoPushRawData == true)
-    {
-      fRawDataWriter->NewEvent( );
-    }
//  if( fDoPushRawData == true)
+//     {
+//       fRawDataWriter->NewEvent( );
+//     }
   if(fAltroRawStreamPtr != NULL)
     {
       delete fAltroRawStreamPtr;
       fAltroRawStreamPtr=NULL;
     }
   
-  fAltroRawStreamPtr = new AliCaloRawStreamV3(fRawReaderMemoryPtr, TString("PHOS"));
+  //  fAltroRawStreamPtr = new AliCaloRawStreamV3(fRawReaderMemoryPtr, TString("PHOS"));
+  fAltroRawStreamPtr = new AliAltroRawStreamV3(fRawReaderMemoryPtr);
 
   if(fAltroRawStreamPtr->NextDDL())
     {
@@ -225,18 +226,18 @@ AliHLTPHOSRawAnalyzerComponentv3::DoIt(const AliHLTComponentBlockData* iter, Ali
              UShort_t* firstBunchPtr = 0;
              UShort_t chId = fMapperPtr->GetChannelID(iter->fSpecification, fAltroRawStreamPtr->GetHWAddress()); 
            
-             if( fDoPushRawData == true)
-               {
-                 fRawDataWriter->SetChannelId( chId );
-               }
+//           if( fDoPushRawData == true)
+//             {
+//               fRawDataWriter->SetChannelId( chId );
+//             }
              while( fAltroRawStreamPtr->NextBunch() == true )
                {
                  nSamples = fAltroRawStreamPtr->GetBunchLength();
                  
-                 if( fDoPushRawData == true)
-                   {
-                     fRawDataWriter->WriteBunchData( fAltroRawStreamPtr->GetSignals(), nSamples,  fAltroRawStreamPtr->GetEndTimeBin()  );
-                   }
+//               if( fDoPushRawData == true)
+//                 {
+//                   fRawDataWriter->WriteBunchData( fAltroRawStreamPtr->GetSignals(), nSamples,  fAltroRawStreamPtr->GetEndTimeBin()  );
+//                 }
                  firstBunchPtr = const_cast< UShort_t* >(  fAltroRawStreamPtr->GetSignals()  );
                }
              if(firstBunchPtr)
@@ -247,10 +248,10 @@ AliHLTPHOSRawAnalyzerComponentv3::DoIt(const AliHLTComponentBlockData* iter, Ali
                      HLTError("Buffer overflow: Trying to write data of size: %d bytes. Output buffer available: %d bytes.", totSize, size);
                      return -1;
                    }
-                 if(fInspectSanity)
-                   {
-                     crazyness = fSanityInspectorPtr->CheckAndHealInsanity(firstBunchPtr, nSamples);
-                   }
+//               if(fInspectSanity)
+//                 {
+//                   crazyness = fSanityInspectorPtr->CheckAndHealInsanity(firstBunchPtr, nSamples);
+//                 }
 
                  fAnalyzerPtr->SetData( firstBunchPtr, nSamples);
                  fAnalyzerPtr->Evaluate(0, nSamples);  
@@ -264,10 +265,10 @@ AliHLTPHOSRawAnalyzerComponentv3::DoIt(const AliHLTComponentBlockData* iter, Ali
                  channelDataPtr++; // Updating position of the free output.
                }
            }
-         if(fDoPushRawData)
-           {
-             fRawDataWriter->NewChannel();
-           }
+//       if(fDoPushRawData)
+//         {
+//           fRawDataWriter->NewChannel();
+//         }
        }
     }
   
@@ -276,10 +277,10 @@ AliHLTPHOSRawAnalyzerComponentv3::DoIt(const AliHLTComponentBlockData* iter, Ali
   channelDataHeaderPtr->fAlgorithm   = fAlgorithm;
   channelDataHeaderPtr->fInfo        = 0;
 
-  if( fDoPushRawData == true)
-    {
-      tmpsize += fRawDataWriter->CopyBufferToSharedMemory( (UShort_t *)channelDataPtr, size, totSize);
-    }
+//   if( fDoPushRawData == true)
+//     {
+//       tmpsize += fRawDataWriter->CopyBufferToSharedMemory( (UShort_t *)channelDataPtr, size, totSize);
+//     }
 
   // channelDataHeaderPtr->fHasRawData  = false;
   channelDataHeaderPtr->fHasRawData = fDoPushRawData;
index 2aec66d928498f5904157ad800901fe5987cb4a7..50d5448e1f7970aea23c2c06946f328299994fd7 100644 (file)
@@ -33,8 +33,6 @@
 #include "Rtypes.h"
 
 
-class AliHLTAltroData;
-
 /** 
  * @class AliHLTPHOSSanityInspector
  * Sanity inspector for PHOS HLT. It takes raw data as input and checks it for insanity
@@ -79,14 +77,8 @@ public:
   
   
   /** Check for insanity */
-  Int_t CheckInsanity(const UInt_t* data, const Int_t nSamples) const;
+  Int_t CheckInsanity(const UShort_t* data, const Int_t nSamples) const;
   
-  /** Check for and heal insanity */
-  Int_t CheckAndHealInsanity(UInt_t* data, Int_t nSamples);  //Not completely reliable
-
-  /** Check for and heal insanity */
-  Int_t CheckAndHealInsanity(Int_t* data, Int_t nSamples);  //Not completely reliable
-
   /** Check for and heal insanity */
   Int_t CheckAndHealInsanity(UShort_t* data, Int_t nSamples);  //Not completely reliable