update of the TRD calibration @ HLT (Jason)
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Nov 2009 22:44:25 +0000 (22:44 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Nov 2009 22:44:25 +0000 (22:44 +0000)
first working version tested with FXSSubscriber and Shuttle

HLT/TRD/AliHLTTRDCalibrationComponent.cxx
HLT/TRD/AliHLTTRDCalibrationComponent.h
HLT/TRD/AliHLTTRDDefinitions.cxx
HLT/TRD/AliHLTTRDDefinitions.h
HLT/TRD/AliHLTTRDTrack.cxx
HLT/TRD/AliHLTTRDTracklet.cxx
HLT/libAliHLTTRD.pkg

index f99e5e9..1981fd5 100644 (file)
@@ -28,6 +28,11 @@ using namespace std;
 #include "TTree.h"
 #include "TFile.h"
 #include "TBranch.h"
+#include "TH2I.h"
+#include "TH2.h"
+#include "TProfile2D.h"
+
+#include "AliHLTReadoutList.h"
 
 #include "AliHLTTRDCalibrationComponent.h"
 #include "AliHLTTRDDefinitions.h"
@@ -36,9 +41,18 @@ using namespace std;
 #include "AliCDBManager.h"
 #include "AliCDBStorage.h"
 #include "AliRawReaderMemory.h"
+
+#include "AliTRDCalPad.h"
+#include "AliTRDCalDet.h"
+
 #include "AliTRDCalibraFillHisto.h"
 #include "AliTRDtrackV1.h"
 
+#include "AliTRDCalibraFit.h"
+#include "AliTRDCalibraMode.h"
+#include "AliTRDCalibraVector.h"
+#include "AliTRDCalibraVdriftLinearFit.h"
+
 #include <cstdlib>
 #include <cerrno>
 #include <string>
@@ -46,14 +60,18 @@ using namespace std;
 ClassImp(AliHLTTRDCalibrationComponent);
 
 AliHLTTRDCalibrationComponent::AliHLTTRDCalibrationComponent()
-: AliHLTCalibrationProcessor(),
-  fTRDCalibraFillHisto(NULL),
-  fOutputSize(50000),
-  fTracksArray(NULL),
-  fOutArray(NULL),
-  fNevent(0),
-  feveryNevent(20),
-  fRecievedTimeBins(kFALSE)
+  : AliHLTCalibrationProcessor(),
+    fTRDCalibraFillHisto(NULL),
+    fOutputSize(500000),
+    fTracksArray(NULL),
+    fOutArray(NULL),
+    fAfterRunArray(NULL),
+    fDisplayArray(NULL),
+    fNevent(0),
+    feveryNevent(1000),
+    fRecievedTimeBins(kFALSE),
+    fTrgStrings(NULL),
+    fAccRejTrg(0)
 {
   // Default constructor
 }
@@ -79,7 +97,18 @@ void AliHLTTRDCalibrationComponent::GetInputDataTypes( vector<AliHLTComponentDat
 AliHLTComponentDataType AliHLTTRDCalibrationComponent::GetOutputDataType()
 {
   // Get the output data type
-  return AliHLTTRDDefinitions::fgkCalibrationDataType;
+  return kAliHLTMultipleDataType;
+  //  return AliHLTTRDDefinitions::fgkCalibrationDataType;
+}
+
+int AliHLTTRDCalibrationComponent::GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList)
+{
+  // Get the output data type
+  tgtList.clear();
+  tgtList.push_back(AliHLTTRDDefinitions::fgkCalibrationDataType);
+  tgtList.push_back(AliHLTTRDDefinitions::fgkEORCalibrationDataType);
+  return tgtList.size();
 }
 
 void AliHLTTRDCalibrationComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
@@ -100,6 +129,9 @@ Int_t AliHLTTRDCalibrationComponent::ScanArgument( int argc, const char** argv )
   // perform initialization. We check whether our relative output size is specified in the arguments.
   int i = 0;
   char* cpErr;
+  if(!fTrgStrings)
+    fTrgStrings = new TObjArray();
+
   while ( i < argc )
     {
       HLTDebug("argv[%d] == %s", i, argv[i] );
@@ -139,17 +171,46 @@ Int_t AliHLTTRDCalibrationComponent::ScanArgument( int argc, const char** argv )
           i += 2;
           continue;
         }
+      if ( !strcmp( argv[i], "-TrgStr" ) )
+        {
+          if ( i+1>=argc )
+            {
+              HLTError("Missing parameter for mbTriggerString");
+              return ENOTSUP;
+            }
+          HLTDebug("argv[%d+1] == %s", i, argv[i+1] );
+          fTrgStrings->Add(new TObjString(argv[i+1]));
+          i += 2;
+          continue;
+        }
+
+      if ( !strcmp( argv[i], "-acceptTrgStr" ) )
+        {
+          fAccRejTrg=1;
+          i += 1;
+          continue;
+        }
+      if ( !strcmp( argv[i], "-rejectTrgStr" ) )
+        {
+          fAccRejTrg=-1;
+          i += 1;
+          continue;
+        }
 
       else {
         HLTError("Unknown option '%s'", argv[i] );
         return EINVAL;
       }
     }
