]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
eff C++
authorphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 Oct 2008 16:59:13 +0000 (16:59 +0000)
committerphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 Oct 2008 16:59:13 +0000 (16:59 +0000)
12 files changed:
HLT/PHOS/AliHLTPHOSClusterizer.cxx
HLT/PHOS/AliHLTPHOSClusterizer.h
HLT/PHOS/AliHLTPHOSDigitMaker.cxx
HLT/PHOS/AliHLTPHOSFourier.cxx
HLT/PHOS/AliHLTPHOSFourierComponent.cxx
HLT/PHOS/AliHLTPHOSHistogramProducer.h
HLT/PHOS/AliHLTPHOSMonitorTriggerComponent.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzer.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv2.cxx
HLT/PHOS/AliHLTPHOSUtilities.cxx
HLT/PHOS/testDecoder.cxx

index 3cf7a23ba9f8b47feae01ab4764a3dc3072a1305..26c10aae6973a1aa307b59dad527cfdc54c780c6 100644 (file)
@@ -87,7 +87,7 @@ AliHLTPHOSClusterizer::SetRecPointContainer(AliHLTPHOSRecPointContainerStruct* r
   }
 
 void
-AliHLTPHOSClusterizer::SetRecoParameters(AliPHOSRecoParam* params)
+AliHLTPHOSClusterizer::SetRecoParameters(AliPHOSRecoParam* /*params*/)
 {
   //see header file for documentation
 #ifndef HAVE_NOT_PHOSRECOPARAMEMC // set from configure if EMC functionality not available in AliPHOSRecoParam
index 3a9fe9542ec230b27e1ed67f4718b0447f38e6cb..ba53d9542eef531d23065cad077c69f48239c0af 100644 (file)
@@ -68,8 +68,7 @@ public:
   virtual ~AliHLTPHOSClusterizer();
 
   /** Copy constructor */  
-  AliHLTPHOSClusterizer(const AliHLTPHOSClusterizer &) : 
-    AliHLTPHOSBase(),
+ AliHLTPHOSClusterizer(const AliHLTPHOSClusterizer &) :  AliHLTPHOSBase(),
     fEmcClusteringThreshold(0),
     fEmcMinEnergyThreshold(0),
     fEmcTimeGate(0),
@@ -82,7 +81,8 @@ public:
     fDigitContainerPtr(0),
     fRecPointContainerPtr(0),
     fPHOSGeometry(0),
-    fGetterPtr(0)
+    fGetterPtr(0),
+      fMaxDigitIndexDiff(0)
   {
     //Copy constructor not implemented
   }
index 05dc3cfdf09ba5b9aad387734897cca29b2a4ec7..bf1be0a250957df3c8160abf487c42d370cd6b9d 100644 (file)
@@ -58,8 +58,8 @@ AliHLTPHOSDigitMaker::AliHLTPHOSDigitMaker() :
   fDigitContainerStructPtr(0),
   fDigitArrayPtr(0),
   fDigitStructPtr(0),
-  fDigitCount(0),
   fShmPtr(0),
+  fDigitCount(0),
   fOrdered(true)
 {
   // See header file for documentation
@@ -104,7 +104,7 @@ AliHLTPHOSDigitMaker::MakeDigits(AliHLTPHOSChannelDataHeaderStruct* channelDataH
   //See header file for documentation
   
   Int_t j = 0;
-  Float_t tmpEnergy = 0;
+  //  Float_t tmpEnergy = 0;
 
 //   Int_t xMod = -1;
 //   Int_t zMod = -1;
index f53d1f7e7aebb715fd567e0227e833e0f0624afe..f8ac06171ccabd5cd7db300d084ba07f7b3cf6a9 100644 (file)
@@ -61,7 +61,7 @@ AliHLTPHOSFourier::GetPSD()
 
 
 void 
-AliHLTPHOSFourier::ProcessFourier(const Int_t *data, const int length, const int z, const int x, const int gain, const int event)
+AliHLTPHOSFourier::ProcessFourier(const Int_t *data, const int length, const int /*z*/, const int /*x*/, const int gain, const int event)
 {
   Double_t  re = 0;
   Double_t  im = 0;
index d9debe626b2bd7c202846d4fd20e9056fb3a64ef..4c35cba42602b97a7b7de4c797c31d34076e303e 100644 (file)
@@ -103,7 +103,7 @@ AliHLTPHOSFourierComponent::GetOutputDataTypes(AliHLTComponentDataTypeList& tgtL
 
 
 void 
-AliHLTPHOSFourierComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier)
+AliHLTPHOSFourierComponent::GetOutputDataSize(unsigned long& /*constBase*/, double& inputMultiplier)
 {
  //  constBase =1;
 //   inputMultiplier = 1;
index 03ddbff6f7c50ef08854fc4432b3f013016ae893..50c8e2e4f9edfaa777ccd67032191bdfc0c5a9b2 100644 (file)
@@ -65,7 +65,8 @@ public:
   void SetMaxNtupleEntries(Int_t n) { fMaxNtupleEntries = n; }
   
 private:
-
+AliHLTPHOSHistogramProducer(const AliHLTPHOSHistogramProducer  & );
+AliHLTPHOSHistogramProducer  & operator = (const AliHLTPHOSHistogramProducer &);
   TH1D* fClusterEnergiesHistPtr;
   TH1D* fMultiplicitiesHistPtr;
   TNtuple* fClusterNtuplePtr;
index 1097690c66cf77873632fab673866391c5b7292c..e1772c28b846e14b47b7a20667536d4a5f582bb7 100644 (file)
@@ -106,8 +106,8 @@ AliHLTPHOSMonitorTriggerComponent::GetOutputDataSize(unsigned long& constBase, d
 
 int
 AliHLTPHOSMonitorTriggerComponent::DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
-                                        AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size,
-                                        std::vector<AliHLTComponentBlockData>& outputBlocks)
+                                          AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* /*outputPtr*/, AliHLTUInt32_t& /*size*/,
+                                          std::vector<AliHLTComponentBlockData>& /*outputBlocks*/)
 {
   //See headerfile for documentation
 
@@ -146,7 +146,7 @@ AliHLTPHOSMonitorTriggerComponent::DoEvent(const AliHLTComponentEventData& evtDa
          eddWord = blockCount;
          PushEventDoneData( eddWord );
          
-         Int_t blockIndex = 0;
+         //      Int_t blockIndex = 0;
          // low data type
          eddWord = 0;
         
index 325fd8569512fbc0b314a41c71b0d439bef6f7ea..14357e854b28059b66fa1ae441fbdc812a195305 100644 (file)
@@ -61,7 +61,8 @@ AliHLTPHOSRawAnalyzer::AliHLTPHOSRawAnalyzer(double * /*dtaPtr*/, double fs): Al
                                                                              fTau(2), 
                                                                              fDTof(99999), 
                                                                              fDAmpl(99999),
-                                                                             fStartIndex(0) 
+                                                                             fStartIndex(0),
+                                                                             fUtilitiesPtr(0)
 {
   fSampleFrequency = fs;
 } //end  
@@ -78,7 +79,7 @@ AliHLTPHOSRawAnalyzer::SetCorrectBaselineUsingFirstFiveSamples()
 void 
 //AliHLTPHOSRawAnalyzer::CorrectBaselineUsingFirstFiveSamples(double *data, int length)
 //AliHLTPHOSRawAnalyzer::CorrectBaselineUsingFirstFiveSamples(int *data, int length)
-AliHLTPHOSRawAnalyzer::CorrectBaselineUsingFirstFiveSamples(UInt_t *data, const int length)
+AliHLTPHOSRawAnalyzer::CorrectBaselineUsingFirstFiveSamples(UInt_t * /*data*/, const int /* length */)
 {
   //  cout << "AliHLTPHOSRawAnalyzer::CorrectBaselineUsingFirstFiveSamples" << endl;
 
index b3954876a9dab1fef7a2c70790a89591e3c1cd32..ec80d2eaaacc176149c87d8e4645ed84e408d357 100644 (file)
@@ -40,9 +40,13 @@ AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent():AliHLTPHOSRcuPr
                                                                  fUseBaselineSubtraction(false), 
                                                                  fDecoderPtr(0),  
                                                                  fAltroDataPtr(0),
-                                                                 fAltroBunchPtr(0),
-                                                                 fDoPushRawData(false),
-                                                                 fDigitContainerPtr(0),
+                                                                 fAltroBunchPtr(0), 
+                                                       
+                                                                fDoPushRawData(false),
+                                                                fDoMakeDigits(0), 
+                                                                fDigitMakerPtr(0),
+                                                                
+                                                                fDigitContainerPtr(0),
                                                                  fDoSelectiveReadOut(false),
                                                                  fSelectedChannelsList(0),
                                                                  fDoCheckDataSize(false),
@@ -143,7 +147,7 @@ AliHLTPHOSRawAnalyzerComponent::GetOutputDataSize(unsigned long& constBase, doub
 
 
 void 
-AliHLTPHOSRawAnalyzerComponent::FillDataArray(UInt_t *data, const AliAltroData *altrodataptr, const int channel)
+AliHLTPHOSRawAnalyzerComponent::FillDataArray(UInt_t *data, const AliAltroData * /*altrodataptr */, const int /* channel */)
 {
   ResetDataPtr(0, ALTRO_MAX_SAMPLES);
   bool islastbunch = true;
@@ -186,7 +190,7 @@ AliHLTPHOSRawAnalyzerComponent::FillDataArray(UInt_t *data, const AliAltroData *
 
 
 void 
-AliHLTPHOSRawAnalyzerComponent::GetFirstBunch(AliAltroData *altrodata,  AliAltroBunch *altrobunch)
+AliHLTPHOSRawAnalyzerComponent::GetFirstBunch(AliAltroData * /*altrodata */,  AliAltroBunch  * /*altrobunch */)
 {
   while( fAltroDataPtr->NextBunch(fAltroBunchPtr) == true)
     {
@@ -385,7 +389,7 @@ AliHLTPHOSRawAnalyzerComponent::DoInit( int argc, const char** argv )
 
 
 void
-AliHLTPHOSRawAnalyzerComponent::Reset(AliHLTPHOSRcuCellEnergyDataStruct* cellDataPtr)
+AliHLTPHOSRawAnalyzerComponent::Reset(AliHLTPHOSRcuCellEnergyDataStruct* /* cellDataPtr */)
 {
   ResetDataPtr(0, ALTRO_MAX_SAMPLES);
 } // end Reset
index 8eb0b1ea9b4c2285caf19fcb10b41b8a2eafc5d3..26e3cdb7c52d3d1ddd756f804b7634552c5d7f93 100644 (file)
@@ -35,6 +35,7 @@ AliHLTPHOSRawAnalyzerComponentv2::AliHLTPHOSRawAnalyzerComponentv2():AliHLTPHOSR
                                                                     fDecoderPtr(0),  
                                                                     fAltroDataPtr(0),
                                                                     fAltroBunchPtr(0),
+                                                                    fNCorruptedBlocks(0),
                                                                     fNOKBlocks(0),
                                                                     fAlgorithm(0),
                                                                     fOffset(0)
@@ -126,7 +127,7 @@ AliHLTPHOSRawAnalyzerComponentv2::DoEvent( const AliHLTComponentEventData& evtDa
 
   const AliHLTComponentBlockData* iter = NULL; 
   unsigned long ndx;
-  bool droppedRaw = true;
+  // bool droppedRaw = true;
 
   for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
     {
index 4bc49fdc5232cb0dd21d9afc836cec6b2f9ea828..d31e5ae0b5fb0297f337c0d460e945a7ee806e23 100644 (file)
@@ -51,6 +51,10 @@ AliHLTPHOSUtilities::ScanSingleIntArgument(int argc, const char** argv, const ch
              *value =  atoi(argv[tmpIndex +1]);
              return true;
            }
+         else
+           {
+             return false;
+           }
        }
     }
  
@@ -81,6 +85,10 @@ AliHLTPHOSUtilities::ScanSingleFloatArgument(int argc, const char** argv, const
              *value =  atof(argv[tmpIndex +1]);
              return true;
            }
+         else
+           {
+             return false;
+           }
        }
     }
   else
@@ -111,9 +119,12 @@ AliHLTPHOSUtilities::ScanSingleNameArgument(int argc, const char** argv, const c
            {
              //    *value =  atoi(argv[tmpIndex +1]);
              sprintf(outname, "%s", argv[tmpIndex +1] );
-
              return true;
            }
+         else
+           {
+             return false;
+           }
        }
     }
   else
index c88258c720f5717a80e6fc30d288767280c31469..41f5c1dee3e55758c17015271dd45b2e24c7c520 100644 (file)
@@ -9,14 +9,36 @@
 #include <cstdlib>
 #include <time.h>
 #include "stdio.h"
+#include <stdexcept>
 
 #define MIN_BUNCH_SIZE 0
 
+void test();
+
+
 using namespace std;
 
+
+
 int main(int argc, const char** argv)
 {
-  
+
+  /*
+  try
+  {
+    test(); 
+  }
+  // catch( bad_alloc &moryAllocationExeption)
+  // catch( bad_alloc)   
+  //  catch(...)   
+  //   catch( exception &e)
+  catch(...)   
+    {
+      std::cerr<<"something bad happened\n";
+      cout << "SEGFAULT" << endl;
+    }
+*/
+
   //  int n_loops = 200000;
   int n_loops = 1;
 
@@ -53,46 +75,52 @@ int main(int argc, const char** argv)
       decoder->Decode();
  
       
-      while(decoder->NextChannel(&altrodata) == true && channelCnt < 10)
+      //while(decoder->NextChannel(&altrodata) == true && channelCnt < 10)
+      while(decoder->NextChannel(&altrodata) == true)
        {
          channelCnt ++;
 
          //      decoder->PrintInfo(altrodata, altrodata.GetDataSize() +4);
-
-         if(  altrodata.GetDataSize() != 0 )
-           {
+         //      if(  altrodata.GetDataSize() != 0 )
+         //        {
+             //   cnt = 0;
              cnt = 0;
              
              while( altrodata.NextBunch(altrobunchPtr) == true)
                {
+                 //      cnt = 0;
                  //              printf("\n");
 
-                 if(altrobunchPtr->GetBunchSize() > MIN_BUNCH_SIZE)
-                   { 
-                     printf("\n");
-                     cout <<"cnt = "<< cnt <<endl;
-                     cout << "altrobunch.fDataSize = "      << altrobunchPtr->GetBunchSize()   << endl;
-                     cout << "altrobunch.fEndTimeBin = "    << altrobunchPtr->GetEndTimeBin()  << endl;
-                     cout << "altrobunch.fStartTimeBin = "  << altrobunchPtr->GetStartTimeBin()  << endl;
-
-                     for(int i=0; i<altrobunchPtr->GetBunchSize() + 20; i++)
+                 //              if(altrobunchPtr->GetBunchSize() > MIN_BUNCH_SIZE)
+                 //                { 
+                 printf("\n");
+                 cout <<"bunchcnt = "<< cnt <<endl;
+                 cout << "altrobunch.fDataSize = "      << altrobunchPtr->GetBunchSize()   << endl;
+                 cout << "altrobunch.fEndTimeBin = "    << altrobunchPtr->GetEndTimeBin()  << endl;
+                 cout << "altrobunch.fStartTimeBin = "  << altrobunchPtr->GetStartTimeBin()  << endl;
+
+                 // for(int i=0; i<altrobunchPtr->GetBunchSize() + 20; i++)
+                 for(int i=0; i<altrobunchPtr->GetBunchSize(); i++)  
+                   {
+                     if(i != 0 && i%4==0)
                        {
-                         if(i != 0 && i%4==0)
-                           {
-                             printf("\n");
-                           }
+                         printf("\n");
+                       }
                          
-                         //                      printf("%d\t", altrobunchPtr->fData[i]);
-                         printf("%d\t", (altrobunchPtr->GetData())[i]); 
+                     //                          printf("%d\t", altrobunchPtr->fData[i]);
+                     printf("%d\t", (altrobunchPtr->GetData())[i]); 
 
-                       }
-                       
-                     printf("\n\n");
                    }
+                       
                  cnt ++; 
+
+                 printf("\n\n");
                }
+             
+             //   cnt ++; 
+             //}
 
-           }
+             //  }
        }
       
     }
@@ -106,7 +134,29 @@ int main(int argc, const char** argv)
   decoder->GetFailureRate();
 
   //  cnt ++;
-  
- return 0;
+  /*
+  try
+    {
+      test(); 
+    }
+  catch
+    {
+      cout << "SEGFAULT" << endl;
+    }
+  */
+
+  return 0;
  
 }  
+
+
+void test()
+{
+  int *tmp;
+
+  for(int i=0; i < 100; i++)
+    {
+      printf("%d\n", tmp[i]);
+    }
+
+}