]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/EMCAL/AliHLTEMCALRawAnalyzerComponent.cxx
Coverity fix
[u/mrichter/AliRoot.git] / HLT / EMCAL / AliHLTEMCALRawAnalyzerComponent.cxx
index 1f86dc6ed4461d2e463509a960b92b3f79d19853..51d3b35e2575192d5785391935f7314e312023a1 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+// Base class fro anlyzing EMCAL raww data
+// Further documentation found in base class
+// --------------
+// --------------
+// --------------
+// --------------
+
+
 
 #include "AliHLTEMCALRawAnalyzerComponent.h"
 #include "AliHLTEMCALMapper.h"
 #include "AliHLTEMCALDefinitions.h"
-#include "AliHLTCaloChannelDataHeaderStruct.h"
 
-AliHLTEMCALRawAnalyzerComponent::AliHLTEMCALRawAnalyzerComponent() : 
-AliHLTCaloRawAnalyzerComponentv3("EMCAL")
-{
-  
+#include "AliCaloConstants.h"
 
+using namespace Algo;
+
+AliHLTEMCALRawAnalyzerComponent::AliHLTEMCALRawAnalyzerComponent( fitAlgorithm algo ) : AliHLTCaloRawAnalyzerComponentv3("EMCAL", algo)
+{
+  //fDebug = true;
+  fDebug = false;
 }
 
 
@@ -36,7 +46,6 @@ AliHLTEMCALRawAnalyzerComponent::~AliHLTEMCALRawAnalyzerComponent()
 }
 
 
-
 void 
 AliHLTEMCALRawAnalyzerComponent::GetInputDataTypes( vector <AliHLTComponentDataType>& list)
 {
@@ -45,7 +54,6 @@ AliHLTEMCALRawAnalyzerComponent::GetInputDataTypes( vector <AliHLTComponentDataT
 }
 
 
-
 AliHLTComponentDataType
 AliHLTEMCALRawAnalyzerComponent::GetOutputDataType()
 {
@@ -54,41 +62,10 @@ AliHLTEMCALRawAnalyzerComponent::GetOutputDataType()
 }
 
 
-void
-AliHLTEMCALRawAnalyzerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
-{
-  //comment
-  constBase = sizeof(AliHLTCaloChannelDataHeaderStruct);
-  inputMultiplier = 0.5;
-}
-
-
-void 
-AliHLTEMCALRawAnalyzerComponent::DoInit() 
-{
-  
-}
-
-bool 
-AliHLTEMCALRawAnalyzerComponent::CheckInputDataType(const AliHLTComponentDataType &datatype)
-{
-  if ( datatype  == AliHLTEMCALDefinitions::fgkDDLRawDataType  )
-     {
-       return true;
-     }
-   else
-     {
-       return false;
-     }
-}
-
-
-
-
 void 
 AliHLTEMCALRawAnalyzerComponent::InitMapping( const int specification )
 {
-
+  // Comment
   if ( fMapperPtr == 0 )
     {
       fMapperPtr =  new   AliHLTEMCALMapper( specification );
@@ -101,66 +78,4 @@ AliHLTEMCALRawAnalyzerComponent::InitMapping( const int specification )
     }
 }
 
-int 
-AliHLTEMCALRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& /*trigData*/, 
-                                        AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks )
-{
-
-  /*
-
-  if( fPhosEventCount%300 == 0 )
-    {
-      cout << __FILE__<<__LINE__<< " Processing event " << fPhosEventCount << endl;
-    }
-  */
-
-  //  Int_t blockSize          = 0;
-  Int_t blockSize          = -1;
-  UInt_t totSize           = 0;
-  const AliHLTComponentBlockData* iter = NULL; 
-  unsigned long ndx;
-
-  for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
-    {
-      iter = blocks+ndx;
-      if(  ! CheckInputDataType(iter->fDataType) )
-       {
-         continue;
-       }
-      else
-       {
-         InitMapping( iter->fSpecification); 
-         
-         blockSize = DoIt(iter, outputPtr, size, totSize); // Processing the block
-         
-         //  blockSize = 1;
-
-         if(blockSize == -1) // If the processing returns -1 we are out of buffer and return an error msg.
-           {
-             return -ENOBUFS;
-           }
-         
-         totSize += blockSize; //Keeping track of the used size
-         AliHLTComponentBlockData bdChannelData;
-         FillBlockData( bdChannelData );
-         bdChannelData.fOffset = 0; //FIXME
-         bdChannelData.fSize = blockSize;
-         
-         //      bdChannelData.fDataType = AliHLTPHOSDefinitions::fgkChannelDataType;
-         bdChannelData.fDataType = AliHLTEMCALDefinitions::fgkChannelDataType;
-
-         bdChannelData.fSpecification = iter->fSpecification;
-         outputBlocks.push_back(bdChannelData);
-         outputPtr += blockSize; //Updating position of the output buffer
-       }
-
-      fCaloEventCount++; 
-      size = totSize; //telling the framework how much buffer space we have used.
-    }
-
-  
-return 0;
-  
-}//end DoEvent