-  return 0;
+  return i;
 }
 
 Int_t AliHLTTRDCalibrationComponent::InitCalibration()
 {
+
+        if(!fTrgStrings)
+    fTrgStrings = new TObjArray();
+
   if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
     HLTError("DefaultStorage is not set in CDBManager");
     return -EINVAL;
@@ -160,7 +221,13 @@ Int_t AliHLTTRDCalibrationComponent::InitCalibration()
   }
   HLTInfo("CDB default storage: %s; RunNo: %i", (AliCDBManager::Instance()->GetDefaultStorage()->GetBaseFolder()).Data(), AliCDBManager::Instance()->GetRun());
 
+  if(fTrgStrings->GetEntriesFast()>0 && !fAccRejTrg){
+    HLTError("Trigger string(s) given, but acceptTrgStr or rejectTrgStr not selected");
+    return -EINVAL;
+  }
+
   fTRDCalibraFillHisto = AliTRDCalibraFillHisto::Instance();
+  fTRDCalibraFillHisto->SetIsHLT(kTRUE);
   fTRDCalibraFillHisto->SetHisto2d(); // choose to use histograms
   fTRDCalibraFillHisto->SetCH2dOn();  // choose to calibrate the gain
   fTRDCalibraFillHisto->SetPH2dOn();  // choose to calibrate the drift velocity
@@ -168,9 +235,16 @@ Int_t AliHLTTRDCalibrationComponent::InitCalibration()
   fTRDCalibraFillHisto->SetIsHLT(); // per detector
   //fTRDCalibraFillHisto->SetDebugLevel(1);// debug
   fTRDCalibraFillHisto->SetFillWithZero(kTRUE);
-
+  fTRDCalibraFillHisto->SetLinearFitterOn(kTRUE);
+  fTRDCalibraFillHisto->SetNumberBinCharge(100);
+  
   fTracksArray = new TClonesArray("AliTRDtrackV1");
-  fOutArray = new TObjArray(3);
+  fOutArray = new TObjArray(4);
+  fAfterRunArray=new TObjArray(5);
+  fDisplayArray=new TObjArray(4);
+
+  HLTDebug("run SetupCTPData");
+  SetupCTPData();
 
   return 0;
 }
@@ -181,25 +255,30 @@ Int_t AliHLTTRDCalibrationComponent::DeinitCalibration()
   // Deinitialization of the component
   
   HLTDebug("DeinitCalibration");
-  fTracksArray->Delete();
-  delete fTracksArray;
-  fTRDCalibraFillHisto->Destroy();
+  delete fTracksArray; fTracksArray=0;
+  //fTRDCalibraFillHisto->Destroy();
   //fOutArray->Delete();
