update from DongJo
authorlmilano <lmilano@cern.ch>
Thu, 27 Nov 2014 12:45:59 +0000 (13:45 +0100)
committerlmilano <lmilano@cern.ch>
Thu, 27 Nov 2014 12:45:59 +0000 (13:45 +0100)
PWGCF/Correlations/JCORRAN/AliJCORRANTask.cxx
PWGCF/Correlations/JCORRAN/AliJCORRANTask.h
PWGCF/Correlations/JCORRAN/AliJDiHadronCorrTask.cxx
PWGCF/Correlations/JCORRAN/AliJEfficiencyTask.cxx

index b98e967..50a3b97 100644 (file)
@@ -44,6 +44,7 @@
 //______________________________________________________________________________
 AliJCORRANTask::AliJCORRANTask() :   
     AliAnalysisTaskSE("PWG4JCORRAN"),
+       fFilterEntry(0),
     fFilter(0x0),
     fAliJRunHeader(0x0)
 {
@@ -56,6 +57,7 @@ AliJCORRANTask::AliJCORRANTask() :
 //______________________________________________________________________________
 AliJCORRANTask::AliJCORRANTask(const char *name, TString inputformat):
     AliAnalysisTaskSE(name), 
+       fFilterEntry(0),
     fFilter(0x0),
     fAliJRunHeader(0x0)
 {
@@ -72,6 +74,7 @@ AliJCORRANTask::AliJCORRANTask(const char *name, TString inputformat):
 //____________________________________________________________________________
 AliJCORRANTask::AliJCORRANTask(const AliJCORRANTask& ap) :
     AliAnalysisTaskSE(ap.GetName()), 
+       fFilterEntry(ap.fFilterEntry),
     fFilter(ap.fFilter),
     fAliJRunHeader(ap.fAliJRunHeader)
 { 
@@ -132,9 +135,8 @@ void AliJCORRANTask::UserExec(Option_t* /*option*/)
        // Processing of one event
        if(fDebug > 5) cout << "------- AliJCORRANTask Exec-------"<<endl;
        if(!((Entry()-1)%100))  AliInfo(Form(" Processing event # %lld",  Entry())); 
-       if( fFilter->GetEventSuccess() ){
-               fFilter->UserExec("");
-       }
+       fFilterEntry = fEntry;
+       fFilter->UserExec("");
 
        if(fDebug > 5) cout << "\t------- End UserExec "<<endl;
 }
index 98319c4..d01a4f9 100644 (file)
@@ -82,12 +82,14 @@ class AliJCORRANTask : public AliAnalysisTaskSE {
   virtual void Terminate(Option_t* );
 
   AliJFilter *GetFilter() { return fFilter; }
+  Int_t GetFilterEntry(){ return fFilterEntry; }
 
   AliJRunHeader * GetJRunHeader(){ return fAliJRunHeader; }
   void SetJRunHeader( AliJRunHeader * hdr ){ fAliJRunHeader = hdr ; }
 
  private:
   
+  Int_t                        fFilterEntry; // entry to compare
   AliJFilter *fFilter; // filter object
   AliJRunHeader * fAliJRunHeader;
 
index 56a18f7..d725ebe 100644 (file)
@@ -123,7 +123,7 @@ void AliJDiHadronCorrTask::UserCreateOutputObjects()
    fJCORRAN->SetHeaderList(fFilterTask->GetFilter()->GetHeaderList() );
    fJCORRAN->SetTrackList( fFilterTask->GetFilter()->GetTrackList()     );
    fJCORRAN->SetMCTrackList( fFilterTask->GetFilter()->GetMCTrackList()    );
-       fJCORRAN->GetCard()->WriteCard(fOutput);
+   fJCORRAN->GetCard()->WriteCard(fOutput);
 
    PostData( 1, fOutput );
    //TH1::AddDirectory( orignalTH1AdddirectoryStatus );
@@ -140,7 +140,7 @@ void AliJDiHadronCorrTask::UserExec(Option_t* /*option*/)
        // Processing of one event
        if(fDebug > 5) cout << "------- AliJDiHadronCorrTask Exec-------"<<endl;
        //if(!((Entry()-1)%100))  cout << Form(" Processing event # %lld",  Entry()) << endl; 
-
+       if( fFilterTask->GetFilterEntry() != fEntry ) return;
 
        //cout << "AliJDiHadronCorrTask::UserExec fFilterTask->GetFilter()->GetEventSuccess() = " << fFilterTask->GetFilter()->GetEventSuccess() << endl;
        if( fFilterTask->GetFilter()->GetEventSuccess() ){
@@ -163,16 +163,16 @@ void AliJDiHadronCorrTask::Init()
 //______________________________________________________________________________
 void AliJDiHadronCorrTask::Terminate(Option_t *)
 {
-/*
-       fJCORRAN->Terminate();
-       OpenFile(1);
-       fOutput->cd();
+       /*
+          fJCORRAN->Terminate();
+          OpenFile(1);
+          fOutput->cd();
 
-       cout<<"# Write Data "<<endl;
+          cout<<"# Write Data "<<endl;
        //write Trigg ID and Assoc ID
        fOutput->Write(0,TObject::kOverwrite);
        PostData(1,fOutput);
-*/
+       */
        cout<<"AliJDiHadronCorrTask Analysis DONE !!"<<endl; 
 
 }
index 850c55e..4d4a623 100644 (file)
@@ -129,6 +129,7 @@ void AliJEfficiencyTask::UserExec(Option_t* /*option*/)
        // Processing of one event
        if(fDebug > 5) cout << "------- AliJEfficiencyTask Exec-------"<<endl;
        if(!((Entry()-1)%100))  AliInfo(Form(" Processing event # %lld",  Entry())); 
+       if( fFilterTask->GetFilterEntry() != fEntry ) return;
 
        if( fFilterTask->GetFilter()->GetEventSuccess() ){
                fEfficiencyScanner->SetJEventHeader( (AliJEventHeader*) fFilterTask->GetFilter()->GetHeaderList()->At(0) );