]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
moving internal initialization and allocation from constructor to DoInit
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 14 Apr 2011 06:11:56 +0000 (06:11 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 14 Apr 2011 06:11:56 +0000 (06:11 +0000)
HLT/CALO/AliHLTCaloRawAnalyzerComponentv3.cxx
HLT/CALO/AliHLTCaloRawAnalyzerComponentv3.h

index e5056daab7b034783b064cfe6327f7191a7c4f6d..4bb830bdb6f6a89a1c3edcedb3c9f89ee8bca355 100644 (file)
@@ -1,3 +1,4 @@
+// $Id$
 
 /**************************************************************************
  * This file is property of and copyright by the ALICE HLT Project        * 
@@ -54,7 +55,8 @@ AliHLTCaloRawAnalyzerComponentv3::AliHLTCaloRawAnalyzerComponentv3(TString det,
                                                                                                     fSanityInspectorPtr(0),
                                                                                                     fRawReaderMemoryPtr(0),
                                                                                                     fAltroRawStreamPtr(0),
-                                                                                                    fAlgorithm(0),  
+                                                                                                    fDetector(det),
+                                                                                                    fAlgorithm(algo),  
                                                                                                     fOffset(0),
                                                                                                     fBunchSizeCut(0),
                                                                                                     fMinPeakPosition(0),
@@ -66,26 +68,12 @@ AliHLTCaloRawAnalyzerComponentv3::AliHLTCaloRawAnalyzerComponentv3(TString det,
 {
   //Constructor
   
-  fAnalyzerPtr = AliCaloRawAnalyzerFactory::CreateAnalyzer(algo);
-  fAnalyzerPtr->SetIsZeroSuppressed(true);
-  fSanityInspectorPtr = new AliHLTCaloSanityInspector();
-  
-  if( fDoPushRawData == true  )
-    {
-      fRawDataWriter  = new RawDataWriter(fCaloConstants); 
-    }
-  fRawReaderMemoryPtr = new AliRawReaderMemory();
-  fAltroRawStreamPtr = new AliCaloRawStreamV3(fRawReaderMemoryPtr, det);  
 }
 
 
 AliHLTCaloRawAnalyzerComponentv3::~AliHLTCaloRawAnalyzerComponentv3()
 {
   //destructor
-  delete fRawReaderMemoryPtr;
-  delete fAltroRawStreamPtr;
-  delete fRawDataWriter;
-  delete fSanityInspectorPtr;
 }
 
 
@@ -131,6 +119,17 @@ AliHLTCaloRawAnalyzerComponentv3::DoInit( int argc, const char** argv )
            AliLog::SetGlobalLogLevel(AliLog::kError);  //PHOS sometimes produces bad data -> Fill up the HLT logs...
        }
     }
+
+  fAnalyzerPtr = AliCaloRawAnalyzerFactory::CreateAnalyzer(fAlgorithm);
+  fAnalyzerPtr->SetIsZeroSuppressed(true);
+  fSanityInspectorPtr = new AliHLTCaloSanityInspector();
+  
+  if( fDoPushRawData == true  )
+    {
+      fRawDataWriter  = new RawDataWriter(fCaloConstants); 
+    }
+  fRawReaderMemoryPtr = new AliRawReaderMemory();
+  fAltroRawStreamPtr = new AliCaloRawStreamV3(fRawReaderMemoryPtr, fDetector);  
  
   return iResult;
 }
@@ -146,6 +145,12 @@ AliHLTCaloRawAnalyzerComponentv3::DoDeinit()
       fAltroRawStreamPtr = 0;
     }
   return 0;
+
+  delete fRawReaderMemoryPtr;
+  delete fAltroRawStreamPtr;
+  delete fRawDataWriter;
+  delete fSanityInspectorPtr;
+
 }
 
 
index 2d8720b26f1b4475dbe556cb7bb313afe0d520e4..2330be251ed568c91ee594c1e3bbf5b225812a7a 100644 (file)
@@ -1,3 +1,5 @@
+//-*- Mode: C++ -*-
+// $Id$
 
 /**************************************************************************
  * This file is property of and copyright by the ALICE HLT Project        * 
@@ -162,6 +164,9 @@ class AliHLTCaloRawAnalyzerComponentv3 :  public AliHLTCaloProcessor, protected
   /** Pointer to the raw stream */
   AliAltroRawStreamV3* fAltroRawStreamPtr;              //!transient
 
+  /** detector */
+  TString fDetector;                                  // detector string id
+
   /** Describing which algorithm we are using */
   Short_t fAlgorithm;                                 //COMMENT
 
@@ -211,7 +216,7 @@ class AliHLTCaloRawAnalyzerComponentv3 :  public AliHLTCaloProcessor, protected
   };
 
   RawDataWriter *fRawDataWriter; 
-  ClassDef(AliHLTCaloRawAnalyzerComponentv3, 1)
+  ClassDef(AliHLTCaloRawAnalyzerComponentv3, 0)
 
 };