New branches with run number and OCDB file ITS/Align/Data in spTree
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Nov 2009 18:28:44 +0000 (18:28 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Nov 2009 18:28:44 +0000 (18:28 +0000)
PWG1/ITS/AliAlignmentDataFilterITS.cxx

index 11a5996..ee8703c 100644 (file)
@@ -285,10 +285,14 @@ void AliAlignmentDataFilterITS::CreateOutputObjects()
 
   fspTree = new TTree("spTree","Tree with ITS track points");
   const AliTrackPointArray *array = 0;
 
   fspTree = new TTree("spTree","Tree with ITS track points");
   const AliTrackPointArray *array = 0;
-  Float_t curv,curverr;
+  Float_t curv,curverr,runNumber;
+  const TObjString *itsaligndata = 0;
   fspTree->Branch("SP","AliTrackPointArray",&array);
   fspTree->Branch("curv",&curv);
   fspTree->Branch("curverr",&curverr);
   fspTree->Branch("SP","AliTrackPointArray",&array);
   fspTree->Branch("curv",&curv);
   fspTree->Branch("curverr",&curverr);
+  fspTree->Branch("run",&runNumber);
+  fspTree->Branch("ITSAlignData",&itsaligndata);
+  
 
   return;
 }
 
   return;
 }
@@ -365,10 +369,29 @@ void AliAlignmentDataFilterITS::FilterCosmic(const AliESDEvent *esd)
 
   // Set branch addresses for space points tree
   AliTrackPointArray *arrayForTree=0;
 
   // Set branch addresses for space points tree
   AliTrackPointArray *arrayForTree=0;
-  Float_t curv,curverr;
+  Float_t curv,curverr,runNumber;
+  TObjString *itsaligndata=0;
   fspTree->SetBranchAddress("SP",&arrayForTree);
   fspTree->SetBranchAddress("curv",&curv);
   fspTree->SetBranchAddress("curverr",&curverr);
   fspTree->SetBranchAddress("SP",&arrayForTree);
   fspTree->SetBranchAddress("curv",&curv);
   fspTree->SetBranchAddress("curverr",&curverr);
+  fspTree->SetBranchAddress("run",&runNumber);
+  fspTree->SetBranchAddress("ITSAlignData",&itsaligndata);
+
+
+  runNumber = (Float_t)esd->GetRunNumber();
+
+  TTree* esdTree = dynamic_cast<TTree*> (GetInputData(0));
+  // Get the list of OCDB objects used for reco 
+  TList *cdbList = (TList*)(esdTree->GetTree()->GetUserInfo())->FindObject("cdbList");
+  TIter iter2(cdbList);             
+  TObjString* cdbEntry=0;
+  TString cdbEntryString;
+  while((cdbEntry =(TObjString*)(iter2.Next()))) {
+  cdbEntryString = cdbEntry->GetString();
+  if(cdbEntryString.Contains("ITS/Align/Data")) 
+    itsaligndata = new TObjString(*cdbEntry);
+  }     
+
 
   TString triggeredClass = fESD->GetFiredTriggerClasses(); 
   if(fOnlySPDFO && !triggeredClass.Contains("C0SCO-ABCE-NOPF-CENT")) return;
 
   TString triggeredClass = fESD->GetFiredTriggerClasses(); 
   if(fOnlySPDFO && !triggeredClass.Contains("C0SCO-ABCE-NOPF-CENT")) return;
@@ -687,10 +710,28 @@ void AliAlignmentDataFilterITS::FilterCollision(const AliESDEvent *esd)
 
   // Set branch addresses for space points tree
   AliTrackPointArray *arrayForTree=0;
 
   // Set branch addresses for space points tree
   AliTrackPointArray *arrayForTree=0;
-  Float_t curv,curverr;
+  Float_t curv,curverr,runNumber;
+  TObjString *itsaligndata=0;
   fspTree->SetBranchAddress("SP",&arrayForTree);
   fspTree->SetBranchAddress("curv",&curv);
   fspTree->SetBranchAddress("curverr",&curverr);
   fspTree->SetBranchAddress("SP",&arrayForTree);
   fspTree->SetBranchAddress("curv",&curv);
   fspTree->SetBranchAddress("curverr",&curverr);
+  fspTree->SetBranchAddress("run",&runNumber);
+  fspTree->SetBranchAddress("ITSAlignData",&itsaligndata);
+
+
+  runNumber = (Float_t)esd->GetRunNumber();
+
+  TTree* esdTree = dynamic_cast<TTree*> (GetInputData(0));
+  // Get the list of OCDB objects used for reco 
+  TList *cdbList = (TList*)(esdTree->GetTree()->GetUserInfo())->FindObject("cdbList");
+  TIter iter2(cdbList);             
+  TObjString* cdbEntry=0;
+  TString cdbEntryString;
+  while((cdbEntry =(TObjString*)(iter2.Next()))) {
+  cdbEntryString = cdbEntry->GetString();
+  if(cdbEntryString.Contains("ITS/Align/Data")) 
+    itsaligndata = new TObjString(*cdbEntry);
+  }     
 
   Int_t ntracks = esd->GetNumberOfTracks();
 
 
   Int_t ntracks = esd->GetNumberOfTracks();