]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Selectiv readout and writing to FXS (oystein)
authorphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 20 Feb 2008 17:57:02 +0000 (17:57 +0000)
committerphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 20 Feb 2008 17:57:02 +0000 (17:57 +0000)
43 files changed:
HLT/PHOS/AliHLTPHOSBaseline.h
HLT/PHOS/AliHLTPHOSBaselineAnalyzer.cxx
HLT/PHOS/AliHLTPHOSBaselineAnalyzer.h
HLT/PHOS/AliHLTPHOSBaselineAnalyzerComponent.cxx
HLT/PHOS/AliHLTPHOSBaselineAnalyzerComponent.h
HLT/PHOS/AliHLTPHOSClusterAnalyser.cxx
HLT/PHOS/AliHLTPHOSClusterAnalyser.h
HLT/PHOS/AliHLTPHOSClusterAnalyserComponent.cxx
HLT/PHOS/AliHLTPHOSClusterAnalyserComponent.h
HLT/PHOS/AliHLTPHOSClusterizer.cxx
HLT/PHOS/AliHLTPHOSClusterizer.h
HLT/PHOS/AliHLTPHOSClusterizerComponent.cxx
HLT/PHOS/AliHLTPHOSClusterizerComponent.h
HLT/PHOS/AliHLTPHOSDefinitions.cxx
HLT/PHOS/AliHLTPHOSDefinitions.h
HLT/PHOS/AliHLTPHOSDigit.cxx
HLT/PHOS/AliHLTPHOSDigit.h
HLT/PHOS/AliHLTPHOSDigitContainerDataStruct.h
HLT/PHOS/AliHLTPHOSDigitDataStruct.h
HLT/PHOS/AliHLTPHOSDigitMaker.cxx
HLT/PHOS/AliHLTPHOSDigitMaker.h
HLT/PHOS/AliHLTPHOSDigitMakerComponent.cxx
HLT/PHOS/AliHLTPHOSDigitMakerComponent.h
HLT/PHOS/AliHLTPHOSESDMaker.cxx
HLT/PHOS/AliHLTPHOSESDMaker.h
HLT/PHOS/AliHLTPHOSESDMakerComponent.cxx
HLT/PHOS/AliHLTPHOSESDMakerComponent.h
HLT/PHOS/AliHLTPHOSEmcCalibrationHistogramProducer.h
HLT/PHOS/AliHLTPHOSPhysicsAnalyzer.cxx
HLT/PHOS/AliHLTPHOSPhysicsAnalyzer.h
HLT/PHOS/AliHLTPHOSPhysicsAnalyzerSpectrum.h
HLT/PHOS/AliHLTPHOSPhysicsAnalyzerSpectrumComponent.cxx
HLT/PHOS/AliHLTPHOSPhysicsAnalyzerSpectrumComponent.h
HLT/PHOS/AliHLTPHOSProcessor.cxx
HLT/PHOS/AliHLTPHOSProcessor.h
HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.h
HLT/PHOS/AliHLTPHOSRcuCalibrationProcessorComponent.cxx
HLT/PHOS/AliHLTPHOSRcuProcessor.h
HLT/PHOS/AliHLTPHOSRecPointContainerStruct.h
HLT/PHOS/AliHLTPHOSRecPointDataStruct.h
HLT/PHOS/AliHLTPHOSSanityInspector.h
HLT/PHOS/AliHLTPHOSSharedMemoryInterface.cxx

index 652885419f0acdf0672d91019dbb11ab20aa272d..2ea3f1c3420dad4d0333f3846c3eac64fb4ad71b 100644 (file)
@@ -56,6 +56,27 @@ public:
    */
   virtual ~AliHLTPHOSBaseline();
 
+  /** Copy constructor */  
+  AliHLTPHOSBaseline(const AliHLTPHOSBaseline &) : 
+    TObject(),
+    fBaseline(-1),
+    fX(-1),
+    fZ(-1),
+    fGain(-1),
+    fEntries(0)
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSBaseline & operator = (const AliHLTPHOSBaseline)
+    
+    {
+      //Assignment
+      return *this; 
+    }
+  
+
   /**
    * Set the baseline
    * @param baseline is the baseline
index 8ff4b92fe790d701bdc0a73a117e9dfa5cee332d..60ed68d5a0b778460adb0f151e348a20b69dc0cc 100644 (file)
@@ -45,8 +45,16 @@ AliHLTPHOSBaselineAnalyzer::AliHLTPHOSBaselineAnalyzer() :
   AliHLTPHOSBase(),
   fSampleStart(5),
   fMaxCrazyDifference(0),      
-  fMaxSignal(0),    
+  fMaxSignal(0),  
+  fChannelCount(0),
   fTreePtr(0),
+  fBaselineArrayPtr(0),
+  fRMSHistogramPtr(0),
+  fRMSMapHighGainHistogramPtr(0),
+  fRMSMapLowGainHistogramPtr(0),
+  fFixedRMSHistogramPtr(0),
+  fFixedRMSMapHighGainHistogramPtr(0),
+  fFixedRMSMapLowGainHistogramPtr(0),
   fSanityInspector(0)     
 {  
   //see headerfile for documentation
@@ -92,9 +100,9 @@ void
 AliHLTPHOSBaselineAnalyzer::CalculateRcuBaselines(AliHLTPHOSRcuCellEnergyDataStruct* rcuData)
 {
   //see headerfile for documentation
-  Int_t xOff = rcuData->fRcuX * N_XCOLUMNS_RCU;
-  Int_t zOff = rcuData->fRcuZ * N_ZROWS_RCU;
-  Float_t baseline = 0;
+  //Int_t xOff = rcuData->fRcuX * N_XCOLUMNS_RCU;
+  //Int_t zOff = rcuData->fRcuZ * N_ZROWS_RCU;
+  //Float_t baseline = 0;
 
   //TODO: fix this to comply with new format
   /*
index 2f0c1a0a49aeb33a9442d795f1aa88029645b0b2..67620d50ca95279295f382b90cafc2cf92bd956a 100644 (file)
@@ -65,7 +65,34 @@ public:
   
   /** Destructor */ 
   virtual ~AliHLTPHOSBaselineAnalyzer();
-
+  
+  /** Copy constructor */
+  AliHLTPHOSBaselineAnalyzer(const AliHLTPHOSBaselineAnalyzer &) : 
+    AliHLTPHOSBase(),
+    fSampleStart(5),
+    fMaxCrazyDifference(0),    
+    fMaxSignal(0),  
+    fChannelCount(0),
+    fTreePtr(0),
+    fBaselineArrayPtr(0),
+    fRMSHistogramPtr(0),
+    fRMSMapHighGainHistogramPtr(0),
+    fRMSMapLowGainHistogramPtr(0),
+    fFixedRMSHistogramPtr(0),
+    fFixedRMSMapHighGainHistogramPtr(0),
+    fFixedRMSMapLowGainHistogramPtr(0),
+    fSanityInspector(0)
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSBaselineAnalyzer & operator = (const AliHLTPHOSBaselineAnalyzer)
+    {
+      //Assignment
+      return *this; 
+    }
+    
   /** 
    * Calculate baselines for an RCU
    * @param rcuData is a pointer to energy and timing data from an RCU
index 09b42d418e6cb073c80339f3bb5d6ea460f0ca00..67456940b385543a35b426049ffe3e4decef1388 100644 (file)
@@ -49,13 +49,15 @@ AliHLTPHOSBaselineAnalyzerComponent::AliHLTPHOSBaselineAnalyzerComponent() :
   AliHLTPHOSProcessor(),
   fBaselineAnalyzerPtr(0),
   fTreePtr(0),
+  fBaselineArrayPtr(0),
   fEvCnt(0),
   fWriteInterval(100),
   fFillInterval(100),
   fFilename(0),
   fDirectory(0),
   fHistPath(0),
-  fRunNb(0)
+  fRunNb(0),
+  fCalculateAll(false)
 {
    //See header file for documentation
 }
@@ -127,7 +129,7 @@ AliHLTComponentDataType
 AliHLTPHOSBaselineAnalyzerComponent::GetOutputDataType()
 {
  //See header file for documentation
-  return AliHLTPHOSDefinitions::fgkAliHLTBaselineDataType;
+  return AliHLTPHOSDefinitions::fgkBaselineDataType;
 }
 
 
index 9ff2344fc04ed60800b4625b8bc79cb24b1d19af..1ade4e2394a83ff2364aa17720757ed094c7da81 100644 (file)
@@ -54,6 +54,31 @@ public:
 
   /** Destructor */ 
   virtual ~AliHLTPHOSBaselineAnalyzerComponent();
+
+  /** Copy constructor */
+  AliHLTPHOSBaselineAnalyzerComponent(const AliHLTPHOSBaselineAnalyzerComponent &) : 
+    AliHLTPHOSProcessor(),
+    fBaselineAnalyzerPtr(0),
+    fTreePtr(0),
+    fBaselineArrayPtr(0),
+    fEvCnt(0),
+    fWriteInterval(100),
+    fFillInterval(100),
+    fFilename(0),
+    fDirectory(0),
+    fHistPath(0),
+    fRunNb(0),
+    fCalculateAll(false)
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSBaselineAnalyzerComponent & operator = (const AliHLTPHOSBaselineAnalyzerComponent)
+    {
+      //Assignment
+      return *this; 
+    }
   
   /** interface function, see @ref AliHLTComponent for description */
   const char* GetComponentID();
index 8c65f4e84174db06ac992db7d01e4e611fd35680..e31576802c4ade13493d596f3e3d5e192cb4ec70 100644 (file)
@@ -53,13 +53,21 @@ AliHLTPHOSClusterAnalyser::AliHLTPHOSClusterAnalyser() :
   fLogWeight = 4.5;
 
   fAnalyzerPtr = new AliHLTPHOSPhysicsAnalyzerSpectrum();
-  //fPHOSGeometry = AliPHOSGeometry::GetInstance("noCPV");
+  fPHOSGeometry = AliPHOSGeometry::GetInstance("noCPV");
 }
 
 AliHLTPHOSClusterAnalyser::~AliHLTPHOSClusterAnalyser() 
 {
 }
 
+void 
+AliHLTPHOSClusterAnalyser::SetCaloClusterContainer(AliHLTPHOSCaloClusterContainerStruct *caloClusterContainerPtr)
+{ 
+  //see header file for documentation
+  fCaloClustersPtr = caloClusterContainerPtr; 
+  fCaloClustersPtr->fNCaloClusters = 0;
+}
+
 Int_t
 AliHLTPHOSClusterAnalyser::CalculateCenterOfGravity()
 {
@@ -123,7 +131,7 @@ AliHLTPHOSClusterAnalyser::CalculateRecPointMoments()
 }
 
 Int_t 
