TPC commissioning run week 21 (Kennth, Gaute, Jochen)
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 23 May 2008 13:24:50 +0000 (13:24 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 23 May 2008 13:24:50 +0000 (13:24 +0000)
- compilation warnings corrected
- bugfix KryptonClusterFinder: creating hwaddress
- bugfix TPCKryptonClusterFinder and ClusterFinder: size of buffer not set
  to 0 for SOR and EOR events.
- TPCClusterDumpComponent updated: produce nicer output.
- Added a macro to test the KryptonClusterfinder, ClusterDump,
- ActivePads(from kryptonClusterFinder), ClusterHistogramComponent and
  HistogramHandler.

12 files changed:
HLT/TPCLib/AliHLTTPCClusterConverterComponent.cxx
HLT/TPCLib/AliHLTTPCClusterDumpComponent.cxx
HLT/TPCLib/AliHLTTPCClusterDumpComponent.h
HLT/TPCLib/AliHLTTPCClusterFinderComponent.cxx
HLT/TPCLib/AliHLTTPCClusterHistoComponent.cxx
HLT/TPCLib/AliHLTTPCHistogramHandlerComponent.cxx
HLT/TPCLib/AliHLTTPCKryptonClusterFinder.cxx
HLT/TPCLib/AliHLTTPCKryptonClusterFinderComponent.cxx
HLT/TPCLib/AliHLTTPCNoiseMapComponent.cxx
HLT/TPCLib/macros/conf-tpc-krypton-hist.C [new file with mode: 0644]
HLT/TPCLib/macros/rec-tpc-krypton-hist.C [new file with mode: 0644]
HLT/TPCLib/offline/AliHLTTPCOfflineCluster.cxx

index 36913e7..9fb1703 100644 (file)
@@ -195,7 +195,7 @@ int AliHLTTPCClusterConverterComponent::DoDeinit(){
   return 0;
 }
 
-int AliHLTTPCClusterConverterComponent::DoEvent(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData){
+int AliHLTTPCClusterConverterComponent::DoEvent(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& /*trigData*/){
 // see header file for class documentation
 
   //Logging(kHLTLogDebug, "HLT::TPCClusterConverter::DoEvent", "DoEvent", "DoEvent()");
index 78463c0..e537e75 100644 (file)
@@ -27,6 +27,7 @@
 #include "AliHLTTPCDefinitions.h"
 #include "AliHLTTPCSpacePointData.h"
 #include "AliHLTTPCClusterDataFormat.h"
+#include "AliHLTTPCTransform.h"
 
 /** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCClusterDumpComponent)
@@ -34,7 +35,8 @@ ClassImp(AliHLTTPCClusterDumpComponent)
   AliHLTTPCClusterDumpComponent::AliHLTTPCClusterDumpComponent()
     :
     AliHLTFileWriter(),
-    fDirectory("")
+    fDirectory(""),
+    fSlice(-1)
 {
   // see header file for class documentation
   // or
@@ -84,11 +86,18 @@ int AliHLTTPCClusterDumpComponent::ScanArgument(int argc, const char** argv)
     if (i>=argc || (argument=argv[i]).IsNull()) continue;
     
     // -directory
-    if (argument.CompareTo("-directory")==0) {
+    if (argument.CompareTo("-directory-clusterdump")==0) {
       if ((bMissingParam=(++i>=argc))) break;
       fDirectory=argv[i];
       break;
     }
+    //-slice
+    if (argument.CompareTo("-slice")==0) {
+      if ((bMissingParam=(++i>=argc))) break;
+      TString str= argv[i];
+      fSlice=str.Atoi();
+      break;
+    }
   }while(0);
 
   HLTWarning("AliHLTTPCClusterDumpComponent does not have any arguments at this time");
@@ -117,20 +126,25 @@ int AliHLTTPCClusterDumpComponent::DumpEvent( const AliHLTComponentEventData& ev
 
   //building the filename
   fCurrentFileName="";
-  ios::openmode filemode=(ios::openmode)0;
   if (!fDirectory.IsNull()) {
     fCurrentFileName+=fDirectory;
   }
-  fCurrentFileName+="TPCClusterDump_Event";
-  fCurrentFileName+=Form("_%d", GetEventCount());
-  ofstream dump(fCurrentFileName.Data(), filemode);
+  fCurrentFileName+="ClusterDump";
+  fCurrentFileName+=Form("_RunNo-%d",GetRunNo());
+  if(fSlice!=-1){
+    fCurrentFileName+=Form("_Slice-%d", fSlice);
+  }
+  fCurrentFileName+=Form("_Event-%d", GetEventCount());
+
+  ofstream dump;
+  dump.open(fCurrentFileName.Data());
 
   for (pDesc=GetFirstInputBlock(AliHLTTPCDefinitions::fgkClustersDataType); pDesc!=NULL; pDesc=GetNextInputBlock(), blockno++) {
     HLTDebug("event %Lu block %d: %s 0x%08x size %d", evtData.fEventID, blockno, DataType2Text(pDesc->fDataType).c_str(), pDesc->fSpecification, pDesc->fSize);
 
     if(pDesc->fDataType!=AliHLTTPCDefinitions::fgkClustersDataType){continue;}
  
-     if (dump.good()) {
+    if (dump.good() || 1) {//the || 1 is there since dump.good() will return false( EOF )
        iResult=1;
        const AliHLTTPCClusterData* clusterData = (const AliHLTTPCClusterData*) pDesc->fPtr;
        Int_t nSpacepoints = (Int_t) clusterData->fSpacePointCnt;
@@ -139,17 +153,14 @@ int AliHLTTPCClusterDumpComponent::DumpEvent( const AliHLTComponentEventData& ev
        for(int i=0;i<nSpacepoints;i++){
         dump << "" << endl;
         dump << "ClusterNumber: " << spacePointCounter << endl;
-        dump << "Slice:         " << clusters[i].fUsed    << endl;//quick fix to get the partiion and slice numbers to the clusterdump
-        dump << "Partition:     " << clusters[i].fTrackN  << endl;//quick fix to get the partiion and slice numbers to the clusterdump
-        dump << "X:             " << clusters[i].fX       << endl;
-        dump << "Y:             " << clusters[i].fY       << endl;
-        dump << "Z:             " << clusters[i].fZ       << endl;
-        dump << "ID:            " << clusters[i].fID      << endl;
-        dump << "Pad row:       " << clusters[i].fPadRow << endl;
-        dump << "fSigmaY2:      " << clusters[i].fSigmaY2 << endl;
-        dump << "fSigmaZ2:      " << clusters[i].fSigmaZ2 << endl;
-        dump << "Charge:        " << clusters[i].fCharge << endl;
-        dump << "Q Max:         " << clusters[i].fMaxQ << endl;
+        dump << "Slice:         " << (Int_t)(clusters[i].fID/10) << endl;//quick fix to get the partiion and slice numbers to the clusterdump
+        dump << "Partition:     " << (Int_t)(clusters[i].fID%10) << endl;//quick fix to get the partiion and slice numbers to the clusterdump
+        dump << "[X,Y,Z]:       [" << clusters[i].fX<<" , "<<clusters[i].fY<<" , "<<clusters[i].fZ <<"]"<< endl;
+        Float_t xyz[3]={clusters[i].fX,clusters[i].fY,clusters[i].fZ};
+        AliHLTTPCTransform::LocHLT2Raw(xyz,(Int_t)(clusters[i].fID/10),(Int_t)(clusters[i].fID%10));
+        dump << "[R,P,T]:       [" << xyz[0]<<" , "<<xyz[1]<<" , "<<xyz[2] <<"]"<< endl;
+        dump << "Total Charge:  " << clusters[i].fCharge         << endl;
+        dump << "Q Max:         " << clusters[i].fMaxQ           << endl;
         spacePointCounter++;
        }
        
@@ -159,7 +170,7 @@ int AliHLTTPCClusterDumpComponent::DumpEvent( const AliHLTComponentEventData& ev
        iResult=-EBADF;
      }
 
-    dump.close();
   }
+  dump.close();
   return iResult;
 }
index f58507b..caf9cbb 100644 (file)
@@ -68,6 +68,9 @@ class AliHLTTPCClusterDumpComponent : public AliHLTFileWriter {
   /** target directory */
   TString    fDirectory;                                           // see above
 
+  /** slice */
+  Int_t fSlice;                                                    //! transient
+
   ClassDef(AliHLTTPCClusterDumpComponent, 0);
 };
 
index 23d6bca..edf5ce3 100644 (file)
@@ -355,6 +355,11 @@ int AliHLTTPCClusterFinderComponent::DoEvent( const AliHLTComponentEventData& ev
 {
   // see header file for class documentation
 
+  if(GetFirstInputBlock( kAliHLTDataTypeSOR ) || GetFirstInputBlock( kAliHLTDataTypeEOR )){
+    size=0;
+    return 0;
+  }
+
   //  == init iter (pointer to datablock)
   const AliHLTComponentBlockData* iter = NULL;
   unsigned long ndx;
index 10f4ba9..f946041 100644 (file)
@@ -59,7 +59,7 @@ fTotalClusterChargeOROCAll(NULL),
   fPlotChargePartSel(kFALSE),
   fPlotQmaxPartAll(kTRUE),  
   fPlotQmaxROCAll(kTRUE),   
-  fPlotNClusters(kFALSE)    
+  fPlotNClusters(kTRUE)    
 {
   // see header file for class documentation
   // or
@@ -159,7 +159,7 @@ int AliHLTTPCClusterHistoComponent::DoDeinit()
   return 0;
 }
 
-int AliHLTTPCClusterHistoComponent::DoEvent(const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& trigData)
+int AliHLTTPCClusterHistoComponent::DoEvent(const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/)
 {
   
   int TotalSpacePoint = 0;
index c39e36b..a2cea39 100644 (file)
@@ -50,6 +50,7 @@ ClassImp(AliHLTTPCHistogramHandlerComponent) //ROOT macro for the implementation
 
 AliHLTTPCHistogramHandlerComponent::AliHLTTPCHistogramHandlerComponent()
     :    
+    fSpecification(0),
     fNoiseHistograms(0),
     fKryptonHistograms(0),
     fSlice(-99),
@@ -130,9 +131,9 @@ int AliHLTTPCHistogramHandlerComponent::DoInit( int argc, const char** argv ) {
   
   TString configuration="";
   TString argument="";
-  for (int i=0; i<argc && iResult>=0; i++) {
+  for (int j=0; j<argc && iResult>=0; j++) {
     
-    argument=argv[i];
+    argument=argv[j];
     if (!configuration.IsNull()) configuration+=" ";
     configuration+=argument;    
   }
@@ -181,7 +182,7 @@ int AliHLTTPCHistogramHandlerComponent::DoDeinit() {
    return 0;
 }
 
-int AliHLTTPCHistogramHandlerComponent::DoEvent(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData){
+int AliHLTTPCHistogramHandlerComponent::DoEvent(const AliHLTComponentEventData&/* evtData*/, AliHLTComponentTriggerData& /*trigData*/){
 // see header file for class documentation
 
   HLTInfo("--- Entering DoEvent() in TPCHistogramHandler ---");
@@ -192,7 +193,7 @@ int AliHLTTPCHistogramHandlerComponent::DoEvent(const AliHLTComponentEventData&
   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",            100,0,100);
+  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);
@@ -257,21 +258,26 @@ int AliHLTTPCHistogramHandlerComponent::DoEvent(const AliHLTComponentEventData&
           fTotalClusterChargeOROCAll->Add(fTotalClusterChargeOROCAll,fHistTH1Tmp,1,1);
        } 
        else if(name=="fQMaxPartitionAll"){
-         AliHLTUInt8_t partitionNr=patch+slice*6;
-         //      if(fHistTH1Tmp->GetBinContent(partitionNr)>fQMaxPartitionAll->GetBinContent(partitionNr)){
-          fQMaxPartitionAll->SetBinContent(partitionNr,fHistTH1Tmp->GetBinContent(partitionNr));
-          //     }
-          fQMaxPartitionAll->Add(fQMaxPartitionAll,fHistTH1Tmp,1,1);
+         for(Int_t t=0;t<216;t++){
+           if(fHistTH1Tmp->GetBinContent(t)>fQMaxPartitionAll->GetBinContent(t)){
+             fQMaxPartitionAll->SetBinContent(t,fHistTH1Tmp->GetBinContent(t));
+           }
+         } 
+       } 
+       else if(name=="fQMaxROCAll"){
+         for(Int_t t=0;t<72;t++){
+           if(fHistTH1Tmp->GetBinContent(t)>fPlotQmaxROCAll->GetBinContent(t)){
+             fPlotQmaxROCAll->SetBinContent(t,fHistTH1Tmp->GetBinContent(t));
+           }
+         }
        } 
-       else if(name=="fPlotQmaxROCAll"){
-         //      if(fHistTH1Tmp->GetBinContent(thissector)>fPlotQmaxROCAll->GetBinContent(thissector)){
-         //   fPlotQmaxROCAll->SetBinContent(thissector,fHistTH1Tmp->GetBinContent(thissector));
-           //    }
-         fPlotQmaxROCAll->Add(fPlotQmaxROCAll,fHistTH1Tmp,1,1);
-       }
        else if(name=="fNumberOfClusters"){ 
-         //   fNumberOfClusters->Add(fNumberOfClusters,fHistTH1Tmp,1,1);
-       } else continue;     
+         fNumberOfClusters->Add(fNumberOfClusters,fHistTH1Tmp,1,1);
+       } 
+       else{
+         HLTWarning("No histogram names match. %s",name.Data());
+         continue;
+       }     
      } //endif fKryptonHistograms==kTRUE                        
   } // end for loop over histogram blocks
   
@@ -285,9 +291,20 @@ void AliHLTTPCHistogramHandlerComponent::MakeHistosPublic() {
   if(fNoiseHistograms){ 
     PushBack((TObject*)fHistTPCSideA,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification( 0,17,0,5));
     PushBack((TObject*)fHistTPCSideC,kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(18,35,0,5));
-    delete fHistTH2Tmp;
-    delete fHistTPCSideA;
-    delete fHistTPCSideC;
+
+    if(fHistTH2Tmp){
+      delete fHistTH2Tmp;
+    }
+    if(fHistTPCSideA){
+      delete fHistTPCSideA;
+    }
+    if(fHistTPCSideC){
+      delete fHistTPCSideC;
+    }
+    
+    fHistTH2Tmp=NULL;
+    fHistTPCSideA=NULL;
+    fHistTPCSideC=NULL;
   }  
   
   if(fKryptonHistograms){
@@ -297,11 +314,30 @@ void AliHLTTPCHistogramHandlerComponent::MakeHistosPublic() {
      PushBack((TObject*)fPlotQmaxROCAll,          kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(0,35,0,5));
      PushBack((TObject*)fNumberOfClusters,        kAliHLTDataTypeHistogram,AliHLTTPCDefinitions::EncodeDataSpecification(0,35,0,5));
           
-     delete fTotalClusterChargeIROCAll;
-     delete fTotalClusterChargeOROCAll;
-     delete fQMaxPartitionAll;
-     delete fPlotQmaxROCAll;
-     delete fNumberOfClusters;
+     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;
index c126e19..1eb8523 100644 (file)
@@ -149,8 +149,7 @@ Bool_t AliHLTTPCKryptonClusterFinder::ComparePads(AliHLTTPCPad *nextPad,AliHLTTP
       cluster->fTime2 += candidate->fTime2;
       cluster->fPad+=candidate->fPad;
       cluster->fPad2=candidate->fPad2;
-      cluster->fLastMergedPad=candidate->fPad/candidate->fTotalCharge;
-      
+      cluster->fLastMergedPad=nextPad->GetPadNumber();
       if(candidate->fQMax>cluster->fQMax){
        cluster->fQMax = candidate->fQMax;
       }
@@ -243,27 +242,44 @@ void AliHLTTPCKryptonClusterFinder::FindKryptonClusters()
            if((Int_t)nextCluster->fQMax>fMaxQOfCluster){
              fMaxQOfCluster = nextCluster->fQMax;
            }
-           
-           
+                   
+
+
            if(tmpCluster->fFlags!=99){//means that this is the first time normal clusters match
              CheckForCandidateOnPreviousRow(tmpCluster);
-             for(UInt_t ap = tmpCluster->fFirstPad ; ap<=tmpCluster->fLastMergedPad ; ap++){
-             fHWAddressVector.push_back((AliHLTUInt16_t)fDigitReader->GetAltroBlockHWaddr(nextCluster->fRowNumber/nextCluster->fTotalCharge-AliHLTTPCTransform::GetFirstRow(fCurrentPatch),ap));
-             //                fHWAddressVector.push_back((AliHLTUInt16_t)fDigitReader->GetAltroBlockHWaddr(tmpCluster->fRowNumber,ap));
+             Int_t minFirst=0;
+             Int_t maxFirst=0;
+             if(tmpCluster->fFirstPad>1){
+               minFirst=2;
+             }
+             if(tmpCluster->fLastMergedPad+2<(UInt_t)AliHLTTPCTransform::GetNPads(prevRow)){
+               maxFirst=2;
+             }
+               
+             for(UInt_t ap = tmpCluster->fFirstPad -minFirst; ap<=tmpCluster->fLastMergedPad+maxFirst; ap++){
+               fHWAddressVector.push_back((AliHLTUInt16_t)fDigitReader->GetAltroBlockHWaddr(tmpCluster->fRowNumber/tmpCluster->fTotalCharge-AliHLTTPCTransform::GetFirstRow(fCurrentPatch),ap));
              }
+           }
              
+           UInt_t minNext=0;
+           UInt_t maxNext=0;
+           if(nextCluster->fFirstPad>1){
+             minNext=2;
+           }
+           if(nextCluster->fLastMergedPad+2<(UInt_t)AliHLTTPCTransform::GetNPads(prevRow+1)){
+             maxNext=2;
            }
-           for(UInt_t ap = nextCluster->fFirstPad ; ap<=nextCluster->fLastMergedPad ; ap++){
+           for(UInt_t ap = nextCluster->fFirstPad-minNext; ap<=nextCluster->fLastMergedPad+maxNext; ap++){
              fHWAddressVector.push_back((AliHLTUInt16_t)fDigitReader->GetAltroBlockHWaddr(nextCluster->fRowNumber/nextCluster->fTotalCharge-AliHLTTPCTransform::GetFirstRow(fCurrentPatch),ap));
              HLTDebug("Pushing back hw address %d from row: %d and Pad: %d",fDigitReader->GetAltroBlockHWaddr(nextCluster->fRowNumber/nextCluster->fTotalCharge-AliHLTTPCTransform::GetFirstRow(fCurrentPatch),ap),nextCluster->fRowNumber/nextCluster->fTotalCharge,ap);
            }
-
+             
            prevRow=nextCluster->fRowNumber/nextCluster->fTotalCharge;
            nextCluster->fFlags=99;
            tmpCluster->fFlags=99;
            if(j!=fClusters.size()-1){
              continue;
-           }       
+           }
          }
        }
       }
@@ -292,6 +308,7 @@ void AliHLTTPCKryptonClusterFinder::FindKryptonClusters()
          Int_t thissector=-1;
          AliHLTTPCTransform::Slice2Sector(fCurrentSlice, (Int_t)(tmpCluster->fRowNumber/tmpCluster->fTotalCharge), thissector, thisrow);
          AliHLTTPCTransform::Raw2Local(xyz, thissector, thisrow,(Float_t)(tmpCluster->fPad/tmpCluster->fTotalCharge),(Float_t)(tmpCluster->fTime/tmpCluster->fTotalCharge));
+         fSpacePointData[fNKryptonClusters].fID = fCurrentSlice*10 +fCurrentPatch;
          fSpacePointData[fNKryptonClusters].fX = xyz[0];
          fSpacePointData[fNKryptonClusters].fY = xyz[1];
          fSpacePointData[fNKryptonClusters].fZ = xyz[2];
@@ -322,15 +339,15 @@ void AliHLTTPCKryptonClusterFinder::CheckForCandidateOnPreviousRow(AliHLTTPCClus
     for(Int_t p=-1;p<2;p++){
       if(tmpCluster->fPad+p>0 && tmpCluster->fPad+p<fNumberOfPadsInRow[tmpCluster->fRowNumber/tmpCluster->fTotalCharge-1]){
        if(tmpCluster->fTotalCharge==0){
-         HLTFatal("Charge of tmpCluster in AliHLTTPCKryptonClusterFinder::CheckForCandidateOnPreviousRow is 0");
+         HLTDebug("Charge of tmpCluster in AliHLTTPCKryptonClusterFinder::CheckForCandidateOnPreviousRow is 0");
          return;
        }
-       if(tmpCluster->fRowNumber/tmpCluster->fTotalCharge-1-AliHLTTPCTransform::GetFirstRow(fCurrentPatch)<0){
-         HLTFatal("AliHLTTPCKryptonClusterFinder::CheckForCandidateOnPreviousRow:    Rownumber is below 0");
+       if((Int_t)(tmpCluster->fRowNumber/tmpCluster->fTotalCharge-1-AliHLTTPCTransform::GetFirstRow(fCurrentPatch))<0){
+         HLTDebug("AliHLTTPCKryptonClusterFinder::CheckForCandidateOnPreviousRow:    Rownumber is below 0");
          return;
        }
        if(tmpCluster->fRowNumber/tmpCluster->fTotalCharge-1-AliHLTTPCTransform::GetFirstRow(fCurrentPatch)>fNumberOfRows){
-         HLTFatal("AliHLTTPCKryptonClusterFinder::CheckForCandidateOnPreviousRow:    Rownumber is too high");
+         HLTDebug("AliHLTTPCKryptonClusterFinder::CheckForCandidateOnPreviousRow:    Rownumber is too high");
          return;
        }
        AliHLTTPCPad *prevPad=fRowPadVector[tmpCluster->fRowNumber/tmpCluster->fTotalCharge-1-AliHLTTPCTransform::GetFirstRow(fCurrentPatch)][tmpCluster->fPad/tmpCluster->fTotalCharge+p];
index 21bc9f7..f6b8507 100644 (file)
@@ -164,14 +164,17 @@ int AliHLTTPCKryptonClusterFinderComponent::DoDeinit()
 }
 
 int AliHLTTPCKryptonClusterFinderComponent::DoEvent( const AliHLTComponentEventData& evtData, 
-                                             const AliHLTComponentBlockData* blocks, 
+                                                    const AliHLTComponentBlockData* /*blocks*/, 
                                              AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr, 
                                              AliHLTUInt32_t& size, 
                                              vector<AliHLTComponentBlockData>& outputBlocks )
 {
   // see header file for class documentation
 
-  if(GetFirstInputBlock( kAliHLTDataTypeSOR ) || GetFirstInputBlock( kAliHLTDataTypeEOR )) return 0;
+  if(GetFirstInputBlock( kAliHLTDataTypeSOR ) || GetFirstInputBlock( kAliHLTDataTypeEOR )){
+    size=0;
+    return 0;
+  }
 
   //  == init iter (pointer to datablock)
   const AliHLTComponentBlockData* iter = NULL;
index 3e93439..5d12e0f 100644 (file)
@@ -117,8 +117,8 @@ int AliHLTTPCNoiseMapComponent::GetOutputDataTypes(AliHLTComponentDataTypeList&
 void AliHLTTPCNoiseMapComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) { 
 // see header file for class documentation
 
-  constBase=0;
-  inputMultiplier=1.0;
+  constBase=800000;
+  inputMultiplier=0.0;
 }
 
 AliHLTComponent* AliHLTTPCNoiseMapComponent::Spawn() { 
@@ -137,9 +137,9 @@ int AliHLTTPCNoiseMapComponent::DoInit( int argc, const char** argv ) {
   
   TString configuration="";
   TString argument="";
-  for (int i=0; i<argc && iResult>=0; i++) {
+  for (int j=0; j<argc && iResult>=0; j++) {
     
-    argument=argv[i];
+    argument=argv[j];
     if (!configuration.IsNull()) configuration+=" ";
     configuration+=argument;    
   }
@@ -225,7 +225,7 @@ int AliHLTTPCNoiseMapComponent::DoDeinit() {
     return 0;
 }
 
-int AliHLTTPCNoiseMapComponent::DoEvent(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData){
+int AliHLTTPCNoiseMapComponent::DoEvent(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& /*trigData*/){
 // see header file for class documentation
  
   HLTInfo("--- Entering DoEvent() in TPCNoiseMap ---");
diff --git a/HLT/TPCLib/macros/conf-tpc-krypton-hist.C b/HLT/TPCLib/macros/conf-tpc-krypton-hist.C
new file mode 100644 (file)
index 0000000..dd84e29
--- /dev/null
@@ -0,0 +1,81 @@
+// $Id$
+/**
+ * Configuration for the rec-krypton-hist.C macro
+ */
+{
+  int iMinSlice=21; 
+  int iMaxSlice=21;
+  int iMinPart=1;
+  int iMaxPart=1;
+
+  TString arg, publisher, noise, noiseInput, krypton,kryptonAP, clusHist,clusDump, rootFileWriter, rootFileWriter2, histoInput1, histoInput2, kelly, clusterDumpInput, clusterDumpInput2,activepads, activePadsInput;
+  
+  for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
+    for (int part=iMinPart; part<=iMaxPart; part++) {
+      
+      // raw data publisher components
+      int ddlno=768;
+      if (part>1) ddlno+=72+4*slice+(part-2);
+      else ddlno+=2*slice+part;
+      arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC '  -dataspec 0x%02x%02x%02x%02x", ddlno, slice, slice, part, part);
+
+      publisher.Form("DP_%02d_%d", slice, part);
+      AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL, arg.Data());
+      
+      krypton.Form("KF_%02d_%d", slice, part);
+      AliHLTConfiguration kryptonconf(krypton.Data(), "TPCKryptonClusterFinder", publisher.Data(), "");
+      
+      activepads.Form("AP_%02d_%d", slice, part);
+      activePadsInput+=publisher.Data();
+      activePadsInput+=" ";
+      activePadsInput+=krypton.Data();
+      AliHLTConfiguration activepadsconf(activepads.Data(), "AltroChannelSelector", activePadsInput.Data(),"");
+      activePadsInput="";
+      kryptonAP.Form("KFAP_%02d_%d", slice, part);
+      AliHLTConfiguration kryptonconf2(kryptonAP.Data(), "TPCKryptonClusterFinder", activepads.Data(), "");
+
+      if(histoInput1.Length()>0) histoInput1+=" ";
+      histoInput1+=krypton;
+
+      if(clusterDumpInput.Length()>0) clusterDumpInput+=" ";
+      clusterDumpInput+=krypton;
+
+      if(clusterDumpInput2.Length()>0) clusterDumpInput2+=" ";
+      clusterDumpInput2+=kryptonAP;
+
+
+    } // end of partition loop
+
+    clusHist.Form("HG_%02d", slice);
+    AliHLTConfiguration clusHistconf(clusHist.Data(), "TPCClusterHisto", histoInput1.Data(), "");
+    histoInput1="";
+    
+    if (histoInput2.Length()>0) histoInput2+=" ";
+    histoInput2+=clusHist;
+
+ } // end of slice loop
+
+  TString argdump;
+  argdump.Form("-directory /home/kenneth/SimpleComponentWrapper/aliroot_configs/100PerEvent/clusterDump");
+  cout<<"clusterDumpInput    "<<clusterDumpInput<<endl;
+  AliHLTConfiguration clusDumpconf("dumpOut", "TPCClusterDump", clusterDumpInput.Data(),"-directory-clusterdump /home/kenneth/SimpleComponentWrapper/aliroot_configs/100PerEvent/clusterDump/");
+
+  TString argdump2;
+  argdump2.Form("-directory-clusterdump /home/kenneth/SimpleComponentWrapper/aliroot_configs/100PerEvent/clusterDumpAP/");
+
+  AliHLTConfiguration clusDumpconf2("dumpOut2", "TPCClusterDump", clusterDumpInput2.Data(), argdump2.Data());
+
+  if (histoInput2.Length()>0) histoInput2+=" ";
+  histoInput2+="dumpOut";
+
+  if (histoInput2.Length()>0) histoInput2+=" ";
+  histoInput2+="dumpOut2";
+
+  AliHLTConfiguration histconf("hist", "TPCHistogramHandler", histoInput2.Data(),"-sum-krypton-histograms 1");
+  
+  
+  //root file writer component
+  rootFileWriter.Form("-datafile %s","partitionHist.root");
+  AliHLTConfiguration rootFileconf("sink1", "ROOTFileWriter", "hist", rootFileWriter.Data());
+
+}
diff --git a/HLT/TPCLib/macros/rec-tpc-krypton-hist.C b/HLT/TPCLib/macros/rec-tpc-krypton-hist.C
new file mode 100644 (file)
index 0000000..573c1d7
--- /dev/null
@@ -0,0 +1,42 @@
+// $Id$
+/**
+This is only temporary and will be nicer for the user, I just dont have time just now.
+
+To run this: aliroot -b -q rec-tpc-krypton-hist.C
+You will have to change the directory for the two clusterdumps. and it have to exist!
+
+You will have to start it in the directory where the raw folders are, and you will also need the Kinematics.root and galice.root at the moment.
+
+It does:
+AliRawReaderPublisher
+KryptonClusterFinder1 (input: altro data fra AliRawReaderPublisher)
+ClusterDump(input: KryptonClusterFinder1)
+AltroSelectionComponent(input: altro data fra AliRawReaderPublisher og liste med hardware addresser fra KryptonClusterFinderen )
+KryptonClusterFinder2(input: altrodata fra AltroSelectionComponent)
+ClusterDump(input: KryptonClusterFinder2)
+ClusterHisto(input: KryptonClusterFinder)
+HistogramHandler(input: ClusterHisto) 
+
+
+Sorry that it is not nicer, it will be soon.
+
+Kenneth
+
+ */
+{
+  AliReconstruction rec;
+  //rec.SetInput("zeroSup/");
+  rec.SetInput("raw0/");
+  //rec.SetInput("../noiseComp/file.root");
+  //rec.SetInput("./");
+  //rec.SetInput("/scratch/peter/07000015067011.10.root");
+  rec.SetRunVertexFinder(kFALSE);
+  rec.SetRunLocalReconstruction("HLT");
+  rec.SetRunReconstruction("");
+  rec.SetRunTracking("");
+  rec.SetLoadAlignFromCDB(0);
+  rec.SetFillTriggerESD(kFALSE);
+  rec.SetFillESD("HLT");
+  rec.SetOption("HLT", "libAliHLTTPC.so  loglevel=0x7c config=$ALICE_ROOT/HLT/TPCLib/macros/conf-tpc-krypton-hist.C chains=sink1");
+  rec.Run();
+}
index 44a7a31..acd7bff 100644 (file)
@@ -38,15 +38,15 @@ AliHLTTPCOfflineCluster::AliHLTTPCOfflineCluster()
 //constructor  
 }
 
-AliHLTTPCOfflineCluster::AliHLTTPCOfflineCluster(const AliHLTTPCSpacePointData& hltCluster){
+AliHLTTPCOfflineCluster::AliHLTTPCOfflineCluster(const AliHLTTPCSpacePointData& /*hltCluster*/){
   
 }
 
-AliHLTTPCOfflineCluster::AliHLTTPCOfflineCluster(const AliTPCclusterMI& offCluster){
+AliHLTTPCOfflineCluster::AliHLTTPCOfflineCluster(const AliTPCclusterMI& /*offCluster*/){
  
 }
 
-AliHLTTPCOfflineCluster& AliHLTTPCOfflineCluster::operator=(const AliTPCclusterMI& offCluster){
+AliHLTTPCOfflineCluster& AliHLTTPCOfflineCluster::operator=(const AliTPCclusterMI& /*offCluster*/){
   return *this;
 }
 
@@ -84,8 +84,8 @@ AliHLTTPCSpacePointData AliHLTTPCOfflineCluster::ConvertOfflineToHLT(AliTPCclust
    spacePoint.fX      = offCluster->GetPad();
    spacePoint.fPadRow = offCluster->GetRow();
    spacePoint.fZ      = offCluster->GetTimeBin();
-   spacePoint.fCharge = offCluster->GetQ();
-   spacePoint.fMaxQ   = offCluster->GetMax();
+   spacePoint.fCharge = (UInt_t)offCluster->GetQ();
+   spacePoint.fMaxQ   = (UInt_t)offCluster->GetMax();
 
    return spacePoint;