AliHLTTPCHistogramHandlerComponent: Added general funcionality to handle all histograms.
authorkaamodt <kaamodt@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 1 Sep 2008 09:29:51 +0000 (09:29 +0000)
committerkaamodt <kaamodt@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 1 Sep 2008 09:29:51 +0000 (09:29 +0000)
AliHLTTPCClusterFinder: Added some extra safety checks.
AliHLTTPCZeroSuppressionComponent: Some cleanup. Also added functionality to switch off pushing of the zerosuppressed data to the output(Needed for the active pad selection), and it no longer pushes the list of hardware addresses by default.(have to be switched on via argument)

HLT/TPCLib/AliHLTTPCClusterFinder.cxx
HLT/TPCLib/AliHLTTPCHistogramHandlerComponent.cxx
HLT/TPCLib/AliHLTTPCHistogramHandlerComponent.h
HLT/TPCLib/AliHLTTPCZeroSuppressionComponent.cxx
HLT/TPCLib/AliHLTTPCZeroSuppressionComponent.h

index dce49a7..9f3b09f 100644 (file)
@@ -699,6 +699,15 @@ void AliHLTTPCClusterFinder::ReadDataUnsorted(void* ptr,unsigned long size)
     UInt_t row=fDigitReader->GetRow();
     UInt_t pad=fDigitReader->GetPad();
 
+    if(row>=fRowPadVector.size()){
+      HLTError("Row number is to large: %d, max is %d",row,fRowPadVector.size()-1);
+      continue;
+    }
+    if(pad>=fRowPadVector[row].size()){
+      HLTError("Pad number is to large: %d, max is %d",pad,fRowPadVector[row].size());
+      continue;
+    }
+
     while(fDigitReader->NextBunch()){
       if(fDigitReader->GetBunchSize()>1){//to remove single timebin values, this will have to change at some point
        UInt_t time = fDigitReader->GetTime();
@@ -721,7 +730,9 @@ void AliHLTTPCClusterFinder::ReadDataUnsorted(void* ptr,unsigned long size)
            candidate.fLastMergedPad=pad;
            candidate.fRowNumber=row+fDigitReader->GetRowOffset();
          }
-         fRowPadVector[row][pad]->AddClusterCandidate(candidate);
+         if(fRowPadVector[row][pad] != NULL){
+           fRowPadVector[row][pad]->AddClusterCandidate(candidate);
+         }
        }
       }
     }
index ee207bf..7a8f477 100644 (file)
@@ -45,11 +45,12 @@ using namespace std;
 
 ClassImp(AliHLTTPCHistogramHandlerComponent) //ROOT macro for the implementation of ROOT specific class methods
 
-AliHLTTPCHistogramHandlerComponent::AliHLTTPCHistogramHandlerComponent()
+  AliHLTTPCHistogramHandlerComponent::AliHLTTPCHistogramHandlerComponent()
     :    
     fSpecification(0),
     fNoiseHistograms(0),
     fKryptonHistograms(0),
+    fUseGeneral(kFALSE),
     fSlice(-99),
     
     fHistTH1Tmp(NULL),
@@ -65,7 +66,9 @@ AliHLTTPCHistogramHandlerComponent::AliHLTTPCHistogramHandlerComponent()
     fHistTPCSideAtot(NULL),  
     fHistTPCSideCtot(NULL),   
     fHistTPCSideArms(NULL),  
-    fHistTPCSideCrms(NULL)   
+    fHistTPCSideCrms(NULL),
+
+    fHistogramData()
 {
   // see header file for class documentation
   // or
@@ -75,7 +78,7 @@ AliHLTTPCHistogramHandlerComponent::AliHLTTPCHistogramHandlerComponent()
 }
 
 AliHLTTPCHistogramHandlerComponent::~AliHLTTPCHistogramHandlerComponent() { 
-// see header file for class documentation
+  // see header file for class documentation
 
 }
 