-AliHLTPHOSClusterAnalyser::CalculateClusterMoments(AliHLTPHOSRecPointDataStruct *recPointPtr, AliHLTPHOSCaloClusterDataStruct* clusterPtr)
+AliHLTPHOSClusterAnalyser::CalculateClusterMoments(AliHLTPHOSRecPointDataStruct */*recPointPtr*/, AliHLTPHOSCaloClusterDataStruct* /*clusterPtr*/)
 {
   //See header file for documentation
   return 0;
@@ -152,7 +160,7 @@ AliHLTPHOSClusterAnalyser::CreateClusters()
 
   //fPHOSGeometry = AliPHOSGeometry::GetInstance("noCPV");
 
-  for(Int_t i = 0; i < fRecPointsPtr->fNRecPoints; i++)
+  for(UInt_t i = 0; i < fRecPointsPtr->fNRecPoints; i++)
     {
       
       caloClusterPtr = &(fCaloClustersPtr->fCaloClusterArray[i]);
@@ -160,8 +168,8 @@ AliHLTPHOSClusterAnalyser::CreateClusters()
       
       localPos[0] = recPointPtr->fX;
       localPos[1] = recPointPtr->fZ;
-
-      fAnalyzerPtr->GlobalPosition( &localPos[0], &globalPos[0], recPointPtr->fModule);
+      
+      fAnalyzerPtr->GlobalPosition( localPos, globalPos, recPointPtr->fModule);
 
       caloClusterPtr->fGlobalPos[0] = globalPos[0];
       caloClusterPtr->fGlobalPos[1] = globalPos[1];
@@ -169,7 +177,7 @@ AliHLTPHOSClusterAnalyser::CreateClusters()
 
       caloClusterPtr->fNCells = recPointPtr->fMultiplicity;
       //cout << "fNCells = " << caloClusterPtr->fNCells << endl;
-      for(Int_t j = 0; j < caloClusterPtr->fNCells; j++)
+      for(UInt_t j = 0; j < caloClusterPtr->fNCells; j++)
        {
          digitPtr = &(recPointPtr->fDigitsList[j]);
          //fPHOSGeometry->RelPosToAbsId((Int_t)(recPointPtr->fModule + 1), (double)(digitPtr->fX), (double)(digitPtr->fZ), id);
@@ -223,9 +231,9 @@ AliHLTPHOSClusterAnalyser::CreateClusters()
       caloClusterPtr->fClusterType = '\0';
     }
   fCaloClustersPtr->fNCaloClusters = fRecPointsPtr->fNRecPoints;
-       
-
-  return 0;
+  //cout << fCaloClustersPtr->fNCaloClusters << endl;
+  return fCaloClustersPtr->fNCaloClusters;
 
 }
 
index 50cdc20d03536fc3292fc25380430fe2a7286532..c58d619eb468fd2683d95445e37d6854bb7ef9e0 100644 (file)
@@ -58,6 +58,30 @@ public:
   /** Destructor */
   virtual ~AliHLTPHOSClusterAnalyser();
   
+  /** Copy constructor */
+  AliHLTPHOSClusterAnalyser(const AliHLTPHOSClusterAnalyser &) : 
+    AliHLTPHOSBase(),
+    fLogWeight(0),
+    fRecPointsPtr(0),
+    fCaloClustersPtr(0),
+    fPHOSGeometry(0),
+    fAnalyzerPtr(0),
+    fDoClusterFit(false),
+    fHaveCPVInfo(false),
+    fDoPID(false),
+    fHaveDistanceToBadChannel(false)
+    
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSClusterAnalyser & operator = (const AliHLTPHOSClusterAnalyser)
+    {
+      //Assignment
+      return *this; 
+    }
+  
   /**
    * Set the rec point container
    * @param recPointContainerPtr is a pointer to the rec points
@@ -68,7 +92,7 @@ public:
    * Set the calo cluster container
    * @param caloClusterContainerPtr is a pointer to the calo clusters
    */
-  void SetCaloClusterContainer(AliHLTPHOSCaloClusterContainerStruct *caloClusterContainerPtr) { fCaloClustersPtr = caloClusterContainerPtr; }
+  void SetCaloClusterContainer(AliHLTPHOSCaloClusterContainerStruct *caloClusterContainerPtr);
 
   /** 
    * Calculates the center of gravity for the reconstruction points in the container
index 613528aa9d7d318bea6a34f7353197961a6e0602..c6df4d288076f7e79fbbcc36108e0b966c3906d6 100644 (file)
@@ -43,7 +43,9 @@ AliHLTPHOSClusterAnalyserComponent gAliHLTPHOSClusterAnalyserComponent;
 
 AliHLTPHOSClusterAnalyserComponent::AliHLTPHOSClusterAnalyserComponent(): 
 AliHLTPHOSProcessor(), 
-fClusterAnalyserPtr(0)
+fClusterAnalyserPtr(0),
+fDoDeconvolution(0),
+fDoCalculateMoments(0)
 {
   //See headerfile for documentation
 }
@@ -98,7 +100,7 @@ AliHLTPHOSClusterAnalyserComponent::GetOutputDataType()
 {
   //See headerfile for documentation
 
-  return AliHLTPHOSDefinitions::fgkAliHLTClusterDataType;
+  return AliHLTPHOSDefinitions::fgkClusterDataType;
 }
 
 void
@@ -129,9 +131,7 @@ AliHLTPHOSClusterAnalyserComponent::DoEvent(const AliHLTComponentEventData& evtD
   UInt_t tSize            = 0;
   UInt_t offset           = 0;
   UInt_t mysize           = 0;
-  Int_t nRecPoints        = 0;
-  Int_t nDigits           = 0;
-  Int_t j =0;
+  Int_t nClusters         = 0;
 
   AliHLTUInt8_t* outBPtr;
   outBPtr = outputPtr;
@@ -144,8 +144,8 @@ AliHLTPHOSClusterAnalyserComponent::DoEvent(const AliHLTComponentEventData& evtD
   fClusterAnalyserPtr->SetCaloClusterContainer((AliHLTPHOSCaloClusterContainerStruct*)outBPtr);
   for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
     {
-      iter = blocks+ndx;
-      if (iter->fDataType != AliHLTPHOSDefinitions::fgkAliHLTRecPointDataType)
+      iter = blocks+ndx; 
+      if (iter->fDataType != AliHLTPHOSDefinitions::fgkClusterDataType)
         {
           continue;
         }
@@ -161,15 +161,13 @@ AliHLTPHOSClusterAnalyserComponent::DoEvent(const AliHLTComponentEventData& evtD
        {
          fClusterAnalyserPtr->CalculateRecPointMoments();
        }
-      fClusterAnalyserPtr->CreateClusters();
-      
+      nClusters = fClusterAnalyserPtr->CreateClusters();
     }
 
-  mysize = 0;
+  mysize = 0; 
   offset = tSize;
-
   mysize += sizeof(AliHLTPHOSCaloClusterContainerStruct);
-  //cout << "Size of calo cluster container: " << mysize << endl;
+  
   AliHLTComponentBlockData bd;
   FillBlockData( bd );
   bd.fOffset = offset;
@@ -180,7 +178,7 @@ AliHLTPHOSClusterAnalyserComponent::DoEvent(const AliHLTComponentEventData& evtD
 
   tSize += mysize;
   outBPtr += mysize;
-
   if ( tSize > size )
     {
       Logging( kHLTLogFatal, "HLT::AliHLTPHOSClusterAnalyserComponent::DoEvent", "Too much data",
@@ -188,6 +186,15 @@ AliHLTPHOSClusterAnalyserComponent::DoEvent(const AliHLTComponentEventData& evtD
                , tSize, size );
       return EMSGSIZE;
     }
+
+  fPhosEventCount++; 
+  if(fPrintInfo == kTRUE)
+    {
+      if(fPhosEventCount%fPrintInfoFrequncy == 0)
+       {
+         cout << "Cluster analyser: # of clusters: " << nClusters << endl;
+       }  
+    }
   
   return 0;
 
@@ -196,9 +203,11 @@ AliHLTPHOSClusterAnalyserComponent::DoEvent(const AliHLTComponentEventData& evtD
 int
 AliHLTPHOSClusterAnalyserComponent::DoInit(int argc, const char** argv )
 {
+
   //See headerfile for documentation
   
   fClusterAnalyserPtr = new AliHLTPHOSClusterAnalyser();
+  ScanArguments(argc, argv);
   for (int i = 0; i < argc; i++)
     {
       if(!strcmp("-dodeconvolution", argv[i]))
index b2c3c8a1eafee1db48b983e53eb0bdf7ccd36a64..feee787865d42e34050353df4654d11f8d71c3dd 100644 (file)
@@ -57,6 +57,23 @@ class AliHLTPHOSClusterAnalyserComponent : public AliHLTPHOSProcessor
   /** Destructor */
   virtual ~AliHLTPHOSClusterAnalyserComponent();
 
+  /** Copy constructor */
+  AliHLTPHOSClusterAnalyserComponent(const AliHLTPHOSClusterAnalyserComponent &) : 
+    AliHLTPHOSProcessor(),
+    fClusterAnalyserPtr(0),
+    fDoDeconvolution(0),
+    fDoCalculateMoments(0)
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSClusterAnalyserComponent & operator = (const AliHLTPHOSClusterAnalyserComponent)
+    {
+      //Assignment
+      return *this; 
+    }
+  
   /** interface function, see @ref AliHLTComponent for description */
   const char* GetComponentID();
 
index 9248506ca54f11468d1fba6e4c7d01a7538b499c..3a7b647a7619b5f888f66abf036573ae4d6335fa 100644 (file)
@@ -72,6 +72,12 @@ AliHLTPHOSClusterizer::~AliHLTPHOSClusterizer()
   //See header file for documentation
 }
 
+void 
+AliHLTPHOSClusterizer::SetRecPointContainer(AliHLTPHOSRecPointContainerStruct* recPointContainerPtr)
+  { 
+    fRecPointContainerPtr = recPointContainerPtr; 
+    fRecPointContainerPtr->fNRecPoints = 0;
+  }
 
 void
 AliHLTPHOSClusterizer::SetRecoParameters(AliPHOSRecoParamEmc* params)
@@ -139,8 +145,6 @@ AliHLTPHOSClusterizer::ClusterizeEvent()
 
   AliHLTPHOSRecPointDataStruct *recPoint = 0;
 
