]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
AliPHOSGetter is removed
authorkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Apr 2008 08:21:11 +0000 (08:21 +0000)
committerkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Apr 2008 08:21:11 +0000 (08:21 +0000)
17 files changed:
PHOS/AliPHOSEmcRecPoint.cxx
PHOS/AliPHOSGetter.cxx [deleted file]
PHOS/AliPHOSGetter.h [deleted file]
PHOS/AliPHOSGetterLight.cxx [deleted file]
PHOS/AliPHOSGetterLight.h [deleted file]
PHOS/AliPHOSJet.cxx
PHOS/AliPHOSJetFinder.cxx
PHOS/AliPHOSLoader.cxx
PHOS/AliPHOSOnlineMonitor.cxx
PHOS/AliPHOSPID.cxx
PHOS/AliPHOSPIDv1.cxx
PHOS/AliPHOSRecParticle.cxx
PHOS/AliPHOSTrackSegmentMaker.cxx
PHOS/AliPHOSTrackSegmentMakerv2.cxx
PHOS/AliPHOSTracker.cxx
PHOS/PHOSbaseLinkDef.h
PHOS/libPHOSbase.pkg

index 3f7c4b7306fd7f24bda850755219de1f3171a27f..e4979a9e33fcaa7b9e49d4c83585467bf03c40c5 100644 (file)
@@ -248,15 +248,15 @@ void AliPHOSEmcRecPoint::ExecuteEvent(Int_t event, Int_t, Int_t) /*const*/
       AliError(Form("Cannot find Run Loader in Default Event Folder"));
       return;
     }
-  AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(rn->GetLoader("PHOSLoader"));
-  if (gime == 0x0) 
+  AliPHOSLoader* phosLoader = dynamic_cast<AliPHOSLoader*>(rn->GetLoader("PHOSLoader"));
+  if (phosLoader == 0x0) 
     {
       AliError(Form("Cannot find PHOS Loader from Run Loader"));
       return;
     }
   
   
