fDebug=0;
}
//____________________________________________________________________________
+AliPHOSGetter::~AliPHOSGetter(){
+ //Here we remove all TFolders and TTasks with current title and file name
+ TFolder * aliceF = (TFolder*)gROOT->FindObjectAny("YSAlice") ;
+
+ if(aliceF){
+ //Hits: the hierarchy is //YSALICE/WhiteBoard/Hits/PHOS/...
+ TFolder * hitsF = (TFolder*)aliceF->FindObject("WhiteBoard/Hits/PHOS") ;
+ if(hitsF){
+ TObject * h = hitsF->FindObject("hits") ;
+ hitsF->Remove(h) ;
+ }
+
+ //SDigits: the hierarchy is //YSALICE/WhiteBoard/SDigits/PHOS/...
+ TFolder * sdigitsF = (TFolder*)aliceF->FindObject("WhiteBoard/SDigits/PHOS") ;
+ if(sdigitsF){
+ TCollection* l = sdigitsF->GetListOfFolders() ;
+ TIter it(l) ;
+ TObject * sf ;
+ while((sf = it.Next()) )
+ sdigitsF->RecursiveRemove(sf) ;
+ }
+ }
+}
+//____________________________________________________________________________
void AliPHOSGetter::CreateWhiteBoard() const
{
// Posts a few item to the white board (folders)
(fgObjGetter->fHeaderFile.CompareTo(headerFile)==0))
return fgObjGetter ;
else
- delete fgObjGetter ; // delete it if already exists another version
+ fgObjGetter->~AliPHOSGetter() ; // delete it if already exists another version
fgObjGetter = new AliPHOSGetter(headerFile,branchTitle) ;
}
if ( !phosfound || !digitizerfound ) {
- cerr << "WARNING: AliPHOSGetter::ReadTreeD -> Cannot find Digits and/or Digitizer with name "
+ cout << "WARNING: AliPHOSGetter::ReadTreeD -> Cannot find Digits and/or Digitizer with name "
<< fDigitsTitle << endl ;
return ;
}
TBranch * hitsbranch = (TBranch*)gAlice->TreeH()->GetBranch("PHOS") ;
if ( !hitsbranch ) {
- cerr << "WARNING: AliPHOSGetter::ReadTreeH -> Cannot find branch PHOS" << endl ;
+ cout << "WARNING: AliPHOSGetter::ReadTreeH -> Cannot find branch PHOS" << endl ;
return ;
}
if(!Hits())
TBranch * hitsbranch = (TBranch*)gAlice->TreeH()->GetListOfBranches()->FindObject("PHOS") ;
if ( !hitsbranch ) {
- cerr << "WARNING: AliPHOSGetter::ReadTreeH -> Cannot find branch PHOS" << endl ;
+ cout << "WARNING: AliPHOSGetter::ReadTreeH -> Cannot find branch PHOS" << endl ;
return ;
}
if(!Hits())
TBranch * qabranch = PHOS()->TreeQA()->GetBranch("PHOS") ;
if (!qabranch) {
- cerr << "WARNING: AliPHOSGetter::ReadTreeQA -> Cannot find QA Alarms for PHOS" << endl ;
+ cout << "WARNING: AliPHOSGetter::ReadTreeQA -> Cannot find QA Alarms for PHOS" << endl ;
return ;
}
}
if ( !phosemcrpfound ) {
- cerr << "WARNING: AliPHOSGetter::ReadTreeR -> Cannot find EmcRecPoints with title "
+ cout << "WARNING: AliPHOSGetter::ReadTreeR -> Cannot find EmcRecPoints with title "
<< fRecPointsTitle << endl ;
return ;
}
if ( !phoscpvrpfound ) {
- cerr << "WARNING: AliPHOSGetter::ReadTreeR -> Cannot find CpvRecPoints with title "
+ cout << "WARNING: AliPHOSGetter::ReadTreeR -> Cannot find CpvRecPoints with title "
<< fRecPointsTitle << endl ;
return ;
}
if ( !clusterizerfound ) {
- cerr << "WARNING: AliPHOSGetter::ReadTreeR -> Can not find Clusterizer with title "
+ cout << "WARNING: AliPHOSGetter::ReadTreeR -> Can not find Clusterizer with title "
<< fRecPointsTitle << endl ;
return ;
}
}
if ( !phostsfound || !tsmakerfound ) {
- cerr << "WARNING: AliPHOSGetter::ReadTreeR -> Cannot find TrackSegments and/or TrackSegmentMaker with name "
+ cout << "WARNING: AliPHOSGetter::ReadTreeR -> Cannot find TrackSegments and/or TrackSegmentMaker with name "
<< fTrackSegmentsTitle << endl ;
return ;
}
}
if ( !phosrpafound || !pidfound ) {
- cerr << "WARNING: AliPHOSGetter::ReadTreeR -> Cannot find RecParticles and/or PID with name "
+ cout << "WARNING: AliPHOSGetter::ReadTreeR -> Cannot find RecParticles and/or PID with name "
<< fRecParticlesTitle << endl ;
return ;
}
}
}
if ( !phosfound || !sdigitizerfound ) {
- cerr << "WARNING: AliPHOSDigitizer::ReadSDigits -> Digits and/or Digitizer branch with name " << GetName()
+ cout << "WARNING: AliPHOSDigitizer::ReadSDigits -> Digits and/or Digitizer branch with name " << GetName()
<< " not found" << endl ;
return ;
}
}
}
if ( !phosfound || !sdigitizerfound ) {
- cerr << "WARNING: AliPHOSGetter::ReadTreeS -> Digits and/or Digitizer branch not found" << endl ;
+ cout << "WARNING: AliPHOSGetter::ReadTreeS -> Digits and/or Digitizer branch not found" << endl ;
return ;
}
}
if(fDebug)
- cerr << "WARNING: AliPHOSGetter::ReturnT -> Task " << path << "/" << name << " not found!" << endl ;
+ cout << "WARNING: AliPHOSGetter::ReturnT -> Task " << path << "/" << name << " not found!" << endl ;
return 0 ;
}