-  delete fOutArray;
-
+  delete fOutArray; fOutArray=0;
+  fAfterRunArray->Delete();
+  delete fAfterRunArray; fAfterRunArray=0;
+  fDisplayArray->Delete();
+  delete fDisplayArray; fDisplayArray=0;
+  fTrgStrings->Delete();
+  delete fTrgStrings; fTrgStrings=0;
   return 0;
 }
 
 Int_t AliHLTTRDCalibrationComponent::ProcessCalibration(const AliHLTComponent_EventData& evtData,
                                                         const AliHLTComponent_BlockData* blocks,
-                                                        AliHLTComponent_TriggerData& /*trigData*/,
+                                                        AliHLTComponent_TriggerData& trigData,
                                                         AliHLTUInt8_t* /*outputPtr*/,
                                                         AliHLTUInt32_t& /*size*/,
                                                         vector<AliHLTComponent_BlockData>& /*outputBlocks*/)
 {
   HLTDebug("NofBlocks %lu", evtData.fBlockCnt );
   // Process an event
-
+       
+  
   // Loop over all input blocks in the event
   vector<AliHLTComponent_DataType> expectedDataTypes;
   GetInputDataTypes(expectedDataTypes);
@@ -230,6 +309,7 @@ Int_t AliHLTTRDCalibrationComponent::ProcessCalibration(const AliHLTComponent_Ev
       Int_t nTimeBins;
       AliHLTTRDUtils::ReadTracks(fTracksArray, block.fPtr, block.fSize, &nTimeBins);
       
+          
       if(!fRecievedTimeBins){
        HLTDebug("Reading number of time bins from input block. Value is: %d", nTimeBins);
        fTRDCalibraFillHisto->Init2Dhistos(nTimeBins); // initialise the histos
@@ -237,26 +317,55 @@ Int_t AliHLTTRDCalibrationComponent::ProcessCalibration(const AliHLTComponent_Ev
        fTRDCalibraFillHisto->SetNumberClustersf(nTimeBins); // Not more than %d  clusters
        fRecievedTimeBins=kTRUE;
       }
-
+      
+       
+      Bool_t TriggerPassed=kFALSE;
+               
+      if(fAccRejTrg){
+       if(fAccRejTrg>0){
+         TriggerPassed=kFALSE;
+         for(int i = 0; i < fTrgStrings->GetEntriesFast(); i++){
+               const TObjString *const obString=(TObjString*)fTrgStrings->At(i);
+               const TString tString=obString->GetString();
+               //printf("Trigger Output: %i\n",EvaluateCTPTriggerClass(tString.Data(),trigData));
+           if(EvaluateCTPTriggerClass(tString.Data(),trigData)){TriggerPassed=kTRUE; break;}
+         }
+       }
+       else{
+         TriggerPassed=kTRUE;
+         for(int i = 0; i < fTrgStrings->GetEntriesFast(); i++){
+                       const TObjString *const obString=(TObjString*)fTrgStrings->At(i);
+                       const TString tString=obString->GetString();
+           if(EvaluateCTPTriggerClass(tString.Data(),trigData)){TriggerPassed=kFALSE; break;}
+         }
+       }
+      }
+      
+      
       Int_t nbEntries = fTracksArray->GetEntries();
       HLTDebug(" %i TRDtracks in tracksArray", nbEntries);
       AliTRDtrackV1* trdTrack = 0x0;
       for (Int_t i = 0; i < nbEntries; i++){
        HLTDebug("%i/%i: ", i+1, nbEntries);
        trdTrack = (AliTRDtrackV1*)fTracksArray->At(i);
-       trdTrack->Print();
+       //trdTrack->Print();
+       fTRDCalibraFillHisto->SetCH2dOn(TriggerPassed);
        fTRDCalibraFillHisto->UpdateHistogramsV1(trdTrack);
+       fTRDCalibraFillHisto->SetCH2dOn(kTRUE);
       }
       
-      if(!fOutArray->At(0))FormOutput();
+
+      if(!fOutArray->At(0))FormOutput(0);
+      if(!fDisplayArray->At(0))FormOutput(1);
       if (fNevent%feveryNevent==0 && fOutArray) {
-        PushBack(fOutArray, AliHLTTRDDefinitions::fgkCalibrationDataType);
+         PushBack(fDisplayArray, AliHLTTRDDefinitions::fgkCalibrationDataType);
       }
 
       fTracksArray->Delete();
       fNevent++;
 
     }
   return 0;
 
 }
@@ -265,19 +374,32 @@ Int_t AliHLTTRDCalibrationComponent::ProcessCalibration(const AliHLTComponent_Ev
  * Form output array of histrograms
  */
 //============================================================================
-void AliHLTTRDCalibrationComponent::FormOutput()
+void AliHLTTRDCalibrationComponent::FormOutput(Int_t param)
 {
   // gain histo
   TH2I *hCH2d = fTRDCalibraFillHisto->GetCH2d();
-  fOutArray->Add(hCH2d);
+  if(!param)fOutArray->Add(hCH2d);
+  else fDisplayArray->Add(hCH2d);
 
   // drift velocity histo
   TProfile2D *hPH2d = fTRDCalibraFillHisto->GetPH2d();
-  fOutArray->Add(hPH2d);
+  if(!param)fOutArray->Add(hPH2d);
+  else fDisplayArray->Add(hPH2d);
 
   // PRF histo
   TProfile2D *hPRF2d = fTRDCalibraFillHisto->GetPRF2d();
-  fOutArray->Add(hPRF2d);
+  if(!param)fOutArray->Add(hPRF2d);
+  else fDisplayArray->Add(hPRF2d);
+
+  // Vdrift Linear Fit
+  if(!param){
+    AliTRDCalibraVdriftLinearFit *hVdriftLinearFitOne=(AliTRDCalibraVdriftLinearFit *)fTRDCalibraFillHisto->GetVdriftLinearFit();
+    fOutArray->Add(hVdriftLinearFitOne);
+  }
+  else{
+    TH2S *hVdriftLinearFitOne = (TH2S *)(((AliTRDCalibraVdriftLinearFit *)fTRDCalibraFillHisto->GetVdriftLinearFit())->GetLinearFitterHisto(10,kTRUE));        
+  fDisplayArray->Add(hVdriftLinearFitOne);
+  }
 
   HLTDebug("GetCH2d = 0x%x; NEntries = %i; size = %i", hCH2d, hCH2d->GetEntries(), sizeof(hCH2d));
   hCH2d->Print();
@@ -285,12 +407,184 @@ void AliHLTTRDCalibrationComponent::FormOutput()
   hPH2d->Print();
   HLTDebug("GetPRF2d = 0x%x; NEntries = %i; size = %i", hPRF2d, hPRF2d->GetEntries(), sizeof(hPRF2d));
   hPRF2d->Print();
+  HLTDebug("GetVdriftLinearFit = 0x%x; size = %i", hVdriftLinearFit, sizeof(hVdriftLinearFit)); 
+  
   HLTDebug("output Array: pointer = 0x%x; NEntries = %i; size = %i", fOutArray, fOutArray->GetEntries(), sizeof(fOutArray));
+   
 }
 
 Int_t AliHLTTRDCalibrationComponent::ShipDataToFXS(const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/)
 {
   //fTRDCalibraFillHisto->DestroyDebugStreamer();
-  PushToFXS((TObject*)fOutArray, "TRD", "GAINDRIFTPRF");
+
+  AliHLTReadoutList rdList(AliHLTReadoutList::kTRD);
+
+  EORCalibration();
+  
+  fOutArray->Remove(fOutArray->FindObject("AliTRDCalibraVdriftLinearFit"));
+  //fOutArray->Remove(fOutArray->FindObject("PRF2d"));
+  //fOutArray->Remove(fOutArray->FindObject("PH2d"));
+  //fOutArray->Remove(fOutArray->FindObject("CH2d"));
+
+  if(!(fOutArray->FindObject("CH2d"))) {
+    TH2I * ch2d = new TH2I("CH2d","Nz0Nrphi0",100,0.0,300.0,540,0,540);
+    fOutArray->Add(ch2d);
+  }
+
+  if(!(fOutArray->FindObject("PH2d"))) {
+    TProfile2D * ph2d = new TProfile2D("PH2d","Nz0Nrphi0",30,-0.05,2.95,540,0,540);
+    fOutArray->Add(ph2d);
+  }
+
+  if(!(fOutArray->FindObject("PRF2d"))) {
+    TProfile2D * prf2d = new TProfile2D("PRF2d","Nz0Nrphi0Ngp3",60,-9.0,9.0,540,0,540);
+    fOutArray->Add(prf2d);
+  }
+
+
+  HLTDebug("Size of the fOutArray is %d\n",fOutArray->GetEntriesFast());
+
+  /*
+  TString fileName="$ALIHLT_TOPDIR/build-debug/output/CalibHistoDump_run";
+  fileName+=".root";
+  HLTInfo("Dumping Histogram file to %s",fileName.Data());
+  TFile* file = TFile::Open(fileName, "RECREATE");
+  //fAfterRunArray->Write();
+  fOutArray->Write();
+  file->Close();
+  HLTInfo("Histogram file dumped");
+  */
+  
+  PushToFXS((TObject*)fOutArray, "TRD", "GAINDRIFTPRF", rdList.Buffer() );
+  //PushToFXS((TObject*)fOutArray->FindObject("CH2d"), "TRD", "GAINDRIFTPRF", rdList.Buffer() );
+
+       
   return 0;
 }
+Int_t AliHLTTRDCalibrationComponent::EORCalibration()
+{
+  //Also Fill histograms for the online display
+  TH2I *hCH2d=(TH2I*)fOutArray->FindObject("CH2d");
+  TProfile2D *hPH2d=(TProfile2D*)fOutArray->FindObject("PH2d");
+  TProfile2D *hPRF2d= (TProfile2D*)fOutArray->FindObject("PRF2d");
+  AliTRDCalibraVdriftLinearFit* hVdriftLinearFit = (AliTRDCalibraVdriftLinearFit*)fOutArray->FindObject("AliTRDCalibraVdriftLinearFit");
+
+  if(!hCH2d || !hPH2d || !hPRF2d || !hVdriftLinearFit) return 0; 
+
+  //Fit
+  AliTRDCalibraFit *calibra = AliTRDCalibraFit::Instance();
+
+  //Gain
+  calibra->SetMinEntries(100);
+  calibra->AnalyseCH(hCH2d);
+  Int_t nbtg = 6*4*18*((Int_t) ((AliTRDCalibraMode *)calibra->GetCalibraMode())->GetDetChamb0(0))
+    + 6*  18*((Int_t) ((AliTRDCalibraMode *)calibra->GetCalibraMode())->GetDetChamb2(0));
+  Int_t nbfit       = calibra->GetNumberFit();
+  Int_t nbE         = calibra->GetNumberEnt();
+  TH1F *coefgain = 0x0;
+  // enough statistics
+  //if ((nbtg >                  0) && 
+  //   (nbfit        >= 0.2*nbE)) {
+  // create the cal objects
+  //calibra->PutMeanValueOtherVectorFit(1,kTRUE);
+  TObjArray object           = calibra->GetVectorFit();
+  AliTRDCalDet *objgaindet   = calibra->CreateDetObjectGain(&object,kFALSE);
+  coefgain                   = objgaindet->MakeHisto1DAsFunctionOfDet();
+  //}
+  calibra->ResetVectorFit();
+
+  // vdrift second method
+  calibra->SetMinEntries(100*20); // If there is less than 20000
+  hVdriftLinearFit->FillPEArray();
+  calibra->AnalyseLinearFitters(hVdriftLinearFit);
+  nbtg = 540;
+  nbfit = calibra->GetNumberFit();
+  nbE   = calibra->GetNumberEnt();
+  TH1F *coefdriftsecond = 0x0;
+  // enough statistics
+  //if ((nbtg >                  0) && 
+  // (nbfit        >= 0.1*nbE)) {
+  // create the cal objects
+  //calibra->PutMeanValueOtherVectorFit(1,kTRUE);
+  object  = calibra->GetVectorFit();
+  AliTRDCalDet *objdriftvelocitydetsecond = calibra->CreateDetObjectVdrift(&object,kTRUE);
+  objdriftvelocitydetsecond->SetTitle("secondmethodvdrift");
+  coefdriftsecond  = objdriftvelocitydetsecond->MakeHisto1DAsFunctionOfDet();
+  //}
+  calibra->ResetVectorFit();
+  
+  // vdrift first method
+  calibra->SetMinEntries(100*20); // If there is less than 20000
+  calibra->AnalysePH(hPH2d);
+  nbtg = 6*4*18*((Int_t) ((AliTRDCalibraMode *)calibra->GetCalibraMode())->GetDetChamb0(1))
+    + 6*  18*((Int_t) ((AliTRDCalibraMode *)calibra->GetCalibraMode())->GetDetChamb2(1));
+  nbfit        = calibra->GetNumberFit();
+  nbE          = calibra->GetNumberEnt();
+  TH1F *coefdrift = 0x0;
+  TH1F *coeft0 = 0x0;
+  // enough statistics
+  //if ((nbtg >                  0) && 
+  // (nbfit        >= 0.2*nbE)) {
+  // create the cal objects
+  //calibra->PutMeanValueOtherVectorFit(1,kTRUE);
+  //calibra->PutMeanValueOtherVectorFit2(1,kTRUE);
+  object  = calibra->GetVectorFit();
+  AliTRDCalDet *objdriftvelocitydet = calibra->CreateDetObjectVdrift(&object,kTRUE);
+  coefdrift        = objdriftvelocitydet->MakeHisto1DAsFunctionOfDet();
+  object              = calibra->GetVectorFit2();
+  AliTRDCalDet *objtime0det  = calibra->CreateDetObjectT0(&object,kTRUE);
+  coeft0        = objtime0det->MakeHisto1DAsFunctionOfDet();
+  //}
+  calibra->ResetVectorFit();
+           
+
+  //PRF
+  calibra->SetMinEntries(200); 
+  calibra->AnalysePRFMarianFit(hPRF2d);
+  nbtg = 6*4*18*((Int_t) ((AliTRDCalibraMode *)calibra->GetCalibraMode())->GetDetChamb0(2))
+    + 6*  18*((Int_t) ((AliTRDCalibraMode *)calibra->GetCalibraMode())->GetDetChamb2(2));
+  nbfit        = calibra->GetNumberFit();
+  nbE          = calibra->GetNumberEnt();
+  TH1F *coefprf = 0x0;
+  // enough statistics
+  //if ((nbtg >                  0) && 
+  //  (nbfit        >= 0.95*nbE)) {
+  // create cal pad objects 
+  object            = calibra->GetVectorFit();
+  TObject *objPRFpad          = calibra->CreatePadObjectPRF(&object);
+  coefprf                     = ((AliTRDCalPad *) objPRFpad)->MakeHisto1D();
+  //}
+  calibra->ResetVectorFit();
+
+
+  coefgain->SetName("coefgain");
+  coefprf->SetName("coefprf");
+  coefdrift->SetName("coefdrift");
+  coefdriftsecond->SetName("coefdriftsecond");
+  coeft0->SetName("coeft0");
+  if(coefgain) fAfterRunArray->Add(coefgain);
+  if(coefprf) fAfterRunArray->Add(coefprf);
+  if(coefdrift) fAfterRunArray->Add(coefdrift);
+  if(coefdriftsecond) fAfterRunArray->Add(coefdriftsecond);
+  if(coeft0) fAfterRunArray->Add(coeft0);
+  
+
+  if(coefgain||coefprf||coefdrift||coeft0||coefdriftsecond) {
+        PushBack(fAfterRunArray, AliHLTTRDDefinitions::fgkEORCalibrationDataType);
+      }
+
+  /*
+  TString fileName="$ALIHLT_TOPDIR/build-debug/output/CalibHistoDump_run";
+  fileName+=".root";
+  HLTInfo("Dumping Histogram file to %s",fileName.Data());
+  TFile* file = TFile::Open(fileName, "RECREATE");
+  fAfterRunArray->Write();
+  fOutArray->Write();
+  file->Close();
+  HLTInfo("Histogram file dumped");
+  */
+
+  return 0;
+}      
+
index d844580..55f792c 100644 (file)
@@ -46,6 +46,7 @@ public:
   const char* GetComponentID();
   void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
   AliHLTComponentDataType GetOutputDataType();
+  int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
   virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
   AliHLTComponent* Spawn();
        
@@ -67,6 +68,7 @@ protected:
                                   vector<AliHLTComponent_BlockData>& outputBlocks);
   /*   virtual Int_t ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData); */
   virtual Int_t ShipDataToFXS(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
+  virtual Int_t  EORCalibration();
        
   using AliHLTCalibrationProcessor::ProcessCalibration;
   //using AliHLTCalibrationProcessor::ShipDataToFXS;
@@ -76,16 +78,21 @@ private:
   AliHLTTRDCalibrationComponent(const AliHLTTRDCalibrationComponent&);
   /** assignment operator prohibited */
   AliHLTTRDCalibrationComponent& operator=(const AliHLTTRDCalibrationComponent&);
-  void FormOutput();
+  void FormOutput(Int_t param);
 
   AliHLTUInt32_t fOutputSize;    // output size
   TClonesArray* fTracksArray;    // array containing the input
   TObjArray* fOutArray;          // array containing the output
+  TObjArray* fAfterRunArray;     // array with after run processing output 
+  TObjArray* fDisplayArray;        //array with online display histos
   UInt_t fNevent;                 // number of processed events
   UInt_t feveryNevent;            // push back every nth event
   Bool_t fRecievedTimeBins;      // already recived the number of time bins?
-
+  TObjArray *fTrgStrings;        // name of trigger classes to accept or reject
+  Int_t  fAccRejTrg;             // do we actually accept or reject the trigger strings?
+  
   ClassDef(AliHLTTRDCalibrationComponent, 1)
 
 };
 #endif
+
index fa957bc..0c53fcc 100644 (file)
@@ -39,6 +39,8 @@ const AliHLTComponentDataType AliHLTTRDDefinitions::fgkMCMcalibrationDataType =
 
 const AliHLTComponentDataType AliHLTTRDDefinitions::fgkCalibrationDataType = { sizeof(AliHLTComponentDataType), {'C','A','L','I','B','R','A','H'},{'T','R','D',' '}};;
 
+const AliHLTComponentDataType AliHLTTRDDefinitions::fgkEORCalibrationDataType = { sizeof(AliHLTComponentDataType), {'C','A','L','I','B','E','O','R'},{'T','R','D',' '}};;
+
 AliHLTTRDDefinitions::AliHLTTRDDefinitions()
 {
   // see header file for class documentation
@@ -50,3 +52,4 @@ AliHLTTRDDefinitions::~AliHLTTRDDefinitions()
 {
   // see header file for class documentation
 }
+
index adee672..b5f0101 100644 (file)
@@ -34,9 +34,11 @@ public:
   static const AliHLTComponentDataType fgkMCMtrackletDataType; // MCM tracklet Data
   static const AliHLTComponentDataType fgkMCMcalibrationDataType; // MCM Calibration data
   static const AliHLTComponentDataType fgkCalibrationDataType; // Calibration with TRDtracks
+  static const AliHLTComponentDataType fgkEORCalibrationDataType;//Calibration end of run 
 
   ClassDef(AliHLTTRDDefinitions, 0)
     
 };
 
 #endif
+
index 8588c69..365927b 100644 (file)
@@ -94,7 +94,8 @@ void AliHLTTRDTrack::CopyDataMembers(const AliTRDtrackV1* const inTrack)
 void AliHLTTRDTrack::ExportTRDTrack(AliTRDtrackV1* const outTrack) const
 {
   //outTrack->Reset(); we always use a new fresh trdtrack as input, so this is useless
-  
+  outTrack->SetBit(AliTRDtrackV1::kOwner);  
+
   outTrack->fDE=fDE;
   outTrack->fFakeRatio=fFakeRatio;
   outTrack->fChi2=fChi2;
@@ -218,3 +219,4 @@ void AliHLTTRDTrack::Print(Bool_t printTracklets) const
 //     }
 //   }
 // }
+
index 60dcae9..9a831bc 100644 (file)
@@ -89,6 +89,7 @@ void AliHLTTRDTracklet::CopyDataMembers(const AliTRDseedV1* const inTracklet)
 void AliHLTTRDTracklet::ExportTRDTracklet(AliTRDseedV1* const outTracklet) const
 {
   //outTracklet->Reset(); we always use a fresh trdtracklet as input, so this is useless
+  outTracklet->SetBit(AliTRDseedV1::kOwner);
 
   outTracklet->fN      = fN;
   outTracklet->fDet    = fDet;
@@ -176,3 +177,4 @@ void AliHLTTRDTracklet::Print(Bool_t printClusters) const
     
 //   }
 // }
+
index 21c6299..98e483b 100644 (file)
@@ -43,7 +43,7 @@ MODULE_HDRS:= \
 # enable automatic generation. 
 MODULE_DHDR:=
 
-EINCLUDE := HLT/BASE HLT/BASE/util HLT/TRD TRD STEER RAW
+EINCLUDE := HLT/BASE HLT/BASE/util HLT/TRD TRD TRD/Cal STEER RAW
 
 LIBRARY_DEP := -lHLTbase -lAliHLTUtil -lESD -lCDB -lTRDrec -lTRDbase \
                -lSTEER -lSTEERBase -lRAWDatarec