set manually the pass number if requested - Constantin
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Jan 2013 08:20:04 +0000 (08:20 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Jan 2013 08:20:04 +0000 (08:20 +0000)
ANALYSIS/TenderSupplies/AliEMCALTenderSupply.cxx
ANALYSIS/TenderSupplies/AliEMCALTenderSupply.h

index 524fda75869fd19834a1b6bd9a65f8137b1ac224..57a74b4424164b5d57c9ef467ec13d83fb4ec1c9 100644 (file)
@@ -138,7 +138,8 @@ AliTenderSupply(name,tender)
 ,fRecalShowerShape(kFALSE)
 ,fInputTree(0)  
 ,fInputFile(0)
 ,fRecalShowerShape(kFALSE)
 ,fInputTree(0)  
 ,fInputFile(0)
-,fFilepass(0) 
+,fGetPassFromFileName(kTRUE)
+,fFilepass("") 
 ,fMass(-1)
 ,fStep(-1)
 ,fCutEtaPhiSum(kTRUE)
 ,fMass(-1)
 ,fStep(-1)
 ,fCutEtaPhiSum(kTRUE)
@@ -196,7 +197,8 @@ AliTenderSupply(name)
 ,fRecalShowerShape(kFALSE)
 ,fInputTree(0)  
 ,fInputFile(0)
 ,fRecalShowerShape(kFALSE)
 ,fInputTree(0)  
 ,fInputFile(0)
-,fFilepass(0) 
+,fGetPassFromFileName(kTRUE)
+,fFilepass("") 
 ,fMass(-1)
 ,fStep(-1)
 ,fCutEtaPhiSum(kTRUE)
 ,fMass(-1)
 ,fStep(-1)
 ,fCutEtaPhiSum(kTRUE)
@@ -468,7 +470,8 @@ void AliEMCALTenderSupply::ProcessEvent()
     } 
 
     // get pass
     } 
 
     // get pass
-    GetPass();
+    if (fGetPassFromFileName)
+      GetPass();
 
     // define what recalib parameters are needed for various switches
     // this is based on implementation in AliEMCALRecoUtils
 
     // define what recalib parameters are needed for various switches
     // this is based on implementation in AliEMCALRecoUtils
@@ -1583,7 +1586,7 @@ void AliEMCALTenderSupply::RecPoints2Clusters(TClonesArray *clus)
 //_____________________________________________________
 void AliEMCALTenderSupply::GetPass()
 {
 //_____________________________________________________
 void AliEMCALTenderSupply::GetPass()
 {
-  // Get passx from filename.
+  // Get passx from filename
   
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   fInputTree = mgr->GetTree();
   
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   fInputTree = mgr->GetTree();
index 2bf4a5fdda3d26b06cf9bf8474dbc289cb5662c9..5256c06bfb1458ef04eb17c1a6809089c5f57587 100644 (file)
@@ -157,7 +157,10 @@ public:
 
   void     SwitchOnUseClusterMCLabelForCell()             { fSetCellMCLabelFromCluster = kTRUE  ;}
   void     SwitchOffUseClusterMCLabelForCell()            { fSetCellMCLabelFromCluster = kFALSE ;}
 
   void     SwitchOnUseClusterMCLabelForCell()             { fSetCellMCLabelFromCluster = kTRUE  ;}
   void     SwitchOffUseClusterMCLabelForCell()            { fSetCellMCLabelFromCluster = kFALSE ;}
-  
+
+  void     SetPass(const char* p)                         { fFilepass = p; fGetPassFromFileName = kFALSE; }
+  void     UnsetPass()                                    { fFilepass = ""; fGetPassFromFileName = kTRUE; }
+   
 private:
 
   AliVEvent* GetEvent();
 private:
 
   AliVEvent* GetEvent();
@@ -204,7 +207,8 @@ private:
   Bool_t                 fRecalShowerShape;       // switch for recalculation of the shower shape
   TTree                 *fInputTree;              //!input data tree
   TFile                 *fInputFile;              //!input data file 
   Bool_t                 fRecalShowerShape;       // switch for recalculation of the shower shape
   TTree                 *fInputTree;              //!input data tree
   TFile                 *fInputFile;              //!input data file 
-  TString                fFilepass;               //!input data pass number
+  Bool_t                 fGetPassFromFileName;    // get fFilepass from file name
+  TString                fFilepass;               // input data pass number
   Double_t               fMass;                   // mass for track matching
   Double_t               fStep;                   // step size during track matching
   Bool_t                 fCutEtaPhiSum;           // swicth to apply residual cut together
   Double_t               fMass;                   // mass for track matching
   Double_t               fStep;                   // step size during track matching
   Bool_t                 fCutEtaPhiSum;           // swicth to apply residual cut together
@@ -233,6 +237,6 @@ private:
   AliEMCALTenderSupply(const AliEMCALTenderSupply&c);
   AliEMCALTenderSupply& operator= (const AliEMCALTenderSupply&c);
   
   AliEMCALTenderSupply(const AliEMCALTenderSupply&c);
   AliEMCALTenderSupply& operator= (const AliEMCALTenderSupply&c);
   
-  ClassDef(AliEMCALTenderSupply, 13); // EMCAL tender task
+  ClassDef(AliEMCALTenderSupply, 14); // EMCAL tender task
 };
 #endif
 };
 #endif