-  const TClonesArray * digits = gime->Digits() ;
+  const TClonesArray * digits = phosLoader->Digits() ;
   
   switch (event) {
     
@@ -531,8 +531,7 @@ void  AliPHOSEmcRecPoint::EvalElipsAxis(Float_t logWeight,TClonesArray * digits,
 //   //Apply correction due to non-perpendicular incidence
 //   Double_t CosX ;
 //   Double_t CosZ ;
-//   AliPHOSGetter * gime = AliPHOSGetter::Instance() ; 
-//   AliPHOSGeometry * phosgeom =  (AliPHOSGeometry*)gime->PHOSGeometry();
+//   AliPHOSGeometry * phosgeom = AliPHOSGeometry::GetInstance() ;
 //   Double_t DistanceToIP= (Double_t ) phosgeom->GetIPtoCrystalSurface() ;
   
 //   CosX = DistanceToIP/TMath::Sqrt(DistanceToIP*DistanceToIP+x*x) ;
diff --git a/PHOS/AliPHOSGetter.cxx b/PHOS/AliPHOSGetter.cxx
deleted file mode 100644 (file)
index bbeb14e..0000000
+++ /dev/null
@@ -1,1091 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-
-/* $Id$ */
-
-//_________________________________________________________________________
-//  A singleton. This class should be used in the analysis stage to get 
-//  reconstructed objects: Digits, RecPoints, TrackSegments and RecParticles,
-//  instead of directly reading them from galice.root file. This container 
-//  ensures, that one reads Digits, made of these particular digits, RecPoints, 
-//  made of these particular RecPoints, TrackSegments and RecParticles. 
-//  This becomes non trivial if there are several identical branches, produced with
-//  different set of parameters. 
-//
-//  An example of how to use (see also class AliPHOSAnalyser):
-//  AliPHOSGetter * gime = AliPHOSGetter::GetInstance("galice.root","test") ;
-//  for(Int_t irecp = 0; irecp < gime->NRecParticles() ; irecp++)
-//     AliPHOSRecParticle * part = gime->RecParticle(1) ;
-//     ................
-//  gime->Event(event) ;    // reads new event from galice.root
-//                  
-//*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
-//*--         Completely redesigned by Dmitri Peressounko March 2001  
-//
-//*-- YS June 2001 : renamed the original AliPHOSIndexToObject and make
-//*--         systematic usage of TFolders without changing the interface        
-//////////////////////////////////////////////////////////////////////////////
-
-// --- ROOT system ---
-
-#include <TFile.h>
-#include <TROOT.h>
-#include <TSystem.h>
-#include <TParticle.h>
-#include <TF1.h>
-#include <TGraph.h>
-#include <TCanvas.h>
-#include <TStyle.h>
-//#include <TFrame.h>
-
-// --- Standard library ---
-
-// --- AliRoot header files ---
-#include "AliESD.h"
-#include "AliHeader.h"  
-#include "AliMC.h"
-#include "AliPHOS.h"
-#include "AliPHOSBeamTestEvent.h"
-#include "AliPHOSGetter.h"
-#include "AliPHOSLoader.h"
-#include "AliPHOSPulseGenerator.h"
-#include "AliRunLoader.h"
-#include "AliStack.h"  
-#include "AliPHOSRawDecoder.h"
-#include "AliRawReaderFile.h"
-#include "AliLog.h"
-#include "AliCDBLocal.h"
-#include "AliCDBStorage.h"
-#include "AliCDBManager.h"
-#include "AliPHOSRawDigiProducer.h"
-#include "AliPHOSReconstructor.h"
-#include "AliPHOSRecoParam.h"
-
-ClassImp(AliPHOSGetter)
-  
-AliPHOSGetter   * AliPHOSGetter::fgObjGetter  = 0 ; 
-AliPHOSLoader   * AliPHOSGetter::fgPhosLoader = 0;
-AliPHOSCalibData* AliPHOSGetter::fgCalibData  = 0;
-Int_t AliPHOSGetter::fgDebug = 0;
-
-//  TFile * AliPHOSGetter::fgFile = 0 ; 
-
-AliPHOSGetter::AliPHOSGetter() :
-  fBTE(0),
-  fLoadingStatus(),
-  fNPrimaries(0),
-  fPrimaries(0),
-  fESDFile(0),
-  fESDFileName(),
-  fESD(0),
-  fESDTree(0),
-  fRawDigits(kFALSE),
-  fcdb(0)
-{
-  // ctor: this is a singleton, the ctor should never be called but cint needs it as public
-  Fatal("ctor", "AliPHOSGetter is a singleton default ctor not callable") ;
-} 
-
-
-//____________________________________________________________________________ 
-AliPHOSGetter::AliPHOSGetter(const char* headerFile, const char* version, Option_t * openingOption) :
-  fBTE(0),
-  fLoadingStatus(),
-  fNPrimaries(0),
-  fPrimaries(0),
-  fESDFile(0),
-  fESDFileName(),
-  fESD(0),
-  fESDTree(0),
-  fRawDigits(kFALSE),
-  fcdb(0)
-{
-  // ctor only called by Instance()
-
-  AliRunLoader* rl = AliRunLoader::GetRunLoader(version) ; 
-  if (!rl) {
-    rl = AliRunLoader::Open(headerFile, version, openingOption);
-    if (!rl) {
-      Fatal("AliPHOSGetter", "Could not find the Run Loader for %s - %s",headerFile, version) ; 
-      return ;
-    } 
-    if (rl->GetAliRun() == 0x0) {
-      rl->LoadgAlice();
-      gAlice = rl->GetAliRun(); // should be removed
-      rl->LoadHeader();
-    }
-  }
-  fgPhosLoader = dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
-  if ( !fgPhosLoader ) 
-    Error("AliPHOSGetter", "Could not find PHOSLoader") ; 
-  else 
-    fgPhosLoader->SetTitle(version);
-  
-  // initialize data members
-  SetDebug(0) ; 
-  fBTE = 0 ; 
-  fPrimaries = 0 ; 
-  fLoadingStatus = "" ; 
-  fESDFileName = rl->GetFileName()  ; // this should be the galice.root file
-  fESDFileName.ReplaceAll("galice.root", "AliESDs.root") ;  
-  fESDFile = 0 ; 
-  fESD = 0 ; 
-  fESDTree = 0 ; 
-  fRawDigits = kFALSE ;
-
-}
-
-AliPHOSGetter::AliPHOSGetter(const AliPHOSGetter & obj) :
-  TObject(obj),
-  fBTE(0),
-  fLoadingStatus(),
-  fNPrimaries(0),
-  fPrimaries(0),
-  fESDFile(0),
-  fESDFileName(),
-  fESD(0),
-  fESDTree(0),
-  fRawDigits(kFALSE),
-  fcdb(0)
-{
-  // cpy ctor requested by Coding Convention 
-  Fatal("cpy ctor", "not implemented") ;
-} 
-
-//____________________________________________________________________________ 
-AliPHOSGetter::AliPHOSGetter(Int_t /*i*/) :
-  fBTE(0),
-  fLoadingStatus(),
-  fNPrimaries(0),
-  fPrimaries(0),
-  fESDFile(0),
-  fESDFileName(),
-  fESD(0),
-  fESDTree(0),
-  fRawDigits(kFALSE),
-  fcdb(0)
-{
-  // special constructor for onflight 
-} 
-
-
-//____________________________________________________________________________ 
-AliPHOSGetter::~AliPHOSGetter()
-{
-  // dtor
-  if(fgPhosLoader){
-    delete fgPhosLoader ;
-    fgPhosLoader = 0 ;
-  }
-  if(fBTE){
-    delete fBTE ; 
-    fBTE = 0 ;
-  } 
-  if(fPrimaries){
-    fPrimaries->Delete() ; 
-    delete fPrimaries ;
-  } 
-  if (fESD) 
-    delete fESD ; 
-  if (fESDTree) 
-    delete fESDTree ;
-  fgObjGetter = 0;
-}
-
-//____________________________________________________________________________ 
-void AliPHOSGetter::Reset()
-{
-  // resets things in case the getter is called consecutively with different files
-  // the PHOS Loader is already deleted by the Run Loader
-
-  if (fPrimaries) { 
-    fPrimaries->Delete() ; 
-    delete fPrimaries ;
-  } 
-  fgPhosLoader = 0; 
-  fgObjGetter = 0; 
-}
-
-//____________________________________________________________________________ 
-AliPHOSClusterizer * AliPHOSGetter::Clusterizer()
-{ 
-  // Returns pointer to the Clusterizer task 
-  AliPHOSClusterizer * rv ; 
-  rv =  dynamic_cast<AliPHOSClusterizer *>(PhosLoader()->Reconstructioner()) ;
-  if (!rv) {
-    Event(0, "R") ; 
-    rv =  dynamic_cast<AliPHOSClusterizer*>(PhosLoader()->Reconstructioner()) ;
-  }
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-TObjArray * AliPHOSGetter::CpvRecPoints() const
-{
-  // asks the Loader to return the CPV RecPoints container 
-
-  TObjArray * rv = 0 ; 
-  
-  rv = PhosLoader()->CpvRecPoints() ; 
-  if (!rv) {
-    PhosLoader()->MakeRecPointsArray() ;
-    rv = PhosLoader()->CpvRecPoints() ; 
-  }
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-TClonesArray * AliPHOSGetter::Digits() const
-{
-  // asks the Loader to return the Digits container 
-
-  TClonesArray * rv = 0 ; 
-  rv = PhosLoader()->Digits() ; 
-
-  if( !rv ) {
-    PhosLoader()->MakeDigitsArray() ; 
-    rv = PhosLoader()->Digits() ;
-  }
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-AliPHOSDigitizer * AliPHOSGetter::Digitizer() 
-{ 
-  // Returns pointer to the Digitizer task 
-  AliPHOSDigitizer * rv ; 
-  rv =  dynamic_cast<AliPHOSDigitizer *>(PhosLoader()->Digitizer()) ;
-  if (!rv) {
-    Event(0, "D") ; 
-    rv =  dynamic_cast<AliPHOSDigitizer *>(PhosLoader()->Digitizer()) ;
-  }
-  return rv ; 
-}
-
-
-//____________________________________________________________________________ 
-TObjArray * AliPHOSGetter::EmcRecPoints() const
-{
-  // asks the Loader to return the EMC RecPoints container 
-
-  TObjArray * rv = 0 ; 
-  
-  rv = PhosLoader()->EmcRecPoints() ; 
-  if (!rv) {
-    PhosLoader()->MakeRecPointsArray() ;
-    rv = PhosLoader()->EmcRecPoints() ; 
-  }
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-TClonesArray * AliPHOSGetter::TrackSegments() const
-{
-  // asks the Loader to return the TrackSegments container 
-
-  TClonesArray * rv = 0 ; 
-  
-  rv = PhosLoader()->TrackSegments() ; 
-  if (!rv) {
-    PhosLoader()->MakeTrackSegmentsArray() ;
-    rv = PhosLoader()->TrackSegments() ; 
-  }
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-AliPHOSTrackSegmentMaker * AliPHOSGetter::TrackSegmentMaker()
-{ 
-  // Returns pointer to the TrackSegmentMaker task 
-  AliPHOSTrackSegmentMaker * rv ; 
-  rv =  dynamic_cast<AliPHOSTrackSegmentMaker *>(PhosLoader()->TrackSegmentMaker()) ;
-  if (!rv) {
-    Event(0, "T") ; 
-    rv =  dynamic_cast<AliPHOSTrackSegmentMaker *>(PhosLoader()->TrackSegmentMaker()) ;
-  }
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-TClonesArray * AliPHOSGetter::RecParticles() const
-{
-  // asks the Loader to return the TrackSegments container 
-
-  TClonesArray * rv = 0 ; 
-  
-  rv = PhosLoader()->RecParticles() ; 
-  if (!rv) {
-    PhosLoader()->MakeRecParticlesArray() ;
-    rv = PhosLoader()->RecParticles() ; 
-  }
-  return rv ; 
-}
-//____________________________________________________________________________ 
-void AliPHOSGetter::Event(Int_t event, const char* opt) 
-{
-  // Reads the content of all Tree's S, D and R
-
-//   if ( event >= MaxEvent() ) {
-//     Error("Event", "%d not found in TreeE !", event) ; 
-//     return ; 
-//   }
-
-  AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
-
-//   // checks if we are dealing with test-beam data
-//   TBranch * btb = rl->TreeE()->GetBranch("AliPHOSBeamTestEvent") ;
-//   if(btb){
-//     if(!fBTE)
-//       fBTE = new AliPHOSBeamTestEvent() ;
-//     btb->SetAddress(&fBTE) ;
-//     btb->GetEntry(event) ;
-//   }
-//   else{
-//     if(fBTE){
-//       delete fBTE ;
-//       fBTE = 0 ;
-//     }
-//   }
-
-  // Loads the type of object(s) requested
-  
-  rl->GetEvent(event) ;
-
-  if(strstr(opt,"X") || (strcmp(opt,"")==0)){
-    ReadPrimaries() ;
-  }
-  
-  if(strstr(opt,"H")  ){
-    ReadTreeH();
-  }
-  
-  if(strstr(opt,"S")  ){
-    ReadTreeS() ;
-  }
-  
-  if(strstr(opt,"D") ){
-    ReadTreeD() ;
-  }
-  
-  if(strstr(opt,"R") ){
-    ReadTreeR() ;
-  }
-
-  if( strstr(opt,"T") ){
-    ReadTreeT() ;
-  }    
-
-  if( strstr(opt,"P") ){
-    ReadTreeP() ;
-  }    
-
-  if( strstr(opt,"E") ){
-    ReadTreeE(event) ;
-  }
-
-}
-
-
-//____________________________________________________________________________ 
-void AliPHOSGetter::Event(AliRawReader *rawReader, const char* opt, Bool_t isOldRCUFormat) 
-{
-  // Reads the raw event from rawReader
-  // isOldRCUFormat defines whenever to assume
-  // the old RCU format or not
-  
-  if( strstr(opt,"W")  ){
-    rawReader->NextEvent();
-    ReadRaw(rawReader,isOldRCUFormat) ;
-  }    
-}
-
-
-//____________________________________________________________________________ 
-Int_t AliPHOSGetter::EventNumber() const
-  {
-  // return the current event number
-  AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
-  return static_cast<Int_t>(rl->GetEventNumber()) ;   
-}
-
-//____________________________________________________________________________ 
-  TClonesArray * AliPHOSGetter::Hits() const
-{
-  // asks the loader to return  the Hits container 
-  
-  TClonesArray * rv = 0 ; 
-  
-  rv = PhosLoader()->Hits() ; 
-  if ( !rv ) {
-    PhosLoader()->LoadHits("read"); 
-    rv = PhosLoader()->Hits() ; 
-  }
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-AliPHOSGetter * AliPHOSGetter::Instance(const char* alirunFileName, const char* version, Option_t * openingOption) 
-{
-  // Creates and returns the pointer of the unique instance
-  // Must be called only when the environment has changed
-  
-  if(!fgObjGetter){ // first time the getter is called 
-    fgObjGetter = new AliPHOSGetter(alirunFileName, version, openingOption) ;
-  }
-  else { // the getter has been called previously
-    AliRunLoader * rl = AliRunLoader::GetRunLoader(fgPhosLoader->GetTitle());
-    if ( rl->GetFileName() == alirunFileName ) {// the alirunFile has the same name
-      // check if the file is already open
-      TFile * galiceFile = dynamic_cast<TFile *>(gROOT->FindObject(rl->GetFileName()) ) ; 
-      
-      if ( !galiceFile ) 
-       fgObjGetter = new AliPHOSGetter(alirunFileName, version, openingOption) ;
-      
-      else {  // the file is already open check the version name
-       TString currentVersionName = rl->GetEventFolder()->GetName() ; 
-       TString newVersionName(version) ; 
-       if (currentVersionName == newVersionName) 
-         if(fgDebug)
-           ::Warning( "Instance", "Files with version %s already open", currentVersionName.Data() ) ;  
-       else {
-         fgObjGetter = new AliPHOSGetter(alirunFileName, version, openingOption) ;      
-       }
-      }
-    }
-    else {
-      rl = AliRunLoader::GetRunLoader(fgPhosLoader->GetTitle()) ; 
-      if ( strstr(version, AliConfig::GetDefaultEventFolderName()) ) // false in case of merging
-       delete rl ; 
-      fgObjGetter = new AliPHOSGetter(alirunFileName, version, openingOption) ;      
-    }
-  }
-  if (!fgObjGetter) 
-    ::Error("AliPHOSGetter::Instance", "Failed to create the PHOS Getter object") ;
-  else 
-    if (fgDebug)
-      Print() ;
-  
-  return fgObjGetter ;
-}
-
-//____________________________________________________________________________ 
-AliPHOSGetter *  AliPHOSGetter::Instance()
-{
-  // Returns the pointer of the unique instance already defined
-  
-  if(!fgObjGetter && fgDebug)
-     ::Warning("AliPHOSGetter::Instance", "Getter not initialized") ;
-
-   return fgObjGetter ;
-           
-}
-
-//____________________________________________________________________________ 
-Int_t AliPHOSGetter::MaxEvent() const 
-{
-  // returns the number of events in the run (from TE)
-
-  AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
-  return static_cast<Int_t>(rl->GetNumberOfEvents()) ; 
-}
-
-//____________________________________________________________________________ 
-TParticle * AliPHOSGetter::Primary(Int_t index) const
-{
-  AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
-  return rl->Stack()->Particle(index) ; 
-} 
-
-//____________________________________________________________________________ 
-AliPHOS * AliPHOSGetter:: PHOS() const  
-{
-  // returns the PHOS object 
-  AliPHOSLoader *    loader = 0;
-  static AliPHOSLoader * oldloader = 0;
-  static AliPHOS * phos = 0;
-
-  loader = PhosLoader();
-
-  if ( loader != oldloader) {
-    phos = dynamic_cast<AliPHOS*>(loader->GetModulesFolder()->FindObject("PHOS")) ;
-    oldloader = loader;
-  }
-  if (!phos) 
-    if (fgDebug)
-      Warning("PHOS", "PHOS module not found in module folders: %s", PhosLoader()->GetModulesFolder()->GetName() ) ; 
-  return phos ; 
-}  
-
-
-
-//____________________________________________________________________________ 
-AliPHOSPID * AliPHOSGetter::PID()
-{ 
-  // Returns pointer to the PID task 
-  AliPHOSPID * rv ; 
-  rv =  dynamic_cast<AliPHOSPID *>(PhosLoader()->PIDTask()) ;
-  if (!rv) {
-    Event(0, "P") ; 
-    rv =  dynamic_cast<AliPHOSPID *>(PhosLoader()->PIDTask()) ;
-  }
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-TClonesArray * AliPHOSGetter::Primaries()  
-{
-  // creates the Primaries container if needed
-  if ( !fPrimaries ) {
-    if (fgDebug) 
-      Info("Primaries", "Creating a new TClonesArray for primaries") ; 
-    fPrimaries = new TClonesArray("TParticle", 1000) ;
-  } 
-  return fPrimaries ; 
-}
-
-//____________________________________________________________________________ 
-void  AliPHOSGetter::Print() 
-{
-  // Print usefull information about the getter
-    
-  AliRunLoader * rl = AliRunLoader::GetRunLoader(fgPhosLoader->GetTitle());
-  ::Info( "Print", "gAlice file is %s -- version name is %s", (rl->GetFileName()).Data(), rl->GetEventFolder()->GetName() ) ; 
-}
-
-//____________________________________________________________________________ 
-void AliPHOSGetter::ReadPrimaries()  
-{
-  // Read Primaries from Kinematics.root
-  
-  AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
-  
-  // gets kine tree from the root file (Kinematics.root)
-  if ( ! rl->TreeK() ) { // load treeK the first time
-    rl->LoadKinematics() ;
-  }
-  
-  fNPrimaries = (rl->GetHeader())->GetNtrack(); 
-  if (fgDebug) 
-    Info( "ReadTreeK", "Found %d particles in event # %d", fNPrimaries, EventNumber() ) ; 
-
-
-  // first time creates the container
-  if ( Primaries() ) 
-    fPrimaries->Clear() ; 
-  
-  Int_t index = 0 ; 
-  for (index = 0 ; index < fNPrimaries; index++) { 
-    new ((*fPrimaries)[index]) TParticle(*(Primary(index)));
-  }
-}
-
-//____________________________________________________________________________ 
-Bool_t AliPHOSGetter::OpenESDFile() 
-{
-  //Open the ESD file    
-  Bool_t rv = kTRUE ; 
-  if (!fESDFile) {
-    fESDFile = TFile::Open(fESDFileName) ;
-    if (!fESDFile ) 
-      return kFALSE ; 
-  }
-  else if (fESDFile->IsOpen()) {
-    fESDFile->Close() ; 
-    fESDFile = TFile::Open(fESDFileName) ;
-  }
-  if (!fESDFile->IsOpen())
-    rv = kFALSE ; 
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-void AliPHOSGetter::FitRaw(Bool_t lowGainFlag, TGraph * gLowGain, TGraph * gHighGain, TF1* signalF, Double_t & energy, Double_t & time) const
-{
-  // Fits the raw signal time distribution 
-
-  const Int_t kNoiseThreshold = 0 ;
-  Double_t timezero1 = 0., timezero2 = 0., timemax = 0. ;
-  Double_t signal = 0., signalmax = 0. ;       
-  time   = 0. ; 
-  energy = 0. ; 
-
-  // Create a shaper pulse object which contains all the shaper parameters
-  AliPHOSPulseGenerator pulse;
-
-  if (lowGainFlag) {
-    timezero1 = timezero2 = signalmax = timemax = 0. ;
-    signalF->FixParameter(0, pulse.GetRawFormatLowCharge()) ; 
-    signalF->FixParameter(1, pulse.GetRawFormatLowGain()) ; 
-    Int_t index ; 
-    for (index = 0; index < pulse.GetRawFormatTimeBins(); index++) {
-      gLowGain->GetPoint(index, time, signal) ; 
-      if (signal > kNoiseThreshold && timezero1 == 0.) 
-       timezero1 = time ;
-      if (signal <= kNoiseThreshold && timezero1 > 0. && timezero2 == 0.)
-       timezero2 = time ; 
-      if (signal > signalmax) {
-       signalmax = signal ; 
-       timemax   = time ; 
-      }
-    }
-    signalmax /= 
-      pulse.RawResponseFunctionMax(pulse.GetRawFormatLowCharge(), 
-                                  pulse.GetRawFormatLowGain()) ;
-    if ( timezero1 + pulse.GetRawFormatTimePeak() < pulse.GetRawFormatTimeMax() * 0.4 ) { // else its noise 
-      signalF->SetParameter(2, signalmax) ; 
-      signalF->SetParameter(3, timezero1) ;                
-      gLowGain->Fit(signalF, "QRO", "", 0., timezero2); //, "QRON") ; 
-      energy = signalF->GetParameter(2) ; 
-      time   = signalF->GetMaximumX() - pulse.GetRawFormatTimePeak() - pulse.GetRawFormatTimeTrigger() ;
-    }
-  } else {
-    timezero1 = timezero2 = signalmax = timemax = 0. ;
-    signalF->FixParameter(0, pulse.GetRawFormatHighCharge()) ; 
-    signalF->FixParameter(1, pulse.GetRawFormatHighGain()) ; 
-    Int_t index ; 
-    for (index = 0; index < pulse.GetRawFormatTimeBins(); index++) {
-      gHighGain->GetPoint(index, time, signal) ;               
-      if (signal > kNoiseThreshold && timezero1 == 0.) 
-       timezero1 = time ;
-      if (signal <= kNoiseThreshold && timezero1 > 0. && timezero2 == 0.)
-       timezero2 = time ; 
-      if (signal > signalmax) {
-       signalmax = signal ;   
-       timemax   = time ; 
-      }
-    }
-    signalmax /= pulse.RawResponseFunctionMax(pulse.GetRawFormatHighCharge(), 
-                                             pulse.GetRawFormatHighGain()) ;;
-    if ( timezero1 + pulse.GetRawFormatTimePeak() < pulse.GetRawFormatTimeMax() * 0.4 ) { // else its noise  
-      signalF->SetParameter(2, signalmax) ; 
-      signalF->SetParameter(3, timezero1) ;               
-      gHighGain->Fit(signalF, "QRO", "", 0., timezero2) ; 
-      energy = signalF->GetParameter(2) ; 
-      time   = signalF->GetMaximumX() - pulse.GetRawFormatTimePeak() - pulse.GetRawFormatTimeTrigger() ;
-    }
-  }
-  if (time == 0) energy = 0 ; 
-}
-
-//____________________________________________________________________________ 
-Int_t AliPHOSGetter::CalibrateRaw(Double_t energy, Int_t *relId)
-{
-  // Convert energy into digitized amplitude for a cell relId
-  // It is a user responsilibity to open CDB and set
-  // AliPHOSCalibData object by the following operators:
-  // 
-  // AliCDBLocal *loc = new AliCDBLocal("deCalibDB");
-  // AliPHOSCalibData* clb = (AliPHOSCalibData*)AliCDBStorage::Instance()
-  //    ->Get(path_to_calibdata,run_number);
-  // AliPHOSGetter* gime = AliPHOSGetter::Instance("galice.root");
-  // gime->SetCalibData(clb);
-
-  if (CalibData() == 0)
-    Warning("CalibrateRaw","Calibration DB is not initiated!");
-
-  Int_t   module = relId[0];
-  Int_t   column = relId[3];
-  Int_t   row    = relId[2];
-
-  Float_t gainFactor = 0.0015; // width of one Emc ADC channel in GeV
-  Float_t pedestal   = 0.005;  // Emc pedestals
-
-  if(CalibData()) {
-    gainFactor = CalibData()->GetADCchannelEmc (module,column,row);
-    pedestal   = CalibData()->GetADCpedestalEmc(module,column,row);
-  }
-  
-  Int_t   amp = static_cast<Int_t>( (energy - pedestal) / gainFactor + 0.5 ) ; 
-  return amp;
-}
-//____________________________________________________________________________ 
-Int_t AliPHOSGetter::ReadRaw(AliRawReader *rawReader,Bool_t isOldRCUFormat)
-{
-  // reads the raw format data, converts it into digits format and store digits in Digits()
-  // container.
-  // isOldRCUFormat = kTRUE in case of the old RCU
-  // format used in the raw data readout.
-  // Reimplemented by Boris Polichtchouk (Jul 2006)
-  // to make it working with the Jul-Aug 2006 beam test data.
-  //Create raw decoder.
-
-  AliPHOSRawDecoder dc(rawReader);
-  dc.SetOldRCUFormat(isOldRCUFormat);
-  dc.SubtractPedestals(AliPHOSReconstructor::GetRecoParamEmc()->SubtractPedestals());
-
-  TClonesArray * digits = Digits() ;
-  AliPHOSRawDigiProducer pr;
-  pr.MakeDigits(digits,&dc);
-  
-  //ADC counts -> GeV
-  for(Int_t i=0; i<digits->GetEntries(); i++) {
-    AliPHOSDigit* digit = (AliPHOSDigit*)digits->At(i);
-    digit->SetEnergy(digit->GetEnergy()/AliPHOSPulseGenerator::GeV2ADC());
-  }
-  
-  //!!!!for debug!!!
-  Int_t modMax=-111;
-  Int_t colMax=-111;
-  Int_t rowMax=-111;
-  Float_t eMax=-333;
-  //!!!for debug!!!
-
-  AliPHOSGeometry * phosgeom =  AliPHOSGeometry::GetInstance() ;
-  Int_t relId[4];
-  for(Int_t iDigit=0; iDigit<digits->GetEntries(); iDigit++) {
-    AliPHOSDigit* digit = (AliPHOSDigit*)digits->At(iDigit);
-    if(digit->GetEnergy()>eMax) {
-      phosgeom->AbsToRelNumbering(digit->GetId(),relId);
-      eMax=digit->GetEnergy();
-      modMax=relId[0];
-      rowMax=relId[2];
-      colMax=relId[3];
-    }
-  }
-
-  AliDebug(1,Form("Digit with max. energy:  modMax %d colMax %d rowMax %d  eMax %f\n\n",
-                 modMax,colMax,rowMax,eMax));
-
-  return digits->GetEntriesFast() ; 
-}
-
-//____________________________________________________________________________ 
-Int_t AliPHOSGetter::ReadTreeD() const
-{
-  // Read the Digits
-  
-  PhosLoader()->CleanDigits() ;    
-  PhosLoader()->LoadDigits("UPDATE") ;
-  PhosLoader()->LoadDigitizer("UPDATE") ;
-  return Digits()->GetEntries() ; 
-}
-
-//____________________________________________________________________________ 
-Int_t AliPHOSGetter::ReadTreeH() const
-{
-  // Read the Hits
-  PhosLoader()->CleanHits() ;
-  // gets TreeH from the root file (PHOS.Hit.root)
-  //if ( !IsLoaded("H") ) {
-    PhosLoader()->LoadHits("UPDATE") ;
-  //  SetLoaded("H") ; 
-  //}  
-  return Hits()->GetEntries() ; 
-}
-
-//____________________________________________________________________________ 
-Int_t AliPHOSGetter::ReadTreeR() const
-{
-  // Read the RecPoints
-  
-  PhosLoader()->CleanRecPoints() ;
-  // gets TreeR from the root file (PHOS.RecPoints.root)
-  //if ( !IsLoaded("R") ) {
-    PhosLoader()->LoadRecPoints("UPDATE") ;
-    //  SetLoaded("R") ; 
-    //}
-
-  return EmcRecPoints()->GetEntries() ; 
-}
-
-//____________________________________________________________________________ 
-Int_t AliPHOSGetter::ReadTreeT() const
-{
-  // Read the TrackSegments
-  
-  PhosLoader()->CleanTracks() ; 
-  // gets TreeT from the root file (PHOS.TrackSegments.root)
-  //if ( !IsLoaded("T") ) {
-    PhosLoader()->LoadTracks("UPDATE") ;
-    PhosLoader()->LoadTrackSegmentMaker("UPDATE") ;
-    //    SetLoaded("T") ; 
-    //}
-
-  return TrackSegments()->GetEntries() ; 
-}
-//____________________________________________________________________________ 
-Int_t AliPHOSGetter::ReadTreeP() const
-{
-  // Read the RecParticles
-  
-  PhosLoader()->CleanRecParticles() ; 
-
-  // gets TreeT from the root file (PHOS.TrackSegments.root)
-  //  if ( !IsLoaded("P") ) {
-    PhosLoader()->LoadRecParticles("UPDATE") ;
-    PhosLoader()->LoadPID("UPDATE") ;
-    //  SetLoaded("P") ; 
-    //}
-
-  return RecParticles()->GetEntries() ; 
-}
-//____________________________________________________________________________ 
-Int_t AliPHOSGetter::ReadTreeS() const
-{
-  // Read the SDigits
-  
-  PhosLoader()->CleanSDigits() ; 
-  // gets TreeS from the root file (PHOS.SDigits.root)
-  //if ( !IsLoaded("S") ) {
-    PhosLoader()->LoadSDigits("READ") ;
-    PhosLoader()->LoadSDigitizer("READ") ;
-    //  SetLoaded("S") ; 
-    //}
-
-  return SDigits()->GetEntries() ; 
-}
-
-//____________________________________________________________________________ 
-Int_t AliPHOSGetter::ReadTreeE(Int_t event)
-{
-  // Read the ESD
-  
-  // gets esdTree from the root file (AliESDs.root)
-  if (!fESDFile)
-    if ( !OpenESDFile() ) 
-      return -1 ; 
-
-  fESDTree = static_cast<TTree*>(fESDFile->Get("esdTree")) ; 
-  fESD = new AliESD;
-   if (!fESDTree) {
-
-     Error("ReadTreeE", "no ESD tree found");
-     return -1;
-   }
-   fESDTree->SetBranchAddress("ESD", &fESD);
-   fESDTree->GetEvent(event);
-
-   return event ; 
-}
-
-//____________________________________________________________________________ 
-TClonesArray * AliPHOSGetter::SDigits() const
-{
-  // asks the Loader to return the Digits container 
-
-  TClonesArray * rv = 0 ; 
-  
-  rv = PhosLoader()->SDigits() ; 
-  if (!rv) {
-    PhosLoader()->MakeSDigitsArray() ;
-    rv = PhosLoader()->SDigits() ; 
-  }
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-AliPHOSSDigitizer * AliPHOSGetter::SDigitizer()
-{ 
-  // Returns pointer to the SDigitizer task 
-  AliPHOSSDigitizer * rv ; 
-  rv =  dynamic_cast<AliPHOSSDigitizer *>(PhosLoader()->SDigitizer()) ;
-  if (!rv) {
-    Event(0, "S") ; 
-    rv =  dynamic_cast<AliPHOSSDigitizer *>(PhosLoader()->SDigitizer()) ;
-  }
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-TParticle * AliPHOSGetter::Secondary(const TParticle* p, Int_t index) const
-{
-  // Return first (index=1) or second (index=2) secondary particle of primary particle p 
-
-  if(index <= 0) 
-    return 0 ;
-  if(index > 2)
-    return 0 ;
-
-  if(p) {
-  Int_t daughterIndex = p->GetDaughter(index-1) ; 
-  AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
-  return  rl->GetAliRun()->GetMCApp()->Particle(daughterIndex) ; 
-  }
-  else
-    return 0 ;
-}
-
-//____________________________________________________________________________ 
-void AliPHOSGetter::Track(Int_t itrack) 
-{
-  // Read the first entry of PHOS branch in hit tree gAlice->TreeH()
- AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
-
-  if( !TreeH() ) // load treeH the first time
-    rl->LoadHits() ;
-
-  // first time create the container
-  TClonesArray * hits = Hits() ; 
-  if ( hits ) 
-    hits->Clear() ; 
-
-  TBranch * phosbranch = dynamic_cast<TBranch*>(TreeH()->GetBranch("PHOS")) ; 
-  phosbranch->SetAddress(&hits) ;
-  phosbranch->GetEntry(itrack) ;
-}
-
-//____________________________________________________________________________ 
-TTree * AliPHOSGetter::TreeD() const 
-{
-  // Returns pointer to the Digits Tree
-  TTree * rv = 0 ; 
-  rv = PhosLoader()->TreeD() ; 
-  if ( !rv ) {
-    PhosLoader()->MakeTree("D");
-    rv = PhosLoader()->TreeD() ;
-  } 
-  
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-TTree * AliPHOSGetter::TreeH() const 
-{
-  // Returns pointer to the Hits Tree
-  TTree * rv = 0 ; 
-  rv = PhosLoader()->TreeH() ; 
-  if ( !rv ) {
-    PhosLoader()->MakeTree("H");
-    rv = PhosLoader()->TreeH() ;
-  } 
-  
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-TTree * AliPHOSGetter::TreeR() const 
-{
-  // Returns pointer to the RecPoints Tree
-  TTree * rv = 0 ; 
-  rv = PhosLoader()->TreeR() ; 
-  if ( !rv ) {
-    PhosLoader()->MakeTree("R");
-    rv = PhosLoader()->TreeR() ;
-  } 
-  
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-TTree * AliPHOSGetter::TreeT() const 
-{
-  // Returns pointer to the TrackSegments Tree
-  TTree * rv = 0 ; 
-  rv = PhosLoader()->TreeT() ; 
-  if ( !rv ) {
-    PhosLoader()->MakeTree("T");
-    rv = PhosLoader()->TreeT() ;
-  } 
-  
-  return rv ; 
-}
-//____________________________________________________________________________ 
-TTree * AliPHOSGetter::TreeP() const 
-{
-  // Returns pointer to the RecParticles  Tree
-  TTree * rv = 0 ; 
-  rv = PhosLoader()->TreeP() ; 
-  if ( !rv ) {
-    PhosLoader()->MakeTree("P");
-    rv = PhosLoader()->TreeP() ;
-  } 
-  
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-TTree * AliPHOSGetter::TreeS() const 
-{ 
- // Returns pointer to the SDigits Tree
-  TTree * rv = 0 ; 
-  rv = PhosLoader()->TreeS() ; 
-  if ( !rv ) {
-    PhosLoader()->MakeTree("S");
-    rv = PhosLoader()->TreeS() ;
-  } 
-  
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-Bool_t AliPHOSGetter::VersionExists(TString & opt) const
-{
-  // checks if the version with the present name already exists in the same directory
-
-  Bool_t rv = kFALSE ;
-  AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
-  TString version( rl->GetEventFolder()->GetName() ) ; 
-
-  opt.ToLower() ; 
-  
-  if ( opt == "sdigits") {
-    // add the version name to the root file name
-    TString fileName( PhosLoader()->GetSDigitsFileName() ) ; 
-    if (version != AliConfig::GetDefaultEventFolderName()) // only if not the default folder name 
-      fileName = fileName.ReplaceAll(".root", "") + "_" + version + ".root" ;
-    if ( !(gSystem->AccessPathName(fileName)) ) { 
-      Warning("VersionExists", "The file %s already exists", fileName.Data()) ;
-      rv = kTRUE ; 
-    }
-    PhosLoader()->SetSDigitsFileName(fileName) ;
-  }
-
-  if ( opt == "digits") {
-    // add the version name to the root file name
-    TString fileName( PhosLoader()->GetDigitsFileName() ) ; 
-    if (version != AliConfig::GetDefaultEventFolderName()) // only if not the default folder name 
-      fileName = fileName.ReplaceAll(".root", "") + "_" + version + ".root" ;
-    if ( !(gSystem->AccessPathName(fileName)) ) {
-      Warning("VersionExists", "The file %s already exists", fileName.Data()) ;  
-      rv = kTRUE ; 
-    }
-  }
-
-  return rv ;
-
-}
-
-//____________________________________________________________________________ 
-UShort_t AliPHOSGetter::EventPattern(void) const
-{
-  // Return the pattern (trigger bit register) of the beam-test event
-  if(fBTE)
-    return fBTE->GetPattern() ;
-  else
-    return 0 ;
-}
-//____________________________________________________________________________ 
-Float_t AliPHOSGetter::BeamEnergy(void) const
-{
-  // Return the beam energy of the beam-test event
-  if(fBTE)
-    return fBTE->GetBeamEnergy() ;
-  else
-    return 0 ;
-}
-//____________________________________________________________________________ 
-
-AliPHOSCalibData* AliPHOSGetter::CalibData()
-{ 
-  // Check if the instance of AliPHOSCalibData exists, and return it
-
-  return fgCalibData;
-}
diff --git a/PHOS/AliPHOSGetter.h b/PHOS/AliPHOSGetter.h
deleted file mode 100644 (file)
index 2d9c231..0000000
+++ /dev/null
@@ -1,247 +0,0 @@
-#ifndef ALIPHOSGETTER_H
-#define ALIPHOSGETTER_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-/* $Id$ */
-
-//_________________________________________________________________________
-//  A singleton that returns various objects 
-//  Should be used on the analysis stage to avoid confusing between different
-//  branches of reconstruction tree: e.g. reading RecPoints and TS made from 
-//  another set of RecPoints.
-// 
-//  The objects are retrived from folders.  
-//*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
-//    
-
-
-// --- ROOT system ---
-#include "TObject.h"  
-class TParticle ;
-class TTree ; 
-class TGraph ; 
-class TF1 ; 
-
-// --- Standard library ---
-
-// --- AliRoot header files ---
-#include "AliConfig.h" 
-#include "AliPHOSLoader.h" 
-#include "AliPHOSHit.h" 
-#include "AliPHOSDigit.h"
-#include "AliPHOSEmcRecPoint.h" 
-#include "AliPHOSCpvRecPoint.h" 
-#include "AliPHOSTrackSegment.h" 
-#include "AliPHOSRecParticle.h" 
-#include "AliPHOSDigitizer.h"
-#include "AliPHOSSDigitizer.h"
-#include "AliPHOSCalibData.h"
-
-class AliPHOS ;  
-class AliPHOSClusterizer ;
-class AliPHOSTrackSegmentMaker ;  
-class AliPHOSPID ; 
-class AliPHOSBeamTestEvent ;
-class AliESD ; 
-class AliRawReader ;
-
-class AliPHOSGetter : public TObject {
-  
-public:  
-  // ctor: this is a singleton, the ctor should never be called but cint needs it as public
-  AliPHOSGetter() ;
-
-public:
-  AliPHOSGetter(const AliPHOSGetter & obj) ;
-  AliPHOSGetter & operator = (const AliPHOSGetter & ) {
-    // assignement operator requested by coding convention, but not needed
-    Fatal("operator =", "not implemented") ;
-    return *this ; 
-  }
-  virtual ~AliPHOSGetter() ; 
-  
-  //=========== Instantiators ================
-  static AliPHOSGetter * Instance(const char* headerFile,
-                                 const char* version = AliConfig::GetDefaultEventFolderName(),
-                                 Option_t * openingOption = "READ" ) ; 
-  static AliPHOSGetter * Instance() ; 
-  
-  void Print(const Option_t *)const{}
-  static void Print() ; 
-  
-  //=========== General information about run ==============
-  virtual Bool_t IsLoaded(TString tree) const { return fLoadingStatus.Contains(tree) ; } 
-  virtual void   SetLoaded(TString tree) { fLoadingStatus += tree ; } 
-  
-  virtual Int_t  MaxEvent() const ; 
-  virtual Int_t  EventNumber() const ; 
-  virtual Bool_t VersionExists(TString & opt) const ; 
-  virtual UShort_t EventPattern(void) const ; 
-  virtual Float_t  BeamEnergy(void) const ;
-  
-  //========== PHOS ============= 
-  virtual AliPHOS *         PHOS() const  ;  
-  
-  //========== Methods to read something from file ==========
-  virtual void   Event(Int_t event, const char * opt = "HSDRTP") ;    
-  void   Event(AliRawReader *rawReader, const char * opt = "W",Bool_t isOldRCUFormat = kFALSE) ;    
-  virtual void   Track(Int_t itrack) ;
-  
-  //-----------------now getter's data--------------------------------------
-  AliPHOSCalibrationDB * CalibrationDB(){return  fcdb; }
-  void ReadCalibrationDB(const char * /*name*/, const char * /*filename*/){ ;}
-  void SetCalibrationDB(AliPHOSCalibrationDB * cdb) {fcdb = cdb ;}
-  
-  void SetCalibData(AliPHOSCalibData* calibda) { fgCalibData = calibda; }
-  AliPHOSCalibData * CalibData();
-
-  //=========== Primaries ============
-  virtual TClonesArray *    Primaries(void) ;
-  virtual TParticle * Primary(Int_t index) const ;
-  virtual Int_t       NPrimaries()const { return fNPrimaries; }
-  virtual TParticle * Secondary(const TParticle * p, Int_t index=1) const ;  
-  
-  //=========== Hits =================
-  virtual TClonesArray *  Hits(void) const ; 
-  virtual AliPHOSHit *    Hit(Int_t index) const { return dynamic_cast<AliPHOSHit*>(Hits()->At(index) );}
-  virtual TTree *         TreeH() const ; 
-  
-  //=========== SDigits ==============
-  virtual TClonesArray *      SDigits() const ;  
-  virtual AliPHOSDigit *      SDigit(Int_t index) const { return static_cast<AliPHOSDigit *>(SDigits()->At(index)) ;} 
-  virtual TTree *             TreeS() const ; 
-  virtual AliPHOSSDigitizer * SDigitizer() ;  
-  
-  virtual TString             GetSDigitsFileName() const { return PhosLoader()->GetSDigitsFileName() ; }  
-  virtual Int_t               LoadSDigits(Option_t* opt="") const { return PhosLoader()->LoadSDigits(opt) ; }
-  virtual Int_t               LoadSDigitizer(Option_t* opt="") const { return  PhosLoader()->LoadSDigitizer(opt) ; }
-  virtual Int_t               WriteSDigits(Option_t* opt="") const  { return PhosLoader()->WriteSDigits(opt) ; }
-  virtual Int_t               WriteSDigitizer(Option_t* opt="") const {
-    return  PhosLoader()->WriteSDigitizer(opt) ; }
-  
-  //========== Digits ================
-  virtual TClonesArray * Digits() const ;
-  virtual AliPHOSDigit * Digit(Int_t index) const { return static_cast<AliPHOSDigit *>(Digits()->At(index)) ;} 
-  virtual TTree *        TreeD() const ; 
-  virtual AliPHOSDigitizer * Digitizer() ;
-  virtual TString             GetDigitsFileName() const { return PhosLoader()->GetDigitsFileName() ; }  
-  virtual Int_t               LoadDigits(Option_t* opt="") const { return PhosLoader()->LoadDigits(opt) ; }
-  virtual Int_t               LoadDigitizer(Option_t* opt="") const {
-    return  PhosLoader()->LoadDigitizer(opt) ; }
-  virtual Int_t               WriteDigits(Option_t* opt="") const { return PhosLoader()->WriteDigits(opt) ; }
-  virtual Int_t               WriteDigitizer(Option_t* opt="") const {
-    return  PhosLoader()->WriteDigitizer(opt) ; }
-
-  //Methods to distinguish raw and simulated digits
-  virtual Bool_t              IsRawDigits(void) const {return fRawDigits;}
-  virtual void                SetRawDigits(Bool_t isRaw = kTRUE){fRawDigits = isRaw;}
-  
-  //========== RecPoints =============
-  virtual TObjArray *           EmcRecPoints() const;
-  virtual AliPHOSEmcRecPoint *  EmcRecPoint(Int_t index) const { return static_cast<AliPHOSEmcRecPoint *>(EmcRecPoints()->At(index)) ;} 
-  virtual TObjArray *           CpvRecPoints() const ; 
-  virtual AliPHOSCpvRecPoint *  CpvRecPoint(Int_t index) const { return static_cast<AliPHOSCpvRecPoint *>(CpvRecPoints()->At(index)) ;} 
-  virtual TTree *               TreeR() const ;
-  virtual AliPHOSClusterizer * Clusterizer() ;
-  virtual TString               GetRecPointsFileName() const { return PhosLoader()->GetRecPointsFileName() ; } 
-  virtual Int_t                 LoadRecPoints(Option_t* opt="") const { return PhosLoader()->LoadRecPoints(opt) ; }
-  virtual Int_t                 WriteRecPoints(Option_t* opt="") const { return PhosLoader()->WriteRecPoints(opt) ; }
-  
-  //========== TrackSegments   TClonesArray * TrackSegments(const char * name = 0) { 
-  virtual TClonesArray *           TrackSegments() const;
-  virtual AliPHOSTrackSegment *  TrackSegment(Int_t index) const { return static_cast<AliPHOSTrackSegment *>(TrackSegments()->At(index)) ;} 
-  virtual TTree *               TreeT() const ;
-  virtual AliPHOSTrackSegmentMaker * TrackSegmentMaker() ;
-  virtual TString               GetTracksFileName() const { return PhosLoader()->GetTracksFileName() ; } 
-  virtual Int_t                 LoadTracks(Option_t* opt="") const { return PhosLoader()->LoadTracks(opt) ; }
-  virtual Int_t                 LoadTrackSegementMaker(Option_t* opt="") const {
-    return  PhosLoader()->LoadTrackSegmentMaker(opt) ; }
-  virtual Int_t                 WriteTracks(Option_t* opt="") const { return PhosLoader()->WriteTracks(opt) ; }
-  virtual Int_t                 WriteTrackSegmentMaker(Option_t* opt="") const {
-    return  PhosLoader()->WriteTracker(opt) ; }
-  
-  //========== RecParticles ===========
-  virtual TClonesArray *         RecParticles() const;
-  virtual AliPHOSRecParticle *   RecParticle(Int_t index) const { return static_cast<AliPHOSRecParticle *>(RecParticles()->At(index)) ;} 
-  virtual TTree *               TreeP() const ;
-  virtual AliPHOSPID * PID() ;
-  virtual TString               GetRecParticlesFileName() const { return PhosLoader()->GetRecParticlesFileName() ; } 
-  virtual Int_t                 LoadRecParticles(Option_t* opt="") const { return PhosLoader()->LoadRecParticles(opt) ; }
-  virtual Int_t                 LoadPID(Option_t* opt="") const {
-    return  PhosLoader()->LoadPID(opt) ; }
-  virtual Int_t                 WriteRecParticles(Option_t* opt="") const { return PhosLoader()->WriteRecParticles(opt) ; }
-  virtual Int_t                 WritePID(Option_t* opt="") const {
-    return  PhosLoader()->WritePID(opt) ; }
-
-  //========== Raw ===========
-  virtual Int_t ReadRaw(AliRawReader *rawReader,Bool_t isOldRCUFormat) ; 
-
-  void SetDebug(Int_t level) {fgDebug = level;} // Set debug level 
-  virtual void PostSDigitizer (AliPHOSSDigitizer * sdigitizer) 
-    const {PhosLoader()->PostSDigitizer(sdigitizer);}    
-  virtual void PostDigitizer (AliPHOSDigitizer * digitizer)    
-    const {PhosLoader()->PostDigitizer(digitizer);}
-  
-  virtual TString Version() const  { return PhosLoader()->GetTitle() ; } 
-  virtual AliPHOSLoader * PhosLoader() const { return  fgPhosLoader ; }
-  virtual void Reset() ;
-  
-  virtual AliESD * ESD() const { return fESD ; }
-  
-protected :
-  AliPHOSGetter(Int_t /*i*/) ;
-  
-protected:
-  static AliPHOSGetter * fgObjGetter; // pointer to the unique instance of the singleton 
-  
-private:
-  AliPHOSGetter(const char* headerFile,
-               const char* version = AliConfig::GetDefaultEventFolderName(),
-               Option_t * openingOption = "READ") ;
-private:
-  
-  Int_t ReadTreeD(void) const ;
-  Int_t ReadTreeH(void) const ;
-  Int_t ReadTreeR(void) const ;
-  Int_t ReadTreeT(void) const ;
-  Int_t ReadTreeS(void) const ;
-  Int_t ReadTreeP(void) const ;
-
-  Int_t ReadTreeE(Int_t event) ;    
-  Bool_t OpenESDFile() ;
-  void ReadPrimaries(void) ;
-
-  void FitRaw(Bool_t lowGainFlag, TGraph * gLowGain, TGraph * gHighGain, TF1* signalF, Double_t & energy, Double_t & time) const; 
-
-  Int_t CalibrateRaw (Double_t energy, Int_t *relId);
-
-private:
-  
-  AliPHOSBeamTestEvent * fBTE ;           //! Header if BeamTest Event
-  static Int_t          fgDebug ;             //! Debug level
-  
-  TString           fLoadingStatus ;     //! tells which trees are loaded
-  Int_t             fNPrimaries ;        //! # of primaries  
-  TClonesArray *    fPrimaries ;         //! list of lists of primaries
-  TFile *           fESDFile ;           //! ESD file
-  TString           fESDFileName ;       //! ESD File Name
-  AliESD *          fESD ;               //! ESD object
-  TTree *           fESDTree ;           //! ESD Tree
-  
-  Bool_t            fRawDigits ;         //! true is raw data
-
-  AliPHOSCalibrationDB * fcdb ;          //! Calibration DB for beam test run 2004
-  static AliPHOSCalibData * fgCalibData; //! instance of AliPHOSCalibData
-
-  static AliPHOSLoader * fgPhosLoader ; // the loader for the NewIO
-  
-  enum EDataTypes{kHits,kSDigits,kDigits,kRecPoints,kTracks,kNDataTypes};
-
-  
-  ClassDef(AliPHOSGetter,2)  // Algorithm class that provides methods to retrieve objects from a list knowing the index 
-    
-    };
-
-#endif // AliPHOSGETTER_H
diff --git a/PHOS/AliPHOSGetterLight.cxx b/PHOS/AliPHOSGetterLight.cxx
deleted file mode 100644 (file)
index e9bf898..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-
-/* $Id$ */
-
-//_________________________________________________________________________
-// 
-//
-//*-- Author :  D.Peressounko (RRC KI) 
-//////////////////////////////////////////////////////////////////////////////
-//Class designed to perform fast on-flight reconstruction of raw data
-//without writing it to file and without creation of all aliroot folder 
-//structure. This class keeps lists of (raw) digits, RecPoints TrackSegments and 
-//RecParticles for one (current) event. In addition, for convinience, it returns 
-//pointers to PHOS geometry, Clusterizser, TSMaker and PID maker.
-
-// --- ROOT system ---
-// --- Standard library ---
-
-// --- AliRoot header files ---
-//#include "AliPHOSCalibrationDB.h"
-#include "AliPHOSGetterLight.h"
-
-ClassImp(AliPHOSGetterLight)
-
-
-//____________________________________________________________________________ 
-AliPHOSGetterLight::AliPHOSGetterLight() : 
-  AliPHOSGetter(0),
-  fDigits(0),
-  fEmcRecPoints(0),
-  fCpvRecPoints(0),
-  fTS(0),
-  fRP(0),
-  fClusterizer(0), 
-  fTSM(0),
-  fPID(0)
-{
-  // ctor
-  SetRawDigits(kTRUE) ;
-  //  fRawDigits =kTRUE;
-  fgObjGetter = this ;
-}
-//____________________________________________________________________________ 
-AliPHOSGetterLight::AliPHOSGetterLight(const char* /*alirunFileName*/, const char* /*version*/, Option_t * /*openingOption*/) :
-  AliPHOSGetter(0),
-  fDigits(new TClonesArray("AliPHOSDigit",256)),
-  fEmcRecPoints(new TObjArray(50)),
-  fCpvRecPoints(new TObjArray(0)),
-  fTS(new TClonesArray("AliPHOSTrackSegment",50)),
-  fRP(new TClonesArray("AliPHOSRecParticle",50)),
-  fClusterizer (0),
-  fTSM(0),
-  fPID(0)
-{
-  //Create containers of reconstructed objects for one event
-  fEmcRecPoints->SetOwner(kTRUE) ;
-  fCpvRecPoints->SetOwner(kTRUE) ;
-
-  SetRawDigits(kTRUE) ;
-  //  fRawDigits = kTRUE ;
-  fgObjGetter = this ;
-}
-
-//____________________________________________________________________________ 
-AliPHOSGetterLight::AliPHOSGetterLight(const AliPHOSGetterLight & obj) : 
-  AliPHOSGetter(obj),
-  fDigits(0),
-  fEmcRecPoints(0),
-  fCpvRecPoints(0),
-  fTS(0),
-  fRP(0),
-  fClusterizer(0), 
-  fTSM(0),
-  fPID(0)
-{
-  // cpy ctor requested by Coding Convention 
-  Fatal("cpy ctor", "not implemented") ;
-} 
-
-//____________________________________________________________________________ 
-  AliPHOSGetterLight::~AliPHOSGetterLight()
-{
-  //Delete containers owned by Getter and do not touch other pointers
-  if(fDigits){ delete fDigits ; fDigits = 0 ;}
-  if(fEmcRecPoints){ delete fEmcRecPoints; fEmcRecPoints = 0 ;}
-  if(fCpvRecPoints){ delete fCpvRecPoints; fCpvRecPoints = 0 ;}
-  if(fTS){ delete fTS; fTS = 0 ;}
-  if(fRP){ delete fRP; fRP = 0 ;}
-}
-//____________________________________________________________________________ 
-AliPHOSGetterLight * AliPHOSGetterLight::Instance(const char* alirunFileName, const char* version, Option_t * openingOption) 
-{
-  // Creates and returns the pointer of the unique instance
-  // Must be called only when the environment has changed
-  
-  if(!fgObjGetter){ // first time the getter is called 
-    fgObjGetter = (AliPHOSGetter*) new AliPHOSGetterLight(alirunFileName, version, openingOption) ;
-  }
-  return (AliPHOSGetterLight*) fgObjGetter ;
-}
-//____________________________________________________________________________ 
-AliPHOSGetterLight * AliPHOSGetterLight::Instance(void) 
-{
-  return (AliPHOSGetterLight*) fgObjGetter ;
-}
diff --git a/PHOS/AliPHOSGetterLight.h b/PHOS/AliPHOSGetterLight.h
deleted file mode 100644 (file)
index 1cb8e62..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-#ifndef ALIPHOSGETTERLIGHT_H
-#define ALIPHOSGETTERLIGHT_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-/* $Id$ */
-
-//_________________________________________________________________________
-//  Class to substitute AliPHOSGetter in "on flight" reconstruction (i.e. without 
-//  writing to file and creation full ALICE data structure)      
-//                  
-//*-- Author: D.Peressounko (RRC KI)
-
-
-// --- ROOT system ---
-class TClonesArray ;
-class TObjArray ;
-
-// --- Standard library ---
-// --- AliRoot header files ---
-#include "AliPHOSGetter.h" 
-class AliPHOSClusterizer ;
-class AliPHOSTrackSegmentMaker ;
-class AliPHOSPID ;
-
-class AliPHOSGetterLight : public AliPHOSGetter {
-
-public:
-  AliPHOSGetterLight() ;          // ctor
-  AliPHOSGetterLight(const AliPHOSGetterLight & obj);
-  
-  AliPHOSGetterLight & operator = (const AliPHOSGetterLight & ) {
-    // assignement operator requested by coding convention, but not needed
-    Fatal("operator =", "not implemented") ;
-    return *this ; 
-  }
-
-  virtual ~AliPHOSGetterLight() ; // dtor
-
-  //method normally used for creation of this class
-  static AliPHOSGetterLight * Instance(const char* /*headerFile*/,
-                                 const char* version = AliConfig::GetDefaultEventFolderName(),
-                                 Option_t * openingOption = "READ" ) ; 
-  static AliPHOSGetterLight * Instance() ; 
-
-  //=========== General information about run ==============
-  
-  virtual Int_t  MaxEvent() const {return 1 ;} //always "read" event 1 
-  virtual Int_t  EventNumber() const {return 0; }  //always the same event 
-  virtual Bool_t VersionExists(TString & /*opt*/) const {return kFALSE;} 
-  virtual UShort_t EventPattern(void) const {return 0;}  //not needed in on-flight reconstruction
-  virtual Float_t  BeamEnergy(void) const {return 10.;} //not needed in on-flight reconstruction
-  
-  //========== PHOS ============= 
-  //Dummy function not necessary for on-flight reconstruction, but has to be overloaded
-  
-  //========== Methods to read something from file ==========
-  virtual void   Event(Int_t /*event*/, const char * /*opt = "HSDRTP"*/){} //Use data already in memory    
-  
-  //-----------------now getter's data--------------------------------------
-  
-  //========== Digits ================
-  virtual TClonesArray * Digits() const {return fDigits ; }
-  virtual AliPHOSDigit * Digit(Int_t index) const { return static_cast<AliPHOSDigit *>(fDigits->At(index)) ;} 
-  //  virtual AliPHOSDigitizer * Digitizer(){Error("Digitizer","Method not defined") ; return 0;}
-  
-  //========== RecPoints =============
-  virtual TObjArray *           EmcRecPoints() const {return fEmcRecPoints ;}
-  virtual AliPHOSEmcRecPoint *  EmcRecPoint(Int_t index) const { return static_cast<AliPHOSEmcRecPoint *>(fEmcRecPoints->At(index)) ;} 
-  virtual TObjArray *           CpvRecPoints() const {return fCpvRecPoints ;} 
-  virtual AliPHOSCpvRecPoint *  CpvRecPoint(Int_t index) const { return static_cast<AliPHOSCpvRecPoint *>(fCpvRecPoints->At(index)) ;} 
-  virtual AliPHOSClusterizer * Clusterizer() { return fClusterizer;}
-  
-  //========== TrackSegments   TClonesArray * TrackSegments(const char * name = 0) { 
-  virtual TClonesArray *        TrackSegments() const {return fTS ;} ;
-  virtual AliPHOSTrackSegment * TrackSegment(Int_t index) const { return static_cast<AliPHOSTrackSegment *>(fTS->At(index)) ;} 
-  virtual AliPHOSTrackSegmentMaker * TrackSegmentMaker(){ return fTSM ;}
-  
-  //========== RecParticles ===========
-  virtual TClonesArray *        RecParticles() const { return fRP;} 
-  virtual AliPHOSRecParticle *  RecParticle(Int_t index) const { return static_cast<AliPHOSRecParticle *>(fRP->At(index)) ;} 
-  virtual AliPHOSPID *          PID(){return fPID ;} 
-
-  //========== Raw ===========
-  //  virtual Int_t ReadRaw(Int_t event) ; 
-
-  virtual void PostClusterizer(AliPHOSClusterizer * clu)const{((AliPHOSGetterLight*)fgObjGetter)->fClusterizer = clu;} 
-  virtual void PostPID(AliPHOSPID * pid)const{((AliPHOSGetterLight*)fgObjGetter)->fPID = pid ;} 
-  virtual void PostTrackSegmentMaker(AliPHOSTrackSegmentMaker * tr)const{((AliPHOSGetterLight*)fgObjGetter)->fTSM = tr ;} 
-  virtual TString Version() const  { return "OnFlight" ; } 
-  virtual void Reset(){} 
-  
-  virtual AliESD * ESD() const { return 0 ; }
-
-private:
-  
-  AliPHOSGetterLight(const char* headerFile,
-               const char* version = AliConfig::GetDefaultEventFolderName(),
-               Option_t * openingOption = "READ") ;
-
-private :
-
-  TClonesArray * fDigits ;        //Digits container for current event
-  TObjArray    * fEmcRecPoints ;  //EmcRecPoints container for current event
-  TObjArray    * fCpvRecPoints ;  //CPV RecPoints container for current event
-  TClonesArray * fTS ;            //TrackSegments container for currect event
-  TClonesArray * fRP ;            //Rec Particles conatiner for currect event
-
-  //  AliPHOSCalibrationDB * fcdb ;   //Pointer to calibration database
-
-  AliPHOSClusterizer       * fClusterizer ; //Pointer to clusterizer 
-  AliPHOSTrackSegmentMaker * fTSM ;         //Pointer to TrackSegmentMaker
-  AliPHOSPID               * fPID ;         //Pointer to PIDMaker
-
-  //  Bool_t         fRawDigits ;    //Do we reconstruct raw digits
-
-  ClassDef(AliPHOSGetterLight,1)  // Getter for \"on flyght\" reconstruction 
-
-};
-
-#endif // AliPHOSGETTERLIGHT_H
index 99c8cab882dec819a545c9c35aa65689ff76c1bf..c3cd8afe91a0e4a20ce1ff3dd3ad09fd9d98e44c 100644 (file)
@@ -31,7 +31,6 @@
 
 // --- AliRoot header files ---
 #include "AliPHOSJet.h"
-//  #include "AliPHOSGetter.h"
 
 ClassImp(AliPHOSJet)
   
index be9355010a23d2b956041078dd642f836ea2df49..cb5e5456aad7194bbcbd6dd26dc49754689ce2b8 100644 (file)
@@ -43,7 +43,6 @@
 #include "AliPHOSJet.h"
 #include "AliPHOSGeometry.h"
 #include "AliPHOSDigit.h"
-#include "AliPHOSGetter.h"
 #include "AliPHOSJetFinder.h"
 #include "AliPHOSDigitizer.h"
 
index d76e6fa09c833ee7b7b0955a4a351508fdc07095..4d7fd1fd4fb941c4412401639a95e2ca00947cff 100644 (file)
@@ -73,7 +73,6 @@
 #include "AliPHOS.h"
 #include "AliPHOSHit.h"
 #include "AliPHOSCalibrationDB.h"
-#include "AliPHOSGetter.h"
 
 ClassImp(AliPHOSLoader)
 
@@ -130,10 +129,6 @@ AliPHOSLoader::~AliPHOSLoader()
   Clean(fgkTracksName);
   Clean(fgkRecParticlesName);
   CleanFolders() ;
-//   // set to 0x0 the objgetter in AliGetter ... weird isn it !
-//   AliPHOSGetter * gime = AliPHOSGetter::Instance() ; // (AliLoader::GetRunLoader()->GetFileName()).Data()) ; 
-//   if (gime) 
-//     gime->Reset() ;
 }
 
 //____________________________________________________________________________ 
index a95f8f70d7a7c9c9525eed636fc0452da4931e24..0411277a7a582255b16fe457f7304d3b6a795e25 100644 (file)
 #include "AliRawEventHeaderBase.h"
 #include "AliPHOSRawStream2004.h"
 #include "AliPHOSDigit.h"
-#include "AliPHOSGetterLight.h"  
 #include "AliPHOSClusterizerv1.h"  
 #include "AliPHOSTrackSegmentMakerv1.h"  
 #include "AliPHOSPIDv1.h"  
 #include "AliPHOSCalibrManager.h" 
 #include "AliPHOSCalibrationDB.h"
+#include "AliPHOSRecParticle.h"
 
 ClassImp(AliPHOSOnlineMonitor)
 
@@ -508,30 +508,30 @@ void  AliPHOSOnlineMonitor::ScanPedestals(TClonesArray * digits){
 //____________________________________________________________________________ 
 void  AliPHOSOnlineMonitor::ScanEdep(TClonesArray * digits){
   //Fill 2D distribution of ADC values in NEL and WEL events
-  AliPHOSGetter * gime = AliPHOSGetter::Instance() ;
-  AliPHOSCalibrationDB *cdb = 0 ;
-  if(gime)
-    cdb = gime->CalibrationDB() ;
-  Int_t mod = 0 ;
-  char name[15] ;
-  TH2D * h = 0 ;
-  TH2D * hCal = 0 ;
-  for(Int_t i=0; i<digits->GetEntriesFast(); i++){
-    AliPHOSDigit * dig = static_cast<AliPHOSDigit*>(digits->At(i)) ;
-    Int_t relId[4] ;
-    fGeom->AbsToRelNumbering(dig->GetId(),relId) ;
-    if(mod != relId[0]){ //new module, look for histograms
-      mod = relId[0] ;
-      sprintf(name,"hEdep%d",mod) ;
-      h = (TH2D*)gROOT->FindObjectAny(name);
-      sprintf(name,"hEdepCal%d",mod) ;
-      hCal = (TH2D*)gROOT->FindObjectAny(name);
-    }
-    if(h)
-      h->Fill(relId[2]-0.1,relId[3]-0.1,1.*dig->GetAmp()) ;
-    if(hCal)
-      hCal->Fill(relId[2]-0.1,relId[3]-0.1,cdb->Calibrate(dig->GetAmp(),dig->GetId())) ;
-  }
+//   AliPHOSGetter * gime = AliPHOSGetter::Instance() ;
+//   AliPHOSCalibrationDB *cdb = 0 ;
+//   if(gime)
+//     cdb = gime->CalibrationDB() ;
+//   Int_t mod = 0 ;
+//   char name[15] ;
+//   TH2D * h = 0 ;
+//   TH2D * hCal = 0 ;
+//   for(Int_t i=0; i<digits->GetEntriesFast(); i++){
+//     AliPHOSDigit * dig = static_cast<AliPHOSDigit*>(digits->At(i)) ;
+//     Int_t relId[4] ;
+//     fGeom->AbsToRelNumbering(dig->GetId(),relId) ;
+//     if(mod != relId[0]){ //new module, look for histograms
+//       mod = relId[0] ;
+//       sprintf(name,"hEdep%d",mod) ;
+//       h = (TH2D*)gROOT->FindObjectAny(name);
+//       sprintf(name,"hEdepCal%d",mod) ;
+//       hCal = (TH2D*)gROOT->FindObjectAny(name);
+//     }
+//     if(h)
+//       h->Fill(relId[2]-0.1,relId[3]-0.1,1.*dig->GetAmp()) ;
+//     if(hCal)
+//       hCal->Fill(relId[2]-0.1,relId[3]-0.1,cdb->Calibrate(dig->GetAmp(),dig->GetId())) ;
+//   }
 }
 //____________________________________________________________________________ 
 void  AliPHOSOnlineMonitor::ScanRecon(TClonesArray * recParticles){
@@ -598,109 +598,109 @@ void  AliPHOSOnlineMonitor::Go(){
     }
   }
 
-  AliPHOSGetterLight * gime = AliPHOSGetterLight::Instance("PHOS","On Flight") ;
+//   AliPHOSGetterLight * gime = AliPHOSGetterLight::Instance("PHOS","On Flight") ;
 
-  //Configure CalibrManager to read data from file
-  //Create calibration database and read it
-  AliPHOSCalibrationDB * calibDB = 0 ;
-  if(fScanSig || fReconstruct){ //We will ned calibration parameters
-    AliPHOSCalibrManager::GetInstance("CalibrDB.root","root") ;
-    //If we configured manager to read from ASCII file, 
-    //give him connection table. OK, it will not harm in any case.
-    AliPHOSCalibrManager::GetInstance()->SetConTable(fcdb) ;
+//   //Configure CalibrManager to read data from file
+//   //Create calibration database and read it
+//   AliPHOSCalibrationDB * calibDB = 0 ;
+//   if(fScanSig || fReconstruct){ //We will ned calibration parameters
+//     AliPHOSCalibrManager::GetInstance("CalibrDB.root","root") ;
+//     //If we configured manager to read from ASCII file, 
+//     //give him connection table. OK, it will not harm in any case.
+//     AliPHOSCalibrManager::GetInstance()->SetConTable(fcdb) ;
     
-    calibDB = new AliPHOSCalibrationDB("OnLine") ;
-    calibDB->GetParameters() ; //Read parameters using Manager
-    gime->SetCalibrationDB(calibDB) ;
-  }
+//     calibDB = new AliPHOSCalibrationDB("OnLine") ;
+//     calibDB->GetParameters() ; //Read parameters using Manager
+//     gime->SetCalibrationDB(calibDB) ;
+//   }
   
-  //Now open data file
-  AliRawReaderDateV3 *rawReader = new AliRawReaderDateV3(fInputFile) ; 
-  rawReader->RequireHeader(kFALSE);
-  AliPHOSRawStream2004     *rawStream = new AliPHOSRawStream2004(rawReader) ;
-  rawStream->SetConTableDB(fcdb) ;
+//   //Now open data file
+//   AliRawReaderDateV3 *rawReader = new AliRawReaderDateV3(fInputFile) ; 
+//   rawReader->RequireHeader(kFALSE);
+//   AliPHOSRawStream2004     *rawStream = new AliPHOSRawStream2004(rawReader) ;
+//   rawStream->SetConTableDB(fcdb) ;
   
-  TClonesArray * digits = gime->Digits() ;
-  TClonesArray * recParticles = gime->RecParticles() ;
-  AliPHOSClusterizerv1* clu = 0 ;
-  AliPHOSTrackSegmentMakerv1 * tsm = 0 ;
-  AliPHOSPIDv1 * pid = 0 ;
-  AliPHOSGeometry * phosgeom = AliPHOSGeometry::GetInstance() ;
-  if(fReconstruct){ //We will need calibation parameters
-    clu = new AliPHOSClusterizerv1(phosgeom) ;
-    clu->SetWriting(0) ; //Do not write to file
-//    clu->SetEmcMinE(0.05) ;  //Minimal energy of the digit
-    clu->SetEmcLocalMaxCut(0.05) ; //Height of local maximum over environment
-    clu->SetEmcClusteringThreshold(0.2) ; //Minimal energy to start cluster
-//    clu->SetUnfolding(kFALSE) ; //Do not unfold
-    tsm = new AliPHOSTrackSegmentMakerv1(phosgeom);
-    tsm->SetWriting(0) ; //Do not write to file
-    pid = new AliPHOSPIDv1(phosgeom) ;
-    pid->SetWriting(0) ; //Do not write to file    
-  }
+//   TClonesArray * digits = gime->Digits() ;
+//   TClonesArray * recParticles = gime->RecParticles() ;
+//   AliPHOSClusterizerv1* clu = 0 ;
+//   AliPHOSTrackSegmentMakerv1 * tsm = 0 ;
+//   AliPHOSPIDv1 * pid = 0 ;
+//   AliPHOSGeometry * phosgeom = AliPHOSGeometry::GetInstance() ;
+//   if(fReconstruct){ //We will need calibation parameters
+//     clu = new AliPHOSClusterizerv1(phosgeom) ;
+//     clu->SetWriting(0) ; //Do not write to file
+// //    clu->SetEmcMinE(0.05) ;  //Minimal energy of the digit
+//     clu->SetEmcLocalMaxCut(0.05) ; //Height of local maximum over environment
+//     clu->SetEmcClusteringThreshold(0.2) ; //Minimal energy to start cluster
+// //    clu->SetUnfolding(kFALSE) ; //Do not unfold
+//     tsm = new AliPHOSTrackSegmentMakerv1(phosgeom);
+//     tsm->SetWriting(0) ; //Do not write to file
+//     pid = new AliPHOSPIDv1(phosgeom) ;
+//     pid->SetWriting(0) ; //Do not write to file    
+//   }
   
-  fNevents=0 ;
-  //Scan all event in file
-  printf("      ") ;
-  while(rawReader->NextEvent()){
-    //Is it PHYSICAL event
-    if(rawReader->GetType() == AliRawEventHeaderBase::kPhysicsEvent){
-      fNevents++ ;
-      if(fNevents%100 ==0){
-       printf("\b\b\b\b\b\b%6d",fNevents) ;
-      }
-      if(rawStream->ReadDigits(digits)){
+//   fNevents=0 ;
+//   //Scan all event in file
+//   printf("      ") ;
+//   while(rawReader->NextEvent()){
+//     //Is it PHYSICAL event
+//     if(rawReader->GetType() == AliRawEventHeaderBase::kPhysicsEvent){
+//       fNevents++ ;
+//       if(fNevents%100 ==0){
+//     printf("\b\b\b\b\b\b%6d",fNevents) ;
+//       }
+//       if(rawStream->ReadDigits(digits)){
        
-       //Test trigger
-       //Pedestal Event
-       ScanTrigger(rawStream->GetTrigger()) ;
-       if(rawStream->IsPEDevent() && fScanPed){
-         ScanPedestals(digits) ;
-       }
-       if((rawStream->IsNELevent() || rawStream->IsWELevent()) && fScanSig){
-         ScanEdep(digits) ;
-         if(fReconstruct){
-           // PLEASE FIX IT !!!
-           //      gime->Clusterizer()->Exec("") ;
-           //      gime->TrackSegmentMaker()->Exec("") ;
-           //      gime->PID()->Exec("") ;
-           ScanRecon(recParticles) ;
-         }
-       }
-      }
+//     //Test trigger
+//     //Pedestal Event
+//     ScanTrigger(rawStream->GetTrigger()) ;
+//     if(rawStream->IsPEDevent() && fScanPed){
+//       ScanPedestals(digits) ;
+//     }
+//     if((rawStream->IsNELevent() || rawStream->IsWELevent()) && fScanSig){
+//       ScanEdep(digits) ;
+//       if(fReconstruct){
+//         // PLEASE FIX IT !!!
+//         //      gime->Clusterizer()->Exec("") ;
+//         //      gime->TrackSegmentMaker()->Exec("") ;
+//         //      gime->PID()->Exec("") ;
+//         ScanRecon(recParticles) ;
+//       }
+//     }
+//       }
       
-      if(fNevents%fNUpdate == 0 ){ //upate all histograms      
-       TIter nextCanvas(fCanvasList);
-       TCanvas * c ;
-       while((c=(TCanvas*)nextCanvas())){
-         c->Modified() ;
-         c->Update() ;
-       }
-      }
-      gSystem->ProcessEvents(); 
-    }
-    //    if(fNevents>=200)break ;
-  }
-  printf("\n") ;
-  gBenchmark->Stop("PHOSOnlineMon");
-  Float_t time = gBenchmark->GetCpuTime("PHOSOnlineMon") ;
-  printf("took %f seconds for scanning, i.e. %f seconds per event %d  \n",
-        time,time/fNevents,fNevents) ; 
+//       if(fNevents%fNUpdate == 0 ){ //upate all histograms   
+//     TIter nextCanvas(fCanvasList);
+//     TCanvas * c ;
+//     while((c=(TCanvas*)nextCanvas())){
+//       c->Modified() ;
+//       c->Update() ;
+//     }
+//       }
+//       gSystem->ProcessEvents(); 
+//     }
+//     //    if(fNevents>=200)break ;
+//   }
+//   printf("\n") ;
+//   gBenchmark->Stop("PHOSOnlineMon");
+//   Float_t time = gBenchmark->GetCpuTime("PHOSOnlineMon") ;
+//   printf("took %f seconds for scanning, i.e. %f seconds per event %d  \n",
+//      time,time/fNevents,fNevents) ; 
   
-  //Update canvas with histograms at the end
-  TIter nextCanvas(fCanvasList);
-  TCanvas * c ;
-  while((c=(TCanvas*)nextCanvas())){
-    c->Modified(kTRUE) ;
-  }
+//   //Update canvas with histograms at the end
+//   TIter nextCanvas(fCanvasList);
+//   TCanvas * c ;
+//   while((c=(TCanvas*)nextCanvas())){
+//     c->Modified(kTRUE) ;
+//   }
   
-  if(clu)delete clu ;
-  if(tsm)delete tsm ;
-  if(pid)delete pid ;
-  printf("delete 1 \n") ;
-  if(calibDB) delete calibDB ;
-  delete rawStream ;
-  delete rawReader ;
+//   if(clu)delete clu ;
+//   if(tsm)delete tsm ;
+//   if(pid)delete pid ;
+//   printf("delete 1 \n") ;
+//   if(calibDB) delete calibDB ;
+//   delete rawStream ;
+//   delete rawReader ;
 }
 //____________________________________________________________________________ 
 void  AliPHOSOnlineMonitor::Clean(){
index d1bf115ed8ccec7d0897a564b7d60c7c8ae565d2..95aa0728807b34174af24ace286050f8ee3fbf01 100644 (file)
 
 
 // --- ROOT system ---
+#include "TBranch.h"
+#include "TClonesArray.h"
+#include "TTree.h"
 
 // --- Standard library ---
 
 // --- AliRoot header files ---
 #include "AliConfig.h"
+#include "AliLog.h"
 #include "AliPHOSPID.h"
-#include "AliPHOSGetter.h"
 
 ClassImp(AliPHOSPID)
 
index 5816f07b7aab3d59bf4bfa833f4c29774948c647..3df63d818cda0711ae9564de795f023d5ccae14d 100644 (file)
@@ -745,7 +745,7 @@ Float_t  AliPHOSPIDv1::GetParameterToCalculateEllipse(TString particle, TString
 //{
 //  // Calculates the distance between the EMC RecPoint and the PPSD RecPoint
 //  
-//  const AliPHOSGeometry * geom = AliPHOSGetter::Instance()->PHOSGeometry() ; 
+//  AliPHOSGeometry * geom =  AliPHOSGeometry::GetInstance();
 //  TVector3 vecEmc ;
 //  TVector3 vecCpv ;
 //  if(cpv){
index 15a83dcb9f1e4e3d5e62aeeb66482933aee57b05..3bc56ebbf89408a5280eeff4dedf320549396479 100644 (file)
 
 
 // --- AliRoot header files ---
+#include "AliStack.h"
+#include "AliPHOSHit.h" 
+#include "AliPHOSDigit.h" 
+#include "AliPHOSTrackSegment.h" 
+#include "AliPHOSEmcRecPoint.h" 
 #include "AliPHOSRecParticle.h"
-#include "AliPHOSGetter.h" 
+#include "AliPHOSLoader.h" 
 #include "AliPHOSGeometry.h" 
 #include "AliLog.h"
 
@@ -93,9 +98,10 @@ Int_t AliPHOSRecParticle::GetNPrimariesToRecParticles() const
 { 
   // Get the number of primaries at the origine of the RecParticle
   Int_t rv = 0 ;
-  AliPHOSGetter * gime = AliPHOSGetter::Instance() ; 
-  Int_t emcRPindex = dynamic_cast<AliPHOSTrackSegment*>(gime->TrackSegments()->At(GetPHOSTSIndex()))->GetEmcIndex();
-  dynamic_cast<AliPHOSEmcRecPoint*>(gime->EmcRecPoints()->At(emcRPindex))->GetPrimaries(rv) ; 
+  AliRunLoader* rl = AliRunLoader::GetRunLoader() ;
+  AliPHOSLoader * phosLoader = dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
+  Int_t emcRPindex = dynamic_cast<AliPHOSTrackSegment*>(phosLoader->TrackSegments()->At(GetPHOSTSIndex()))->GetEmcIndex();
+  dynamic_cast<AliPHOSEmcRecPoint*>(phosLoader->EmcRecPoints()->At(emcRPindex))->GetPrimaries(rv) ; 
   return rv ; 
 }
 
@@ -104,10 +110,12 @@ const TParticle * AliPHOSRecParticle::GetPrimary() const
 {
   // Get the primary particle at the origine of the RecParticle and 
   // which has deposited the largest energy in SDigits
-  AliPHOSGetter * gime = AliPHOSGetter::Instance() ; 
-  if (!gime) 
-    Error("GetPrimary", "Getter not yet instantiated") ; 
-  gime->Event(gime->EventNumber(), "SRTPX") ; 
+  AliRunLoader* rl = AliRunLoader::GetRunLoader() ;
+  AliPHOSLoader * phosLoader = dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
+  rl->GetEvent(rl->GetEventNumber()) ;
+  rl->LoadKinematics("READ");
+  rl->LoadSDigits("READ");
+  
   if(GetNPrimaries() == 0)
     return 0 ;
   if(GetNPrimaries() == 1)
@@ -127,7 +135,7 @@ const TParticle * AliPHOSRecParticle::GetPrimary() const
   Int_t iPrim=-1 ;
   if(module != 0){
     geom->RelPosToAbsId(module,x,z,AbsId) ;
-   TClonesArray * sdigits = gime->SDigits() ;
+   TClonesArray * sdigits = phosLoader->SDigits() ;
    AliPHOSDigit * sdig ;
     
    for(Int_t i = 0 ; i < sdigits->GetEntriesFast() ; i++){
@@ -144,7 +152,7 @@ const TParticle * AliPHOSRecParticle::GetPrimary() const
    }
   }
   if(iPrim >= 0)
-    return gime->Primary(iPrim) ;
+    return rl->Stack()->Particle(iPrim) ;
   else
     return 0 ;
 } 
@@ -157,39 +165,40 @@ Int_t AliPHOSRecParticle::GetPrimaryIndex() const
   // which the RecParticle is created from
 
 
-  AliPHOSGetter * gime = AliPHOSGetter::Instance() ; 
-  if (!gime) 
-    AliError(Form("Getter not yet instantiated")) ; 
-  //PH  gime->Event(gime->EventNumber(), "DRTX") ; 
-  gime->Event(gime->EventNumber(), "DRT") ; 
+  AliRunLoader* rl = AliRunLoader::GetRunLoader() ;
+  AliPHOSLoader * phosLoader = dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
+  rl->GetEvent(rl->GetEventNumber()) ;
+  rl->LoadHits("READ");
+  rl->LoadDigits("READ");
+  rl->LoadRecPoints("READ");
+  rl->LoadTracks("READ");
   
   // Get TrackSegment corresponding to this RecParticle
-  AliPHOSTrackSegment *ts          = gime->TrackSegment(fPHOSTrackSegment);
+  const AliPHOSTrackSegment *ts          = phosLoader->TrackSegment(fPHOSTrackSegment);
 
   // Get EmcRecPoint corresponding to this TrackSegment
   Int_t emcRecPointIndex = ts->GetEmcIndex();
 
-  AliPHOSEmcRecPoint  *emcRecPoint = gime->EmcRecPoint(emcRecPointIndex);
+  const AliPHOSEmcRecPoint  *emcRecPoint = phosLoader->EmcRecPoint(emcRecPointIndex);
 
   // Get the list of digits forming this EmcRecParticle
   Int_t  nDigits   = emcRecPoint->GetDigitsMultiplicity();
   Int_t *digitList = emcRecPoint->GetDigitsList();
 
   // Find the digit with maximum amplitude
-  AliPHOSDigit *digit = 0;
   Int_t maxAmp = 0;
   Int_t bestDigitIndex = -1;
   for (Int_t iDigit=0; iDigit<nDigits; iDigit++) {
-    digit = gime->Digit(digitList[iDigit]);
+    const AliPHOSDigit * digit = phosLoader->Digit(digitList[iDigit]);
     if (digit->GetAmp() > maxAmp) {
       maxAmp = digit->GetAmp();
       bestDigitIndex = iDigit;
     }
   }
-  if (bestDigitIndex>-1)
-    digit = gime->Digit(digitList[bestDigitIndex]);
-  if (digit==0) return -12345;
-
+  if (bestDigitIndex>-1) {
+    const AliPHOSDigit * digit = phosLoader->Digit(digitList[bestDigitIndex]);
+    if (digit==0) return -12345;
+  }
   
   // Get the list of primary tracks producing this digit
   // and find which track has more track energy.
@@ -230,17 +239,16 @@ Int_t AliPHOSRecParticle::GetPrimaryIndex() const
   // find which hit has deposited more energy 
   // and find the primary track.
 
-  AliPHOSHit *hit = 0;
-  TClonesArray *hits = gime->Hits();
+  TClonesArray *hits = phosLoader->Hits();
   if (hits==0) return -12345;
 
   Double_t maxedep  =  0;
   Int_t    maxtrack = -1;
   Int_t    nHits    = hits ->GetEntries();
-  Int_t    id       = digit->GetId();
+  Int_t    id       = (phosLoader->Digit(digitList[bestDigitIndex]))->GetId();
 
   for (Int_t iHit=0; iHit<nHits; iHit++) {
-    hit = gime->Hit(iHit);
+    const AliPHOSHit * hit = phosLoader->Hit(iHit);
     if(hit->GetId() == id){
       Double_t edep  = hit->GetEnergy();
       Int_t    track = hit->GetPrimary();
@@ -267,11 +275,12 @@ const TParticle * AliPHOSRecParticle::GetPrimary(Int_t index) const
   } 
   else { 
     Int_t dummy ; 
-    AliPHOSGetter * gime = AliPHOSGetter::Instance() ; 
+    AliRunLoader* rl = AliRunLoader::GetRunLoader() ;
+    AliPHOSLoader * phosLoader = dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
 
-    Int_t emcRPindex = dynamic_cast<AliPHOSTrackSegment*>(gime->TrackSegments()->At(GetPHOSTSIndex()))->GetEmcIndex();
-    Int_t primaryindex = dynamic_cast<AliPHOSEmcRecPoint*>(gime->EmcRecPoints()->At(emcRPindex))->GetPrimaries(dummy)[index] ; 
-    return gime->Primary(primaryindex) ;
+    Int_t emcRPindex = dynamic_cast<AliPHOSTrackSegment*>(phosLoader->TrackSegments()->At(GetPHOSTSIndex()))->GetEmcIndex();
+    Int_t primaryindex = dynamic_cast<AliPHOSEmcRecPoint*>(phosLoader->EmcRecPoints()->At(emcRPindex))->GetPrimaries(dummy)[index] ; 
+    return rl->Stack()->Particle(primaryindex) ;
    } 
   //  return 0 ; 
 }
index ccbd2f1b3e2657d9fd130b1f7d19c28128ecf1fc..fc3c480bfc3da7e2bff1df976a8e9c84a5eb5bad 100644 (file)
@@ -90,9 +90,7 @@ AliPHOSTrackSegmentMaker::AliPHOSTrackSegmentMaker(const AliPHOSTrackSegmentMake
 //____________________________________________________________________________
 AliPHOSTrackSegmentMaker::~AliPHOSTrackSegmentMaker()
 {
- //Remove this from the parental task before destroying
-  //  if(AliPHOSGetter::Instance()->PhosLoader())
-  //    AliPHOSGetter::Instance()->PhosLoader()->CleanTracker();
+  //Remove this from the parental task before destroying
   if (fEMCRecPoints) {
     fEMCRecPoints->Delete();
     delete fEMCRecPoints;
index c5b325777a8a1fb27a2d2640b8a61aacfb2eb3ec..6eb292078266396f8b02ce2087d4754828cc06c8 100644 (file)
@@ -76,7 +76,8 @@
 #include "AliPHOSTrackSegmentMakerv2.h"
 #include "AliPHOSTrackSegment.h"
 #include "AliPHOSLink.h"
-#include "AliPHOSGetter.h"
+#include "AliPHOSEmcRecPoint.h"
+#include "AliPHOSCpvRecPoint.h"
 
 #include "AliESDEvent.h"
 #include "AliESDtrack.h"
index 3d0a706b268d7991ea6bd8d2e9b28323c0a1115c..6a30ea664fc959f9507a1ec5cca2504904dc2fdb 100644 (file)
@@ -41,7 +41,6 @@
 #include "AliPHOSTracker.h"
 #include "AliPHOSEmcRecPoint.h"
 #include "AliESDEvent.h"
-#include "AliPHOSGetter.h"
 #include "AliESDtrack.h"
 #include "AliPHOSTrackSegmentMakerv1.h"
 #include "AliPHOSPIDv1.h"
index 90802b748ecdf4bbe1e2a92d1688998caea846b9..3be4d49efd4123f0588e51bafb32acc679ea3900 100644 (file)
@@ -11,8 +11,6 @@
 #pragma link C++ class AliPHOSGeometry+;
 #pragma link C++ class AliPHOS+;
 #pragma link C++ class AliPHOSLoader+;
-#pragma link C++ class AliPHOSGetter+;
-#pragma link C++ class AliPHOSGetterLight+;
 #pragma link C++ class AliPHOSHit+;
 #pragma link C++ class AliPHOSTrackSegmentMaker+;
 #pragma link C++ class AliPHOSPID+;
index 0726db826c72799f6d947a18e971ed948b98cfeb..67d6b4d06dbf7820135b4ebb04768593d80035a8 100644 (file)
@@ -3,8 +3,7 @@ SRCS          =  AliPHOS.cxx \
                  AliPHOSEMCAGeometry.cxx \
                  AliPHOSCPVGeometry.cxx AliPHOSCPVBaseGeometry.cxx \
                  AliPHOSSupportGeometry.cxx \
-                 AliPHOSLoader.cxx AliPHOSGetter.cxx \
-                 AliPHOSGetterLight.cxx \
+                 AliPHOSLoader.cxx \
                  AliPHOSHit.cxx AliPHOSTrackSegmentMaker.cxx  AliPHOSPID.cxx \
                 AliPHOSClusterizer.cxx \
                 AliPHOSCalibrationDB.cxx AliPHOSDigitizer.cxx \