1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 //_________________________________________________________________________
19 // A singleton. This class should be used in the analysis stage to get
20 // reconstructed objects: Digits, RecPoints, TrackSegments and RecParticles,
21 // instead of directly reading them from galice.root file. This container
22 // ensures, that one reads Digits, made of these particular digits, RecPoints,
23 // made of these particular RecPoints, TrackSegments and RecParticles.
24 // This becomes non trivial if there are several identical branches, produced with
25 // different set of parameters.
27 // An example of how to use (see also class AliPHOSAnalyser):
28 // AliPHOSGetter * gime = AliPHOSGetter::GetInstance("galice.root","test") ;
29 // for(Int_t irecp = 0; irecp < gime->NRecParticles() ; irecp++)
30 // AliPHOSRecParticle * part = gime->RecParticle(1) ;
32 // gime->Event(event) ; // reads new event from galice.root
34 //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
35 //*-- Completely redesigned by Dmitri Peressounko March 2001
37 //*-- YS June 2001 : renamed the original AliPHOSIndexToObject and make
38 //*-- systematic usage of TFolders without changing the interface
39 //////////////////////////////////////////////////////////////////////////////
41 // --- ROOT system ---
46 #include <TParticle.h>
50 // --- Standard library ---
52 // --- AliRoot header files ---
54 #include "AliHeader.h"
57 #include "AliPHOSBeamTestEvent.h"
58 #include "AliPHOSGetter.h"
59 #include "AliPHOSLoader.h"
60 #include "AliRunLoader.h"
62 #include "AliPHOSRawStream.h"
63 #include "AliRawReaderFile.h"
65 ClassImp(AliPHOSGetter)
67 AliPHOSGetter * AliPHOSGetter::fgObjGetter = 0 ;
68 AliPHOSLoader * AliPHOSGetter::fgPhosLoader = 0;
69 Int_t AliPHOSGetter::fgDebug = 0;
71 // TFile * AliPHOSGetter::fgFile = 0 ;
73 //____________________________________________________________________________
74 AliPHOSGetter::AliPHOSGetter(const char* headerFile, const char* version, Option_t * openingOption)
76 // ctor only called by Instance()
78 AliRunLoader* rl = AliRunLoader::GetRunLoader(version) ;
80 rl = AliRunLoader::Open(headerFile, version, openingOption);
82 Fatal("AliPHOSGetter", "Could not find the Run Loader for %s - %s",headerFile, version) ;
85 if (rl->GetAliRun() == 0x0) {
87 gAlice = rl->GetAliRun(); // should be removed
90 fgPhosLoader = dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
92 Error("AliPHOSGetter", "Could not find PHOSLoader") ;
94 fgPhosLoader->SetTitle(version);
97 // initialize data members
101 fLoadingStatus = "" ;
103 fESDFileName = rl->GetFileName() ; // this should be the galice.root file
104 fESDFileName.ReplaceAll("galice.root", "AliESDs.root") ;
110 //____________________________________________________________________________
111 AliPHOSGetter::~AliPHOSGetter()
114 delete fgPhosLoader ;
118 fPrimaries->Delete() ;
127 //____________________________________________________________________________
128 void AliPHOSGetter::Reset()
130 // resets things in case the getter is called consecutively with different files
131 // the PHOS Loader is already deleted by the Run Loader
134 fPrimaries->Delete() ;
141 //____________________________________________________________________________
142 AliPHOSClusterizer * AliPHOSGetter::Clusterizer()
144 // Returns pointer to the Clusterizer task
145 AliPHOSClusterizer * rv ;
146 rv = dynamic_cast<AliPHOSClusterizer *>(PhosLoader()->Reconstructioner()) ;
149 rv = dynamic_cast<AliPHOSClusterizer*>(PhosLoader()->Reconstructioner()) ;
154 //____________________________________________________________________________
155 TObjArray * AliPHOSGetter::CpvRecPoints()
157 // asks the Loader to return the CPV RecPoints container
161 rv = PhosLoader()->CpvRecPoints() ;
163 PhosLoader()->MakeRecPointsArray() ;
164 rv = PhosLoader()->CpvRecPoints() ;
169 //____________________________________________________________________________
170 TClonesArray * AliPHOSGetter::Digits()
172 // asks the Loader to return the Digits container
174 TClonesArray * rv = 0 ;
175 rv = PhosLoader()->Digits() ;
178 PhosLoader()->MakeDigitsArray() ;
179 rv = PhosLoader()->Digits() ;
184 //____________________________________________________________________________
185 AliPHOSDigitizer * AliPHOSGetter::Digitizer()
187 // Returns pointer to the Digitizer task
188 AliPHOSDigitizer * rv ;
189 rv = dynamic_cast<AliPHOSDigitizer *>(PhosLoader()->Digitizer()) ;
192 rv = dynamic_cast<AliPHOSDigitizer *>(PhosLoader()->Digitizer()) ;
198 //____________________________________________________________________________
199 TObjArray * AliPHOSGetter::EmcRecPoints()
201 // asks the Loader to return the EMC RecPoints container
205 rv = PhosLoader()->EmcRecPoints() ;
207 PhosLoader()->MakeRecPointsArray() ;
208 rv = PhosLoader()->EmcRecPoints() ;
213 //____________________________________________________________________________
214 TClonesArray * AliPHOSGetter::TrackSegments()
216 // asks the Loader to return the TrackSegments container
218 TClonesArray * rv = 0 ;
220 rv = PhosLoader()->TrackSegments() ;
222 PhosLoader()->MakeTrackSegmentsArray() ;
223 rv = PhosLoader()->TrackSegments() ;
228 //____________________________________________________________________________
229 AliPHOSTrackSegmentMaker * AliPHOSGetter::TrackSegmentMaker()
231 // Returns pointer to the TrackSegmentMaker task
232 AliPHOSTrackSegmentMaker * rv ;
233 rv = dynamic_cast<AliPHOSTrackSegmentMaker *>(PhosLoader()->TrackSegmentMaker()) ;
236 rv = dynamic_cast<AliPHOSTrackSegmentMaker *>(PhosLoader()->TrackSegmentMaker()) ;
241 //____________________________________________________________________________
242 TClonesArray * AliPHOSGetter::RecParticles()
244 // asks the Loader to return the TrackSegments container
246 TClonesArray * rv = 0 ;
248 rv = PhosLoader()->RecParticles() ;
250 PhosLoader()->MakeRecParticlesArray() ;
251 rv = PhosLoader()->RecParticles() ;
255 //____________________________________________________________________________
256 void AliPHOSGetter::Event(Int_t event, const char* opt)
258 // Reads the content of all Tree's S, D and R
260 if ( event >= MaxEvent() ) {
261 Error("Event", "%d not found in TreeE !", event) ;
265 AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
267 // checks if we are dealing with test-beam data
268 TBranch * btb = rl->TreeE()->GetBranch("AliPHOSBeamTestEvent") ;
271 fBTE = new AliPHOSBeamTestEvent() ;
272 btb->SetAddress(&fBTE) ;
273 btb->GetEntry(event) ;
282 // Loads the type of object(s) requested
284 rl->GetEvent(event) ;
286 if( strstr(opt,"X") || (strcmp(opt,"")==0) )
295 if( strstr(opt,"D") )
298 if( strstr(opt,"R") )
301 if( strstr(opt,"T") )
304 if( strstr(opt,"P") )
307 if( strstr(opt,"E") )
310 if( strstr(opt,"W") )
314 // if( strstr(opt,"Q") )
320 //____________________________________________________________________________
321 Int_t AliPHOSGetter::EventNumber() const
323 // return the current event number
324 AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
325 return static_cast<Int_t>(rl->GetEventNumber()) ;
328 //____________________________________________________________________________
329 TClonesArray * AliPHOSGetter::Hits()
331 // asks the loader to return the Hits container
333 TClonesArray * rv = 0 ;
335 rv = PhosLoader()->Hits() ;
337 PhosLoader()->LoadHits("read");
338 rv = PhosLoader()->Hits() ;
343 //____________________________________________________________________________
344 AliPHOSGetter * AliPHOSGetter::Instance(const char* alirunFileName, const char* version, Option_t * openingOption)
346 // Creates and returns the pointer of the unique instance
347 // Must be called only when the environment has changed
349 //::Info("Instance","alirunFileName=%s version=%s openingOption=%s",alirunFileName,version,openingOption);
351 if(!fgObjGetter){ // first time the getter is called
352 fgObjGetter = new AliPHOSGetter(alirunFileName, version, openingOption) ;
354 else { // the getter has been called previously
355 AliRunLoader * rl = AliRunLoader::GetRunLoader(fgPhosLoader->GetTitle());
356 if ( rl->GetFileName() == alirunFileName ) {// the alirunFile has the same name
357 // check if the file is already open
358 TFile * galiceFile = dynamic_cast<TFile *>(gROOT->FindObject(rl->GetFileName()) ) ;
361 fgObjGetter = new AliPHOSGetter(alirunFileName, version, openingOption) ;
363 else { // the file is already open check the version name
364 TString currentVersionName = rl->GetEventFolder()->GetName() ;
365 TString newVersionName(version) ;
366 if (currentVersionName == newVersionName)
368 ::Warning( "Instance", "Files with version %s already open", currentVersionName.Data() ) ;
370 fgObjGetter = new AliPHOSGetter(alirunFileName, version, openingOption) ;
375 AliRunLoader * rl = AliRunLoader::GetRunLoader(fgPhosLoader->GetTitle()) ;
376 if ( strstr(version, AliConfig::GetDefaultEventFolderName()) ) // false in case of merging
378 fgObjGetter = new AliPHOSGetter(alirunFileName, version, openingOption) ;
382 ::Error("AliPHOSGetter::Instance", "Failed to create the PHOS Getter object") ;
390 //____________________________________________________________________________
391 AliPHOSGetter * AliPHOSGetter::Instance()
393 // Returns the pointer of the unique instance already defined
395 if(!fgObjGetter && fgDebug)
396 ::Warning("AliPHOSGetter::Instance", "Getter not initialized") ;
402 //____________________________________________________________________________
403 Int_t AliPHOSGetter::MaxEvent() const
405 // returns the number of events in the run (from TE)
407 AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
408 return static_cast<Int_t>(rl->GetNumberOfEvents()) ;
411 //____________________________________________________________________________
412 TParticle * AliPHOSGetter::Primary(Int_t index) const
414 AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
415 return rl->Stack()->Particle(index) ;
418 //____________________________________________________________________________
419 AliPHOS * AliPHOSGetter:: PHOS() const
421 // returns the PHOS object
422 AliPHOS * phos = dynamic_cast<AliPHOS*>(PhosLoader()->GetModulesFolder()->FindObject("PHOS")) ;
425 Warning("PHOS", "PHOS module not found in module folders: %s", PhosLoader()->GetModulesFolder()->GetName() ) ;
431 //____________________________________________________________________________
432 AliPHOSPID * AliPHOSGetter::PID()
434 // Returns pointer to the PID task
436 rv = dynamic_cast<AliPHOSPID *>(PhosLoader()->PIDTask()) ;
439 rv = dynamic_cast<AliPHOSPID *>(PhosLoader()->PIDTask()) ;
444 //____________________________________________________________________________
445 AliPHOSGeometry * AliPHOSGetter::PHOSGeometry() const
447 // Returns PHOS geometry
449 AliPHOSGeometry * rv = 0 ;
451 rv = PHOS()->GetGeometry() ;
455 //____________________________________________________________________________
456 TClonesArray * AliPHOSGetter::Primaries()
458 // creates the Primaries container if needed
461 Info("Primaries", "Creating a new TClonesArray for primaries") ;
462 fPrimaries = new TClonesArray("TParticle", 1000) ;
467 //____________________________________________________________________________
468 void AliPHOSGetter::Print()
470 // Print usefull information about the getter
472 AliRunLoader * rl = AliRunLoader::GetRunLoader(fgPhosLoader->GetTitle());
473 ::Info( "Print", "gAlice file is %s -- version name is %s", (rl->GetFileName()).Data(), rl->GetEventFolder()->GetName() ) ;
476 //____________________________________________________________________________
477 void AliPHOSGetter::ReadPrimaries()
479 // Read Primaries from Kinematics.root
481 AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
483 // gets kine tree from the root file (Kinematics.root)
484 if ( ! rl->TreeK() ) { // load treeK the first time
485 rl->LoadKinematics() ;
488 fNPrimaries = (rl->GetHeader())->GetNtrack();
490 Info( "ReadTreeK", "Found %d particles in event # %d", fNPrimaries, EventNumber() ) ;
493 // first time creates the container
495 fPrimaries->Clear() ;
498 for (index = 0 ; index < fNPrimaries; index++) {
499 new ((*fPrimaries)[index]) TParticle(*(Primary(index)));
503 //____________________________________________________________________________
504 Bool_t AliPHOSGetter::OpenESDFile()
509 fESDFile = TFile::Open(fESDFileName) ;
513 else if (fESDFile->IsOpen()) {
515 fESDFile = TFile::Open(fESDFileName) ;
517 if (!fESDFile->IsOpen())
522 //____________________________________________________________________________
523 Int_t AliPHOSGetter::ReadRaw(Int_t event)
525 // reads the raw format data, converts it into digits format and store digits in Digits()
528 AliRawReaderFile rawReader(event) ;
529 AliPHOSRawStream in(&rawReader);
531 const Int_t kHighGainIdOffset = PHOSGeometry()->GetNModules()
532 * PHOSGeometry()->GetNPhi()
533 * PHOSGeometry()->GetNZ()
536 Bool_t first = kTRUE ;
538 TH1D hLowGain("hLowGain", "Low Gain", 1000, 0., PHOS()->GetRawFormatTimeMax()) ;
539 TH1D hHighGain("hHighGain", "High Gain", 1000, 0., PHOS()->GetRawFormatTimeMax()) ;
541 // fit half the gaussian decay rather than AliPHOS::RawResponseFunction because thiswould give a floating point
542 // exception during error calculation ... To solve...
543 TF1 * gauss = new TF1("gauss", "gaus",
544 PHOS()->GetRawFormatTimePeak(),
545 PHOS()->GetRawFormatTimeMax() ) ;
548 Bool_t hgflag = kFALSE ;
550 TClonesArray * digits = Digits() ;
554 while ( in.Next() ) { // PHOS entries loop
556 if ( (in.IsNewRow() || in.IsNewColumn() || in.IsNewModule()) ) {
558 hLowGain.Fit(gauss, "QRON") ;
559 Int_t ampL = static_cast<Int_t>(gauss->Eval(gauss->GetParameter(2)) + 0.5) ;
560 Double_t timeL = PHOS()->GetRawFormatTimePeak() - gauss->GetParameter(2) ;
561 if (timeL < 0 ) // happens with noise
562 timeL = PHOS()->GetRawFormatTimePeak() ;
564 hHighGain.Fit(gauss, "QRON") ;
565 Int_t ampH = static_cast<Int_t>(gauss->Eval(gauss->GetParameter(2)) + 0.5) ;
566 Double_t timeH = PHOS()->GetRawFormatTimePeak() - gauss->GetParameter(2) ;
567 if (timeH < 0 ) // happens with noise
568 timeH = PHOS()->GetRawFormatTimePeak() ;
569 new((*digits)[idigit]) AliPHOSDigit( -1, id+kHighGainIdOffset, ampH, timeH) ;
573 new((*digits)[idigit]) AliPHOSDigit( -1, id, ampL, timeL) ;
580 relId[0] = in.GetModule() ;
581 if ( relId[0] >= PHOS()->GetRawFormatHighGainOffset() ) {
582 relId[0] -= PHOS()->GetRawFormatHighGainOffset() ;
587 relId[2] = in.GetRow() ;
588 relId[3] = in.GetColumn() ;
589 PHOSGeometry()->RelToAbsNumbering(relId, id) ;
593 in.GetTime() * PHOS()->GetRawFormatTimeMax() / PHOS()->GetRawFormatTimeBins(),
594 in. GetSignal() * PHOS()->GetRawFormatHighGainFactor() ) ;
597 in.GetTime() * PHOS()->GetRawFormatTimeMax() / PHOS()->GetRawFormatTimeBins(),
599 } // PHOS entries loop
603 return Digits()->GetEntriesFast() ;
606 //____________________________________________________________________________
607 Int_t AliPHOSGetter::ReadTreeD()
611 PhosLoader()->CleanDigits() ;
612 // gets TreeD from the root file (PHOS.Digits.root)
613 // if ( !IsLoaded("D") ) {
614 PhosLoader()->LoadDigits("UPDATE") ;
615 PhosLoader()->LoadDigitizer("UPDATE") ;
618 return Digits()->GetEntries() ;
621 //____________________________________________________________________________
622 Int_t AliPHOSGetter::ReadTreeH()
625 PhosLoader()->CleanHits() ;
626 // gets TreeH from the root file (PHOS.Hit.root)
627 //if ( !IsLoaded("H") ) {
628 PhosLoader()->LoadHits("UPDATE") ;
631 return Hits()->GetEntries() ;
634 //____________________________________________________________________________
635 Int_t AliPHOSGetter::ReadTreeR()
637 // Read the RecPoints
639 PhosLoader()->CleanRecPoints() ;
640 // gets TreeR from the root file (PHOS.RecPoints.root)
641 //if ( !IsLoaded("R") ) {
642 PhosLoader()->LoadRecPoints("UPDATE") ;
643 PhosLoader()->LoadClusterizer("UPDATE") ;
647 return EmcRecPoints()->GetEntries() ;
650 //____________________________________________________________________________
651 Int_t AliPHOSGetter::ReadTreeT()
653 // Read the TrackSegments
655 PhosLoader()->CleanTracks() ;
656 // gets TreeT from the root file (PHOS.TrackSegments.root)
657 //if ( !IsLoaded("T") ) {
658 PhosLoader()->LoadTracks("UPDATE") ;
659 PhosLoader()->LoadTrackSegmentMaker("UPDATE") ;
663 return TrackSegments()->GetEntries() ;
665 //____________________________________________________________________________
666 Int_t AliPHOSGetter::ReadTreeP()
668 // Read the RecParticles
670 PhosLoader()->CleanRecParticles() ;
672 // gets TreeT from the root file (PHOS.TrackSegments.root)
673 // if ( !IsLoaded("P") ) {
674 PhosLoader()->LoadRecParticles("UPDATE") ;
675 PhosLoader()->LoadPID("UPDATE") ;
679 return RecParticles()->GetEntries() ;
681 //____________________________________________________________________________
682 Int_t AliPHOSGetter::ReadTreeS()
686 PhosLoader()->CleanSDigits() ;
687 // gets TreeS from the root file (PHOS.SDigits.root)
688 //if ( !IsLoaded("S") ) {
689 PhosLoader()->LoadSDigits("READ") ;
690 PhosLoader()->LoadSDigitizer("READ") ;
694 return SDigits()->GetEntries() ;
697 //____________________________________________________________________________
698 Int_t AliPHOSGetter::ReadTreeE(Int_t event)
702 // gets esdTree from the root file (AliESDs.root)
704 if ( !OpenESDFile() )
707 fESDTree = static_cast<TTree*>(fESDFile->Get("esdTree")) ;
711 Error("ReadTreeE", "no ESD tree found");
714 fESDTree->SetBranchAddress("ESD", &fESD);
715 fESDTree->GetEvent(event);
720 //____________________________________________________________________________
721 TClonesArray * AliPHOSGetter::SDigits()
723 // asks the Loader to return the Digits container
725 TClonesArray * rv = 0 ;
727 rv = PhosLoader()->SDigits() ;
729 PhosLoader()->MakeSDigitsArray() ;
730 rv = PhosLoader()->SDigits() ;
735 //____________________________________________________________________________
736 AliPHOSSDigitizer * AliPHOSGetter::SDigitizer()
738 // Returns pointer to the SDigitizer task
739 AliPHOSSDigitizer * rv ;
740 rv = dynamic_cast<AliPHOSSDigitizer *>(PhosLoader()->SDigitizer()) ;
743 rv = dynamic_cast<AliPHOSSDigitizer *>(PhosLoader()->SDigitizer()) ;
748 //____________________________________________________________________________
749 TParticle * AliPHOSGetter::Secondary(const TParticle* p, Int_t index) const
751 // Return first (index=1) or second (index=2) secondary particle of primary particle p
759 Int_t daughterIndex = p->GetDaughter(index-1) ;
760 AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
761 return rl->GetAliRun()->GetMCApp()->Particle(daughterIndex) ;
767 //____________________________________________________________________________
768 void AliPHOSGetter::Track(Int_t itrack)
770 // Read the first entry of PHOS branch in hit tree gAlice->TreeH()
772 AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
774 if( !TreeH() ) // load treeH the first time
777 // first time create the container
778 TClonesArray * hits = Hits() ;
782 TBranch * phosbranch = dynamic_cast<TBranch*>(TreeH()->GetBranch("PHOS")) ;
783 phosbranch->SetAddress(&hits) ;
784 phosbranch->GetEntry(itrack) ;
787 //____________________________________________________________________________
788 TTree * AliPHOSGetter::TreeD() const
790 // Returns pointer to the Digits Tree
792 rv = PhosLoader()->TreeD() ;
794 PhosLoader()->MakeTree("D");
795 rv = PhosLoader()->TreeD() ;
801 //____________________________________________________________________________
802 TTree * AliPHOSGetter::TreeH() const
804 // Returns pointer to the Hits Tree
806 rv = PhosLoader()->TreeH() ;
808 PhosLoader()->MakeTree("H");
809 rv = PhosLoader()->TreeH() ;
815 //____________________________________________________________________________
816 TTree * AliPHOSGetter::TreeR() const
818 // Returns pointer to the RecPoints Tree
820 rv = PhosLoader()->TreeR() ;
822 PhosLoader()->MakeTree("R");
823 rv = PhosLoader()->TreeR() ;
829 //____________________________________________________________________________
830 TTree * AliPHOSGetter::TreeT() const
832 // Returns pointer to the TrackSegments Tree
834 rv = PhosLoader()->TreeT() ;
836 PhosLoader()->MakeTree("T");
837 rv = PhosLoader()->TreeT() ;
842 //____________________________________________________________________________
843 TTree * AliPHOSGetter::TreeP() const
845 // Returns pointer to the RecParticles Tree
847 rv = PhosLoader()->TreeP() ;
849 PhosLoader()->MakeTree("P");
850 rv = PhosLoader()->TreeP() ;
856 //____________________________________________________________________________
857 TTree * AliPHOSGetter::TreeS() const
859 // Returns pointer to the SDigits Tree
861 rv = PhosLoader()->TreeS() ;
863 PhosLoader()->MakeTree("S");
864 rv = PhosLoader()->TreeS() ;
870 //____________________________________________________________________________
871 Bool_t AliPHOSGetter::VersionExists(TString & opt) const
873 // checks if the version with the present name already exists in the same directory
877 AliRunLoader * rl = AliRunLoader::GetRunLoader(PhosLoader()->GetTitle());
878 TString version( rl->GetEventFolder()->GetName() ) ;
882 if ( opt == "sdigits") {
883 // add the version name to the root file name
884 TString fileName( PhosLoader()->GetSDigitsFileName() ) ;
885 if (version != AliConfig::GetDefaultEventFolderName()) // only if not the default folder name
886 fileName = fileName.ReplaceAll(".root", "") + "_" + version + ".root" ;
887 if ( !(gSystem->AccessPathName(fileName)) ) {
888 Warning("VersionExists", "The file %s already exists", fileName.Data()) ;
891 PhosLoader()->SetSDigitsFileName(fileName) ;
894 if ( opt == "digits") {
895 // add the version name to the root file name
896 TString fileName( PhosLoader()->GetDigitsFileName() ) ;
897 if (version != AliConfig::GetDefaultEventFolderName()) // only if not the default folder name
898 fileName = fileName.ReplaceAll(".root", "") + "_" + version + ".root" ;
899 if ( !(gSystem->AccessPathName(fileName)) ) {
900 Warning("VersionExists", "The file %s already exists", fileName.Data()) ;
909 //____________________________________________________________________________
910 UShort_t AliPHOSGetter::EventPattern(void) const
912 // Return the pattern (trigger bit register) of the beam-test event
914 return fBTE->GetPattern() ;
918 //____________________________________________________________________________
919 Float_t AliPHOSGetter::BeamEnergy(void) const
921 // Return the beam energy of the beam-test event
923 return fBTE->GetBeamEnergy() ;