@@ -83,26 +86,26 @@ AliHLTTPCHistogramHandlerComponent::~AliHLTTPCHistogramHandlerComponent() {
 // These functions are required for the registration process
 
 const char* AliHLTTPCHistogramHandlerComponent::GetComponentID() { 
-// see header file for class documentation
+  // see header file for class documentation
 
   return "TPCHistogramHandler";
 }
 
 void AliHLTTPCHistogramHandlerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list) { 
-// see header file for class documentation
+  // see header file for class documentation
 
   list.clear(); 
   list.push_back( kAliHLTDataTypeHistogram );
 }
 
 AliHLTComponentDataType AliHLTTPCHistogramHandlerComponent::GetOutputDataType() { 
-// see header file for class documentation
+  // see header file for class documentation
 
   return kAliHLTDataTypeHistogram;
 }
 
 int AliHLTTPCHistogramHandlerComponent::GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList) { 
-// see header file for class documentation
+  // see header file for class documentation
 
   tgtList.clear();
   tgtList.push_back(kAliHLTDataTypeHistogram);
@@ -110,20 +113,20 @@ int AliHLTTPCHistogramHandlerComponent::GetOutputDataTypes(AliHLTComponentDataTy
 }
 
 void AliHLTTPCHistogramHandlerComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) { 
-// see header file for class documentation
+  // see header file for class documentation
 
   constBase=0;
   inputMultiplier=2.0;
 }
 
 AliHLTComponent* AliHLTTPCHistogramHandlerComponent::Spawn() { 
-// see header file for class documentation
+  // see header file for class documentation
 
   return new AliHLTTPCHistogramHandlerComponent();
 }
        
 int AliHLTTPCHistogramHandlerComponent::DoInit( int argc, const char** argv ) { 
-// see header file for class documentation
+  // see header file for class documentation
 
   Int_t i = 0;
   Char_t* cpErr;
@@ -148,155 +151,165 @@ int AliHLTTPCHistogramHandlerComponent::DoInit( int argc, const char** argv ) {
  
   while ( i < argc ) {      
     if (!strcmp( argv[i], "-sum-noise-histograms")) {
-        fNoiseHistograms = strtoul( argv[i+1], &cpErr ,0);
+      fNoiseHistograms = strtoul( argv[i+1], &cpErr ,0);
             
-    if ( *cpErr ) {
+      if ( *cpErr ) {
         HLTError("Cannot convert sum-noise-histograms specifier '%s'.", argv[i+1]);
         return EINVAL;
-    }
+      }
       i+=2;
       continue;
     }
     
     if (!strcmp( argv[i], "-sum-krypton-histograms")) {
-        fKryptonHistograms = strtoul( argv[i+1], &cpErr ,0);
+      fKryptonHistograms = strtoul( argv[i+1], &cpErr ,0);
             
-    if ( *cpErr ) {
+      if ( *cpErr ) {
         HLTError("Cannot convert sum-krypton-histograms specifier '%s'.", argv[i+1]);
         return EINVAL;
-    }
+      }
       i+=2;
       continue;
     }    
-                  
+
+    if (!strcmp( argv[i], "-use-general")) {
+      fUseGeneral = kTRUE;
+    }
+    
     Logging(kHLTLogError, "HLT::TPCHistogramHandler::DoInit", "Unknown Option", "Unknown option '%s'", argv[i] );
     return EINVAL;
-
+    
   } // end while
   
-  fHistTPCSideAmax = new TH2F("fHistTPCSideAmax","TPC side A (max signal)",250,-250,250,250,-250,250);
-  fHistTPCSideAmax->SetXTitle("global X (cm)"); fHistTPCSideAmax->SetYTitle("global Y (cm)");
-  fHistTPCSideCmax = new TH2F("fHistTPCSideCmax","TPC side C (max signal)",250,-250,250,250,-250,250);
-  fHistTPCSideCmax->SetXTitle("global X (cm)"); fHistTPCSideCmax->SetYTitle("global Y (cm)");
-  fHistTPCSideAtot = new TH2F("fHistTPCSideAtot","TPC side A (total signal)",250,-250,250,250,-250,250);
-  fHistTPCSideAtot->SetXTitle("global X (cm)"); fHistTPCSideAtot->SetYTitle("global Y (cm)");
-  fHistTPCSideCtot = new TH2F("fHistTPCSideCtot","TPC side C (total signal)",250,-250,250,250,-250,250);
-  fHistTPCSideCtot->SetXTitle("global X (cm)"); fHistTPCSideCtot->SetYTitle("global Y (cm)");
-  fHistTPCSideArms = new TH2F("fHistTPCSideArms","TPC side A (baseline RMS)",250,-250,250,250,-250,250);
-  fHistTPCSideArms->SetXTitle("global X (cm)"); fHistTPCSideArms->SetYTitle("global Y (cm)");
-  fHistTPCSideCrms = new TH2F("fHistTPCSideCrms","TPC side C (baseline RMS)",250,-250,250,250,-250,250);
-  fHistTPCSideCrms->SetXTitle("global X (cm)"); fHistTPCSideCrms->SetYTitle("global Y (cm)");
-
+  if(fUseGeneral == kFALSE){
+    fHistTPCSideAmax = new TH2F("fHistTPCSideAmax","TPC side A (max signal)",250,-250,250,250,-250,250);
+    fHistTPCSideAmax->SetXTitle("global X (cm)"); fHistTPCSideAmax->SetYTitle("global Y (cm)");
+    fHistTPCSideCmax = new TH2F("fHistTPCSideCmax","TPC side C (max signal)",250,-250,250,250,-250,250);
+    fHistTPCSideCmax->SetXTitle("global X (cm)"); fHistTPCSideCmax->SetYTitle("global Y (cm)");
+    
+    fHistTPCSideAtot = new TH2F("fHistTPCSideAtot","TPC side A (total signal)",250,-250,250,250,-250,250);
+    fHistTPCSideAtot->SetXTitle("global X (cm)"); fHistTPCSideAtot->SetYTitle("global Y (cm)");
+    fHistTPCSideCtot = new TH2F("fHistTPCSideCtot","TPC side C (total signal)",250,-250,250,250,-250,250);
+    fHistTPCSideCtot->SetXTitle("global X (cm)"); fHistTPCSideCtot->SetYTitle("global Y (cm)");
+    
+    fHistTPCSideArms = new TH2F("fHistTPCSideArms","TPC side A (baseline RMS)",250,-250,250,250,-250,250);
+    fHistTPCSideArms->SetXTitle("global X (cm)"); fHistTPCSideArms->SetYTitle("global Y (cm)");
+    fHistTPCSideCrms = new TH2F("fHistTPCSideCrms","TPC side C (baseline RMS)",250,-250,250,250,-250,250);
+    fHistTPCSideCrms->SetXTitle("global X (cm)"); fHistTPCSideCrms->SetYTitle("global Y (cm)");
+  }
   return 0;
 } // end DoInit()
 
 int AliHLTTPCHistogramHandlerComponent::DoDeinit() { 
-// see header file for class documentation 
+  // see header file for class documentation 
     
-    if(fHistTPCSideAmax){ delete fHistTPCSideAmax; fHistTPCSideAmax=NULL; }
-    if(fHistTPCSideCmax){ delete fHistTPCSideCmax; fHistTPCSideCmax=NULL; }
+  if(fHistTPCSideAmax){ delete fHistTPCSideAmax; fHistTPCSideAmax=NULL; }
+  if(fHistTPCSideCmax){ delete fHistTPCSideCmax; fHistTPCSideCmax=NULL; }
    
-    if(fHistTPCSideAtot){ delete fHistTPCSideAtot; fHistTPCSideAtot=NULL; }
-    if(fHistTPCSideCtot){ delete fHistTPCSideCtot; fHistTPCSideCtot=NULL; }
+  if(fHistTPCSideAtot){ delete fHistTPCSideAtot; fHistTPCSideAtot=NULL; }
+  if(fHistTPCSideCtot){ delete fHistTPCSideCtot; fHistTPCSideCtot=NULL; }
    
-    if(fHistTPCSideArms){ delete fHistTPCSideArms; fHistTPCSideArms=NULL; }
-    if(fHistTPCSideCrms){ delete fHistTPCSideCrms; fHistTPCSideCrms=NULL; }
+  if(fHistTPCSideArms){ delete fHistTPCSideArms; fHistTPCSideArms=NULL; }
+  if(fHistTPCSideCrms){ delete fHistTPCSideCrms; fHistTPCSideCrms=NULL; }
 
-   return 0;
+  return 0;
 }
 
 int AliHLTTPCHistogramHandlerComponent::DoEvent(const AliHLTComponentEventData&/* evtData*/, AliHLTComponentTriggerData& /*trigData*/){
-// see header file for class documentation
+  // see header file for class documentation
 
   HLTInfo("--- Entering DoEvent() in TPCHistogramHandler ---");
   
   if(GetFirstInputBlock( kAliHLTDataTypeSOR ) || GetFirstInputBlock( kAliHLTDataTypeEOR )) return 0;
  
-  fTotalClusterChargeIROCAll = new TH1F("fTotalClusterChargeIROCAll","Total Charge of clusters in all IROC",4000,0,4000);  
-  fTotalClusterChargeOROCAll = new TH1F("fTotalClusterChargeOROCAll","Total Charge of clusters in all OROC",4000,0,4000);
-  fQMaxPartitionAll          = new TH1F("fQMaxPartitionAll",         "QMax for All Partitions",             216,0,216);
-  fPlotQmaxROCAll            = new TH1F("fQMaxROCAll",               "QMax for All ROC",                    72,0,72);
-  fNumberOfClusters          = new TH1F("fNumberOfClusters",         "Total Number of Clusters",            1,0,1);
-    
-//   fHistTH2Tmp = new TH2F("fHistTH2Tmp","fHistTH2Tmp",250,-250,250,250,-250,250);    
-//   fHistTPCSideA = new TH2F("fHistTPCSideA","TPC side A (max signal)",250,-250,250,250,-250,250);
-//   fHistTPCSideA->SetXTitle("global X (cm)"); fHistTPCSideA->SetYTitle("global Y (cm)");
-//   fHistTPCSideC = new TH2F("fHistTPCSideC","TPC side C (max signal)",250,-250,250,250,-250,250);
-//   fHistTPCSideC->SetXTitle("global X (cm)"); fHistTPCSideC->SetYTitle("global Y (cm)");
+  if(fUseGeneral == kFALSE){
+    fTotalClusterChargeIROCAll = new TH1F("fTotalClusterChargeIROCAll","Total Charge of clusters in all IROC",4000,0,4000);  
+    fTotalClusterChargeOROCAll = new TH1F("fTotalClusterChargeOROCAll","Total Charge of clusters in all OROC",4000,0,4000);
+    fQMaxPartitionAll          = new TH1F("fQMaxPartitionAll",         "QMax for All Partitions",             216,0,216);
+    fPlotQmaxROCAll            = new TH1F("fQMaxROCAll",               "QMax for All ROC",                    72,0,72);
+    fNumberOfClusters          = new TH1F("fNumberOfClusters",         "Total Number of Clusters",            1,0,1);
+    }    
+  //   fHistTH2Tmp = new TH2F("fHistTH2Tmp","fHistTH2Tmp",250,-250,250,250,-250,250);    
+  //   fHistTPCSideA = new TH2F("fHistTPCSideA","TPC side A (max signal)",250,-250,250,250,-250,250);
+  //   fHistTPCSideA->SetXTitle("global X (cm)"); fHistTPCSideA->SetYTitle("global Y (cm)");
+  //   fHistTPCSideC = new TH2F("fHistTPCSideC","TPC side C (max signal)",250,-250,250,250,-250,250);
+  //   fHistTPCSideC->SetXTitle("global X (cm)"); fHistTPCSideC->SetYTitle("global Y (cm)");
   
+
+  
+
   const TObject *iter = NULL;  
         
   for(iter = GetFirstInputObject(kAliHLTDataTypeHistogram|kAliHLTDataOriginTPC); iter != NULL; iter = GetNextInputObject()){
   
 
-//      HLTInfo("Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s", 
-//               evtData.fEventID, evtData.fEventID,
-//               DataType2Text(GetDataType(iter)).c_str(), 
-//               DataType2Text(kAliHLTDataTypeHistogram | kAliHLTDataOriginTPC).c_str());
+    //      HLTInfo("Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s", 
+    //               evtData.fEventID, evtData.fEventID,
+    //               DataType2Text(GetDataType(iter)).c_str(), 
+    //               DataType2Text(kAliHLTDataTypeHistogram | kAliHLTDataOriginTPC).c_str());
    
-//      if (GetDataType(iter) == (kAliHLTDataTypeHistogram | kAliHLTDataOriginTPC) && GetEventCount()<2){
-//          HLTWarning("data type %s is depricated, use %s (kAliHLTDataTypeHistogram)!", 
-//      DataType2Text(kAliHLTDataTypeHistogram).c_str(),
-//          DataType2Text(kAliHLTDataTypeHistogram | kAliHLTDataOriginTPC).c_str());
-//      }      
+    //      if (GetDataType(iter) == (kAliHLTDataTypeHistogram | kAliHLTDataOriginTPC) && GetEventCount()<2){
+    //          HLTWarning("data type %s is depricated, use %s (kAliHLTDataTypeHistogram)!", 
+    //          DataType2Text(kAliHLTDataTypeHistogram).c_str(),
+    //          DataType2Text(kAliHLTDataTypeHistogram | kAliHLTDataOriginTPC).c_str());
+    //      }      
      
-     if (GetDataType(iter) != (kAliHLTDataTypeHistogram | kAliHLTDataOriginTPC)) continue;
+    if (GetDataType(iter) != (kAliHLTDataTypeHistogram | kAliHLTDataOriginTPC)) continue;
          
-     // Summing the output histograms of the AliHLTTPCNoiseMapComponent (from partition to TPC sides)
-     if(fNoiseHistograms){  
+    // Summing the output histograms of the AliHLTTPCNoiseMapComponent (from partition to TPC sides)
+
+    if(fUseGeneral == kFALSE){
+      if(fNoiseHistograms){  
         
        //fHistTH2Tmp = new TH2F("fHistTH2Tmp","fHistTH2Tmp",250,-250,250,250,-250,250);        
-        fHistTH2Tmp = (TH2F*)iter;
-        TString histName = fHistTH2Tmp->GetName();
+       fHistTH2Tmp = (TH2F*)iter;
+       TString histName = fHistTH2Tmp->GetName();
         
        UInt_t minSlice     = AliHLTTPCDefinitions::GetMinSliceNr(GetSpecification(iter)); 
-        UInt_t maxSlice     = AliHLTTPCDefinitions::GetMaxSliceNr(GetSpecification(iter)); 
-        UInt_t minPartition = AliHLTTPCDefinitions::GetMinPatchNr(GetSpecification(iter)); 
-        UInt_t maxPartition = AliHLTTPCDefinitions::GetMaxPatchNr(GetSpecification(iter)); 
-       
-        if((minSlice!=maxSlice) || (minPartition!=maxPartition)){
-            HLTWarning("TPCHistogramHandler::The Noise Map component is not running on partition level!");
-        }
-
-        // minSlice=maxSlice, when the Noise Map component runs on partition level (as it should)
+       UInt_t maxSlice     = AliHLTTPCDefinitions::GetMaxSliceNr(GetSpecification(iter)); 
+       UInt_t minPartition = AliHLTTPCDefinitions::GetMinPatchNr(GetSpecification(iter)); 
+       UInt_t maxPartition = AliHLTTPCDefinitions::GetMaxPatchNr(GetSpecification(iter)); 
+       
+       if((minSlice!=maxSlice) || (minPartition!=maxPartition)){
+         HLTWarning("TPCHistogramHandler::The Noise Map component is not running on partition level!");
+       }
+       
+       // minSlice=maxSlice, when the Noise Map component runs on partition level (as it should)
         
        if(minSlice<18){ 
-          if     (histName=="fHistMaxSignal") fHistTPCSideAmax->Add(fHistTPCSideAmax,fHistTH2Tmp,1,1); 
-          else if(histName=="fHistTotSignal") fHistTPCSideAtot->Add(fHistTPCSideAtot,fHistTH2Tmp,1,1);
-          else if(histName=="fHistPadRMS")    fHistTPCSideArms->Add(fHistTPCSideArms,fHistTH2Tmp,1,1);
-          else continue;
+         if     (histName=="fHistMaxSignal") fHistTPCSideAmax->Add(fHistTPCSideAmax,fHistTH2Tmp,1,1); 
+         else if(histName=="fHistTotSignal") fHistTPCSideAtot->Add(fHistTPCSideAtot,fHistTH2Tmp,1,1);
+         else if(histName=="fHistPadRMS")    fHistTPCSideArms->Add(fHistTPCSideArms,fHistTH2Tmp,1,1);
+         else continue;
        }
        else{ 
-          if     (histName=="fHistMaxSignal") fHistTPCSideCmax->Add(fHistTPCSideCmax,fHistTH2Tmp,1,1);
-          else if(histName=="fHistTotSignal") fHistTPCSideCtot->Add(fHistTPCSideCtot,fHistTH2Tmp,1,1);
-          else if(histName=="fHistPadRMS")    fHistTPCSideCrms->Add(fHistTPCSideCrms,fHistTH2Tmp,1,1);
-          else continue;
+         if     (histName=="fHistMaxSignal") fHistTPCSideCmax->Add(fHistTPCSideCmax,fHistTH2Tmp,1,1);
+         else if(histName=="fHistTotSignal") fHistTPCSideCtot->Add(fHistTPCSideCtot,fHistTH2Tmp,1,1);
+         else if(histName=="fHistPadRMS")    fHistTPCSideCrms->Add(fHistTPCSideCrms,fHistTH2Tmp,1,1);
+         else continue;
        }
-     } // endif fNoiseHistograms==kTRUE   
-     
-     
-     // Summing the output of AliHLTTPCClusterHistoComponent
-     if(fKryptonHistograms){
-       Int_t thisrow=-1,thissector=-1,row=-1;
-       
-       AliHLTUInt8_t slice = AliHLTTPCDefinitions::GetMinSliceNr(GetSpecification(iter));
-       AliHLTUInt8_t patch = AliHLTTPCDefinitions::GetMinPatchNr(GetSpecification(iter));
-       row = AliHLTTPCTransform::GetFirstRow(patch); 
-       AliHLTTPCTransform::Slice2Sector(slice,row,thissector,thisrow);
-       
-       fHistTH1Tmp = (TH1F*)iter;      
-       //cout << fHistTH1Tmp->GetName() << "\t" << fHistTH1Tmp->GetEntries() << endl;
-       
+      } // endif fNoiseHistograms==kTRUE   
+      
+      
+      // Summing the output of AliHLTTPCClusterHistoComponent
+      if(fKryptonHistograms){
+       Int_t thisrow=-1,thissector=-1,row=-1;
+       
+       AliHLTUInt8_t slice = AliHLTTPCDefinitions::GetMinSliceNr(GetSpecification(iter));
+       AliHLTUInt8_t patch = AliHLTTPCDefinitions::GetMinPatchNr(GetSpecification(iter));
+       row = AliHLTTPCTransform::GetFirstRow(patch); 
+       AliHLTTPCTransform::Slice2Sector(slice,row,thissector,thisrow);
+       
+       fHistTH1Tmp = (TH1F*)iter;      
+       //cout << fHistTH1Tmp->GetName() << "\t" << fHistTH1Tmp->GetEntries() << endl;
+       
        TString name = fHistTH1Tmp->GetName();
-               
+       
        if(name=="fTotalClusterChargeIROCAll"){
-          fTotalClusterChargeIROCAll->Add(fTotalClusterChargeIROCAll,fHistTH1Tmp,1,1);
+         fTotalClusterChargeIROCAll->Add(fTotalClusterChargeIROCAll,fHistTH1Tmp,1,1);
        } 
        else if(name=="fTotalClusterChargeOROCAll"){
-          fTotalClusterChargeOROCAll->Add(fTotalClusterChargeOROCAll,fHistTH1Tmp,1,1);
+         fTotalClusterChargeOROCAll->Add(fTotalClusterChargeOROCAll,fHistTH1Tmp,1,1);
        } 
        else if(name=="fQMaxPartitionAll"){
          for(Int_t t=0;t<216;t++){
@@ -319,65 +332,111 @@ int AliHLTTPCHistogramHandlerComponent::DoEvent(const AliHLTComponentEventData&/
          HLTWarning("No histogram names match. %s",name.Data());
          continue;
        }     
-     } //endif fKryptonHistograms==kTRUE
-                
+      } //endif fKryptonHistograms==kTRUE
+    }
+    else{ // means fUseGeneral ==kTRUE
+      TH1 * tmp = (TH1*)iter;
+      TString histName = tmp->GetName();
+      UInt_t minSlice     = AliHLTTPCDefinitions::GetMinSliceNr(GetSpecification(iter)); 
+      UInt_t maxSlice     = AliHLTTPCDefinitions::GetMaxSliceNr(GetSpecification(iter)); 
+      UInt_t minPartition = AliHLTTPCDefinitions::GetMinPatchNr(GetSpecification(iter)); 
+      UInt_t maxPartition = AliHLTTPCDefinitions::GetMaxPatchNr(GetSpecification(iter)); 
+      
+      Bool_t histogramNotAdded = kTRUE;
+
+      for(UInt_t i=0;i<fHistogramData.size();i++){
+       if(histName.CompareTo(fHistogramData.at(i).fHistogram->GetName())){
+         if(minSlice==fHistogramData.at(i).fMinSlice && maxSlice == fHistogramData.at(i).fMaxSlice){
+           if(minPartition==fHistogramData.at(i).fMinPartition && maxPartition == fHistogramData.at(i).fMaxPartition){
+             fHistogramData.at(i).fHistogram->Add(tmp);
+             histogramNotAdded = kFALSE;
+             break;
+           }
+           else{
+             HLTWarning("Histogram with same name does not have the same partition specification");
+           }
+         }
+         else{
+           HLTWarning("Histogram with same name does not have the same slice specification");
+         }
+       }
+      }
+
+      if(histogramNotAdded == kTRUE){
+       AliHLTHistogramData  histogramData;
+       histogramData.fHistogram = tmp;
+       histogramData.fMinSlice = minSlice;
+       histogramData.fMaxSlice = maxSlice;
+       histogramData.fMinPartition = minPartition;
+       histogramData.fMaxPartition = maxPartition;
+       fHistogramData.push_back(histogramData);
+      }
+    }
+    
   } // end for loop over histogram blocks
   
   MakeHistosPublic();
   return 0;
 } // end DoEvent()
-
+  
 void AliHLTTPCHistogramHandlerComponent::MakeHistosPublic() {
-// see header file for class documentation
+  // see header file for class documentation
 
-  if(fNoiseHistograms){ 
-    PushBack((TObject*)fHistTPCSideAmax,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification( 0,17,0,5));
-    PushBack((TObject*)fHistTPCSideCmax,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(18,35,0,5));
-  
-    PushBack((TObject*)fHistTPCSideAtot,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification( 0,17,0,5));
-    PushBack((TObject*)fHistTPCSideCtot,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(18,35,0,5));
+  if(fUseGeneral == kFALSE){
+    if(fNoiseHistograms){ 
+      PushBack((TObject*)fHistTPCSideAmax,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification( 0,17,0,5));
+      PushBack((TObject*)fHistTPCSideCmax,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(18,35,0,5));
+      
+      PushBack((TObject*)fHistTPCSideAtot,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification( 0,17,0,5));
+      PushBack((TObject*)fHistTPCSideCtot,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(18,35,0,5));
+      
+      PushBack((TObject*)fHistTPCSideArms,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification( 0,17,0,5));
+      PushBack((TObject*)fHistTPCSideCrms,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(18,35,0,5));
+      
+      //if(fHistTH2Tmp)  { delete fHistTH2Tmp;   fHistTH2Tmp=NULL;   }
+      //     if(fHistTPCSideA){ delete fHistTPCSideA; fHistTPCSideA=NULL; }
+      //     if(fHistTPCSideC){ delete fHistTPCSideC; fHistTPCSideC=NULL; }
+    }  
     
-    PushBack((TObject*)fHistTPCSideArms,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification( 0,17,0,5));
-    PushBack((TObject*)fHistTPCSideCrms,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(18,35,0,5));
-
-    //if(fHistTH2Tmp)  { delete fHistTH2Tmp;   fHistTH2Tmp=NULL;   }
-//     if(fHistTPCSideA){ delete fHistTPCSideA; fHistTPCSideA=NULL; }
-//     if(fHistTPCSideC){ delete fHistTPCSideC; fHistTPCSideC=NULL; }
-  }  
-  
-  if(fKryptonHistograms){
-     PushBack((TObject*)fTotalClusterChargeIROCAll,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(0,17,0,1));
-     PushBack((TObject*)fTotalClusterChargeOROCAll,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(0,17,2,5));
-     PushBack((TObject*)fQMaxPartitionAll,        kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(0,35,0,5));
-     PushBack((TObject*)fPlotQmaxROCAll,          kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(0,35,0,5));
-     PushBack((TObject*)fNumberOfClusters,        kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(0,35,0,5));
-          
-     if(fTotalClusterChargeIROCAll){ delete fTotalClusterChargeIROCAll; fTotalClusterChargeIROCAll=NULL; }
-     if(fTotalClusterChargeOROCAll){ delete fTotalClusterChargeOROCAll; fTotalClusterChargeOROCAll=NULL; }
-     if(fQMaxPartitionAll)         { delete fQMaxPartitionAll;          fQMaxPartitionAll=NULL;          }
-     if(fPlotQmaxROCAll)           { delete fPlotQmaxROCAll;            fPlotQmaxROCAll=NULL;            }
-     if(fNumberOfClusters)         { delete fNumberOfClusters;          fNumberOfClusters=NULL;          }
-     if(fHistTH1Tmp)               { delete fHistTH1Tmp;                fHistTH1Tmp=NULL;                }
+    if(fKryptonHistograms){
+      PushBack((TObject*)fTotalClusterChargeIROCAll,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(0,17,0,1));
+      PushBack((TObject*)fTotalClusterChargeOROCAll,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(0,17,2,5));
+      PushBack((TObject*)fQMaxPartitionAll,       kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(0,35,0,5));
+      PushBack((TObject*)fPlotQmaxROCAll,         kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(0,35,0,5));
+      PushBack((TObject*)fNumberOfClusters,       kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(0,35,0,5));
+      
+      if(fTotalClusterChargeIROCAll){ delete fTotalClusterChargeIROCAll; fTotalClusterChargeIROCAll=NULL; }
+      if(fTotalClusterChargeOROCAll){ delete fTotalClusterChargeOROCAll; fTotalClusterChargeOROCAll=NULL; }
+      if(fQMaxPartitionAll)         { delete fQMaxPartitionAll;          fQMaxPartitionAll=NULL;          }
+      if(fPlotQmaxROCAll)           { delete fPlotQmaxROCAll;            fPlotQmaxROCAll=NULL;            }
+      if(fNumberOfClusters)         { delete fNumberOfClusters;          fNumberOfClusters=NULL;          }
+      if(fHistTH1Tmp)               { delete fHistTH1Tmp;                fHistTH1Tmp=NULL;                }
+    }
   }
-//  TObjArray histos;
+  else{ // means fUseGeneral == kTRUE
+    for(UInt_t i=0;i<fHistogramData.size();i++){
+      PushBack((TObject*)fHistogramData.at(i).fHistogram,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification( 
+               fHistogramData.at(i).fMinSlice,fHistogramData.at(i).fMaxSlice,fHistogramData.at(i).fMinPartition,fHistogramData.at(i).fMaxPartition));
+    }
+  }
+  //  TObjArray histos;
    
-//   if(fPlotSideA) histos.Add(fHistSideA);
-//   if(fPlotSideC) histos.Add(fHistSideC);
-//   if(fApplyNoiseMap) histos.Add(fHistCDBMap);
-//   
-//   TIter iterator(&histos);
-//   while(TObject *pObj=iterator.Next()){
-//   
-//         PushBack(pObj, kAliHLTDataTypeHistogram|kAliHLTDataOriginTPC, fSpecification);
-//   }
-//   
-//   
-//   //PushBack( (TObject*) &histos, kAliHLTDataTypeHistogram, fSpecification);    
+  //   if(fPlotSideA) histos.Add(fHistSideA);
+  //   if(fPlotSideC) histos.Add(fHistSideC);
+  //   if(fApplyNoiseMap) histos.Add(fHistCDBMap);
+  //   
+  //   TIter iterator(&histos);
+  //   while(TObject *pObj=iterator.Next()){
+  //   
+  //         PushBack(pObj, kAliHLTDataTypeHistogram|kAliHLTDataOriginTPC, fSpecification);
+  //   }
+  //   
+  //   
+  //   //PushBack( (TObject*) &histos, kAliHLTDataTypeHistogram, fSpecification);    
 }
 
 int AliHLTTPCHistogramHandlerComponent::Configure(const char* arguments) { 
-// see header file for class documentation
+  // see header file for class documentation
   
   int iResult=0;
   if (!arguments) return iResult;
@@ -421,14 +480,14 @@ int AliHLTTPCHistogramHandlerComponent::Configure(const char* arguments) {
 }
 
 int AliHLTTPCHistogramHandlerComponent::Reconfigure(const char* cdbEntry, const char* chainId) { 
-// see header file for class documentation
+  // see header file for class documentation
 
   int iResult=0;
   const char* path="HLT/ConfigTPC/TPCHistogramHandlerComponent";
   const char* defaultNotify="";
   if (cdbEntry) {
-      path=cdbEntry;
-      defaultNotify=" (default)";
+    path=cdbEntry;
+    defaultNotify=" (default)";
   }
   
   if (path) {
index bfdffcc..492596f 100644 (file)
@@ -5,14 +5,14 @@
 #define ALIHLTTPCHISTOGRAMHANDLERCOMPONENT_H
 
 //* This file is property of and copyright by the ALICE HLT Project        * 
-//* ALICE Experiment at CERN, All rights reserved.                         *
-//* See cxx source for full Copyright notice                               *
+  //* ALICE Experiment at CERN, All rights reserved.                         *
+    //* See cxx source for full Copyright notice                               *
 
-/** @file   AliHLTTPCHistogramHandlerComponent.h
-    @author Kalliopi Kanaki
-    @date   
-    @brief  Component for acting upon histograms
-*/
+    /** @file   AliHLTTPCHistogramHandlerComponent.h
+       @author Kalliopi Kanaki
+       @date   
+       @brief  Component for acting upon histograms
+    */
 
 // see below for class documentation
 // or
@@ -21,6 +21,7 @@
 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
 
 #include "AliHLTProcessor.h"
+#include <vector>
 
 class TH1;
 class TH2;
@@ -41,79 +42,92 @@ class TH2;
  */
 class AliHLTTPCHistogramHandlerComponent : public AliHLTProcessor {
     
-   public:
-   
-   /** standard constructor */    
-   AliHLTTPCHistogramHandlerComponent();           
-   /** destructor */
-   virtual ~AliHLTTPCHistogramHandlerComponent();
-
-      // Public functions to implement AliHLTComponent's interface.
-      // These functions are required for the registration process
+public:
+  struct AliHLTHistogramData
+  {
+    TH1 *fHistogram;
+    UInt_t fMinSlice;
+    UInt_t fMaxSlice;
+    UInt_t fMinPartition;
+    UInt_t fMaxPartition;
+  };
+  typedef struct AliHLTHistogramData AliHLTHistogramData; //!
+
+  /** standard constructor */    
+  AliHLTTPCHistogramHandlerComponent();           
+  /** destructor */
+  virtual ~AliHLTTPCHistogramHandlerComponent();
+
+  // Public functions to implement AliHLTComponent's interface.
+  // These functions are required for the registration process
       
-      /** interface function, see @ref AliHLTComponent for description */
-      const char* GetComponentID();                                                         
-      /** interface function, see @ref AliHLTComponent for description */
-      void GetInputDataTypes( vector<AliHLTComponentDataType>& list);                       
-      /** interface function, see @ref AliHLTComponent for description */
-      AliHLTComponentDataType GetOutputDataType();                                          
-      /** interface function, see @ref AliHLTComponent for description */
-      int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);                       
-      /** interface function, see @ref AliHLTComponent for description */
-      virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); 
-      /** interface function, see @ref AliHLTComponent for description */
-      AliHLTComponent* Spawn();                                                           
-      /** function for acting on the saving and cleaning histograms, after they are filled */
-      void MakeHistosPublic();
-
-   protected:
+  /** interface function, see @ref AliHLTComponent for description */
+  const char* GetComponentID();                                                             
+  /** interface function, see @ref AliHLTComponent for description */
+  void GetInputDataTypes( vector<AliHLTComponentDataType>& list);                           
+  /** interface function, see @ref AliHLTComponent for description */
+  AliHLTComponentDataType GetOutputDataType();                                      
+  /** interface function, see @ref AliHLTComponent for description */
+  int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);                           
+  /** interface function, see @ref AliHLTComponent for description */
+  virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); 
+  /** interface function, see @ref AliHLTComponent for description */
+  AliHLTComponent* Spawn();                                                       
+  /** function for acting on the saving and cleaning histograms, after they are filled */
+  void MakeHistosPublic();
+
+protected:
        
-      // Protected functions to implement AliHLTComponent's interface.
-      // These functions provide initialization as well as the actual processing capabilities of the component. 
+  // Protected functions to implement AliHLTComponent's interface.
+  // These functions provide initialization as well as the actual processing capabilities of the component. 
 
-      int DoInit( int argc, const char** argv );
-      int DoDeinit();
-      int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData );
-      int Reconfigure(const char* cdbEntry, const char* chainId);
+  int DoInit( int argc, const char** argv );
+  int DoDeinit();
+  int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData );
+  int Reconfigure(const char* cdbEntry, const char* chainId);
 
-      using AliHLTProcessor::DoEvent;
+  using AliHLTProcessor::DoEvent;
 
-   private:
+private:
    
-      int Configure(const char* arguments);
+  int Configure(const char* arguments);
           
-      /** copy constructor prohibited */
-      AliHLTTPCHistogramHandlerComponent(const AliHLTTPCHistogramHandlerComponent&);
+  /** copy constructor prohibited */
+  AliHLTTPCHistogramHandlerComponent(const AliHLTTPCHistogramHandlerComponent&);
 
-      /** assignment operator prohibited */
-      AliHLTTPCHistogramHandlerComponent& operator=(const AliHLTTPCHistogramHandlerComponent&);
+  /** assignment operator prohibited */
+  AliHLTTPCHistogramHandlerComponent& operator=(const AliHLTTPCHistogramHandlerComponent&);
 
-      /** the reader object for data decoding */
-      AliHLTUInt32_t fSpecification;  //!transient
+  /** the reader object for data decoding */
+  AliHLTUInt32_t fSpecification;  //!transient
       
+
+  
       
-      Bool_t fNoiseHistograms;   //!transient
-      Bool_t fKryptonHistograms; //!transient
+  Bool_t fNoiseHistograms;   //!transient
+  Bool_t fKryptonHistograms; //!transient
+  Bool_t fUseGeneral;        //!transient
       
-      Int_t fSlice;  //!transient
+  Int_t fSlice;  //!transient
       
-      TH1 *fHistTH1Tmp;                //!transient  
-      TH1 *fTotalClusterChargeIROCAll; //!transient
-      TH1 *fTotalClusterChargeOROCAll; //!transient
-      TH1 *fQMaxPartitionAll;          //!transient
-      TH1 *fPlotQmaxROCAll;            //!transient
-      TH1 *fNumberOfClusters;          //!transient
-            
-      TH2 *fHistTH2Tmp;    //!transient
-      TH2 *fHistTPCSideAmax;  //!transient     
-      TH2 *fHistTPCSideCmax;  //!transient  
-      TH2 *fHistTPCSideAtot;  //!transient     
-      TH2 *fHistTPCSideCtot;  //!transient  
-      TH2 *fHistTPCSideArms;  //!transient     
-      TH2 *fHistTPCSideCrms;  //!transient  
-
+  TH1 *fHistTH1Tmp;                //!transient  
+  TH1 *fTotalClusterChargeIROCAll; //!transient
+  TH1 *fTotalClusterChargeOROCAll; //!transient
+  TH1 *fQMaxPartitionAll;          //!transient
+  TH1 *fPlotQmaxROCAll;            //!transient
+  TH1 *fNumberOfClusters;          //!transient
             
-      ClassDef(AliHLTTPCHistogramHandlerComponent, 2)
-    };
+  TH2 *fHistTH2Tmp;    //!transient
+  TH2 *fHistTPCSideAmax;  //!transient 
+  TH2 *fHistTPCSideCmax;  //!transient  
+  TH2 *fHistTPCSideAtot;  //!transient 
+  TH2 *fHistTPCSideCtot;  //!transient  
+  TH2 *fHistTPCSideArms;  //!transient 
+  TH2 *fHistTPCSideCrms;  //!transient  
+
+  vector<AliHLTHistogramData> fHistogramData;
+  
+  ClassDef(AliHLTTPCHistogramHandlerComponent, 3)
+};
 
 #endif