-  //printf("Number of digits in event: %d\n", fDigitContainerPtr->fNDigits);
-
   //Clusterization starts
   for(i = 0; i < fDigitContainerPtr->fNDigits; i++)
     { 
@@ -154,6 +158,9 @@ AliHLTPHOSClusterizer::ClusterizeEvent()
       //printf("Got rec point above clustering threshold!\n");
       recPoint = &(fRecPointContainerPtr->fRecPointArray[nRecPoints]);
       recPoint->fAmp = 0;
+      //TODO!!!!!!!
+      recPoint->fModule = fDigitContainerPtr->fDigitDataStruct[i].fModule;
+      //TODO!!!!!!!
       //recPoint->
       recPoint->fDigitsList[fDigitsInCluster] =  fDigitContainerPtr->fDigitDataStruct[i];
       recPoint->fAmp += fDigitContainerPtr->fDigitDataStruct[i].fEnergy;
index cde4f4b580f74aa2e513d539db03782924e7bd41..95918fdd2add39191b6f8c77432c8d6f8669b280 100644 (file)
@@ -65,19 +65,41 @@ public:
   
   /** Destructor */
   virtual ~AliHLTPHOSClusterizer();
-  
-  /*
-  AliHLTPHOSClusterizer(const AliHLTPHOSClusterizer &);
-  AliHLTPHOSClusterizer & operator = (const AliHLTPHOSClusterizer &) {return *this;}
-  */
 
+  /** Copy constructor */  
+  AliHLTPHOSClusterizer(const AliHLTPHOSClusterizer &) : 
+    AliHLTPHOSBase(),
+    fEmcClusteringThreshold(0),
+    fEmcMinEnergyThreshold(0),
+    fEmcTimeGate(0),
+    fLogWeight(0),
+    fDigitsInCluster(0),
+    fOnlineMode(true),
+    fDigitArrayPtr(0),
+    fEmcRecPointsPtr(0),
+    fDigitPtr(0),
+    fDigitContainerPtr(0),
+    fRecPointContainerPtr(0),
+    fPHOSGeometry(0),
+    fGetterPtr(0)
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSClusterizer & operator = (const AliHLTPHOSClusterizer)
+  {
+    //Assignment
+    return *this; 
+  }
+  
   /** Set digit container */
   void SetDigitContainer(AliHLTPHOSDigitContainerDataStruct* digitContainerPtr)
   { fDigitContainerPtr = digitContainerPtr; }
 
   /** Set rec point container */
-  void SetRecPointContainer(AliHLTPHOSRecPointContainerStruct *RecPointContainerPtr)
-  { fRecPointContainerPtr = RecPointContainerPtr; }
+  void SetRecPointContainer(AliHLTPHOSRecPointContainerStruct *recPointContainerPtr);
+
 
   /** Set reco parameters */
   void SetRecoParameters(AliPHOSRecoParamEmc* recoPars);
index 5bda5c5fdee03ba3cfdf8d14c6bef2d6e41da98e..bfe4b7f6063fc7f364038773bedede331a723df0 100644 (file)
@@ -47,9 +47,12 @@ AliHLTPHOSClusterizerComponent gAliHLTPHOSClusterizerComponent;
 
 AliHLTPHOSClusterizerComponent::AliHLTPHOSClusterizerComponent(): 
   AliHLTPHOSProcessor(), 
+  fAllDigitsPtr(0),
   fClusterizerPtr(0),
-  fRecPointStructArrayPtr(0) 
-  //, fRecPointListPtr(0)
+  fRecPointStructArrayPtr(0),
+  fDigitCount(0),
+  fModuleClusterizationMode(false),
+  fNoCrazyness(0)
 {
   //See headerfile for documentation
 }
@@ -58,12 +61,12 @@ AliHLTPHOSClusterizerComponent::~AliHLTPHOSClusterizerComponent()
 {
   //See headerfile for documentation
 
-  if (fClusterizerPtr)
+  if(fClusterizerPtr)
     {
       delete fClusterizerPtr;
       fClusterizerPtr = 0;
     }
-  if (fRecPointStructArrayPtr)
+  if(fRecPointStructArrayPtr)
     {
       for (int i = 0; i < 1000; i++)
         {
@@ -72,7 +75,11 @@ AliHLTPHOSClusterizerComponent::~AliHLTPHOSClusterizerComponent()
       delete fRecPointStructArrayPtr;
       fRecPointStructArrayPtr = 0;
     }
-
+  if(fAllDigitsPtr)
+    {
+      delete fAllDigitsPtr;
+      fAllDigitsPtr = 0;
+    }
 }
 
 
@@ -115,22 +122,15 @@ AliHLTPHOSClusterizerComponent::GetComponentID()
 void
 AliHLTPHOSClusterizerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
 {
-  //See headerfile for documentation
-
-  const AliHLTComponentDataType* pType=fgkInputDataTypes;
-  while (pType->fID!=0)
-    {
-      list.push_back(*pType);
-      pType++;
-    }
+  list.clear();
+  list.push_back(AliHLTPHOSDefinitions::fgkDigitDataType);
 }
 
 AliHLTComponentDataType
 AliHLTPHOSClusterizerComponent::GetOutputDataType()
 {
   //See headerfile for documentation
-
-  return AliHLTPHOSDefinitions::fgkAliHLTClusterDataType;
+  return AliHLTPHOSDefinitions::fgkClusterDataType;
 }
 
 void
@@ -138,14 +138,13 @@ AliHLTPHOSClusterizerComponent::GetOutputDataSize(unsigned long& constBase, doub
 
 {
   //See headerfile for documentation
-
   constBase = 30;
   inputMultiplier = 1;
 }
 
 int
 AliHLTPHOSClusterizerComponent::DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
-                                        AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size,
+                                        AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size,
                                         std::vector<AliHLTComponentBlockData>& outputBlocks)
 {
   //See headerfile for documentation
@@ -154,7 +153,6 @@ AliHLTPHOSClusterizerComponent::DoEvent(const AliHLTComponentEventData& evtData,
   UInt_t offset           = 0;
   UInt_t mysize           = 0;
   Int_t nRecPoints        = 0;
-  Int_t nDigits           = 0;
   Int_t j =0;
 
   AliHLTUInt8_t* outBPtr;
@@ -166,54 +164,58 @@ AliHLTPHOSClusterizerComponent::DoEvent(const AliHLTComponentEventData& evtData,
 
   AliHLTPHOSDigitContainerDataStruct *digitContainerPtr = 0;
   fClusterizerPtr->SetRecPointContainer((AliHLTPHOSRecPointContainerStruct*)outBPtr);
-
+  
   for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
     {
       iter = blocks+ndx;
-      if (iter->fDataType != AliHLTPHOSDefinitions::fgkAliHLTDigitDataType)
-        {
-         //  cout << "Data type is not fgkAliHLTDigitDataTupe\n";
-          continue;
-        }
-      specification = specification|iter->fSpecification;
-      digitContainerPtr = reinterpret_cast<AliHLTPHOSDigitContainerDataStruct*>(iter->fPtr);
-      fClusterizerPtr->SetDigitContainer(digitContainerPtr);
-      
-      for (UInt_t i = 0; i < digitContainerPtr->fNDigits; i++)
+      if (iter->fDataType == AliHLTPHOSDefinitions::fgkDigitDataType)
         {
-         if(fNoCrazyness && digitContainerPtr->fDigitDataStruct[i].fCrazyness)
-           continue;
-           
-          fAllDigitsPtr->fDigitDataStruct[j].fX = digitContainerPtr->fDigitDataStruct[i].fX;
-          fAllDigitsPtr->fDigitDataStruct[j].fZ = digitContainerPtr->fDigitDataStruct[i].fZ;
-          fAllDigitsPtr->fDigitDataStruct[j].fAmplitude = digitContainerPtr->fDigitDataStruct[i].fAmplitude;
-          fAllDigitsPtr->fDigitDataStruct[j].fTime = digitContainerPtr->fDigitDataStruct[i].fTime;
-         fAllDigitsPtr->fDigitDataStruct[j].fCrazyness = digitContainerPtr->fDigitDataStruct[i].fCrazyness;
-         j++;
+         specification = specification|iter->fSpecification;
+         digitContainerPtr = reinterpret_cast<AliHLTPHOSDigitContainerDataStruct*>(iter->fPtr);
+         if(fModuleClusterizationMode)
+           {
+             for (UInt_t i = 0; i < digitContainerPtr->fNDigits; i++)
+               {
+                 fAllDigitsPtr->fDigitDataStruct[j].fX = digitContainerPtr->fDigitDataStruct[i].fX;
+                 fAllDigitsPtr->fDigitDataStruct[j].fZ = digitContainerPtr->fDigitDataStruct[i].fZ;
+                 fAllDigitsPtr->fDigitDataStruct[j].fAmplitude = digitContainerPtr->fDigitDataStruct[i].fAmplitude;
+                 fAllDigitsPtr->fDigitDataStruct[j].fTime = digitContainerPtr->fDigitDataStruct[i].fTime;
+                 fAllDigitsPtr->fDigitDataStruct[j].fCrazyness = digitContainerPtr->fDigitDataStruct[i].fCrazyness;
+                 j++;
+               }
+         
+           }
        }
     }
+  if(fModuleClusterizationMode && fAllDigitsPtr != 0)
+    {
+      fClusterizerPtr->SetDigitContainer(fAllDigitsPtr);
+    }
+  else if(digitContainerPtr != 0)
+    {
+      fClusterizerPtr->SetDigitContainer(digitContainerPtr);
+    }      
+  if(digitContainerPtr != 0)
+    {
+      nRecPoints = fClusterizerPtr->ClusterizeEvent();
+      
+      mysize = 0;
+      offset = tSize;
 
-  nRecPoints = fClusterizerPtr->ClusterizeEvent();
-  //cout << "Number of clusters found: " << nRecPoints << ", from a total of " << nDigits << " digits" << endl;
-
-  mysize = 0;
-  offset = tSize;
-
-  mysize += sizeof(AliHLTPHOSRecPointContainerStruct);
-
-  //cout << "Size of rec point container: " << mysize << endl;
-
-  AliHLTComponentBlockData bd;
-  FillBlockData( bd );
-  bd.fOffset = offset;
-  bd.fSize = mysize;
-  bd.fDataType = AliHLTPHOSDefinitions::fgkAliHLTRecPointDataType;
-  bd.fSpecification = specification;
-  outputBlocks.push_back( bd );
-
-  tSize += mysize;
-  outBPtr += mysize;
-
+      mysize += sizeof(AliHLTPHOSRecPointContainerStruct);
+      
+      AliHLTComponentBlockData bd;
+      FillBlockData( bd );
+      bd.fOffset = offset;
+      bd.fSize = mysize;
+      bd.fDataType = AliHLTPHOSDefinitions::fgkClusterDataType;
+      bd.fSpecification = specification;
+      outputBlocks.push_back( bd );
+      tSize += mysize;
+      outBPtr += mysize;
+  
+    }
+  
   if ( tSize > size )
     {
       Logging( kHLTLogFatal, "HLT::AliHLTPHOSClusterizerComponent::DoEvent", "Too much data",
@@ -224,6 +226,7 @@ AliHLTPHOSClusterizerComponent::DoEvent(const AliHLTComponentEventData& evtData,
   
   return 0;
 
+
 }
 
 int
@@ -236,28 +239,24 @@ AliHLTPHOSClusterizerComponent::DoInit(int argc, const char** argv )
   fClusterizerPtr->SetDigitContainer(fAllDigitsPtr);
   fNoCrazyness = false;
   //
-  
+
+  ScanArguments(argc, argv);
   for (int i = 0; i < argc; i++)
     {
       if(!strcmp("-digitthreshold", argv[i]))
        {
          fClusterizerPtr->SetEmcMinEnergyThreshold(atof(argv[i+1]));
-         cout << "Clusterizer: digit threshold is: " << argv[i+1] << endl;
        }
       if(!strcmp("-recpointthreshold", argv[i]))
        {
          fClusterizerPtr->SetEmcClusteringThreshold(atof(argv[i+1]));
-         cout << "Clusterizer: rec point threshold is: " << argv[i+1] << endl;
+       }
+      if(!strcmp("-modulemode", argv[i]))
+       {
+         fModuleClusterizationMode = true;
        }
     }
 
-  
-  cout << "#######################################\n";
-  cout << "# Clusterizer component started with: # \n";
-  //  cout << "# --> Digit threshold:     " << fClusterizerPtr->GetThreshold() << " #\n";
-  //  cout << "# --> Cluster threshold:   " << fClusterizerPtr->GetClusterThreshold() << " #\n";
-  cout << "#######################################\n";
-
   return 0;
 }
 
index f85b2f98fd3da51a9589f3a7d2dbb670414f4e80..c70fa83d680e4f47b13b031a2f307dea1558a29a 100644 (file)
@@ -65,6 +65,26 @@ class AliHLTPHOSClusterizerComponent: public AliHLTPHOSProcessor
   /** Destructor */
   virtual ~AliHLTPHOSClusterizerComponent();
 
+  /** Copy constructor */  
+  AliHLTPHOSClusterizerComponent(const AliHLTPHOSClusterizerComponent &) : 
+    AliHLTPHOSProcessor(),
+    fAllDigitsPtr(0),
+    fClusterizerPtr(0),
+    fRecPointStructArrayPtr(0),
+    fDigitCount(0),
+    fModuleClusterizationMode(0),
+    fNoCrazyness(0)
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSClusterizerComponent & operator = (const AliHLTPHOSClusterizerComponent)
+  {
+    //Assignment
+    return *this; 
+  }
+
   /** interface function, see @ref AliHLTComponent for description */
   const char* GetComponentID();
 
@@ -78,10 +98,11 @@ class AliHLTPHOSClusterizerComponent: public AliHLTPHOSProcessor
   void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
 
   /** interface function, see @ref AliHLTComponent for description */
+  
   int DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
                AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size,
                std::vector<AliHLTComponentBlockData>& outputBlocks);
-
+  // Int_t DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
   /** interface function, see @ref AliHLTComponent for description */
   AliHLTComponent* Spawn();
   
@@ -107,11 +128,14 @@ protected:
   /** Number of digits in event */
   Int_t fDigitCount;              
 
+  /** If the clusterizer is doing clusterization of the whole module */
+  Bool_t fModuleClusterizationMode;                             //COMMENT
+
   /** If one should consider crazyness or not */                              
-  Bool_t fNoCrazyness;                                          
+  Bool_t fNoCrazyness;                                          //COMMENT
 
   /** interface function, see @ref AliHLTComponent for description */
-  static const AliHLTComponentDataType fgkInputDataTypes[];
+  static const AliHLTComponentDataType fgkInputDataTypes[];     //COMMENT
 };
 
 #endif
index 0ec5f36471381e55b777b7c416e72897238631b5..4cf2a29f36036e375cce4273b1602a4bdd2497ad 100644 (file)
@@ -39,16 +39,17 @@ const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCellAccumulatedEnergyDat
 const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCellTimingHistogramDataType   = { sizeof(AliHLTComponentDataType),       {'T','I','M','E','H','I','S','T'},{'P','H','O','S'}};;    
 const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCellTimingAverageDataType     = { sizeof(AliHLTComponentDataType),       {'T','I','M','E','A','V','E','R'},{'P','H','O','S'}};;
 const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCellChannelDataDataType       = { sizeof(AliHLTComponentDataType),       {'C','H','A','N','D','A','T','A'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTClusterDataType         = { sizeof(AliHLTComponentDataType),       {'C','L','U','S','T','R','T','Y'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTRecPointDataType        = { sizeof(AliHLTComponentDataType),       {'R','E','C','P','T','T','Y','P'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTHistDataType            = { sizeof(AliHLTComponentDataType),       {'H','I','S','T','T','Y','P','E'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTSpectrumDataType        = { sizeof(AliHLTComponentDataType),       {'S','P','E','C','T','Y','P','E'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTRootTreeDataType        = { sizeof(AliHLTComponentDataType),       {'R','T','R','E','T','Y','P','E'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTBaselineDataType        = { sizeof(AliHLTComponentDataType),       {'B','A','S','L','T','Y','P','E'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTDigitDataType           = { sizeof(AliHLTComponentDataType),       {'D','I','G','I','T','Y','P','E'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTNoiseMapDataType        = { sizeof(AliHLTComponentDataType),       {'N','O','M','A','T','Y','P','E'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTMIPDataType             = { sizeof(AliHLTComponentDataType),       {'M','I','P','D','T','Y','P','E'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTSandboxDataType         = { sizeof(AliHLTComponentDataType),       {'S','A','B','X','T','Y','P','E'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkClusterDataType               = { sizeof(AliHLTComponentDataType),       {'C','L','U','S','T','R','T','Y'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkRecPointDataType              = { sizeof(AliHLTComponentDataType),       {'R','E','C','P','O','I','N','T'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkHistDataType                  = { sizeof(AliHLTComponentDataType),       {'H','I','S','T','O','G','R','A'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkSpectrumDataType              = { sizeof(AliHLTComponentDataType),       {'S','P','E','C','T','R','U','M'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkRootTreeDataType              = { sizeof(AliHLTComponentDataType),       {'R','O','O','T','T','R','E','E'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkBaselineDataType              = { sizeof(AliHLTComponentDataType),       {'B','A','S','E','L','I','N','E'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkDigitDataType                 = { sizeof(AliHLTComponentDataType),       {'D','I','G','I','T','T','Y','P'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkNoiseMapDataType              = { sizeof(AliHLTComponentDataType),       {'N','O','I','S','E','M','A','P'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkMIPDataType                   = { sizeof(AliHLTComponentDataType),       {'M','I','P','D','T','Y','P','E'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkSandboxDataType               = { sizeof(AliHLTComponentDataType),       {'S','A','N','D','B','O','X','T'},{'P','H','O','S'}};;
 const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkEmcCalibDataType              = { sizeof(AliHLTComponentDataType),       {'C','A','L','I','T','Y','P','E'},{'P','H','O','S'}};;
 const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCaloClusterDataType           = { sizeof(AliHLTComponentDataType),       {'C','A','L','C','L','U','S','T'},{'P','H','O','S'}};;
 
+
index 536c2c6ae8aaad45b45beda8c79ebfcc134cc62f..854f137643b5e617961411bcae3a76f65dc50b36 100644 (file)
@@ -15,6 +15,7 @@
 class AliHLTPHOSDefinitions
 {
 public:
+
   static const AliHLTComponentDataType fgkCellEnergyDataType;    /**<Reconstructed cell/crystal energies*/
   static const AliHLTComponentDataType fgkDDLPackedRawDataType;  /**<DDL raw data on the RCU data format*/
   static const AliHLTComponentDataType fgkCellEnergyHistogramDataType;  /**<Histogram for per cell/gain energy distribution*/
@@ -23,16 +24,16 @@ public:
   static const AliHLTComponentDataType fgkCellTimingHistogramDataType;  /**<Histogram for per cell/gain time distribution*/      
   static const AliHLTComponentDataType fgkCellTimingAverageDataType;  /**<Histogram for per cell/gain time distribution*/  
   static const AliHLTComponentDataType fgkCellChannelDataDataType;  /**<Time dependent signal from the readout channels*/  
-  static const AliHLTComponentDataType fgkAliHLTClusterDataType;  //Cluster data type
-  static const AliHLTComponentDataType fgkAliHLTRecPointDataType; //RecPoint data type
-  static const AliHLTComponentDataType fgkAliHLTHistDataType;     //hist data type
-  static const AliHLTComponentDataType fgkAliHLTSpectrumDataType; //spectrum data type
-  static const AliHLTComponentDataType fgkAliHLTDigitDataType; //Digit data type
-  static const AliHLTComponentDataType fgkAliHLTRootTreeDataType; //Root tree type
-  static const AliHLTComponentDataType fgkAliHLTBaselineDataType; //Baseline type
-  static const AliHLTComponentDataType fgkAliHLTMIPDataType; //"MIP" data type
-  static const AliHLTComponentDataType fgkAliHLTNoiseMapDataType; //Noise map data type
-  static const AliHLTComponentDataType fgkAliHLTSandboxDataType; //General data type
+  static const AliHLTComponentDataType fgkClusterDataType;  //Cluster data type
+  static const AliHLTComponentDataType fgkRecPointDataType; //RecPoint data type
+  static const AliHLTComponentDataType fgkHistDataType;     //hist data type
+  static const AliHLTComponentDataType fgkSpectrumDataType; //spectrum data type
+  static const AliHLTComponentDataType fgkDigitDataType; //Digit data type
+  static const AliHLTComponentDataType fgkRootTreeDataType; //Root tree type
+  static const AliHLTComponentDataType fgkBaselineDataType; //Baseline type
+  static const AliHLTComponentDataType fgkMIPDataType; //"MIP" data type
+  static const AliHLTComponentDataType fgkNoiseMapDataType; //Noise map data type
+  static const AliHLTComponentDataType fgkSandboxDataType; //General data type
   static const AliHLTComponentDataType fgkEmcCalibDataType; //Calibration data type
   static const AliHLTComponentDataType fgkCaloClusterDataType; //Calo cluster data type
 };
index 4b9454861305bfffd7b3cf62cf525f751360e1aa..e02a0996ec49c4921138316dc05177cfd5be6db4 100644 (file)
@@ -45,7 +45,10 @@ AliHLTPHOSDigit::AliHLTPHOSDigit() :
   fSamples(55),
   fPreSamples(15),
   fTotalSamples(70),
-  fDebugVar(-1)
+  fDebugVar(-1),
+  fData(0),
+  fCrazyness(0),
+  fBaseline(0)
 {
   //See header file for documentation
   //added by PT
index 3f63c885cff0428f4277c7413c7b23980f43db95..05e7abc56b9e40bda65e4959337a3eb734b8c90b 100644 (file)
@@ -1,3 +1,4 @@
+
 /**************************************************************************
  * This file is property of and copyright by the ALICE HLT Project        * 
  * All rights reserved.                                                   *
@@ -54,6 +55,34 @@ public:
   /** Destructor */
   virtual ~AliHLTPHOSDigit();
 
+   /** Copy constructor */  
+  AliHLTPHOSDigit(const AliHLTPHOSDigit &) : 
+    TObject(),
+    AliHLTPHOSBase(),
+    fX(-1),
+    fZ(-1),
+    fAmplitude(-1),
+    fTime(-1),
+    fEnergy(-1),
+    fGain(-1),
+    fSamples(55),
+    fPreSamples(15),
+    fTotalSamples(70),
+    fDebugVar(-1),
+    fData(0),
+    fCrazyness(0),
+    fBaseline(0)
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSDigit & operator = (const AliHLTPHOSDigit)
+  {
+    //Assignment
+    return *this; 
+  }
+
   /** Set x */
   void SetX(Int_t x) { fX = x; }
 
index a2b25004d1b3803bc266712348436c1087af8393..c0a19c5cffcbcc476820ac39839005524de2964c 100644 (file)
@@ -51,7 +51,7 @@ struct AliHLTPHOSDigitContainerDataStruct
   UInt_t fPHOSModule;                                  //COMMENT
 
   /** Array of digits in container */
-  AliHLTPHOSDigitDataStruct fDigitDataStruct[7168];    //COMMENT
+  AliHLTPHOSDigitDataStruct fDigitDataStruct[N_XCOLUMNS_RCU*N_ZROWS_RCU*N_GAINS];    //COMMENT
 
 };
 
index 09fcb215276d09b4df06a9d384cf920284760c73..fb6a53cc651e407dce5ca7ce293ffd49a98673c3 100644 (file)
@@ -63,26 +63,12 @@ struct AliHLTPHOSDigitDataStruct
   /** The gain */
   Int_t fGain;
   
-  /** The raw data */
-  Int_t fData[512];
-
   /** The crazyness */
   Int_t fCrazyness; 
 
   /** The baseline */
   Float_t fBaseline;
 
-  /** 
-   * Set the raw data 
-   * @param data is a pointer to the raw data 
-   */ 
-  void SetRawData(Int_t *data)
-  {
-    for(Int_t i = 0; i < 512; i++) //Fy pÃ¥ deg Ã˜ystein
-      {
-       fData[i] = data[i];
-      }
-  }
 };
 
 #endif
index 7fc1e382e3b4125a7c302a84a95f66102b142c41..4ab98c483c04cc617f86113d79d467379779a679 100644 (file)
@@ -51,12 +51,19 @@ AliHLTPHOSDigitMaker::AliHLTPHOSDigitMaker() :
   fCellDataPtr(0),
   fDigitContainerStructPtr(0),
   fDigitArrayPtr(0),
-  fDigitPtr(0),
   fDigitStructPtr(0),
   fDigitCount(0)
 {
   // See header file for documentation
-
+  for(UInt_t x = 0; x < N_XCOLUMNS_MOD; x++)
+    {
+      for(UInt_t z = 0; z < N_ZROWS_MOD; z++)
+       {
+         fHighGainFactors[x][z] = 0.005;
+         fLowGainFactors[x][z] = 0.08;
+       }
+    }
+  
 }
   
 AliHLTPHOSDigitMaker::~AliHLTPHOSDigitMaker() 
@@ -68,16 +75,15 @@ Int_t
 AliHLTPHOSDigitMaker::MakeDigits(AliHLTPHOSRcuCellEnergyDataStruct* rcuData)
 {
   //See header file for documentation
-  Int_t i = 0;
+  
   Int_t j = 0;
   Int_t xMod = -1;
   Int_t zMod = -1;
-  Int_t gain = -1;
   Float_t amplitude = 0;
  
-  for(Int_t x = 0; x < N_XCOLUMNS_RCU; x++)
+  for(UInt_t x = 0; x < N_XCOLUMNS_RCU; x++)
     {
-      for(Int_t z = 0; z < N_ZROWS_RCU; z++) 
+      for(UInt_t z = 0; z < N_ZROWS_RCU; z++) 
        {
          fCellDataPtr = &(rcuData->fValidData[x][z][HIGH_GAIN]);
          xMod = x + rcuData->fRcuX * N_XCOLUMNS_RCU;
@@ -94,6 +100,7 @@ AliHLTPHOSDigitMaker::MakeDigits(AliHLTPHOSRcuCellEnergyDataStruct* rcuData)
              //TODO: fix time
              fDigitStructPtr->fTime = fCellDataPtr->fTime * 0.0000001;
              fDigitStructPtr->fCrazyness = fCellDataPtr->fCrazyness;
+             fDigitStructPtr->fModule = rcuData->fModuleID;
              j++;
            }
          else if(amplitude >= MAX_BIN_VALUE)
@@ -110,6 +117,7 @@ AliHLTPHOSDigitMaker::MakeDigits(AliHLTPHOSRcuCellEnergyDataStruct* rcuData)
                  //TODO: fix time
                  fDigitStructPtr->fTime = fCellDataPtr->fTime  * 0.0000001;;
                  fDigitStructPtr->fCrazyness = fCellDataPtr->fCrazyness;
+                 fDigitStructPtr->fModule = rcuData->fModuleID;
                  j++;
                }
            }
@@ -133,9 +141,9 @@ void
 AliHLTPHOSDigitMaker::SetGlobalHighGainFactor(Float_t factor)
 {
   //See header file for documentation
-  for(Int_t x = 0; x < N_XCOLUMNS_MOD; x++)
+  for(UInt_t x = 0; x < N_XCOLUMNS_MOD; x++)
     {
-      for(Int_t z = 0; z < N_ZROWS_MOD; z++)
+      for(UInt_t z = 0; z < N_ZROWS_MOD; z++)
        {
          fHighGainFactors[x][z] = factor;
        }
@@ -146,9 +154,9 @@ void
 AliHLTPHOSDigitMaker::SetGlobalLowGainFactor(Float_t factor)
 {
   //See header file for documentation
-  for(Int_t x = 0; x < N_XCOLUMNS_MOD; x++)
+  for(UInt_t x = 0; x < N_XCOLUMNS_MOD; x++)
     {
-      for(Int_t z = 0; z < N_ZROWS_MOD; z++)
+      for(UInt_t z = 0; z < N_ZROWS_MOD; z++)
        {
          fLowGainFactors[x][z] = factor;
        }
@@ -165,9 +173,9 @@ AliHLTPHOSDigitMaker::SetDigitThresholds(const char* filepath, Int_t nSigmas)
   TH2F *lgHist = (TH2F*)histFile->Get("RMSLGMapHist");
   TH2F *hgHist = (TH2F*)histFile->Get("RMSHGMapHist");
 
-  for(Int_t x = 0; x < N_XCOLUMNS_MOD; x++)
+  for(UInt_t x = 0; x < N_XCOLUMNS_MOD; x++)
     {
-      for(Int_t z = 0; z < N_ZROWS_MOD; z++)
+      for(UInt_t z = 0; z < N_ZROWS_MOD; z++)
        {
          fDigitThresholds[x][z][LOW_GAIN] = lgHist->GetBinContent(x, z) * nSigmas;
          fDigitThresholds[x][z][HIGH_GAIN] = hgHist->GetBinContent(x, z) * nSigmas;
index cfbfaacdae6ce47e0e402c220b857d9fddddf182..ecfb91c61f05721aba7afe4b18031efe7149cd2c 100644 (file)
@@ -42,7 +42,6 @@
  * @ingroup alihlt_phos
  */
 
-class AliHLTPHOSDigit;
 class TClonesArray;
 class TTree;
 class AliHLTPHOSValidCellDataStruct;
@@ -62,6 +61,26 @@ public:
 
   /** Destructor */
   virtual ~AliHLTPHOSDigitMaker();
+
+  /** Copy constructor */  
+  AliHLTPHOSDigitMaker(const AliHLTPHOSDigitMaker &) : 
+    AliHLTPHOSBase(),
+    fCellDataPtr(0),
+    fDigitContainerStructPtr(0),
+    fDigitArrayPtr(0),
+    fDigitStructPtr(0),
+    fDigitCount(0)
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSDigitMaker & operator = (const AliHLTPHOSDigitMaker)
+  {
+    //Assignment
+    return *this; 
+  }
+
  
   // void SetValidCellData(AliHLTPHOSValidCellDataStruct *data) { fCellDataPtr = data; }
   //  void SetDigitContainerStruct(AliHLTPHOSDigitContainerStruct *container) 
@@ -128,9 +147,6 @@ private:
   /** Pointer to the digit TClonesArray */
   TClonesArray *fDigitArrayPtr;                                  //! transient
 
-  /** Pointer to a AliHLTPHOSDigit */
-  AliHLTPHOSDigit *fDigitPtr;                                    //! transient
-
   /** Pointer to a AliHLTPHOSDigitDataStruct */
   AliHLTPHOSDigitDataStruct *fDigitStructPtr;                    //! transient
 
index 045f7920aac23d664e90664c3957d0d077791179..e50a8c2c24e67eb0610fdced2b8a68e82a41d9cd 100644 (file)
@@ -1,4 +1,4 @@
-/**************************************************************************
+ /**************************************************************************
  * This file is property of and copyright by the ALICE HLT Project        *
  * All rights reserved.                                                   *
  *                                                                        *
@@ -45,7 +45,8 @@ AliHLTPHOSDigitMakerComponent gAliHLTPHOSDigitMakerComponent;
 
 AliHLTPHOSDigitMakerComponent::AliHLTPHOSDigitMakerComponent() :
   AliHLTPHOSProcessor(),
-  fDigitMakerPtr(0)
+  fDigitMakerPtr(0),
+  fDigitContainerPtr(0)
   //  fEvtCnt(0)
 {
   //see header file for documentation
@@ -91,7 +92,7 @@ AliHLTComponentDataType
 AliHLTPHOSDigitMakerComponent::GetOutputDataType()
 {
   //see header file for documentation
-  return AliHLTPHOSDefinitions::fgkAliHLTDigitDataType;
+  return AliHLTPHOSDefinitions::fgkDigitDataType;
 }
 
 
@@ -148,7 +149,7 @@ AliHLTPHOSDigitMakerComponent::DoEvent(const AliHLTComponentEventData& evtData,
   FillBlockData( bd );
   bd.fOffset = offset;
   bd.fSize = mysize;
-  bd.fDataType = AliHLTPHOSDefinitions::fgkAliHLTDigitDataType;
+  bd.fDataType = AliHLTPHOSDefinitions::fgkDigitDataType;
   bd.fSpecification = specification;
   outputBlocks.push_back( bd );
        
index d100c5f638a210ba7078e8e395f9c55129b1040b..1f26e4893b33f242bbf87f248fce6123940c0399 100644 (file)
@@ -54,9 +54,25 @@ public:
   /** Constructor */
   AliHLTPHOSDigitMakerComponent();
 
-  /** Destructor */
+  /** Destructor */ 
   virtual ~AliHLTPHOSDigitMakerComponent();
 
+  /** Copy constructor */  
+  AliHLTPHOSDigitMakerComponent(const AliHLTPHOSDigitMakerComponent &) : 
+    AliHLTPHOSProcessor(),
+    fDigitMakerPtr(0),
+    fDigitContainerPtr(0)
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSDigitMakerComponent & operator = (const AliHLTPHOSDigitMakerComponent)
+  {
+    //Assignment
+    return *this; 
+  }
+
   /** interface function, see @ref AliHLTComponent for description */
   const char* GetComponentID();
 
index 77ae4068195e93b36fe1524cb1e3087c8bd676d4..d3e1ce9dcaca0a792ef80fe1eaecc6771a7107de 100644 (file)
@@ -52,8 +52,8 @@ AliHLTPHOSESDMaker::~AliHLTPHOSESDMaker()
   //See header file for documentation
   if(fCaloClustersPtr)
     {
-      delete fCaloClustersPtr;
-      fCaloClustersPtr = 0;
+      //fCaloClustersPtr->Delete();
+      //fCaloClustersPtr = 0;
     }
 }
 
@@ -65,7 +65,7 @@ AliHLTPHOSESDMaker::FillESDCaloClusters()
   AliESDCaloCluster *caloCluster = 0;
   AliHLTPHOSCaloClusterDataStruct* caloClusterStruct = 0;
 
-  for( Int_t i = 0; i < fCaloClusterContainerPtr->fNCaloClusters; i++)
+  for(UInt_t i = 0; i < fCaloClusterContainerPtr->fNCaloClusters; i++)
     {
       caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->At(i + fNCaloClusters);
       caloClusterStruct = &(fCaloClusterContainerPtr->fCaloClusterArray[i]);
@@ -98,8 +98,7 @@ AliHLTPHOSESDMaker::FillESDEvent()
   
   AliESDCaloCluster *caloCluster = 0;
   AliHLTPHOSCaloClusterDataStruct* caloClusterStruct = 0;
-  
-  for( Int_t i = 0; i < fCaloClusterContainerPtr->fNCaloClusters; i++)
+  for(UInt_t i = 0; i < fCaloClusterContainerPtr->fNCaloClusters; i++)
     {
       //      caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i + fNCaloClusters);
       caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i);
@@ -129,11 +128,47 @@ AliHLTPHOSESDMaker::FillESDEvent()
   
   return 0;
 }
+Int_t
+AliHLTPHOSESDMaker::FillESDEvent(AliHLTPHOSCaloClusterContainerStruct* caloClusterContainerPtr)
+{
+  //See header file for documentation
+  
+  AliESDCaloCluster *caloCluster = 0;
+  AliHLTPHOSCaloClusterDataStruct* caloClusterStruct = 0;
+  
+  for(UInt_t i = 0; i < 1/*caloClusterContainerPtr->fNCaloClusters*/; i++)
+    {
+      //      caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i + fNCaloClusters);
+      //caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i + fNCaloClusters);
+      /*      caloClusterStruct = &(caloClusterContainerPtr->fCaloClusterArray[i]);
+      caloCluster->SetID(caloClusterStruct->fID);
+      caloCluster->SetClusterType(caloClusterStruct->fClusterType);
+      caloCluster->SetPosition((Float_t*)&caloClusterStruct->fGlobalPos[0]);
+      caloCluster->SetE(caloClusterStruct->fEnergy);
+      caloCluster->SetClusterDisp(caloClusterStruct->fDispersion);
+      caloCluster->SetClusterChi2(caloClusterStruct->fFitQuality);
+      caloCluster->SetPid((Float_t*)&caloClusterStruct->fPID[0]);
+      caloCluster->SetM20(caloClusterStruct->fM20);
+      caloCluster->SetM02(caloClusterStruct->fM02);
+      caloCluster->SetM11(caloClusterStruct->fM11);
+      caloCluster->SetNExMax(caloClusterStruct->fNExMax);
+      caloCluster->SetEmcCpvDistance(caloClusterStruct->fEmcCpvDistance);
+      caloCluster->SetDistanceToBadChannel(caloClusterStruct->fDistToBadChannel);
+      caloCluster->SetNCells(caloClusterStruct->fNCells);
+      caloCluster->SetCellsAbsId(caloClusterStruct->fCellsAbsId);
+      caloCluster->SetCellsAmplitudeFraction(caloClusterStruct->fCellsAmpFraction);
+      fESDEventPtr->AddCaloCluster(caloCluster);
+      //cout << caloCluster->E() << endl;*/
+      fNCaloClusters++;  
+    }
+  
+  return 0;
+}
 
 void 
 AliHLTPHOSESDMaker::ResetESD()
 {
   fNCaloClusters = 0;
-  fCaloClustersPtr->Delete();
+  // fCaloClustersPtr->Delete();
 }
 
index 9cd5bec4b8757974a061a8a81264407a48dfb25f..e7aa32898dcbf13e91256d308a26f7971fcb07e8 100644 (file)
@@ -55,6 +55,24 @@ public:
   /** Destructor */
   virtual ~AliHLTPHOSESDMaker();
 
+  /** Copy constructor */  
+  AliHLTPHOSESDMaker(const AliHLTPHOSESDMaker &) : 
+    AliHLTPHOSBase(),
+    fNCaloClusters(0),
+    fCaloClustersPtr(0),
+    fESDEventPtr(0),
+    fCaloClusterContainerPtr(0)
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSESDMaker & operator = (const AliHLTPHOSESDMaker)
+  {
+    //Assignment
+    return *this; 
+  }
+
   /** 
    * Set the AliESDEvent object to be filled
    * @param is a pointer to the AliESDEvent
@@ -79,6 +97,13 @@ public:
    */
   Int_t FillESDEvent();
 
+  /** 
+   * Fill the AliESDEvent object with clusters from a calo cluster container
+   * @param caloClusterContainerPtr is a pointer to a cluster container
+   * @return
+   */
+  Int_t FillESDEvent(AliHLTPHOSCaloClusterContainerStruct* caloClusterContainerPtr);
+
   /**
    * Reset the ESD and ESDCaloCluster array
    */
index 77cae06e997d4668c2ba12bdaed7c5e1c87adb5d..01dfb0b3ae9af9fae90d5535e5dc56793bd97d00 100644 (file)
@@ -131,7 +131,7 @@ AliHLTPHOSESDMakerComponent::GetOutputDataSize(unsigned long& constBase, double&
 }
  
 Int_t 
-AliHLTPHOSESDMakerComponent::DoEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& trigData ) 
+AliHLTPHOSESDMakerComponent::DoEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/ ) 
 {
   // see header file for class documentation
  
@@ -141,23 +141,20 @@ AliHLTPHOSESDMakerComponent::DoEvent( const AliHLTComponentEventData& /*evtData*
   const AliHLTComponentBlockData* iter = 0;
 
   UInt_t specification = 0;
+
+  fESDMakerPtr->ResetESD();
+
+  fESDEventPtr = new AliESDEvent();
+  fESDEventPtr->CreateStdContent();
+  fESDMakerPtr->SetESDEvent(fESDEventPtr);
   
   for ( iter = GetFirstInputBlock(AliHLTPHOSDefinitions::fgkCaloClusterDataType); iter != 0; iter = GetNextInputBlock()) 
     {
       specification = specification|iter->fSpecification;
       caloClusterContainerPtr = reinterpret_cast<AliHLTPHOSCaloClusterContainerStruct*>(iter->fPtr);
-      fESDMakerPtr->SetCaloClusterContainer(caloClusterContainerPtr);
+      fESDMakerPtr->FillESDEvent(caloClusterContainerPtr);
+      //      fESDMakerPtr->SetCaloClusterContainer(caloClusterContainerPtr);
     }
-  fESDEventPtr = new AliESDEvent();
-  fESDEventPtr->CreateStdContent();
-  fESDMakerPtr->SetESDEvent(fESDEventPtr);
-  fESDMakerPtr->FillESDEvent();
-  
-  //  AliESDCaloCluster *cc = fESDEventPtr->GetCaloCluster(0);
-  /*if(cc)
-    {
-      cout << cc->E() << endl;
-      }*/
   
   PushBack(fESDEventPtr, kAliHLTDataTypeESDObject|kAliHLTDataOriginPHOS, specification);
  
@@ -167,6 +164,14 @@ AliHLTPHOSESDMakerComponent::DoEvent( const AliHLTComponentEventData& /*evtData*
       fESDEventPtr = 0;
     }
 
+  fPhosEventCount++; 
+  if(fPrintInfo == kTRUE)
+    {
+      if(fPhosEventCount%fPrintInfoFrequncy == 0)
+       {
+         cout << "Made ESD from event!" << endl;
+       }  
+    }
   return 0;
 }
 
@@ -176,14 +181,13 @@ AliHLTPHOSESDMakerComponent::DoInit(int argc, const char** argv )
 {
   //See headerfile for documentation
 
-  fESDEventPtr = new AliESDEvent();
-  fESDEventPtr->CreateStdContent();
   fESDMakerPtr = new AliHLTPHOSESDMaker();
-  fESDMakerPtr->SetESDEvent(fESDEventPtr);
+  //fESDMakerPtr->SetESDEvent(fESDEventPtr);
   //
+  ScanArguments(argc, argv);
   for (int i = 0; i < argc; i++)
     {
-     
+      
     }
 
   return 0;
index c697aa81d2da6d122cd2701f25ac373d850a54db..7ad1284408a6c2fe97df7cf13fc887f2722ffd20 100644 (file)
@@ -57,6 +57,23 @@ class AliHLTPHOSESDMakerComponent: public AliHLTPHOSProcessor
   /** Destructor */
   virtual ~AliHLTPHOSESDMakerComponent();
 
+  /** Copy constructor */  
+  AliHLTPHOSESDMakerComponent(const AliHLTPHOSESDMakerComponent &) : 
+    AliHLTPHOSProcessor(),
+    fESDMakerPtr(0),
+    fESDEventPtr(0)
+    
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSESDMakerComponent & operator = (const AliHLTPHOSESDMakerComponent)
+  {
+    //Assignment
+    return *this; 
+  }
+
   /** interface function, see @ref AliHLTComponent for description */
   const char* GetComponentID();
 
index c2b6babfe16cf15084136f7914c45c2be4b136cb..56ead77c720ec78bcc8780b2785f3ea8df889c20 100644 (file)
@@ -58,6 +58,19 @@ class AliHLTPHOSEmcCalibrationHistogramProducer: public AliHLTPHOSBase
   /** Destructor */
   virtual ~AliHLTPHOSEmcCalibrationHistogramProducer();
 
+    /** Copy constructor */  
+  AliHLTPHOSEmcCalibrationHistogramProducer(const AliHLTPHOSEmcCalibrationHistogramProducer &) : AliHLTPHOSBase()
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSEmcCalibrationHistogramProducer & operator = (const AliHLTPHOSEmcCalibrationHistogramProducer)
+  {
+    //Assignment
+    return *this; 
+  }
+
   /** Reset the histograms */
   void Reset();
 
index c1852c64d5bb035497cf500549c443f6d5f0d6fd..4d6514a52b0b4bfb0ae1b354e132036b0855ba0b 100644 (file)
 
 ClassImp(AliHLTPHOSPhysicsAnalyzer);
 
-AliHLTPHOSPhysicsAnalyzer::AliHLTPHOSPhysicsAnalyzer():fRecPointsPtr(0), fRootHistPtr(0), fPHOSRadius(0)
-                                                   
-                                                      
+AliHLTPHOSPhysicsAnalyzer::AliHLTPHOSPhysicsAnalyzer():
+  fRecPointsPtr(0), 
+  fRootHistPtr(0), 
+  fPHOSRadius(0)
 {
   //Constructor
   //See header file for documentation
   AliPHOSGeometry *geom=AliPHOSGeometry::GetInstance("noCPV");
 
   //  fPHOSRadius = geom->GetIPtoCrystalSurface();
-  fPHOSRadius = 1500;
+  fPHOSRadius = geom->GetIPtoCrystalSurface();
 
   for(UInt_t i = 0; i < N_MODULES; i++)
     {
@@ -85,7 +86,7 @@ AliHLTPHOSPhysicsAnalyzer::~AliHLTPHOSPhysicsAnalyzer()
 }
 
 void
-AliHLTPHOSPhysicsAnalyzer::LocalPosition(AliHLTPHOSRecPointDataStruct* recPointPtr, Float_t* locPositionPtr)
+AliHLTPHOSPhysicsAnalyzer::LocalPosition(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/, Float_t* /*locPositionPtr*/)
 {
   //Get local position for a recPoint
 
@@ -100,17 +101,16 @@ AliHLTPHOSPhysicsAnalyzer::GlobalPosition(AliHLTPHOSRecPointDataStruct* recPoint
   //Get global position for a recPoint
   //See header file for documentation
   Float_t tempPosX = 0;
-
-  //  Int_t module = recPointPtr->fPHOSModule;
-
-  Int_t module = 2;
+  
+  Int_t module = recPointPtr->fModule;
 
   tempPosX = kCRYSTAL_SIZE*(recPointPtr->fX-N_XCOLUMNS_MOD/2) + kCRYSTAL_SIZE/2;
 
   positionPtr[0] = tempPosX*fRotParametersSin[module] + fPHOSRadius*fRotParametersCos[module];
 
   positionPtr[1] = tempPosX*fRotParametersCos[module] - fPHOSRadius*fRotParametersSin[module];
-
   positionPtr[2] = kCRYSTAL_SIZE*(recPointPtr->fZ-N_ZROWS_MOD/2) + kCRYSTAL_SIZE/2;
 
 }
@@ -120,9 +120,9 @@ AliHLTPHOSPhysicsAnalyzer::GlobalPosition(Float_t* locPositionPtr, Float_t* posi
 { 
   //Get global position from local postion and module number
   //See header file for documentation
-  positionPtr[0] = kCRYSTAL_SIZE*(locPositionPtr[0]-N_XCOLUMNS_MOD/2)*fRotParametersCos[module-1] + fPHOSRadius*fRotParametersSin[module-1];
+  positionPtr[0] = kCRYSTAL_SIZE*(locPositionPtr[0]-N_XCOLUMNS_MOD/2)*fRotParametersCos[module] + fPHOSRadius*fRotParametersSin[module];
 
-  positionPtr[1] = kCRYSTAL_SIZE*(locPositionPtr[0]-N_XCOLUMNS_MOD/2)*fRotParametersSin[module-1] - fPHOSRadius*fRotParametersCos[module-1];
+  positionPtr[1] = kCRYSTAL_SIZE*(locPositionPtr[0]-N_XCOLUMNS_MOD/2)*fRotParametersSin[module] - fPHOSRadius*fRotParametersCos[module];
   
   positionPtr[2] = kCRYSTAL_SIZE*(locPositionPtr[1]-N_ZROWS_MOD);
 
index 3d229b649db3c444d6a2ec8209e16fdabf8bef62..19e58d252e58a3da4051a52beee490817121777e 100644 (file)
@@ -60,12 +60,22 @@ class AliHLTPHOSPhysicsAnalyzer
   /** Destructor */
   virtual ~AliHLTPHOSPhysicsAnalyzer();
 
-  /*
-  AliHLTPHOSPhysicsAnalyzer(const AliHLTPHOSPhysicsAnalyzer & );
-  AliHLTPHOSPhysicsAnalyzer & operator = (const AliHLTPHOSPhysicsAnalyzer &) {return *this;}
-  */
-
-
+  /** Copy constructor */  
+  AliHLTPHOSPhysicsAnalyzer(const AliHLTPHOSPhysicsAnalyzer &):
+  fRecPointsPtr(0), 
+  fRootHistPtr(0), 
+  fPHOSRadius(0)
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSPhysicsAnalyzer & operator = (const AliHLTPHOSPhysicsAnalyzer &) 
+  {
+    //Assignement
+    return *this;
+  }
+  
   void SetHistogram(TH1F* histPtr) {fRootHistPtr = histPtr;}
 
   /** 
index c5f3744faa6c93c6b781686d3cc8ec1c8311ea03..bd94b5c7c97ed201d04b4a249293e14d5a2b4d0b 100644 (file)
@@ -49,12 +49,14 @@ class AliHLTPHOSPhysicsAnalyzerSpectrum : public AliHLTPHOSPhysicsAnalyzer
 
   /** Copy constructor */
   AliHLTPHOSPhysicsAnalyzerSpectrum(const AliHLTPHOSPhysicsAnalyzerSpectrum &);
-  /*
+
+  /** Assignment */
   AliHLTPHOSPhysicsAnalyzerSpectrum & operator = (const AliHLTPHOSPhysicsAnalyzerSpectrum)
     {
+      //Assignment
       return *this; 
     }
-  */
+
 
   /** Destructor */
   virtual ~AliHLTPHOSPhysicsAnalyzerSpectrum();
index 2c3e8a3caeeec4e2f9c348127a67881ff738ab07..4fdf7b9dccbab8dcf9446cdf2db1801e2ee39068 100644 (file)
@@ -74,12 +74,15 @@ AliHLTPHOSPhysicsAnalyzerSpectrumComponent::~AliHLTPHOSPhysicsAnalyzerSpectrumCo
       
 }
 
-// PTH AliHLTPHOSPhysicsAnalyzerSpectrumComponent::AliHLTPHOSPhysicsAnalyzerSpectrumComponent(const AliHLTPHOSPhysicsAnalyzerSpectrumComponent &):AliHLTProcessor(), fAnalyzerPtr(0), 
-//                                                                                                                                        fPeakFitter(0), fRootHistPtr(0), 
-//                                                                                                                                        fWriteInterval(0)
-//{
+AliHLTPHOSPhysicsAnalyzerSpectrumComponent::AliHLTPHOSPhysicsAnalyzerSpectrumComponent(const AliHLTPHOSPhysicsAnalyzerSpectrumComponent &) :
+  AliHLTPHOSProcessor(),
+  fAnalyzerPtr(0),
+  fPeakFitter(0), 
+  fRootHistPtr(0)
+  //fWriteInterval(0)
+{
   //Copy constructor not implemented 
-//}
+}
 
 Int_t
 AliHLTPHOSPhysicsAnalyzerSpectrumComponent::Deinit()
@@ -130,7 +133,7 @@ AliHLTComponentDataType
 AliHLTPHOSPhysicsAnalyzerSpectrumComponent::GetOutputDataType()
 {
   //  return AliHLTPHOSPhysicsDefinitions::fgkAliHLTSpectrumDataType;
-  return AliHLTPHOSDefinitions::fgkAliHLTSpectrumDataType;
+  return AliHLTPHOSDefinitions::fgkSpectrumDataType;
 }
 
 void
@@ -145,7 +148,7 @@ AliHLTPHOSPhysicsAnalyzerSpectrumComponent::GetOutputDataSize(unsigned long& con
 
 Int_t 
 AliHLTPHOSPhysicsAnalyzerSpectrumComponent::DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
-                                                   AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& /*size*/,
+                                                   AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* /*outputPtr*/, AliHLTUInt32_t& /*size*/,
                                                    std::vector<AliHLTComponentBlockData>& /*outputBlocks*/)
 {
   //Do event
@@ -157,9 +160,9 @@ AliHLTPHOSPhysicsAnalyzerSpectrumComponent::DoEvent(const AliHLTComponentEventDa
     {
       iter = blocks+ndx;
       
-      if(iter->fDataType != AliHLTPHOSDefinitions::fgkAliHLTRecPointDataType)
+      if(iter->fDataType != AliHLTPHOSDefinitions::fgkRecPointDataType)
        {
-         cout << "Warning: data type is not fgkAliHLTClusterDataType " << endl;
+         cout << "Warning: data type is not fgkRecPointDataType " << endl;
          continue;
        }
       
index 2ad68bae7550df56b3580c872a5a985fff148b19..bc4e60639ab718aff816aa145910d3a6b485ff16 100644 (file)
@@ -62,12 +62,16 @@ class AliHLTPHOSPhysicsAnalyzerSpectrumComponent: public AliHLTPHOSProcessor //
 
   /** Destructor */
   ~AliHLTPHOSPhysicsAnalyzerSpectrumComponent();
-
-  // PTH  AliHLTPHOSPhysicsAnalyzerSpectrumComponent(const AliHLTPHOSPhysicsAnalyzerSpectrumComponent &);
-  //  AliHLTPHOSPhysicsAnalyzerSpectrumComponent & operator = (const AliHLTPHOSPhysicsAnalyzerSpectrumComponent &)
-  //   {
-  //     return *this;
-  //  }
+  
+  /** Copy constructor */
+  AliHLTPHOSPhysicsAnalyzerSpectrumComponent(const AliHLTPHOSPhysicsAnalyzerSpectrumComponent &);
+
+  /** Assignment */
+  AliHLTPHOSPhysicsAnalyzerSpectrumComponent & operator = (const AliHLTPHOSPhysicsAnalyzerSpectrumComponent &)
+  {
+    // Assignment
+    return *this;
+  }
 
   /** interface function, see @ref AliHLTComponent for description */
   const char* GetComponentID();
index 99844eef43148ec868099a8e905dfc5a634a921a..c50474a5d382fd7580a9ff4368ff4adc14a20a64 100644 (file)
@@ -20,7 +20,7 @@
 const AliHLTComponentDataType AliHLTPHOSProcessor::fgkInputDataTypes[]={kAliHLTVoidDataType,{0,"",""}}; //'zero' terminated array
 
 
-AliHLTPHOSProcessor::AliHLTPHOSProcessor():AliHLTProcessor(), AliHLTPHOSBase(), fModuleID(0), fPrintInfoFrequncy(1000), fRunNumber(0)
+AliHLTPHOSProcessor::AliHLTPHOSProcessor():AliHLTProcessor(), AliHLTPHOSBase(), fPhosEventCount(0), fModuleID(0), fPrintInfo(0), fPrintInfoFrequncy(1000), fRunNumber(0)
 {
   ScanRunNumberFromFile();
 }
@@ -53,3 +53,36 @@ AliHLTPHOSProcessor::ScanRunNumberFromFile()
       cout << "ERROR, could not find file  " << tmpFileName <<endl;
     }
 }
+int
+AliHLTPHOSProcessor::ScanArguments(int argc, const char** argv)
+{
+  fPrintInfo = kFALSE;
+  int iResult=0;
+  TString argument="";
+
+  for(int i=0; i<argc && iResult>=0; i++) 
+    {
+      argument=argv[i];
+      
+      if (argument.IsNull()) 
+       {
+         continue;
+       }
+                         
+    if (argument.CompareTo("-printinfo") == 0) 
+      {
+       if(i+1 <= argc)
+         {
+           argument=argv[i+1];
+           fPrintInfoFrequncy = atoi(argv[i+1]);
+           fPrintInfo = kTRUE;
+         }
+       else
+         {
+           cout << "WARNING: asking for event info, but no update frequency is specified, option is ignored" << endl;
+         }
+      }
+    }
+  return 0;
+}
index e737fdef8c41c3e65ec1cf33d2868c7a3689b086..b0568227e76727b042a65236395e7b19e3fcc64e 100644 (file)
@@ -27,6 +27,7 @@ class AliHLTPHOSProcessor:public AliHLTProcessor, public AliHLTPHOSBase
 
  protected:
   void ScanRunNumberFromFile();
+  virtual int ScanArguments(int argc, const char** argv);
   int fPhosEventCount;                  /**<Global event counter for this component*/
   AliHLTUInt8_t  fModuleID;             /**<ID of the module this component read data from (0-4)*/
   Bool_t fPrintInfo;                    /**<wether or not to print debugg info to std out*/
index f28b19ababf29b0f652b60e99908a6aedec050d5..839619f46d36227687b2797baf9ced119ef8b7fe 100644 (file)
 #include "AliHLTPHOSMapper.h"
 #include "AliHLTPHOSSanityInspector.h"
 #include "AliHLTPHOSBaseline.h"
+#include "AliHLTPHOSDigitContainerDataStruct.h"
+#include "AliHLTPHOSDigitMaker.h"
 #include "TFile.h"
 #include "TTree.h"
 #include "TClonesArray.h"
+#include "TH2F.h"
 #include  "AliAltroDecoder.h"    // decoder for altro payload
 #include  "AliAltroData.h"       // container for altro payload
 #include  "AliAltroBunch.h"      // container for altro bunches
@@ -35,11 +38,19 @@ AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent():AliHLTPHOSRcuPr
                                                                 fSendChannelData(kFALSE),
                                                                 fOutPtr(0), 
                                                                 fMapperPtr(0), 
+                                                                fSanityInspectorPtr(0),
                                                                 fUseBaselineSubtraction(false), 
                                                                 fDecoderPtr(0),  
                                                                 fAltroDataPtr(0),
-                                                                fAltroBunchPtr(0)   
-                                                                //                                                              fRawMemoryReader(0), fPHOSRawStream(0) 
+                                                                fAltroBunchPtr(0),
+                                                                fDoPushCellEnergies(false),
+                                                                fDoMakeDigits(false),
+                                                                fDigitMakerPtr(0),
+                                                                fDigitContainerPtr(0),
+                                                                fDoSelectiveReadOut(false),
+                                                                fSelectedChannelsList(0),
+                                                                fDoCheckDataSize(false)
+                                                                //fRawMemoryReader(0), fPHOSRawStream(0) 
 {
   //comment
   fMapperPtr = new AliHLTPHOSMapper();
@@ -47,10 +58,8 @@ AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent():AliHLTPHOSRcuPr
   fAltroBunchPtr = new AliAltroBunch();
   fDecoderPtr = new AliAltroDecoder();
   fSanityInspectorPtr = new AliHLTPHOSSanityInspector();
+  fSelectedChannelsList = new AliHLTUInt16_t[N_XCOLUMNS_RCU*N_ZROWS_RCU*N_GAINS];
 }
-
-
 AliHLTPHOSRawAnalyzerComponent::~AliHLTPHOSRawAnalyzerComponent()
 {
   //comment
@@ -113,7 +122,6 @@ AliHLTPHOSRawAnalyzerComponent::GetComponentID()
   return "AliPhosTestRaw";
 }
 
-
 void
 AliHLTPHOSRawAnalyzerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
 {
@@ -125,18 +133,28 @@ AliHLTPHOSRawAnalyzerComponent::GetInputDataTypes( vector<AliHLTComponentDataTyp
   }
 }
 
-
 AliHLTComponentDataType 
 AliHLTPHOSRawAnalyzerComponent::GetOutputDataType()
 {
   //comment
-  return AliHLTPHOSDefinitions::fgkCellEnergyDataType;
+  return kAliHLTMultipleDataType;
+  //  return AliHLTPHOSDefinitions::fgkDigitDataType;
 }
 
+int 
+AliHLTPHOSRawAnalyzerComponent::GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList)
+{
+  // Added by OD
+  // see header file for class documentation
+  tgtList.clear();
+  tgtList.push_back(AliHLTPHOSDefinitions::fgkCellEnergyDataType);
+  tgtList.push_back(AliHLTPHOSDefinitions::fgkDigitDataType);
+  tgtList.push_back(kAliHLTDataTypeHwAddr16);
+  return tgtList.size();
+}
 
 void
 AliHLTPHOSRawAnalyzerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
-
 {
   //comment
   constBase = 30;
@@ -154,6 +172,8 @@ AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData
   UInt_t mysize            = 0;
   UInt_t tSize             = 0;
   Float_t baseline         = 0;
+  UInt_t digitCount        = 0;
+
   AliHLTUInt8_t* outBPtr;
   outBPtr = outputPtr;
   const AliHLTComponentBlockData* iter = NULL; 
@@ -161,12 +181,11 @@ AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData
   Int_t *rawDataBufferPos = (Int_t *)outputPtr; 
 
   AliHLTPHOSValidCellDataStruct *validCellPtr = 0;
-  Int_t x = -1;
-  Int_t z = -1;
-  Int_t gain = -1;
 
   UInt_t nSamples = 0;
 
+  UInt_t nSelected = 0;
+
   UInt_t specification = 0;
 
   for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
@@ -182,13 +201,9 @@ AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData
        {
          continue; 
        }
-      specification = specification|iter->fSpecification;
 
-      if( fPhosEventCount%100 == 0)
-       {
-         cout << "event count = "<< fPhosEventCount <<endl;
-       } 
-    
+      specification = specification|iter->fSpecification;
+  
       fDecoderPtr->SetMemory(reinterpret_cast<UChar_t*>( iter->fPtr ), iter->fSize);
       fDecoderPtr->Decode();
       fOutPtr =  (AliHLTPHOSRcuCellEnergyDataStruct*)outBPtr;
@@ -202,34 +217,37 @@ AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData
        {
          
          nSamples = fAltroDataPtr->GetDataSize() - 2;
-         if(nSamples != fNTotalSamples)
-           {
-             cout << "Error, fDataSize = " << nSamples + 2 << endl;
-             continue;
-           }
-         else
+         if(fDoCheckDataSize)
            {
-             //               cout << "Info, fDataSize = " << fAltroDataPtr->GetDataSize() << endl;
+             if(nSamples != fNTotalSamples)
+               {
+                 //cout << "Error, fDataSize = " << nSamples + 2 << endl;
+                 //continue;
+               }
+             else
+               {
+                 //cout << "Info, fDataSize = " << fAltroDataPtr->GetDataSize() << endl;
+               }
            }
         
          crazyness = fSanityInspectorPtr->CheckInsanity(fAltroDataPtr->GetData(), fAltroDataPtr->GetDataSize() - 2);
          fAnalyzerPtr->SetData(fAltroDataPtr->GetData());  
          fAnalyzerPtr->Evaluate(0, fAltroDataPtr->GetDataSize() -2);  
-                
 
-         validCellPtr = &(fOutPtr->fValidData
-                       [fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fXCol]
-                       [fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fZRow]
-                       [fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fGain]);
-         validCellPtr->fX = fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fXCol;
-         validCellPtr->fZ = fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fZRow;
-         validCellPtr->fGain = fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fGain;
+         Int_t x = fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fXCol;
+         Int_t z = fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fZRow;
+         Int_t gain = fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fGain;         
+         validCellPtr = &(fOutPtr->fValidData[x][z][gain]);
+         validCellPtr->fX = x;
+         validCellPtr->fZ = z;
+         validCellPtr->fGain = gain;
 
          if(fUseBaselineSubtraction)
            {
              baseline = fBaselines[validCellPtr->fX][validCellPtr->fZ][ validCellPtr->fGain];
            }
          baseline = 0;
+         
          validCellPtr->fEnergy  = (float)fAnalyzerPtr->GetEnergy() - baseline;
          validCellPtr->fTime    = (float)fAnalyzerPtr->GetTiming();
          validCellPtr->fCrazyness = (int)crazyness;
@@ -237,33 +255,93 @@ AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData
          validCellPtr->fID = tmpChannelCnt;
          validCellPtr->fData = rawDataBufferPos;
          const UInt_t *tmpData =  fAltroDataPtr->GetData();
-         
-         for(Int_t sample = 0; sample < nSamples; sample++)
+
+         if(fDoPushCellEnergies)
+           {
+             for(UInt_t sample = 0; sample < nSamples; sample++)
+               {
+                 (validCellPtr->fData)[sample] = tmpData[sample] - (int)baseline;
+               }
+           }
+         if(fDoSelectiveReadOut)
            {
-             (validCellPtr->fData)[sample] = tmpData[sample] - (int)baseline;
+             if(validCellPtr->fEnergy > fSelectiveReadOutThresholds[x][z][gain])
+               {
+                 fSelectedChannelsList[nSelected] = (AliHLTUInt16_t)(fAltroDataPtr->GetHadd());
+                 nSelected++;
+               }
            }
 
          UInt_t tmpSize =  sizeof(Int_t)*(validCellPtr->fNSamples);
-         mysize += sizeof(Int_t)*(validCellPtr->fNSamples);
+         //      mysize += sizeof(Int_t)*(validCellPtr->fNSamples);
          mysize += tmpSize;
+         //      mysize += tmpSize;
          rawDataBufferPos += tmpSize/sizeof(Int_t);
+
          tmpChannelCnt ++;
+
        }
       
-      fOutPtr->fCnt  =  tmpChannelCnt;
+      fOutPtr->fCnt  = tmpChannelCnt;
       fOutPtr->fSize = mysize;
-
-      AliHLTComponentBlockData bd;
-      FillBlockData( bd );
-      bd.fOffset = offset;
-      bd.fSize = mysize;
-
-      bd.fDataType = AliHLTPHOSDefinitions::fgkCellEnergyDataType;
-      bd.fSpecification = specification;
-      outputBlocks.push_back( bd );
-
-      tSize += mysize;
-      outBPtr += mysize;
+      
+      if(fDoPushCellEnergies)
+       {
+         AliHLTComponentBlockData bdCellEnergy;
+         FillBlockData( bdCellEnergy );
+         bdCellEnergy.fOffset = offset;
+         bdCellEnergy.fSize = mysize;
+         bdCellEnergy.fDataType = AliHLTPHOSDefinitions::fgkCellEnergyDataType;
+         bdCellEnergy.fSpecification = specification;
+         outputBlocks.push_back( bdCellEnergy );
+         
+         tSize += mysize;
+         outBPtr += mysize;
+       }
+      
+      //Making Digits
+      if(fDoMakeDigits)
+       {
+         Int_t digitSize = 0;
+         fDigitMakerPtr->SetDigitContainerStruct((AliHLTPHOSDigitContainerDataStruct*)outBPtr);          
+         digitCount = fDigitMakerPtr->MakeDigits(fOutPtr);
+         offset = tSize;
+         digitSize += sizeof(AliHLTPHOSDigitContainerDataStruct);
+         
+         AliHLTComponentBlockData bdDigits;
+         FillBlockData(bdDigits);
+         bdDigits.fOffset = offset;
+         bdDigits.fSize = mysize;
+         bdDigits.fDataType = AliHLTPHOSDefinitions::fgkDigitDataType;
+         bdDigits.fSpecification = specification;
+         outputBlocks.push_back( bdDigits );
+         
+         tSize += digitSize;
+         outBPtr += digitSize;
+         fDigitMakerPtr->Reset();
+       }      
+                  
+      //Pushing selected channel addresses
+      if(fDoSelectiveReadOut)
+       {
+         UInt_t hwAddSize = sizeof(AliHLTUInt16_t);
+         offset = tSize;
+         for(UInt_t n = 0; n < nSelected; n++)
+           {
+             ((AliHLTUInt16_t*)outBPtr)[n] = fSelectedChannelsList[n];
+           }
+         mysize = nSelected*hwAddSize;
+         AliHLTComponentBlockData bdHwAdd;
+         FillBlockData(bdHwAdd);
+         bdHwAdd.fOffset = offset;
+         bdHwAdd.fSize = mysize;
+         bdHwAdd.fDataType = kAliHLTDataTypeHwAddr16;
+         bdHwAdd.fSpecification = specification;
+         outputBlocks.push_back( bdHwAdd );
+         
+         tSize += mysize;
+         outBPtr += mysize;
+       }
       
       if( tSize > size )
        {
@@ -283,7 +361,9 @@ AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData
     {
       if(fPhosEventCount%fPrintInfoFrequncy == 0)
        {
-         cout <<"Analyzing event " <<  fPhosEventCount  << "for Equippment " << fkEquippmentID << endl; 
+         cout << "Analyzing event " <<  fPhosEventCount  << " for Equippment " << fkEquippmentID << endl; 
+         if(fDoSelectiveReadOut) cout << "# of selected channels: " << nSelected << endl;
+         if(fDoMakeDigits) cout << "# of digits: " << digitCount << endl;
        }  
     }
 
@@ -296,21 +376,52 @@ int
 AliHLTPHOSRawAnalyzerComponent::DoInit( int argc, const char** argv )
 {
   //See base class for documentation
-  cout <<"AliHLTPHOSRawAnalyzerComponent::DoInit( int argc, const char** argv ) "<< endl;
-
+  
   fSendChannelData = kFALSE;
   fPrintInfo = kFALSE;
   int iResult=0;
   TString argument="";
   iResult = ScanArguments(argc, argv);
 
+  int nSigmas = 3;
+  
+  fDigitMakerPtr = new AliHLTPHOSDigitMaker();
+  
   for(int i = 0; i < argc; i++)
     {
+      if(!strcmp("-rmsfilepath", argv[i]))
+       {
+         fDigitMakerPtr->SetDigitThresholds(argv[i+1], nSigmas);
+         SetSelectiveReadOutThresholds(argv[i+1], nSigmas);
+       }
       if(!strcmp("-baselinefile", argv[i]))
        {
-         cout << "Getting baselines from " << argv[i+1] << endl;
          SetBaselines(argv[i+1]);
        }
+      if(!strcmp("-lowgainfactor", argv[i]))
+       {
+         fDigitMakerPtr->SetGlobalLowGainFactor(atof(argv[i+1]));
+       }
+      if(!strcmp("-highgainfactor", argv[i]))
+       {
+         fDigitMakerPtr->SetGlobalHighGainFactor(atof(argv[i+1]));
+       }
+      if(!strcmp("-selectivereadout", argv[i]))
+       {
+         fDoSelectiveReadOut = true;
+       }
+      if(!strcmp("-makedigits", argv[i]))
+       {
+         fDoMakeDigits = true;
+       }
+      if(!strcmp("-pushcellenergies", argv[i]))
+               {
+         fDoPushCellEnergies = true;
+       }
+      if(!strcmp("-checkdatasize", argv[i]))
+       {
+         fDoCheckDataSize = true;
+       }
     }
 
   if(fIsSetEquippmentID == kFALSE)
@@ -336,9 +447,9 @@ AliHLTPHOSRawAnalyzerComponent::Reset(AliHLTPHOSRcuCellEnergyDataStruct* cellDat
   //comment
   //  for(unsigned int mod = 0; mod < N_MODULES; mod ++)
   //{
-  for(unsigned int x = 0; x < N_XCOLUMNS_MOD; x ++)
+  for(unsigned int x = 0; x < N_XCOLUMNS_RCU; x ++)
     {
-      for(unsigned int z = 0; z < N_ZROWS_MOD; z ++)
+      for(unsigned int z = 0; z < N_ZROWS_RCU; z ++)
        {
          for(unsigned int gain = 0; gain < N_GAINS; gain ++ )
            {
@@ -384,7 +495,6 @@ AliHLTPHOSRawAnalyzerComponent::SetBaselines(const char* file)
          if((baseline->GetZ() < (Int_t)((fRcuZ + 1)*N_ZROWS_RCU)) && (baseline->GetZ() >= (Int_t)(fRcuZ*N_ZROWS_RCU)))
            {
              fBaselines[baseline->GetX() - fRcuX*N_XCOLUMNS_RCU][baseline->GetZ() - fRcuZ*N_ZROWS_RCU][baseline->GetGain()] = baseline->GetBaseline();
-             //              cout <<  fBaselines[baseline->GetX() - fRcuX*N_XCOLUMNS_RCU][baseline->GetZ() - fRcuZ*N_ZROWS_RCU][baseline->GetGain()] << endl;
            }
        }
     }
@@ -392,3 +502,23 @@ AliHLTPHOSRawAnalyzerComponent::SetBaselines(const char* file)
   delete baselineFile;
   baselineFile = 0;
 }
+
+void 
+AliHLTPHOSRawAnalyzerComponent::SetSelectiveReadOutThresholds(const char* filepath, Int_t nSigmas)
+{
+  //See header file for documentation
+
+  TFile *histFile = new TFile(filepath);
+  
+  TH2F *lgHist = (TH2F*)histFile->Get("RMSLGMapHist");
+  TH2F *hgHist = (TH2F*)histFile->Get("RMSHGMapHist");
+
+  for(UInt_t x = 0; x < N_XCOLUMNS_MOD; x++)
+    {
+      for(UInt_t z = 0; z < N_ZROWS_MOD; z++)
+       {
+         fSelectiveReadOutThresholds[x][z][LOW_GAIN] = lgHist->GetBinContent(x, z) * nSigmas;
+         fSelectiveReadOutThresholds[x][z][HIGH_GAIN] = hgHist->GetBinContent(x, z) * nSigmas;
+       }
+    }
+}
index 5be94f07fe26b366599e5d27989fc3d31da45574..ad14ae8a443cee8ef1217470fcb0fd130bf5e65f 100644 (file)
@@ -12,7 +12,8 @@ class AliHLTPHOSSanityInspector;
 class AliAltroDecoder;      // decoder for altro payload
 class AliAltroData;         // container for altro payload
 class AliAltroBunch;        // container for altro bunches
-
+class AliHLTPHOSDigitMaker;
+class AliHLTPHOSDigitContainerDataStruct;
 
 class AliHLTPHOSRawAnalyzerComponent: public AliHLTPHOSRcuProcessor
 {
@@ -24,6 +25,7 @@ class AliHLTPHOSRawAnalyzerComponent: public AliHLTPHOSRcuProcessor
   virtual const char* GetComponentID() = 0;
   virtual void GetInputDataTypes( vector <AliHLTComponentDataType>& list);
   virtual AliHLTComponentDataType GetOutputDataType();
+  virtual int GetOutputDataTypes(AliHLTComponentDataTypeList& list);
   virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
   virtual AliHLTComponent* Spawn() = 0; 
  protected:
@@ -37,7 +39,8 @@ class AliHLTPHOSRawAnalyzerComponent: public AliHLTPHOSRcuProcessor
  private:
   void Reset(AliHLTPHOSRcuCellEnergyDataStruct* cellDataPtr);
   void ResetDataPtr(int startindex = 0, int sampleCnt = 0);
-  void SetBaselines(const char* baselineFile);
+  void SetBaselines(const char* baselineFile); 
+  void SetSelectiveReadOutThresholds(const char* filepath, Int_t nSignams);
   Bool_t fSendChannelData;       /**<wether or not to send raw data from the component into shared memory*/
   Double_t fTmpChannelData[ALTRO_MAX_SAMPLES];                        /**<temporary variable to store raw samples from a single altro channel*/
   Double_t fMaxValues[N_MODULES][N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS]; /**<array to store cell energies*/
@@ -51,6 +54,30 @@ class AliHLTPHOSRawAnalyzerComponent: public AliHLTPHOSRcuProcessor
   AliAltroDecoder *fDecoderPtr;           // decoder for altro payload
   AliAltroData    *fAltroDataPtr;         // container for altro payload
   AliAltroBunch   *fAltroBunchPtr;        // container for altro bunches
+
+  /** Are we pushing the cell energies (raw data) */
+  Bool_t fDoPushCellEnergies; //Added by OD
+
+  /** Are we making digits? */
+  Bool_t fDoMakeDigits;  //Added by OD
+
+  /** The digit maker */
+  AliHLTPHOSDigitMaker *fDigitMakerPtr;                    //! transient Added by OD
+
+  /** The digit containerto use for digit making */
+  AliHLTPHOSDigitContainerDataStruct *fDigitContainerPtr;  //! transient Added by OD
+
+  /** Are we doing selective read out? */
+  Bool_t fDoSelectiveReadOut;  //Added by OD
+
+  /** Threshold for selective readout ( zero suppression threshold) */
+  Float_t fSelectiveReadOutThresholds[N_XCOLUMNS_MOD][N_ZROWS_MOD][N_GAINS]; //Added by OD
+
+  /** The selected HW addresses */
+  AliHLTUInt16_t *fSelectedChannelsList;  //! transient Added by OD
+
+  /** Should we check data size? */
+  Bool_t fDoCheckDataSize;      //Added by OD
 };
 #endif
 
index bf69327c12c76ef7da1fe294eced0c959d44aa18..e06ff05b1e8051cfeb63e14bb98b7287cce45f8a 100644 (file)
@@ -15,8 +15,9 @@ AliHLTPHOSRcuCalibrationProcessorComponent gAliHLTPHOSRcuCalibrationProcessorCom
 
 AliHLTPHOSRcuCalibrationProcessorComponent::AliHLTPHOSRcuCalibrationProcessorComponent() :
   AliHLTCalibrationProcessor(),
+  fCalibDataPtr(0),
   fRcuCalibProcessorPtr(0),
-  fCalibDataPtr(0)
+  fShmPtr(0)
 {
 }
 
@@ -24,8 +25,11 @@ AliHLTPHOSRcuCalibrationProcessorComponent::~AliHLTPHOSRcuCalibrationProcessorCo
 {
 }
 
-AliHLTPHOSRcuCalibrationProcessorComponent::AliHLTPHOSRcuCalibrationProcessorComponent(const AliHLTPHOSRcuCalibrationProcessorComponent&) 
-  //  fHistogramProducer(0)
+AliHLTPHOSRcuCalibrationProcessorComponent::AliHLTPHOSRcuCalibrationProcessorComponent(const AliHLTPHOSRcuCalibrationProcessorComponent&) :
+  AliHLTCalibrationProcessor(),
+  fCalibDataPtr(0),
+  fRcuCalibProcessorPtr(0),
+  fShmPtr(0)
 {
   HLTFatal("copy constructor untested");
 }
index 19f13acd3ceb22596e0191ec1e0b4405badf0217..f2a86c2c0b007f424949d1fb02a57b6907c50ffd 100644 (file)
@@ -13,7 +13,7 @@ class  AliHLTPHOSRcuProcessor : public AliHLTPHOSProcessor
   AliHLTPHOSRcuProcessor();
   virtual ~AliHLTPHOSRcuProcessor();
   const AliHLTUInt16_t  GetEquippmentID() const;
-  int ScanArguments(int argc, const char** argv);
+  virtual int ScanArguments(int argc, const char** argv);
   void SetEquippmentID(AliHLTUInt16_t id);
   void SetCoordinates(AliHLTUInt16_t equippmentID);
   const AliHLTUInt16_t fkEquippmentID;  /**<Equippment ID as defined by ALICE*/
index 20ba0e1762345093997027161981f6d18d4f2c09..fc41cc12b5765812fc9597dcebc816ed7af7005a 100644 (file)
@@ -42,7 +42,7 @@ struct AliHLTPHOSRecPointContainerStruct
   UInt_t fNRecPoints; 
 
   /** Array of rec points in the container */
-  AliHLTPHOSRecPointDataStruct fRecPointArray[200];
+  AliHLTPHOSRecPointDataStruct fRecPointArray[100];
 
 };
 
index 132cd9ae9d73f9d989adfd7b944b4a55bf0ed912..4c7afd886f7f126017afe2a72f38cbb9f1e70123 100644 (file)
@@ -57,7 +57,7 @@ struct AliHLTPHOSRecPointDataStruct
   Float_t fZ;                                 //COMMENT
 
   /** Module number */
-  Float_t fModule;                            //COMMENT
+  Int_t fModule;                              //COMMENT
 
   /** The total energy of the rec point */
   Float_t fAmp;                               //COMMENT
@@ -81,7 +81,7 @@ struct AliHLTPHOSRecPointDataStruct
   Float_t fDistanceToBadChannel;              //COMMENT
 
   /** Array of digits in the rec point */
-  AliHLTPHOSDigitDataStruct fDigitsList[64];  //COMMENT
+  AliHLTPHOSDigitDataStruct fDigitsList[128];  //COMMENT
 
 };
 
index ee3f3f8e8f9233a54d15c60e9b79961d7fb5a149..42855d9f8f929a02683f74b3eb12c410ebe5bc02 100644 (file)
@@ -50,6 +50,22 @@ public:
   
   /* Destructor */
   virtual ~AliHLTPHOSSanityInspector();
+
+  /** Copy constructor */  
+  AliHLTPHOSSanityInspector(const AliHLTPHOSSanityInspector &) : 
+    AliHLTPHOSBase(),
+    fMaxDifference(0)
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSSanityInspector & operator = (const AliHLTPHOSSanityInspector)
+  {
+    //Assignment
+    return *this; 
+  }
+  
   
   //  Int_t CheckInsanity(UInt_t* data, Int_t nSamples);
   
index 0cb3f5fdf38a986d522ff5d6d85640bf309d545b..78f6044fe6b87f1ec67ee4a3762acc0b2c0173c2 100644 (file)
@@ -28,6 +28,9 @@ AliHLTPHOSSharedMemoryInterface::AliHLTPHOSSharedMemoryInterface(): fCurrentChan
                                                                    fCellEnergiesPtr(0), 
                                                                    fIsSetMemory(false), 
                                                                    fMaxCnt(0),
+                                                                   fCurrentX(0),
+                                                                   fCurrentZ(0),
+                                                                   fCurrentGain(0),
                                                                    fCurrentCnt(0), 
                                                                    fCharDataOffset(0), 
                                                                    fCharPtr(0), 
@@ -60,8 +63,8 @@ AliHLTPHOSSharedMemoryInterface::NextChannel()
      return fCurrentChannel;
     }
   */
-  // Added by OD
 
+  // Changed by OD
   if(fCurrentCnt < fMaxCnt)
     {
       for(Int_t x = 0; x < N_XCOLUMNS_MOD; x++)
@@ -71,15 +74,12 @@ AliHLTPHOSSharedMemoryInterface::NextChannel()
              for(Int_t gain = 0; gain < N_GAINS; gain++)
                {
                  fCurrentChannel =  &(fCellEnergiesPtr->fValidData[x][z][gain]);
-                 if(fCurrentChannel->fEnergy > 0)
+                 if(fCurrentChannel->fID == fCurrentCnt)
                    {
-                     if(fCurrentChannel->fID == fCurrentCnt)
-                       {
-                         fCurrentChannel->fData = fIntPtr; 
-                         fIntPtr +=  fCurrentChannel->fNSamples;
-                         fCurrentCnt ++;
-                         return fCurrentChannel;
-                       }
+                     fCurrentChannel->fData = fIntPtr; 
+                     fIntPtr +=  fCurrentChannel->fNSamples;
+                     fCurrentCnt ++;
+                     return fCurrentChannel;
                    }
                }
            }