]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/AliHLTTPCCalibPedestalComponent.cxx
Remove compilser warnings
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCCalibPedestalComponent.cxx
index 61cea3558fe82c779df8bf12d39bdefc2f615a1f..57287dccc1c039dbc2e9a991b7d246967dc77ca3 100755 (executable)
@@ -45,9 +45,7 @@ using namespace std;
 #include <errno.h>
 #include "TString.h"
 
-// this is a global object used for automatic component registration, do not use this
-AliHLTTPCCalibPedestalComponent gAliHLTTPCCalibPedestalComponent;
-
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCCalibPedestalComponent)
 
 AliHLTTPCCalibPedestalComponent::AliHLTTPCCalibPedestalComponent()
@@ -55,7 +53,10 @@ AliHLTTPCCalibPedestalComponent::AliHLTTPCCalibPedestalComponent()
   fRawReader(NULL),
   fRawStream(NULL),
   fCalibPedestal(NULL),
-  fRCUFormat(kFALSE),
+  // Note: initialization of min and max seems to be in the wrong order but is on
+  // purpose in order to work correctly with the conditional in DoEvent line 221
+  //  if ( patch < fMinPatch ) fMinPatch =  patch;
+  //  if ( patch > fMaxPatch ) fMaxPatch =  patch;
   fMinPatch(5),
   fMaxPatch(0),
   fSpecification(0) ,
@@ -132,11 +133,9 @@ Int_t AliHLTTPCCalibPedestalComponent::ScanArgument( Int_t argc, const char** ar
     else {
       parameter = argv[1];
       if ( parameter.CompareTo("old") == 0 ) {
-       fRCUFormat = kTRUE;
         HLTInfo( "RCU Format is set to old." );
       }
       else if ( parameter.CompareTo("new") == 0 ) {
-       fRCUFormat = kFALSE;
         HLTInfo( "RCU Format is set to new." );
       }
       else {
@@ -169,12 +168,7 @@ Int_t AliHLTTPCCalibPedestalComponent::InitCalibration() {
   if (fRawReader)
     return EINPROGRESS;
 
-#if defined(HAVE_ALIRAWDATA) && defined(HAVE_ALITPCRAWSTREAM_H) 
   fRawReader = new AliRawReaderMemory();
-#else
-  HLTFatal("AliRawReader  not available - check your build");
-  return -ENODEV;
-#endif
 
   return 0;
 }
@@ -193,10 +187,8 @@ Int_t AliHLTTPCCalibPedestalComponent::DeinitCalibration() {
   return 0;
 }
 
-/*
- * --- setter for rcuformat need in AliTPCCalibPedestal class
- */
-Int_t AliHLTTPCCalibPedestalComponent::ProcessCalibration( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/ ) {
+Int_t AliHLTTPCCalibPedestalComponent::ProcessCalibration( const AliHLTComponentEventData& /*evtData*/, 
+                                                          AliHLTComponentTriggerData& /*trigData*/ ) {
   // see header file for class documentation
   
   const AliHLTComponentBlockData* iter = NULL;
@@ -205,17 +197,16 @@ Int_t AliHLTTPCCalibPedestalComponent::ProcessCalibration( const AliHLTComponent
   Int_t ddlId = 0;
     
   // ** Loop over all input blocks and specify which data format should be read - only select Raw Data
-  iter = GetFirstInputBlock( AliHLTTPCDefinitions::fgkDDLPackedRawDataType );
+  iter = GetFirstInputBlock( kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC);
   
   while ( iter != NULL ) {
     
     // ** Print Debug output which data format was received
     //    char tmp1[14], tmp2[14];
-    //DataType2Text( iter->fDataType, tmp1 );
-    //DataType2Text( AliHLTTPCDefinitions::fgkDDLPackedRawDataType, tmp2 );
-
-//     HLTDebug ( "Event received - Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s", 
-//            evtData.fEventID, evtData.fEventID, tmp1, tmp2 );
+    //    DataType2Text( iter->fDataType, tmp1 );
+    //    DataType2Text( AliHLTTPCDefinitions::fgkDDLPackedRawDataType, tmp2 );
+    //    HLTDebug ( "Event received - Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s", 
+    //    evtData.fEventID, evtData.fEventID, tmp1, tmp2 );
 
     // ** Get DDL ID in order to tell the memory reader which slice/patch to use
     slice = AliHLTTPCDefinitions::GetMinSliceNr( *iter );
@@ -235,7 +226,6 @@ Int_t AliHLTTPCCalibPedestalComponent::ProcessCalibration( const AliHLTComponent
     fRawReader->SetEquipmentID(ddlId);
 
     fRawStream = new AliTPCRawStream( fRawReader );
-    fRawStream->SetOldRCUFormat( fRCUFormat );
 
     // ** Process actual Pedestal Calibration - Fill histograms
     fCalibPedestal->ProcessEvent( fRawStream );
@@ -260,7 +250,8 @@ Int_t AliHLTTPCCalibPedestalComponent::ProcessCalibration( const AliHLTComponent
 } // Int_t AliHLTTPCCalibPedestalComponent::ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ) {
 
 
-Int_t AliHLTTPCCalibPedestalComponent::ShipDataToFXS( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/ ) {
+Int_t AliHLTTPCCalibPedestalComponent::ShipDataToFXS( const AliHLTComponentEventData& /*evtData*/, 
+                                                     AliHLTComponentTriggerData& /*trigData*/ ) {
   // see header file for class documentation
     
   if ( fEnableAnalysis )