index 7f1f73d..5bb6e0f 100755 (executable)
@@ -68,6 +68,8 @@ AliHLTTPCZeroSuppressionComponent::AliHLTTPCZeroSuppressionComponent()
     fLeftTimeBin(5),
     fRightTimeBin(5),
     fGetActivePads(kFALSE),
+    fSkipSendingZSData(kFALSE),
+    fSendHWList(kFALSE),
     fHwAddressList()
 {
   // see header file for class documentation
@@ -149,7 +151,7 @@ int AliHLTTPCZeroSuppressionComponent::DoInit( int argc, const char** argv )
   while ( i < argc ) {      
 
     // -- zero suppression threshold
-    if ( !strcmp( argv[i], "signal-threshold" ) ) {
+    if ( !strcmp( argv[i], "-signal-threshold" ) || !strcmp( argv[i], "signal-threshold" ) ) {
       fSignalThreshold = strtoul( argv[i+1], &cpErr ,0);
       if ( *cpErr ) {
        HLTError("Cannot convert signal-threshold specifier '%s'.", argv[i+1]);
@@ -160,7 +162,7 @@ int AliHLTTPCZeroSuppressionComponent::DoInit( int argc, const char** argv )
     }
 
     // -- checking for nsigma-threshold, used in 2007 December run in ZeroSuppression
-    if ( !strcmp( argv[i], "rms-threshold" ) ) {
+    if ( !strcmp( argv[i], "-rms-threshold" ) ||  !strcmp( argv[i], "rms-threshold" ) ) {
       fNRMSThreshold = strtoul( argv[i+1], &cpErr ,0);
       if ( *cpErr ){
        HLTError("Cannot convert rms-threshold specifier '%s'. Must be integer", argv[i+1]);
@@ -171,7 +173,7 @@ int AliHLTTPCZeroSuppressionComponent::DoInit( int argc, const char** argv )
     }
 
     // -- number of timebins
-    if ( !strcmp( argv[i], "ntimebins" ) ) {
+    if ( !strcmp( argv[i], "-ntimebins" ) || !strcmp( argv[i], "ntimebins" ) ) {
       fNTimeBins = strtoul( argv[i+1], &cpErr ,0);
       if ( *cpErr ) {
        HLTError("Cannot convert ntimebins specifier '%s'.", argv[i+1]);
@@ -182,7 +184,7 @@ int AliHLTTPCZeroSuppressionComponent::DoInit( int argc, const char** argv )
     }
 
     // -- first timebin
-    if ( !strcmp( argv[i], "start-timebin" ) ) {
+    if ( !strcmp( argv[i], "-start-timebin" ) || !strcmp( argv[i], "start-timebin" ) ) {
       fStartTimeBin = strtoul( argv[i+1], &cpErr ,0);
       if ( *cpErr ) {
        HLTError("Cannot convert start-timebin specifier '%s'.", argv[i+1]);
@@ -193,7 +195,7 @@ int AliHLTTPCZeroSuppressionComponent::DoInit( int argc, const char** argv )
     }
 
     // -- last timebin
-    if ( !strcmp( argv[i], "end-timebin" ) ) {
+    if ( !strcmp( argv[i], "-end-timebin" ) || !strcmp( argv[i], "end-timebin" ) ) {
       if(strtoul( argv[i+1], &cpErr ,0)<=(UInt_t)AliHLTTPCTransform::GetNTimeBins()){
        fEndTimeBin = strtoul( argv[i+1], &cpErr ,0);
       }
@@ -206,7 +208,7 @@ int AliHLTTPCZeroSuppressionComponent::DoInit( int argc, const char** argv )
     }
 
     // -- timebins to keep left of signal
-    if ( !strcmp( argv[i], "timebin-left" ) ) {
+    if ( !strcmp( argv[i], "-timebin-left" ) || !strcmp( argv[i], "timebin-left" ) ) {
       fLeftTimeBin = strtoul( argv[i+1], &cpErr ,0);
       if ( *cpErr ) {
        HLTError("Cannot convert timebin-left specifier '%s'.", argv[i+1]);
@@ -217,7 +219,7 @@ int AliHLTTPCZeroSuppressionComponent::DoInit( int argc, const char** argv )
     }
 
     // -- timebin to keep right of signal
-    if ( !strcmp( argv[i], "timebin-right" ) ) {
+    if ( !strcmp( argv[i], "-timebin-right" ) || !strcmp( argv[i], "timebin-right" ) ) {
       fRightTimeBin = strtoul( argv[i+1], &cpErr ,0);
       if ( *cpErr ) {
        HLTError("Cannot convert timebin-right specifier '%s'.", argv[i+1]);
@@ -228,7 +230,7 @@ int AliHLTTPCZeroSuppressionComponent::DoInit( int argc, const char** argv )
     }
 
     // -- value below average to subtract
-    if ( !strcmp( argv[i], "value-below-average" ) ) {
+    if ( !strcmp( argv[i], "-value-below-average" ) || !strcmp( argv[i], "value-below-average" ) ) {
       fValueBelowAverage = strtoul( argv[i+1], &cpErr ,0);
       if ( *cpErr ) {
        HLTError("Cannot convert value-below-average specifier '%s'.", argv[i+1]);
@@ -239,7 +241,7 @@ int AliHLTTPCZeroSuppressionComponent::DoInit( int argc, const char** argv )
     }
 
     // -- pad occupancy limit
-    if ( !strcmp( argv[i], "occupancy-limit" ) ) {
+    if ( !strcmp( argv[i], "-occupancy-limit" ) || !strcmp( argv[i], "occupancy-limit" ) ) {
       fMinimumNumberOfSignals = strtoul( argv[i+1], &cpErr ,0);
       if ( *cpErr ) {
        HLTError("Cannot convert occupancy-limit specifier '%s'.", argv[i+1]);
@@ -260,8 +262,8 @@ int AliHLTTPCZeroSuppressionComponent::DoInit( int argc, const char** argv )
       continue;
     }
 
-    // -- checking for rcu format
-    if ( !strcmp( argv[i], "sort-pads" ) ) {
+    // -- checking for pad sorting
+    if ( !strcmp( argv[i], "-sort-pads" ) || !strcmp( argv[i], "sort-pads" ) ) {
       fSortPads = strtoul( argv[i+1], &cpErr ,0);
       if ( *cpErr ){
        HLTError("Cannot convert sort-pads specifier '%s'. Should  be 0(off) or 1(on), must be integer", argv[i+1]);
@@ -270,12 +272,26 @@ int AliHLTTPCZeroSuppressionComponent::DoInit( int argc, const char** argv )
       i+=2;
       continue;
     }
+
+    // -- checking for skipZSdatashipping
+    if ( !strcmp( argv[i], "-skip-sending-data" ) ) {
+      fSkipSendingZSData = kTRUE;
+    }
+
+    // -- checking for hw address shipping
+    if ( !strcmp( argv[i], "-send-hw-list" ) ) {
+      fSendHWList = kTRUE;
+    }
       
     Logging(kHLTLogError, "HLT::TPCClusterFinder::DoInit", "Unknown Option", "Unknown option '%s'", argv[i] );
     return EINVAL;
 
   }
 
+  if(fSkipSendingZSData == kTRUE && fSendHWList == kFALSE){
+    HLTError("Component will have no output, check your configuration.");
+  }
+
   HLTDebug("using AliHLTTPCDigitReaderDecoder");
   fDigitReader = new AliHLTTPCDigitReaderDecoder();
 
@@ -464,40 +480,50 @@ int AliHLTTPCZeroSuppressionComponent::DoEvent( const AliHLTComponentEventData&
       return -ENOSPC;
     }
 
-    //Push back the zerosuppressed altro data to the output
-    AliHLTComponentBlockData bd;
-    FillBlockData( bd );
-    bd.fOffset = 0;
-    bd.fSize = sizeOfData;
-    bd.fDataType = kAliHLTDataTypeDDLRaw;
-    bd.fSpecification = iter->fSpecification;
-    Logging( kHLTLogDebug, "HLT::TPCZeroSuppressionComponent::DoEvent", "Event received", 
-            "Event 0x%08LX (%Lu) output data block %lu of %lu bytes at offset %lu",
-            evtData.fEventID, evtData.fEventID, ndx,size ,0);
-    outputBlocks.push_back( bd );
 
-    //Push back the list of hardware addresses to the output
-    AliHLTUInt32_t dataOffsetBeforeHW=sizeOfData;
-    AliHLTUInt32_t sizeOfHWArray=fHwAddressList.size()*sizeof(AliHLTUInt16_t);
+    AliHLTUInt32_t dataOffsetBeforeHW=0;
 
-    if(dataOffsetBeforeHW+sizeOfHWArray>size){
-      HLTWarning("Buffer too small too add the active channels: %d of %d byte(s) already used", dataOffsetBeforeHW + sizeOfHWArray, size);
-      return -ENOSPC;
+
+    //Push back the zerosuppressed altro data to the output
+    if(fSkipSendingZSData == kFALSE){
+      AliHLTComponentBlockData bd;
+      FillBlockData( bd );
+      bd.fOffset = 0;
+      bd.fSize = sizeOfData;
+      bd.fDataType = kAliHLTDataTypeDDLRaw;
+      bd.fSpecification = iter->fSpecification;
+      Logging( kHLTLogDebug, "HLT::TPCZeroSuppressionComponent::DoEvent", "Event received", 
+              "Event 0x%08LX (%Lu) output data block %lu of %lu bytes at offset %lu",
+              evtData.fEventID, evtData.fEventID, ndx,size ,0);
+      outputBlocks.push_back( bd );
+    
+      //Push back the list of hardware addresses to the output
+      dataOffsetBeforeHW=sizeOfData;
     }
 
-    AliHLTUInt16_t*outputHWPtr=(AliHLTUInt16_t*)(outputPtr+dataOffsetBeforeHW);
-    outputHWPtr = &fHwAddressList[0];
-    AliHLTComponentBlockData bdHW;
-    FillBlockData( bdHW );
-    bdHW.fOffset = dataOffsetBeforeHW;
-    bdHW.fSize = sizeOfHWArray;
-    bdHW.fDataType = kAliHLTDataTypeHwAddr16;
-    bdHW.fSpecification = iter->fSpecification;
-    Logging( kHLTLogDebug, "HLT::TPCZeroSuppressionComponent::DoEvent", "Event received", 
+    AliHLTUInt32_t sizeOfHWArray = 0;
+
+    if(fSendHWList == kTRUE){
+      sizeOfHWArray = fHwAddressList.size()*sizeof(AliHLTUInt16_t);
+      
+      if(dataOffsetBeforeHW+sizeOfHWArray>size){
+       HLTWarning("Buffer too small too add the active channels: %d of %d byte(s) already used", dataOffsetBeforeHW + sizeOfHWArray, size);
+       return -ENOSPC;
+      }
+      
+      AliHLTUInt16_t*outputHWPtr=(AliHLTUInt16_t*)(outputPtr+dataOffsetBeforeHW);
+      outputHWPtr = &fHwAddressList[0];
+      AliHLTComponentBlockData bdHW;
+      FillBlockData( bdHW );
+      bdHW.fOffset = dataOffsetBeforeHW;
+      bdHW.fSize = sizeOfHWArray;
+      bdHW.fDataType = kAliHLTDataTypeHwAddr16;
+      bdHW.fSpecification = iter->fSpecification;
+      Logging( kHLTLogDebug, "HLT::TPCZeroSuppressionComponent::DoEvent", "Event received", 
             "Event 0x%08LX (%Lu) output data block %lu of %lu bytes at offset %lu",
-            evtData.fEventID, evtData.fEventID, ndx,size ,0);
-    outputBlocks.push_back( bdHW );
-    
+              evtData.fEventID, evtData.fEventID, ndx,size ,0);
+      outputBlocks.push_back( bdHW );
+    }
     size = dataOffsetBeforeHW+sizeOfHWArray;
 
   } else {
index 5765492..c75deeb 100755 (executable)
@@ -152,6 +152,12 @@ class AliHLTTPCZeroSuppressionComponent : public AliHLTProcessor
       /** Flag to switch on active pads selection */
       Bool_t fGetActivePads;                                           //! transient
 
+      /** Flag to switch off data being sent to output */
+      Bool_t fSkipSendingZSData;
+
+      /** Flag to switch off hw list being sent to output */
+      Bool_t fSendHWList;
+
       /** Vector of active pad hardware addresses */
       vector<AliHLTUInt16_t> fHwAddressList;                  //! transient