]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
uuhhhhaaa - what did I change? Added the run number and fixed coding conventions ;-)
authorekman <ekman@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 10 Nov 2006 15:43:23 +0000 (15:43 +0000)
committerekman <ekman@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 10 Nov 2006 15:43:23 +0000 (15:43 +0000)
PWG0/TPC/AliROCESDAnalysisSelector.cxx
PWG0/TPC/AliROCESDAnalysisSelector.h
PWG0/TPC/AliTPCClusterHistograms.cxx
PWG0/TPC/runROCESDAnalysis.C

index 770296c9b83a9e5b634f11491302715ad55d6728..4fb9f2f6f478ec05624b7afb6291eb6a526dd3d9 100644 (file)
@@ -89,9 +89,12 @@ void AliROCESDAnalysisSelector::Init(TTree *tree)
   AliSelector::Init(tree);
 
   // Set branch address
   AliSelector::Init(tree);
 
   // Set branch address
-  if (tree)
+  if (tree) {
+    tree->SetBranchStatus("*", 0);
+    tree->SetBranchStatus("fTracks.*", 1);
+    tree->SetBranchStatus("fTimeStamp", 1);
     tree->SetBranchAddress("ESDfriend", &fESDfriend);
     tree->SetBranchAddress("ESDfriend", &fESDfriend);
-    
+  }
   if (fESDfriend != 0)
     AliDebug(AliLog::kInfo, "INFO: Found ESDfriend branch in chain.");
 }
   if (fESDfriend != 0)
     AliDebug(AliLog::kInfo, "INFO: Found ESDfriend branch in chain.");
 }
@@ -104,6 +107,9 @@ Bool_t AliROCESDAnalysisSelector::Process(Long64_t entry)
   //   return kFALSE;
   //
 
   //   return kFALSE;
   //
 
+  //  AliDebug(AliLog::kInfo, Form("Processing event %d \n", entry));
+
+
   if (AliSelector::Process(entry) == kFALSE)
     return kFALSE;
 
   if (AliSelector::Process(entry) == kFALSE)
     return kFALSE;
 
