#include "TTree.h"
#include "TROOT.h"
#include "TObjString.h"
+#include "TFolder.h"
// --- Standard library ---
#include <iostream.h>
#include "AliRun.h"
#include "AliPHOSIndexToObject.h"
+#include "AliPHOS.h"
#include "AliPHOSDigitizer.h"
#include "AliPHOSSDigitizer.h"
#include "AliPHOSClusterizer.h"
#include "AliPHOSTrackSegmentMakerv1.h"
#include "AliPHOSTrackSegment.h"
#include "AliPHOSPID.h"
-#include "AliPHOSPIDv1.h"
+#include "AliPHOSPIDv1.h"
+
ClassImp(AliPHOSIndexToObject)
gAlice = (AliRun *) file->Get("gAlice") ;
}
+ // Posts a few item to the white board (folders)
+
+ TFolder * aliceF = (TFolder*)gROOT->GetListOfBrowsables()->FindObject("YSAlice") ;
+ AliPHOS * phos = GetPHOS() ;
+
+ // -- the geometry
+ TFolder * geomF = (TFolder*)aliceF->FindObject("folders/Geometry/PHOS") ;
+ AliPHOSGeometry * geom = phos->GetGeometry() ;
+ geomF->Add(geom) ;
+
fMaxEvent = (Int_t) gAlice->TreeE()->GetEntries() ;
DefineBranchTitles(branch,branchTitle) ;
delete sdigs[index] ;
}
+
//____________________________________________________________________________
AliPHOSIndexToObject * AliPHOSIndexToObject::GetInstance()
{
}
+//____________________________________________________________________________
+ AliPHOSGeometry * AliPHOSIndexToObject::GetPHOSGeometry() const
+{
+ // retrieves the geometr from the folder
+
+ TFolder * aliceF = (TFolder *)gROOT->GetListOfBrowsables()->FindObject("YSAlice") ;
+ TString path("folders/Geometry/PHOS/") ;
+ path += GetPHOS()->GetTitle() ;
+ return (AliPHOSGeometry*)aliceF->FindObject(path.Data()) ;
+}
+
+//____________________________________________________________________________
+ AliPHOS * AliPHOSIndexToObject::GetPHOS() const
+{
+ // returns the PHOS object
+ return ( (AliPHOS*)gAlice->GetDetector("PHOS") );
+}
+
//____________________________________________________________________________
TParticle * AliPHOSIndexToObject::GimePrimary(Int_t index) const
{
// --- AliRoot header files ---
+class AliPHOS ;
+class AliPHOSGeometry ;
class AliPHOSDigit ;
class AliPHOSDigitizer ;
class AliPHOSSDigitizer ;
void GetEvent(Int_t event) ; // reads event from file
Int_t GetEventNumber(){ return fEvent; }
Int_t GetMaxEvent() { return fMaxEvent;}
-
- static AliPHOSIndexToObject * GetInstance(const char* headerFile,const char* branch = "PHOSRP",
+ AliPHOSGeometry * GetPHOSGeometry() const ;
+ AliPHOS * GetPHOS() const ;
+ static AliPHOSIndexToObject * GetInstance(const char* headerFile,const char* branch = "PHOSRP",
const char* branchTitle =0 ) ;
static AliPHOSIndexToObject * GetInstance() ;