@@ -132,6 +138,7 @@ Bool_t AliROCESDAnalysisSelector::Process(Long64_t entry)
   // loop over esd tracks
   for (Int_t t=0; t<nTracks; t++)
   {
   // loop over esd tracks
   for (Int_t t=0; t<nTracks; t++)
   {
+
     AliESDtrack* esdTrack = dynamic_cast<AliESDtrack*> (fESD->GetTrack(t));
     if (!esdTrack)
     {
     AliESDtrack* esdTrack = dynamic_cast<AliESDtrack*> (fESD->GetTrack(t));
     if (!esdTrack)
     {
@@ -198,20 +205,29 @@ void AliROCESDAnalysisSelector::SlaveTerminate()
   for (Int_t i=0; i<kTPCSectors; i++)
     if (fClusterHistograms[i])
         fOutput->Add(fClusterHistograms[i]);
   for (Int_t i=0; i<kTPCSectors; i++)
     if (fClusterHistograms[i])
         fOutput->Add(fClusterHistograms[i]);
+
 } 
 
 void AliROCESDAnalysisSelector::Terminate()
 {
   // TODO read from output list for PROOF
     
 } 
 
 void AliROCESDAnalysisSelector::Terminate()
 {
   // TODO read from output list for PROOF
     
-  TFile* file = TFile::Open("rocESD.root", "RECREATE");
+  TNamed* comment = dynamic_cast<TNamed*>(fTree->GetUserInfo()->FindObject("comment"));
+
+  if (comment)
+    AliDebug(AliLog::kInfo, Form("INFO: Found comment in input list: %s \n", comment->GetTitle()));
+
+  TFile* file = TFile::Open(Form("rocESD_%s.root",comment->GetTitle()), "RECREATE");
   
   for (Int_t i=0; i<kTPCSectors; i++)
     if (fClusterHistograms[i]) {
       fClusterHistograms[i]->SaveHistograms();
       TCanvas* c = fClusterHistograms[i]->DrawHistograms();
   
   for (Int_t i=0; i<kTPCSectors; i++)
     if (fClusterHistograms[i]) {
       fClusterHistograms[i]->SaveHistograms();
       TCanvas* c = fClusterHistograms[i]->DrawHistograms();
-      c->SaveAs(Form("%s.eps",c->GetName()));
-      c->SaveAs(Form("%s.gif",c->GetName()));
+      c->SaveAs(Form("plots_%s_%s.eps",comment->GetTitle(),c->GetName()));
+      c->SaveAs(Form("plots_%s_%s.gif",comment->GetTitle(),c->GetName()));
+
+      c->Close();
+      delete c;
     }
   file->Close();
 } 
     }
   file->Close();
 } 
index 948d5f358d870ec7177a57a8e49c6ec1eac334b6..74a70335d94290609fe4e4d53a59eee15565652f 100644 (file)
@@ -31,6 +31,7 @@ class AliROCESDAnalysisSelector : public AliSelector {
     AliTPCClusterHistograms* fClusterHistograms[kTPCSectors];
 
  private:
     AliTPCClusterHistograms* fClusterHistograms[kTPCSectors];
 
  private:
+
     AliROCESDAnalysisSelector(const AliROCESDAnalysisSelector&);
     AliROCESDAnalysisSelector& operator=(const AliROCESDAnalysisSelector&);
 
     AliROCESDAnalysisSelector(const AliROCESDAnalysisSelector&);
     AliROCESDAnalysisSelector& operator=(const AliROCESDAnalysisSelector&);
 
index 8b717dc66d6124fe4eb1700bb4fb9bb37a3dfeb9..4101fda224275e053368d73a02172ce374a130e4 100644 (file)
@@ -401,12 +401,12 @@ TCanvas* AliTPCClusterHistograms::DrawHistograms(const Char_t* opt) {
   // Draws some histograms and save the canvas as eps and gif file.
   //  
 
   // Draws some histograms and save the canvas as eps and gif file.
   //  
 
-  TCanvas* c = new TCanvas(Form("plots_%s",fName.Data()), fName.Data(), 1200, 1000);
+  TCanvas* c = new TCanvas(Form("%s",fName.Data()), fName.Data(), 1200, 1000);
 
   gStyle->SetOptStat(0);
   gStyle->SetOptFit(0);
 
 
   gStyle->SetOptStat(0);
   gStyle->SetOptFit(0);
 
-  gStyle->SetPadLeftMargin(0.05);
+  gStyle->SetPadLeftMargin(0.1);
 
   c->Divide(3,3);
 
 
   c->Divide(3,3);
 
index f740b0818eae308407540586d327a5d320cd25c5..051f644229b7928cee23eec06ac7776fb7a9a9c8 100644 (file)
@@ -7,13 +7,13 @@
 #include "../CreateESDChain.C"
 #include "../PWG0Helper.C"
 
 #include "../CreateESDChain.C"
 #include "../PWG0Helper.C"
 
-void runROCESDAnalysis(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aDebug = kFALSE, Bool_t aProof = kFALSE, 
+void runROCESDAnalysis(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aDebug = kFALSE, Int_t runNumber=0, Bool_t aProof = kFALSE, 
     const char* option = "", const char* proofServer = "jgrosseo@lxb6046")
 {
   if (aProof)
     connectProof(proofServer);
 
     const char* option = "", const char* proofServer = "jgrosseo@lxb6046")
 {
   if (aProof)
     connectProof(proofServer);
 
-  TString libraries("libEG;libGeom;libESD;libPWG0base");
+  TString libraries("libEG;libGeom;libESD;libPWG0base;libPWG0dep");
   TString packages;
 
   if (!prepareQuery(libraries, packages, 2))
   TString packages;
 
   if (!prepareQuery(libraries, packages, 2))
@@ -23,6 +23,10 @@ void runROCESDAnalysis(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aDeb
 
   TList inputList;
 
 
   TList inputList;
 
+  //  TNamed* comment = new TNamed("comment",runStr.Data());
+  if (runNumber!=0)
+    inputList.Add(new TNamed("comment",Form("%d",runNumber)));
+
   TString selectorName = "AliROCESDAnalysisSelector";
   AliLog::SetClassDebugLevel(selectorName, AliLog::kInfo);
 
   TString selectorName = "AliROCESDAnalysisSelector";
   AliLog::SetClassDebugLevel(selectorName, AliLog::kInfo);