#include "TFolder.h"
// --- Standard library ---
-#include <strstream.h>
// --- AliRoot header files ---
#include "AliPHOS.h"
// Contamination(...) - calculates contamination of the photon spectrum and
// pobability of reconstruction of several primaries as
// kGAMMA,kELECTRON etc.
-//
-// User Case:
+//// User Case:
// root [0] AliPHOSAnalyze * a = new AliPHOSAnalyze("galice.root")
// // set the file you want to analyse
// root [1] a->DrawRecon(1,3)
// --- Standard library ---
-#include <iomanip.h>
-
// --- AliRoot header files ---
#include "AliRun.h"
//========== Create ObjectGetter
AliPHOSGetter * gime = AliPHOSGetter::GetInstance(ffileName.Data(),branchTitle) ;
if(Nevent >= gAlice->TreeE()->GetEntries() ) {
- cout << "There is no event " << Nevent << ", only " << gAlice->TreeE()->GetEntries() << "events available " <<endl ;
+ Error("DrawRecon", "There is no event %d only %d events available", Nevent, gAlice->TreeE()->GetEntries() ) ;
return ;
}
const AliPHOSGeometry * phosgeom = gime->PHOSGeometry() ;
}
}
}
- cout << "Number of EMC + CPV SDigits per module: " <<endl ;
- cout << nsdig[0] << " " << nsdig[1] << " " << nsdig[2] << " " << nsdig[3]<< " " << nsdig[4] << endl ;
- cout << endl ;
-
+ TString message ;
+ message = "Number of EMC + CPV SDigits per module: \n" ;
+ message += "%d %d %d %d %d\n";
+ Info("DrawRecon", message.Data(), nsdig[0], nsdig[1], nsdig[2], nsdig[3], nsdig[4] ) ;
//Plot digits
Int_t iDigit ;
branches = gAlice->TreeS()->GetListOfBranches() ;
- cout << "TreeS: " << endl ;
+ TString message ;
+ message = "TreeS:\n" ;
for(ibranch = 0;ibranch <branches->GetEntries();ibranch++){
TBranch * branch=(TBranch *) branches->At(ibranch) ;
- if(strstr(branch->GetName(),"PHOS") )
- cout << " " << branch->GetName() << " " << branch->GetTitle() << endl ;
+ if(strstr(branch->GetName(),"PHOS") ){
+ message += " " ;
+ message += branch->GetName() ;
+ message += " " ;
+ message += branch->GetTitle() ;
+ message += "\n" ;
+ }
}
- cout << endl ;
-
branches = gAlice->TreeD()->GetListOfBranches() ;
- cout << "TreeD: " << endl ;
+ message += "TreeD:\n" ;
for(ibranch = 0;ibranch <branches->GetEntries();ibranch++){
TBranch * branch=(TBranch *) branches->At(ibranch) ;
- if(strstr(branch->GetName(),"PHOS") )
- cout << " " << branch->GetName() << " " << branch->GetTitle() << endl ;
+ if(strstr(branch->GetName(),"PHOS") ) {
+ message += " ";
+ message += branch->GetName() ;
+ message += " " ;
+ message += branch->GetTitle() ;
+ message +="\n" ;
+ }
}
- cout << endl ;
-
branches = gAlice->TreeR()->GetListOfBranches() ;
- cout << "TreeR: " << endl ;
+ message += "TreeR: \n" ;
for(ibranch = 0;ibranch <branches->GetEntries();ibranch++){
TBranch * branch=(TBranch *) branches->At(ibranch) ;
- if(strstr(branch->GetName(),"PHOS") )
- cout << " " << branch->GetName() << " " << branch->GetTitle() << endl ;
+ if(strstr(branch->GetName(),"PHOS") ) {
+ message += " " ;
+ message += branch->GetName() ;
+ message += " " ;
+ message += branch->GetTitle() ;
+ message += "\n" ;
+ }
}
- cout << endl ;
-
-
+ Info("LS", message.Data()) ;
}
//____________________________________________________________________________
void AliPHOSAnalyze::InvariantMass(const char* branchTitle)
Int_t iRecParticle ;
TClonesArray * rp = gime->RecParticles() ;
if(!rp){
- cout << "AliPHOSAnalyze::InvariantMass --> Can't find RecParticles " << endl ;
+ Error("InvariantMass", "Can't find RecParticles") ;
return ;
}
Int_t iRecParticle ;
TClonesArray * rp = gime->RecParticles() ;
if(!rp) {
- cout << "AliPHOSAnalyze::EnergyResolution --> Event " <<ievent
- << ", Can't find RecParticles " << endl ;
+ Error("EnergyResolution", "Event %d, Can't find RecParticles ", ievent) ;
return ;
}
TClonesArray * ts = gime->TrackSegments() ;
if(!ts) {
- cout << "AliPHOSAnalyze::EnergyResolution --> Event " <<ievent
- << ", Can't find TrackSegments " << endl ;
+ Error("EnergyResolution", "Event %d, Can't find TrackSegments", ievent) ;
return ;
}
TObjArray * emcrp = gime->EmcRecPoints() ;
if(!emcrp){
- cout << "AliPHOSAnalyze::EnergyResolution --> Event " <<ievent
- << ", Can't find EmcRecPoints " << endl ;
+ Error("EnergyResolution", "Event %d, Can't find EmcRecPoints") ;
return ;
}
gime->Event(ievent) ;
TClonesArray * rp = gime->RecParticles() ;
if(!rp) {
- cout << "AliPHOSAnalyze::PositionResolution --> Event " <<ievent
- << ", Can't find RecParticles " << endl ;
+ Error("PositionResolution", "Event %d, Can't find RecParticles", ievent) ;
return ;
}
TClonesArray * ts = gime->TrackSegments() ;
if(!ts) {
- cout << "AliPHOSAnalyze::PositionResolution --> Event " <<ievent
- << ", Can't find TrackSegments " << endl ;
+ Error("PositionResolution", "Event %d, Can't find TrackSegments", ievent) ;
return ;
}
TObjArray * emcrp = gime->EmcRecPoints() ;
if(!emcrp){
- cout << "AliPHOSAnalyze::PositionResolution --> Event " <<ievent
- << ", Can't find EmcRecPoints " << endl ;
+ Error("PositionResolution", "Event %d, Can't find EmcRecPoints", ievent) ;
return ;
}
TClonesArray * rp = gime->RecParticles() ;
if(!rp) {
- cout << "AliPHOSAnalyze::Contamination --> Event " <<ievent
- << ", Can't find RecParticles " << endl ;
+ Error("Contamination", "Event %d, Can't find RecParticles", ievent) ;
return ;
}
TClonesArray * ts = gime->TrackSegments() ;
if(!ts) {
- cout << "AliPHOSAnalyze::Contamination --> Event " <<ievent
- << ", Can't find TrackSegments " << endl ;
+ Error("Contamination", "Event %d, Can't find TrackSegments", ievent) ;
return ;
}
TObjArray * emcrp = gime->EmcRecPoints() ;
if(!emcrp){
- cout << "AliPHOSAnalyze::Contamination --> Event " <<ievent
- << ", Can't find EmcRecPoints " << endl ;
+ Error("Contamination", "Event %d, Can't find EmcRecPoints", ievent) ;
return ;
}
//print Final Table
maxevent = (Int_t)gAlice->TreeE()->GetEntries() ;
- // cout << "Resolutions: Analyzed " << gime->MaxEvent() << " event(s)" << endl ;
- cout << "Resolutions: Analyzed " << maxevent << " event(s)" << endl ;
- cout << endl ;
-
- cout << " Primary: Photon Neutron Antineutron Charged hadron AntiProton" << endl ;
- cout << "--------------------------------------------------------------------------------" << endl ;
- cout << " kGAMMA: "
- << setw(8) << counter[2][0] << setw(9) << counter[2][1] << setw(13) << counter[2][2]
- << setw(15)<< counter[2][3] << setw(13) << counter[2][4] << endl ;
- cout << " kGAMMAHA: "
- << setw(8) << counter[3][0] << setw(9) << counter[3][1] << setw(13) << counter[3][2]
- << setw(15)<< counter[3][3] << setw(13) << counter[3][4] << endl ;
- cout << " kNEUTRALEM: "
- << setw(8) << counter[0][0] << setw(9) << counter[0][1] << setw(13) << counter[0][2]
- << setw(15)<< counter[0][3] << setw(13) << counter[0][4] << endl ;
- cout << " kNEUTRALHA: "
- << setw(8) << counter[1][0] << setw(9) << counter[1][1] << setw(13) << counter[1][2]
- << setw(15)<< counter[1][3] << setw(13) << counter[1][4] << endl ;
- cout << " kABSURDEM: "
- << setw(8) << counter[4][0] << setw(9) << counter[4][1] << setw(13) << counter[4][2]
- << setw(15)<< counter[4][3] << setw(13) << counter[4][4] << endl ;
- cout << " kABSURDHA: "
- << setw(8) << counter[5][0] << setw(9) << counter[5][1] << setw(13) << counter[5][2]
- << setw(15)<< counter[5][3] << setw(13) << counter[5][4] << endl ;
- cout << " kELECTRON: "
- << setw(8) << counter[6][0] << setw(9) << counter[6][1] << setw(13) << counter[6][2]
- << setw(15)<< counter[6][3] << setw(13) << counter[6][4] << endl ;
- cout << " kCHARGEDHA: "
- << setw(8) << counter[7][0] << setw(9) << counter[7][1] << setw(13) << counter[7][2]
- << setw(15)<< counter[7][3] << setw(13) << counter[7][4] << endl ;
- cout << "--------------------------------------------------------------------------------" << endl ;
-
+ TString message ;
+ message = "Resolutions: Analyzed %d event(s)\n" ;
+
+ message += " Primary: Photon Neutron Antineutron Charged hadron AntiProton\n" ;
+ message += "--------------------------------------------------------------------------------\n" ;
+ message += " kGAMMA: " ;
+ message += "%d %d %d %d %d\n" ;
+ message += " kGAMMAHA: " ;
+ message += "%d %d %d %d %d\n" ;
+ message += " kNEUTRALEM: " ;
+ message += "%d %d %d %d %d\n" ;
+ message += " kNEUTRALHA: " ;
+ message += "%d %d %d %d %d\n" ;
+ message += " kABSURDEM: ";
+ message += "%d %d %d %d %d\n" ;
+ message += " kABSURDHA: " ;
+ message += "%d %d %d %d %d\n" ;
+ message += " kELECTRON: " ;
+ message += "%d %d %d %d %d\n" ;
+ message += " kCHARGEDHA: " ;
+ message += "%d %d %d %d %d\n" ;
+
+ message += "--------------------------------------------------------------------------------" ;
+
+
Int_t totalInd = 0 ;
for(i1 = 0; i1<8; i1++)
for(i2 = 0; i2<5; i2++)
totalInd+=counter[i1][i2] ;
- cout << "Indentified particles: " << totalInd << endl ;
+ message += "Indentified particles: %d" ;
+ Info("Contamination", message.Data(), maxevent,
+ counter[2][0], counter[2][1], counter[2][2], counter[2][3], counter[2][4],
+ counter[3][0], counter[3][1], counter[3][2], counter[3][3], counter[3][4],
+ counter[0][0], counter[0][1], counter[0][2], counter[0][3], counter[0][4],
+ counter[1][0], counter[1][1], counter[1][2], counter[1][3], counter[1][4],
+ counter[4][0], counter[4][1], counter[4][2], counter[4][3], counter[4][4],
+ counter[5][0], counter[5][1], counter[5][2], counter[5][3], counter[5][4],
+ counter[6][0], counter[6][1], counter[6][2], counter[6][3], counter[6][4],
+ counter[7][0], counter[7][1], counter[7][2], counter[7][3], counter[7][4],
+ totalInd ) ;
+
}
// --- ROOT system ---
#include "TFile.h"
// --- Standard library ---
-#include <iostream.h>
#include <fstream>
// --- AliRoot header files ---
fSlopes->AddAt(slope,i);
}
else
- cout << "Please, create me with non-default constructor!" << endl;
+ Warning("SetAll", "Please, create me with non-default constructor!") ;
}
//____________________________________________________________________________
void AliPHOSCalibrationDB::ReadCalibrationParameters(const char * filename, Option_t* opt){
if(strcmp(opt,"gains")==0){ //read gains
if(!fctdb){
- cout << "Specify Connections Table Database first" << endl ;
+ Error("ReadCalibrationParameters", "Specify Connections Table Database first") ;
return ;
}
ifstream gainfile(filename) ;
else
if(strstr(opt,"pedest")){ //read pedestals
if(!fctdb){
- cout << "Specify Connections Table Database first" << endl ;
+ Error("ReadCalibrationParameters", "Specify Connections Table Database first") ;
return ;
}
ifstream pfile(filename) ;
pfile.close();
}
else{
- cout << "Available options are " << endl ;
- cout << " `gains' : to read gains " << endl ;
- cout << " `pedestals : to read pedestals " << endl ;
+ Warning("ReadCalibrationParameters", "Available options are\n `gains' : to read gains\n `pedestals : to read pedestals ") ;
}
}
//____________________________________________________________________________
#include "TTree.h"
// --- Standard library ---
-#include <iostream.h>
#include <stdlib.h>
// --- AliRoot header files ---
#include "TTask.h"
// --- Standard library ---
-#include <iostream.h>
// --- AliRoot header files ---
AliPHOSClusterizer(const char * headerFile, const char * name, const Bool_t toSplit) ;
virtual ~AliPHOSClusterizer() ; // dtor
- virtual Float_t GetEmcClusteringThreshold()const {cout << "Not Defined" << endl ; return 0. ; }
- virtual Float_t GetEmcLocalMaxCut()const {cout << "Not Defined" << endl ; return 0. ; }
- virtual Float_t GetEmcLogWeight()const {cout << "Not Defined" << endl ; return 0. ; }
- virtual Float_t GetEmcTimeGate() const {cout << "Not Defined" << endl ; return 0. ; } ;
- virtual Float_t GetCpvClusteringThreshold()const {cout << "Not Defined" << endl ; return 0. ; }
- virtual Float_t GetCpvLocalMaxCut()const {cout << "Not Defined" << endl ; return 0. ; }
- virtual Float_t GetCpvLogWeight()const {cout << "Not Defined" << endl ; return 0. ; }
- virtual const char * GetRecPointsBranch() const {cout << "Not Defined" << endl ; return 0 ; } ;
- virtual const Int_t GetRecPointsInRun() const {cout << "Not Defined" << endl ; return 0 ; }
- virtual const char * GetDigitsBranch() const{cout << "Not Defined" << endl ; return 0 ; } ;
-
- virtual void MakeClusters() {cout << "Not Defined" << endl ; }
- virtual void Print(Option_t * option)const {cout << "Not Defined" << endl ; }
-
- virtual void SetEmcClusteringThreshold(Float_t cluth) {cout << "Not Defined" << endl ; }
- virtual void SetEmcLocalMaxCut(Float_t cut) {cout << "Not Defined" << endl ; }
- virtual void SetEmcLogWeight(Float_t w) {cout << "Not Defined" << endl ; }
- virtual void SetEmcTimeGate(Float_t gate) {cout << "Not Defined" << endl ; }
- virtual void SetCpvClusteringThreshold(Float_t cluth) {cout << "Not Defined" << endl ; }
- virtual void SetCpvLocalMaxCut(Float_t cut) {cout << "Not Defined" << endl ; }
- virtual void SetCpvLogWeight(Float_t w) {cout << "Not Defined" << endl ; }
- virtual void SetDigitsBranch(const char * title) {cout << "Not Defined" << endl ; }
- virtual void SetRecPointsBranch(const char *title) {cout << "Not Defined" << endl ; }
- virtual void SetUnfolding(Bool_t toUnfold ){cout << "Not Defined" << endl ;}
- virtual const char * Version() const {cout << "Not Defined" << endl ; return 0 ; }
+ virtual Float_t GetEmcClusteringThreshold()const {Warning("GetEmcClusteringThreshold", "Not Defined" ) ; return 0. ; }
+ virtual Float_t GetEmcLocalMaxCut()const {Warning("GetEmcLocalMaxCut", "Not Defined" ) ; return 0. ; }
+ virtual Float_t GetEmcLogWeight()const {Warning("GetEmcLogWeight", "Not Defined" ) ; return 0. ; }
+ virtual Float_t GetEmcTimeGate() const {Warning("GetEmcTimeGate", "Not Defined" ) ; return 0. ; } ;
+ virtual Float_t GetCpvClusteringThreshold()const {Warning("GetCpvClusteringThreshold", "Not Defined" ) ; return 0. ; }
+ virtual Float_t GetCpvLocalMaxCut()const {Warning("GetCpvLocalMaxCut", "Not Defined" ) ; return 0. ; }
+ virtual Float_t GetCpvLogWeight()const {Warning("GetCpvLogWeight", "Not Defined" ) ; return 0. ; }
+ virtual const char * GetRecPointsBranch() const {Warning("GetRecPointsBranch", "Not Defined" ) ; return 0 ; } ;
+ virtual const Int_t GetRecPointsInRun() const {Warning("GetRecPointsInRun", "Not Defined" ) ; return 0 ; }
+ virtual const char * GetDigitsBranch() const{Warning("GetDigitsBranch", "Not Defined" ) ; return 0 ; } ;
+
+ virtual void MakeClusters() {Warning("MakeClusters", "Not Defined" ) ; }
+ virtual void Print(Option_t * option)const {Warning("Print", "Not Defined" ) ; }
+
+ virtual void SetEmcClusteringThreshold(Float_t cluth) {Warning("SetEmcClusteringThreshold", "Not Defined" ) ; }
+ virtual void SetEmcLocalMaxCut(Float_t cut) {Warning("SetEmcLocalMaxCut", "Not Defined" ) ; }
+ virtual void SetEmcLogWeight(Float_t w) {Warning("SetEmcLogWeight", "Not Defined" ) ; }
+ virtual void SetEmcTimeGate(Float_t gate) {Warning("SetEmcTimeGate", "Not Defined" ) ; }
+ virtual void SetCpvClusteringThreshold(Float_t cluth) {Warning("SetCpvClusteringThreshold", "Not Defined" ) ; }
+ virtual void SetCpvLocalMaxCut(Float_t cut) {Warning("SetCpvLocalMaxCut", "Not Defined" ) ; }
+ virtual void SetCpvLogWeight(Float_t w) {Warning("SetCpvLogWeight", "Not Defined" ) ; }
+ virtual void SetDigitsBranch(const char * title) {Warning("SetDigitsBranch", "Not Defined" ) ; }
+ virtual void SetRecPointsBranch(const char *title) {Warning("SetRecPointsBranch", "Not Defined" ) ; }
+ virtual void SetUnfolding(Bool_t toUnfold ){Warning("SetUnfolding", "Not Defined" ) ;}
+ virtual const char * Version() const {Warning("Version", "Not Defined" ) ; return 0 ; }
protected:
// --- Standard library ---
-#include <iostream.h>
-#include <iomanip.h>
-
// --- AliRoot header files ---
#include "AliPHOSCalibrationDB.h"
#include "AliPHOSClusterizerv1.h"
if(strstr(option,"tim")){
gBenchmark->Stop("PHOSClusterizer");
- cout << "AliPHOSClusterizer:" << endl ;
- cout << " took " << gBenchmark->GetCpuTime("PHOSClusterizer") << " seconds for Clusterizing "
- << gBenchmark->GetCpuTime("PHOSClusterizer")/nevents << " seconds per event " << endl ;
- cout << endl ;
+ Info("Exec", " took %f seconds for Clusterizing %f seconds per event \n",
+ gBenchmark->GetCpuTime("PHOSClusterizer"),
+ gBenchmark->GetCpuTime("PHOSClusterizer")/nevents ) ;
}
-
}
//____________________________________________________________________________
gMinuit->mnparm(index, "x", x, 0.1, 0, 0, ierflg) ;
index++ ;
if(ierflg != 0){
- cout << "PHOS Unfolding> Unable to set initial value for fit procedure : x = " << x << endl ;
+ Warning("FindFit", "PHOS Unfolding unable to set initial value for fit procedure : x = %f\n", x ) ;
return kFALSE;
}
gMinuit->mnparm(index, "z", z, 0.1, 0, 0, ierflg) ;
index++ ;
if(ierflg != 0){
- cout << "PHOS Unfolding> Unable to set initial value for fit procedure : z = " << z << endl ;
+ Warning("FindFit", "PHOS Unfolding unable to set initial value for fit procedure : z =%f\n", z ) ;
return kFALSE;
}
gMinuit->mnparm(index, "Energy", energy , 0.05*energy, 0., 4.*energy, ierflg) ;
index++ ;
if(ierflg != 0){
- cout << "PHOS Unfolding> Unable to set initial value for fit procedure : energy = " << energy << endl ;
+ Warning("FindFit", "PHOS Unfolding unable to set initial value for fit procedure : energy = %f\n", energy ) ;
return kFALSE;
}
}
gMinuit->mnexcm("MIGRAD", &p0, 0, ierflg) ; // minimize
if(ierflg == 4){ // Minimum not found
- cout << "PHOS Unfolding> Fit not converged, cluster abandoned "<< endl ;
+ Warning("FindFit", "PHOS Unfolding fit not converged, cluster abandoned\n" );
return kFALSE ;
}
for(index = 0; index < nPar; index++){
AliPHOSGetter * gime = AliPHOSGetter::GetInstance(GetTitle(),branchname.Data(), fToSplit ) ;
if ( gime == 0 ) {
- cerr << "ERROR: AliPHOSClusterizerv1::Init -> Could not obtain the Getter object !" << endl ;
+ Error("Init", "Could not obtain the Getter object !") ;
return ;
}
TClonesArray * digits = gime->Digits() ;
if ( !digits ) {
- cerr << "ERROR: AliPHOSClusterizerv1::MakeClusters -> Digits with name "
- << GetName() << " not found ! " << endl ;
+ Error("MakeClusters", "Digits with name %s not found !") ;
abort() ;
}
TClonesArray * digitsC = (TClonesArray*)digits->Clone() ;
{
// Print clusterizer parameters
- if( strcmp(GetName(), "") !=0 ){
-
+ TString message ;
+ TString taskName(GetName()) ;
+ taskName.ReplaceAll(Version(), "") ;
+
+ if( strcmp(GetName(), "") !=0 ) {
// Print parameters
-
- TString taskName(GetName()) ;
- taskName.ReplaceAll(Version(), "") ;
-
- cout << "---------------"<< taskName.Data() << " " << GetTitle()<< "-----------" << endl
- << "Clusterizing digits from the file: " << taskName.Data() << endl
- << " Branch: " << GetName() << endl
- << endl
- << " EMC Clustering threshold = " << fEmcClusteringThreshold << endl
- << " EMC Local Maximum cut = " << fEmcLocMaxCut << endl
- << " EMC Logarothmic weight = " << fW0 << endl
- << endl
- << " CPV Clustering threshold = " << fCpvClusteringThreshold << endl
- << " CPV Local Maximum cut = " << fCpvLocMaxCut << endl
- << " CPV Logarothmic weight = " << fW0CPV << endl
- << endl ;
+ message = "\n--------------- %s %s -----------\n" ;
+ message += "Clusterizing digits from the file: %s\n" ;
+ message += " Branch: %s\n" ;
+ message += " EMC Clustering threshold = %f\n" ;
+ message += " EMC Local Maximum cut = %f\n" ;
+ message += " EMC Logarothmic weight = %f\n" ;
+ message += " CPV Clustering threshold = %f\n" ;
+ message += " CPV Local Maximum cut = %f\n" ;
+ message += " CPV Logarothmic weight = %f\n" ;
if(fToUnfold)
- cout << " Unfolding on " << endl ;
+ message += " Unfolding on\n" ;
else
- cout << " Unfolding off " << endl ;
+ message += " Unfolding off\n" ;
- cout << "------------------------------------------------------------------" <<endl ;
+ message += "------------------------------------------------------------------" ;
}
- else
- cout << " AliPHOSClusterizerv1 not initialized " << endl ;
+ else
+ message = " AliPHOSClusterizerv1 not initialized " ;
+
+ Info("Print", message.Data(),
+ taskName.Data(),
+ GetTitle(),
+ taskName.Data(),
+ GetName(),
+ fEmcClusteringThreshold,
+ fEmcLocMaxCut,
+ fW0,
+ fCpvClusteringThreshold,
+ fCpvLocMaxCut,
+ fW0CPV ) ;
}
+
+
//____________________________________________________________________________
void AliPHOSClusterizerv1::PrintRecPoints(Option_t * option)
{
TObjArray * emcRecPoints = AliPHOSGetter::GetInstance()->EmcRecPoints(BranchName()) ;
TObjArray * cpvRecPoints = AliPHOSGetter::GetInstance()->CpvRecPoints(BranchName()) ;
- cout << "AliPHOSClusterizerv1: : event "<<gAlice->GetEvNumber() << endl ;
- cout << " Found "<< emcRecPoints->GetEntriesFast() << " EMC Rec Points and "
- << cpvRecPoints->GetEntriesFast() << " CPV RecPoints" << endl ;
-
+ TString message ;
+ message = "event %d\n" ;
+ message += " Found %d EMC RecPoints and %d CPV RecPoints \n" ;
+ Info("PrintRecPoints", message.Data(),
+ gAlice->GetEvNumber(),
+ emcRecPoints->GetEntriesFast(),
+ cpvRecPoints->GetEntriesFast() ) ;
+
fRecPointsInRun += emcRecPoints->GetEntriesFast() ;
fRecPointsInRun += cpvRecPoints->GetEntriesFast() ;
-
+
if(strstr(option,"all")) {
- cout << "EMC clusters " << endl ;
- cout << " Index Ene(MeV) Multi Module X Y Z Lambda 1 Lambda 2 # of prim Primaries list " << endl;
-
+ message = "EMC clusters " ;
+ message += " Index Ene(MeV) Multi Module X Y Z Lambda 1 Lambda 2 # of prim Primaries list " ;
+ Info("PrintRecPoints", message.Data() ) ;
Int_t index ;
for (index = 0 ; index < emcRecPoints->GetEntries() ; index++) {
AliPHOSEmcRecPoint * rp = (AliPHOSEmcRecPoint * )emcRecPoints->At(index) ;
Int_t * primaries;
Int_t nprimaries;
primaries = rp->GetPrimaries(nprimaries);
-
- cout << setw(4) << rp->GetIndexInList() << " "
- << setw(7) << setprecision(3) << rp->GetEnergy() << " "
- << setw(3) << rp->GetMultiplicity() << " "
- << setw(1) << rp->GetPHOSMod() << " "
- << setw(6) << setprecision(2) << locpos.X() << " "
- << setw(6) << setprecision(2) << locpos.Y() << " "
- << setw(6) << setprecision(2) << locpos.Z() << " "
- << setw(4) << setprecision(2) << lambda[0] << " "
- << setw(4) << setprecision(2) << lambda[1] << " "
- << setw(2) << nprimaries << " " ;
+ message = " %d %f %d %f %f %f %f %f %d\n" ;
+ Info("PrintRecPoints", message.Data(),
+ rp->GetIndexInList(),
+ rp->GetEnergy(),
+ rp->GetMultiplicity(),
+ rp->GetPHOSMod(),
+ locpos.X(),
+ locpos.Y(),
+ locpos.Z(),
+ lambda[0],
+ lambda[1],
+ nprimaries ) ;
- for (Int_t iprimary=0; iprimary<nprimaries; iprimary++)
- cout << setw(4) << primaries[iprimary] << " " ;
- cout << endl ;
+ for (Int_t iprimary=0; iprimary<nprimaries; iprimary++) {
+ message = " %d" ;
+ Info("PrintRecPoints", message.Data(), primaries[iprimary] ) ;
+ }
}
-
- //Now plot CPV recPoints
- cout << "EMC clusters " << endl ;
- cout << " Index "
- << " Multi "
- << " Module "
- << " X "
- << " Y "
- << " Z "
- << " # of prim "
- << " Primaries list " << endl;
+ //Now plot CPV recPoints
+ message = "EMC clusters Index Multi Module X Y Z # of prim Primaries list \n" ;
+ Info("PrintRecPoints", message.Data() ) ;
for (index = 0 ; index < cpvRecPoints->GetEntries() ; index++) {
AliPHOSRecPoint * rp = (AliPHOSRecPoint * )cpvRecPoints->At(index) ;
- cout << setw(6) << rp->GetIndexInList() << " ";
- cout << setw(6) << rp->GetPHOSMod() << " CPV ";
-
+
TVector3 locpos;
rp->GetLocalPosition(locpos);
- cout << setw(6) << locpos.X() << " ";
- cout << setw(6) << locpos.Y() << " ";
- cout << setw(6) << locpos.Z() << " ";
-
+
Int_t * primaries;
Int_t nprimaries ;
+
+ message = " %d %d CPV %f %f %f %d" ;
+ Info("PrintRecPoints", message.Data(),
+ rp->GetIndexInList(),
+ rp->GetPHOSMod(),
+ locpos.X(),
+ locpos.Y(),
+ locpos.Z(),
+ nprimaries) ;
+
primaries = rp->GetPrimaries(nprimaries);
- cout << setw(6) << nprimaries << " ";
-
- for (Int_t iprimary=0; iprimary<nprimaries; iprimary++)
- cout << setw(4) << primaries[iprimary] << " ";
- cout << endl;
+ for (Int_t iprimary=0; iprimary<nprimaries; iprimary++) {
+ message = " %d " ;
+ Info("PrintRecPoints", message.Data(), primaries[iprimary] ) ;
+ }
}
-
-
- cout << "-----------------------------------------------------------------------"<<endl ;
}
}
#include "TROOT.h"
// --- Standard library ---
-#include <iostream.h>
-#include <iomanip.h>
// --- AliRoot header files ---
#include "AliPHOSClusterizerv2.h"
// if(!ReadDigits(ievent)) //reads digits for event fEvent
// continue;
- cout<<" MakeClusters invoked..";
+ Info("Exec", "MakeClusters invoked..") ;
MakeClusters() ;
- cout<<" done."<<endl;
+ Info("Exec", "MakeClusters done.") ;
//SmartRecPoints will communicate with wPool.
wPoolF->Remove(recCpv);
delete recCpv;
- cout<<" "<<gime->CpvRecPoints()->GetEntries()<<endl;
- cout<<" "<<cpvRecPoints->GetEntries()<<" cpvRecPoints."<<endl<<endl;
+ Info("Exec", " %d", gime->CpvRecPoints()->GetEntries() ) ;
+ Info("Exec", " %d cpvRecPoints", cpvRecPoints->GetEntries() ) ;
// Now Emc reconstruction
wPoolF->Remove(recEmc);
delete recEmc;
- cout<<" "<<nOldCpv<<" OLD cpvRecPoints."<<endl;
- cout<<" "<<gime->CpvRecPoints()->GetEntries()<<endl;
- cout<<" "<<cpvRecPoints->GetEntries()<<" cpvRecPoints."<<endl<<endl;
+ TString message ;
+ message = " %d OLD cpvRecPoints\n" ;
+ message += " %d\n" ;
+ message += " %d cpvRecPoints\n" ;
- cout<<" "<<nOldEmc<<" OLD emcRecPoints."<<endl;
- cout<<" "<<gime->EmcRecPoints()->GetEntries()<<endl;
- cout<<" "<<emcRecPoints->GetEntries()<<" emcRecPoints."<<endl<<endl;
+ message += " %d OLD emcRecPoints " ;
+ message += " %d\n" ;
+ message += " %d emcRecPoints\n" ;
+
+ Info("Exec", message.Data(),
+ nOldCpv,
+ gime->CpvRecPoints()->GetEntries(),cpvRecPoints->GetEntries(),
+ nOldEmc,
+ gime->EmcRecPoints()->GetEntries(), emcRecPoints->GetEntries() ) ;
WriteRecPoints(ievent);
if(strstr(option,"tim")) {
gBenchmark->Stop("PHOSClusterizer");
- cout << "AliPHOSClusterizer:" << endl ;
- cout << " took " << gBenchmark->GetCpuTime("PHOSClusterizer") << " seconds for Clusterizing " << endl;
- cout << endl ;
-
+ Info("Exec","took %f seconds for Clusterizing", gBenchmark->GetCpuTime("PHOSClusterizer") ) ;
}
-
}
//---------------------------------------------------------------------------------
Int_t AliPHOSClusterizerv2::AreNeighbours(AliPHOSDigit* d1, AliPHOSDigit* d2) const
#include "TH2S.h"
// --- Standard library ---
-#include <iostream.h>
+
// --- AliRoot header files ---
#include "AliPHOSGeometry.h"
#include "AliPHOSConTableDB.h"
//assuming, that prototype is centered in the third module of the PHOS
fNcrInProto =fProtoRaws*fProtoColumns ;
if(!fNcrInProto){
- cout << "configuratio of prototype is not known!!!" << endl ;
- cout << "specify number of raws and columns in prototype" << endl ;
+ Error("BuildDB", "configuratio of prototype is not known!!!\n Specify number of raws and columns in prototype") ;
return ;
}
fRawOffset = (fGeom->GetNPhi() - fProtoRaws)/2 ;
//____________________________________________________________________________
void AliPHOSConTableDB::Print(Option_t * option)const {
- cout << GetName() << " " << GetTitle() << endl ;
- cout << "PHOS Geometry configured for " ;
+ TString message ;
+ message = " %s %s\n" ;
+ message += "PHOS Geometry configured for " ;
if(fGeom)
- cout << fGeom->GetName() << " " << fGeom->GetTitle() << endl ;
+ message += "%s %s \n" ;
else
- cout << " null " << endl ;
- cout << "-------Prototype parameters--------" << endl ;
- cout << " number of columns: " << fProtoColumns << endl ;
- cout << " number of raws: " << fProtoRaws << endl ;
- cout << " centered in third PHOS module with offsets: " <<endl ;
- cout << " raw: " << fRawOffset << " of " << fGeom->GetNPhi() << endl ;
- cout << " col: " << fColOffset << " of " << fGeom->GetNZ() << endl ;
- cout << "------------------------------------" << endl ;
+ message += " null \n" ;
+
+ Info("Print", message.Data(), GetName(), GetTitle(), fGeom->GetName(), fGeom->GetTitle() ) ;
+
+ message = "-------Prototype parameters--------\n" ;
+ message += " number of columns: %d" ;
+ message += " number of raws: %d" ;
+ message += " centered in third PHOS module with offsets: " ;
+ message += " raw: %d of %d\n" ;
+ message += " col: %d of %d\n" ;
+ message += "------------------------------------" ;
+
+ Info("Print", message.Data(), fProtoColumns, fProtoRaws, fRawOffset, fGeom->GetNPhi(), fColOffset,fGeom->GetNZ() );
}
// --- Standard library ---
-#include <iostream.h>
-
// --- AliRoot header files ---
#include "AliPHOSCpvRecPoint.h"
} else {
x = -1e6 ;
z = -1e6 ;
- if (fMulDigit != 0) cout << "AliPHOSCpvRecPoint: too low log weight factor "
- << "to evaluate cluster's center\n";
+ if (fMulDigit != 0)
+ Warning(":EvalLocalPosition", "Too low log weight factor to evaluate cluster's center" ) ;
}
fLocPos.SetX(x) ;
fLocPos.SetY(0.) ;
{
// Print the list of digits belonging to the cluster
- cout << "AliPHOSCpvRecPoint: " << endl ;
-
+ TString message ;
+ message = "AliPHOSCpvRecPoint: " ;
+ message += "Digits # " ;
+ Info("Print", message.Data()) ;
+
Int_t iDigit;
- cout << "Digits # " ;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
- cout << fDigitsList[iDigit] << " " ;
- cout << endl ;
+ Info("Print", " %d ", fDigitsList[iDigit]) ;
- cout << "Energies: " ;
+ Info("Print", "Energies: ") ;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
- cout << fEnergyList[iDigit] << " " ;
- cout << endl ;
+ Info("Print", " %f ", fEnergyList[iDigit]) ;
- cout << " Multiplicity = " << fMulDigit << endl ;
- cout << " Cluster Energy = " << fAmp << endl ;
- cout << " Stored at position " << GetIndexInList() << endl ;
+ message = " Multiplicity = %d\n" ;
+ message += " Cluster Energy = %f\n" ;
+ message += " Stored at position %d\n" ;
+ Info("Print", message.Data(), fMulDigit, fAmp, GetIndexInList() ) ;
+
}
AliPHOSGeometry::GetInstance(title, "") ;
if (GetGeometry()->IsInitialized() )
- cout << "AliPHOS" << Version() << " : PHOS geometry intialized for " << GetGeometry()->GetName() << endl ;
+ Info("AliPHOSv1", "AliPHOS %d : PHOS geometry intialized for %s", Version(), GetGeometry()->GetName() );
else
- cout << "AliPHOS" << Version() << " : PHOS geometry initialization failed !" << endl ;
+ Info("AliPHOSv1", "AliPHOS %d : PHOS geometry initialization failed !", Version() ) ;
// Defining the PHOS Reconstructioner
//we assume, that there is al least one EMC digit...
if(fSDigits->GetEntries() == 0) {
- cout << "PHOS::SDigits2Digits> No SDigits !!! Do not produce Digits " << endl ;
+ Warning("SDigits2Digits", "No SDigits !!! Do not produce Digits ") ;
return ;
}
Float_t pNorm = p.Py();
Float_t eloss = kdEdx;
-// cout << "CPVDigitize: YVK : "<<hitX<<" "<<hitZ<<" | "<<pX<<" "<<pZ<<" "<<pNorm<<endl;
-
Float_t dZY = pZ/pNorm * GetGeometry()->GetCPVGasThickness();
Float_t dXY = pX/pNorm * GetGeometry()->GetCPVGasThickness();
gRandom->Rannor(rnor1,rnor2);
// --- Standard library ---
-#include <iostream.h>
-
// --- AliRoot header files ---
#include "AliPHOSDigit.h"
fPrimary[fNprimary] = (digit.fPrimary)[index] ;
fNprimary++ ;
if(fNprimary>fNMaxPrimary) {
- cout << "AliPHOSDigit >> Increase NMaxPrimary "<< endl ;
+ Error("Operator +", "Increase NMaxPrimary") ;
return *this ;
}
}
{
// Prints the data of the digit
- out << "ID " << digit.fId << " Energy = " << digit.fAmp << " Time = " << digit.fTime << endl ;
- Int_t i ;
- for(i=0;i<digit.fNprimary;i++)
- out << "Primary " << i+1 << " = " << digit.fPrimary[i] << endl ;
- out << "Position in list = " << digit.fIndexInList << endl ;
+// out << "ID " << digit.fId << " Energy = " << digit.fAmp << " Time = " << digit.fTime << endl ;
+// Int_t i ;
+// for(i=0;i<digit.fNprimary;i++)
+// out << "Primary " << i+1 << " = " << digit.fPrimary[i] << endl ;
+// out << "Position in list = " << digit.fIndexInList << endl ;
+ digit.Warning("operator <<", "Implement differently") ;
return out ;
}
#include "TBenchmark.h"
// --- Standard library ---
-#include <iomanip.h>
// --- AliRoot header files ---
#include "AliRun.h"
// get first the sdigitizer from the tasks list (must have same name as the digitizer)
const AliPHOSSDigitizer * sDigitizer = gime->SDigitizer(GetName());
if ( !sDigitizer) {
- cerr << "ERROR: AliPHOSDigitizer::Digitize -> SDigitizer with name " << GetName() << " not found " << endl ;
+ Error("Digitize", "SDigitizer with name %s not found", GetName() ) ;
abort() ;
}
if ( (sdigits = (TClonesArray*)folder->FindObject(GetName()) ) ) {
TString fileName(folder->GetName()) ;
fileName.ReplaceAll("_","/") ;
-// cout << "INFO: AliPHOSDigitizer::Digitize -> Adding SDigits "
-// << GetName() << " from " << fileName << endl ;
+// Info("Digitize", "Adding SDigits %s from %s", GetName(), fileName() ) ;
sdigArray->AddAt(sdigits, input) ;
input++ ;
}
}
if ( phosfound ) {
- cerr << "WARNING: AliPHOSDigitizer -> Digits branch with name " << GetName()
- << " already exits" << endl ;
+ Error("Exec", "Digits branch with name %s already exists", GetName() ) ;
return ;
}
if ( digitizerfound ) {
- cerr << "WARNING: AliPHOSDigitizer -> Digitizer branch with name " << GetName()
- << " already exits" << endl ;
+ Error("Exec", "Digitizer branch with name %s already exists", GetName() );
return ;
}
}
for(input = 0 ; input < fManager->GetNinputs(); input ++){
TTree * treeS = fManager->GetInputTreeS(input) ;
if(!treeS){
- cerr << "AliPHOSDigitizer::Exec -> No Input " << endl ;
+ Error("Exec", "No Input") ;
return ;
}
gime->ReadTreeS(treeS,input) ;
if(strstr(option,"tim")){
gBenchmark->Stop("PHOSDigitizer");
- cout << "AliPHOSDigitizer:" << endl ;
- cout << " took " << gBenchmark->GetCpuTime("PHOSDigitizer") << " seconds for Digitizing "
- << gBenchmark->GetCpuTime("PHOSDigitizer")/nevents << " seconds per event " << endl ;
- cout << endl ;
- }
-
+ TString message ;
+ message = " took %f seconds for Digitizing %f seconds per event\n" ;
+ Info("Exec", message.Data(),
+ gBenchmark->GetCpuTime("PHOSDigitizer"),
+ gBenchmark->GetCpuTime("PHOSDigitizer")/nevents );
+ }
}
//____________________________________________________________________________
AliPHOSGetter * gime = AliPHOSGetter::GetInstance(GetTitle(), GetName(), fToSplit) ;
if ( gime == 0 ) {
- cerr << "ERROR: AliPHOSDigitizer::Init -> Could not obtain the Getter object !" << endl ;
+ Error("Init", "Could not obtain the Getter object !") ;
return kFALSE;
}
Init() ;
if(fManager){
- cout << "Can not use this method under AliRunDigitizer " << endl ;
+ Warning("MixWith", "Can not use this method under AliRunDigitizer\n" ) ;
return ;
}
path += "/" ;
path += GetName() ;
if ( gROOT->FindObjectAny(path.Data()) ) {
- cerr << "WARNING: AliPHOSDigitizer::MixWith -> Entry already exists, do not add" << endl ;
+ Warning("MixWith", "Entry already exists, do not add\n" ) ;
return;
}
-
+
gime->PostSDigits(GetName(),headerFile) ;
// check if the requested file is already open or exist and if SDigits Branch exist
if ( !file ) {
file = new TFile(headerFile, "READ") ;
if (!file) {
- cerr << "ERROR: AliPHOSDigitizer::MixWith -> File " << headerFile << " does not exist!" << endl ;
+ Error("MixWith", "File %s does not exist\n", headerFile );
return ;
}
}
-
}
//__________________________________________________________________
-void AliPHOSDigitizer::Print(Option_t* option)const {
+void AliPHOSDigitizer::Print(Option_t* option)const
+{
// Print Digitizer's parameters
if( strcmp(GetName(), "") != 0 ){
-
- cout << "------------------- "<< GetName() << " -------------" << endl ;
+ TString message("\n-------------------") ;
+ message += GetName() ;
+ message += "-------------\n" ;
const Int_t nStreams = GetNInputStreams() ;
if (nStreams) {
Int_t index = 0 ;
- for (index = 0 ; index < nStreams ; index++)
- cout << "Adding SDigits " << GetName() << " from " << fManager->GetInputFileName(index, 0) << endl ;
-
- cout << endl ;
- cout << "Writing digits to " << fManager->GetInputFileName(0, 0) << endl ;
+ for (index = 0 ; index < nStreams ; index++) {
+ message += "Adding SDigits " ;
+ message += GetName() ;
+ message += "from " ;
+ message += fManager->GetInputFileName(index, 0) ;
+ }
+ message += "\nWriting digits to " ;
+ message += fManager->GetInputFileName(0, 0) ;
} else {
-// AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
-// gime->Folder("sdigits") ;
-// cout << "Digitizing sDigits from file(s): " <<endl ;
-// TCollection * folderslist = gime->Folder("sdigits")->GetListOfFolders() ;
-// TIter next(folderslist) ;
-// TFolder * folder = 0 ;
+ // AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
+ // gime->Folder("sdigits") ;
+ // TCollection * folderslist = gime->Folder("sdigits")->GetListOfFolders() ;
+ // TIter next(folderslist) ;
+ // TFolder * folder = 0 ;
-// while ( (folder = (TFolder*)next()) ) {
-// if ( folder->FindObject(GetName()) )
- // cout << "Adding SDigits " << GetName() << " from " << GetSDigitsFileName() << endl ;
-// }
- cout << endl ;
- cout << "Writing digits to " << GetTitle() << endl ;
+ // while ( (folder = (TFolder*)next()) ) {
+ // if ( folder->FindObject(GetName()) )
+ // }
+ message += "\nWriting digits to " ;
+ message += GetTitle() ;
}
- cout << endl ;
- cout << "With following parameters: " << endl ;
- cout << " Electronics noise in EMC (fPinNoise) = " << fPinNoise << endl ;
- cout << " Threshold in EMC (fEMCDigitThreshold) = " << fEMCDigitThreshold << endl ; ;
- cout << " Noise in CPV (fCPVNoise) = " << fCPVNoise << endl ;
- cout << " Threshold in CPV (fCPVDigitThreshold) = " << fCPVDigitThreshold << endl ;
- cout << "---------------------------------------------------" << endl ;
+ message += "\nWith following parameters:\n" ;
+ message += " Electronics noise in EMC (fPinNoise) = %f\n" ;
+ message += " Threshold in EMC (fEMCDigitThreshold) = %f\n" ;
+ message += " Noise in CPV (fCPVNoise) = %f\n" ;
+ message += " Threshold in CPV (fCPVDigitThreshold) = %f\n" ;
+ message += "---------------------------------------------------\n" ;
+ Info("Print", message.Data(),
+ fPinNoise,
+ fEMCDigitThreshold,
+ fCPVNoise,
+ fCPVDigitThreshold ) ;
}
else
- cout << "AliPHOSDigitizer not initialized " << endl ;
+ Info("Print", "AliPHOSDigitizer not initialized\n" ) ;
}
-
+
//__________________________________________________________________
-void AliPHOSDigitizer::PrintDigits(Option_t * option){
- // Print a table of digits
-
- AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
- TClonesArray * digits = gime->Digits() ;
-
- cout << "AliPHOSDigitiser: event " << gAlice->GetEvNumber() << endl ;
- cout << " Number of entries in Digits list " << digits->GetEntriesFast() << endl ;
- cout << endl ;
- if(strstr(option,"all")||strstr(option,"EMC")){
+ void AliPHOSDigitizer::PrintDigits(Option_t * option)
+{
+ // Print a table of digits
+
+ AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
+ TClonesArray * digits = gime->Digits() ;
+
+ TString message ;
+ message = "event %d\n" ;
+ message += " Number of entries in Digits list %d\n" ;
+ Info("Print", message.Data(), gAlice->GetEvNumber(), digits->GetEntriesFast() ) ;
+ if(strstr(option,"all")||strstr(option,"EMC")){
//loop over digits
AliPHOSDigit * digit;
- cout << "EMC digits (with primaries): " << endl ;
- cout << "Digit Id Amplitude Index Nprim Primaries list " << endl;
+ message = "EMC digits (with primaries):\n" ;
+ message += "Digit Id Amplitude Index Nprim Primaries list\n" ;
+ Info("Print", message.Data()) ;
Int_t maxEmc = gime->PHOSGeometry()->GetNModules()*gime->PHOSGeometry()->GetNCristalsInModule() ;
Int_t index ;
for (index = 0 ; (index < digits->GetEntriesFast()) &&
(((AliPHOSDigit * ) digits->At(index))->GetId() <= maxEmc) ; index++) {
digit = (AliPHOSDigit * ) digits->At(index) ;
- if(digit->GetNprimary() == 0) continue;
- cout << setw(6) << digit->GetId() << " " << setw(10) << digit->GetAmp() << " "
- << setw(6) << digit->GetIndexInList() << " "
- << setw(5) << digit->GetNprimary() <<" ";
+ if(digit->GetNprimary() == 0)
+ continue;
+ message = " %d %d %d %d\n" ;
+ Info("Print", message.Data(),
+ digit->GetId(),
+ digit->GetAmp(),
+ digit->GetIndexInList(),
+ digit->GetNprimary() ) ;
Int_t iprimary;
- for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++)
- cout << setw(5) << digit->GetPrimary(iprimary+1) << " ";
- cout << endl;
- }
- cout << endl;
+ for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++) {
+ message = " %d\n" ;
+ Info("Print", message.Data(), digit->GetPrimary(iprimary+1) ) ;
+ }
+ }
}
if(strstr(option,"all")||strstr(option,"CPV")){
//loop over CPV digits
AliPHOSDigit * digit;
- cout << "CPV digits: " << endl ;
- cout << "Digit Id Amplitude Index Nprim Primaries list " << endl;
+ message = "CPV digits:\n" ;
+ message += "Digit Id Amplitude Index Nprim Primaries list\n" ;
+ Info("Print", message.Data()) ;
Int_t maxEmc = gime->PHOSGeometry()->GetNModules()*gime->PHOSGeometry()->GetNCristalsInModule() ;
Int_t index ;
for (index = 0 ; index < digits->GetEntriesFast(); index++) {
digit = (AliPHOSDigit * ) digits->At(index) ;
if(digit->GetId() > maxEmc){
- cout << setw(6) << digit->GetId() << " " << setw(10) << digit->GetAmp() << " "
- << setw(6) << digit->GetIndexInList() << " "
- << setw(5) << digit->GetNprimary() <<" ";
+ message = " %d %d %d %d\n" ;
+ Info("Print", message.Data(),
+ digit->GetId(),
+ digit->GetAmp(),
+ digit->GetIndexInList(),
+ digit->GetNprimary() ) ;
Int_t iprimary;
- for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++)
- cout << setw(5) << digit->GetPrimary(iprimary+1) << " ";
- cout << endl;
- }
+ for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++) {
+ message = " %d\n" ;
+ Info("Print", message.Data(), digit->GetPrimary(iprimary+1) ) ;
+ }
+ }
}
}
-
}
//__________________________________________________________________
// --- Standard library ---
-#include <iostream.h>
-
// --- AliRoot header files ---
#include "AliGenerator.h"
{
// Print the list of digits belonging to the cluster
- cout << "AliPHOSEmcRecPoint: " << endl ;
+ TString message ;
+ message = "AliPHOSEmcRecPoint:\n" ;
+ message += " digits # = " ;
+ Info("Print", message.Data()) ;
Int_t iDigit;
- cout << " digits # = " ;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
- cout << fDigitsList[iDigit] << " " ;
- cout << endl ;
+ Info("Print", " %d ", fDigitsList[iDigit] ) ;
- cout << " Energies = " ;
+ Info("Print", " Energies = ") ;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
- cout << fEnergyList[iDigit] << " ";
- cout << endl ;
+ Info("Print", " %f ", fEnergyList[iDigit] ) ;
- cout << " Primaries " ;
+ Info("Print", " Primaries ") ;
for(iDigit = 0;iDigit < fMulTrack; iDigit++)
- cout << fTracksList[iDigit] << " " << endl ;
+ Info("Print", " %d ", fTracksList[iDigit]) ;
- cout << " Multiplicity = " << fMulDigit << endl ;
- cout << " Cluster Energy = " << fAmp << endl ;
- cout << " Number of primaries " << fMulTrack << endl ;
- cout << " Stored at position " << GetIndexInList() << endl ;
+ message = " Multiplicity = %d" ;
+ message += " Cluster Energy = %f" ;
+ message += " Number of primaries %d" ;
+ message += " Stored at position %d" ;
+ Info("Print", message.Data(), fMulDigit, fAmp, fMulTrack,GetIndexInList() ) ;
}
#include "AliPHOSDigitizer.h"
// --- Standard library ---
-#include <iostream.h>
ClassImp(AliPHOSEvalRecPoint)
// fParent=parent;
TObjArray* wPool = (TObjArray*)GetWorkingPool();
if(!wPool) {
- cout<<" Couldn't find working pool. Exit."<<endl;
+ Error("AliPHOSEvalRecPoint", "Couldn't find working pool. Exit.") ;
exit(1);
}
TFolder* wPoolF = (TFolder*)aliceF->FindObject("WhiteBoard/RecPoints/PHOS/SmP");
AliPHOSClusterizer* clu = (AliPHOSClusterizer*)wPoolF->FindObject("PHOS:clu-v1");
if(!clu) {
- cout<<" Couldn't find Clusterizer. Exit."<<endl;
+ Error("GetClusterizer", "Couldn't find Clusterizer. Exit.") ;
exit(1);
}
AliPHOSClusterizer* clusterizer = GetClusterizer();
if(!clusterizer) {
- cout<<" Cannot get clusterizer. Exit."<<endl;
+ Error("Init", "Cannot get clusterizer. Exit.") ;
exit(1);
}
Float_t yy = lpos.X();
Float_t E = GetEnergy();
- cout<<" (x,z,E)[old] = ("<<yy<<","<<xx<<","<<E<<")"<<endl;
+ Info("InitTwoGam", "(x,z,E)[old] = (%f, %f, %f)", yy, xx, E) ;
// xx = XY(xx/E);
// yy = XY(yy/E);
Float_t dx1 = x1c - ix;
Float_t dy1 = y1c - iy;
-// cout<<" Mult "<<nDigits<<" dx1 "<<dx1<<" dy1 "<<dy1<<endl;
+// Info("TwoGam", "Mult %d dx1 %f dy1 %f", nDigits, dx1, dy1) ;
// AG(e1c,dx1,dy1,a1,gx1,gy1);
GetReconstructionManager()->AG(e1c,dx1,dy1,a1,gx1,gy1);
Float_t dx2 = x2c - ix;
Float_t dy2 = y2c - iy;
-// cout<<" "<<" dx2 "<<dx2<<" dy2 "<<dy2<<endl;
+// Info("TwoGam", " dx2 %f dy2 %f", dx2, dy2) ;
// AG(e2c,dx2,dy2,a2,gx2,gy2);
GetReconstructionManager()->AG(e2c,dx2,dy2,a2,gx2,gy2);
loop20: ;
Float_t step = st*gr;
-
- cout<<" Iteration "<<Iter<<" dof "<<dof<<" chisq/dof "<<ch/dof<<" chstop/dof "<<chstop/dof<<" step " <<step<<" stpmin "<<stpmin<<endl;
+ Info("TwoGam", "Iteration %d dof %d chisq/dof %f chstop/dof %f step %d stpmin %d",
+ Iter, dof, ch/dof, chstop/dof, step, stpmin) ;
if(step<stpmin)
Float_t z2_new = xx2;
Float_t e2_new = ee2;
- cout<<" (x,z,E)[1 fit] = ("<<x1_new<<","<<z1_new<<","<<e1_new<<")"<<endl;
- cout<<" (x,z,E)[2 fit] = ("<<x2_new<<","<<z2_new<<","<<e2_new<<")"<<endl;
+ TString message ;
+ message = " (x,z,E)[1 fit] = (%f, %f, %f)\n" ;
+ message = " (x,z,E)[2 fit] = (%f, %f, %f)\n" ;
+ Info("TwoGam", message.Data(),
+ x1_new, z1_new, e1_new,
+ x2_new, z2_new, e2_new) ;
fChi2Dof = chisq;
GetReconstructionManager()->AG(eMax,dz,dx,single_shower_gain,gxMax,gyMax);
Float_t total_gain = eFit[iDigit];
Float_t ratio = single_shower_gain/total_gain;
-// cout<<" ratio -> "<<ratio<<endl;
eDigit = eDigit*ratio;
newRP->AddDigit(*digit,eDigit);
}
-
- cout<<"======= Split: daughter rec point "<<iMax<<" ================="<<endl;
+ Info("UnfoldTwoMergedPoints", "======= Split: daughter rec point %d =================", iMax) ;
newRP->Print("");
}
delete[] eFit;
- cout<<endl;
}
Float_t A;
GetReconstructionManager()->AG(E,dx,dy,A,gx,gy);
Float_t dd;
- cout<<" (ix iy xc yc dx dy) "<<ix<<" "<<iy<<" "<<xc<<" "<<yc<<" "<<dx<<" "<<dy<<endl;
+ Info("EvaluatePosition", " (ix iy xc yc dx dy) %f %f %f %f %f %f", ix, iy, xc, yc, dx, dy) ;
Float_t chi2dg = GetReconstructionManager()->OneGamChi2(A,eDigit,E,dd);
// Exclude digit with too large chisquare.
Float_t grc = TMath::Sqrt(grxc*grxc + gryc*gryc);
if(grc<1.e-10) grc=1.e-10;
Float_t sc = 1. + chisqc/chisq;
- cout<<" chisq: "<<chisq<<endl;
+ Info("EvaluatePosition", " chisq: %f", chisq) ;
st = st/sc;
if(chisqc>chisq)
goto loop20;
loop20: ;
Float_t step = st*gr;
-
- cout<<" Iteration "<<Iter<<" dof "<<dof<<" chisq/dof "<<chisq/dof<<" chstop/dof "<<chstop/dof<<" step " <<step<<" Stpmin "<<Stpmin<<endl;
+ Info("EvaluatePosition", " Iteration %d dof %d chisq/dof %f chstop/dof %f step %d Stpmin %d",
+ Iter, dof, chisq/dof, chisq/dof, chstop/dof, step, Stpmin) ;
if(step<Stpmin)
// TVector3 pos;
// RP->GetLocalPosition(pos);
-// cout<<" (x,z)[old] = ("<<x_old<<","<<z_old<<")"<<endl;
-// cout<<" (x,z)[new] = ("<<pos.X()<<","<<pos.Z()<<")"<<endl;
-// cout<<" gamma[1]: "<<gamma1[1]<<" gamma1[2]: "<<gamma1[2]<<endl;
fChi2Dof = chisq;
Float_t Thr0 = GetReconstructionManager()->KillGamMinEnergy();
if(GetEnergy()<Thr0) {
- cout<<"+++++++ Killing this rec point ++++++++++"<<endl;
+ Info("KillWeakPoint", "+++++++ Killing this rec point ++++++++++") ;
RemoveFromWorkingPool(this);
return kTRUE;
}
{
if(TooClose(rp))
{
- cout<<"+++++++ Merging point 1: ++++++"<<endl;
+ Info("MergeClosePoint", "+++++++ Merging point 1: ++++++") ;
this->Print("");
- cout<<"+++++++ and point 2: ++++++++++"<<endl;
+ Info("MergeClosePoint", "+++++++ and point 2: ++++++++++") ;
((AliPHOSEvalRecPoint*)rp)->Print("");
//merge two rec. points
RemoveFromWorkingPool(rp);
delete rp;
- cout<<"++++++ Resulting point: ++++++++"<<endl;
+ Info("MergeClosePoint", "++++++ Resulting point: ++++++++") ;
this->Print("");
break;
// AliPHOSClusterizer* clusterizer = fGetter->Clusterizer("PHOSclu-v1");
AliPHOSClusterizer* clusterizer = GetClusterizer();
if(!clusterizer) {
- cout<<" Cannot get clusterizer. Exit."<<endl;
+ Error("UnfoldLocalMaxima", "Cannot get clusterizer. Exit.") ;
exit(1);
}
GetReconstructionManager()->AG(eMax,dz,dx,single_shower_gain,gxMax,gyMax);
Float_t total_gain = eFit[iDigit];
Float_t ratio = single_shower_gain/total_gain;
- cout<<" ratio -> "<<ratio<<endl;
+ Info("UnfoldLocalMaxima", " ratio -> %f", ratio) ;
eDigit = eDigit*ratio;
newRP->AddDigit(*digit,eDigit);
}
}
newRP->EvalLocalPosition(LogWeight,digits);
- cout<<"======= Unfold: daughter rec point "<<iMax<<" ================="<<endl;
+ Info("UnfoldLocalMaxima", "======= Unfold: daughter rec point %d =================", iMax) ;
newRP->Print("");
}
// RemoveFromWorkingPool(this);
delete[] eFit;
- cout<<endl;
return Nmax;
TVector3 lpos;
GetLocalPosition(lpos);
- cout<<" Chi2/dof = "<<Chi2Dof()<<endl;
- cout<<" Local (x,z) = ("<<lpos.X()<<","<<lpos.Z()<<") in module "<<GetPHOSMod()<<endl;
-// if(GetReconstructionManager())
-// cout<<" Distance of merger = "<<GetReconstructionManager()->MergeGammasMinDistanceCut()<<endl;
+ TString message ;
+ message = " Chi2/dof = %f" ;
+ message += " Local (x,z) = (%f, %f) in module %d" ;
+ Info("Print", message.Data(), Chi2Dof(), lpos.X(), lpos.Z(), GetPHOSMod()) ;
+
}
AliPHOSRecManager* AliPHOSEvalRecPoint::GetReconstructionManager() const
TFolder* wPoolF = (TFolder*)aliceF->FindObject("WhiteBoard/RecPoints/PHOS/SmP");
AliPHOSRecManager* recMng = (AliPHOSRecManager*)wPoolF->FindObject("AliPHOSRecManager");
if(!recMng) {
- cout<<" Couldn't find Reconstruction Manager. Exit."<<endl;
+ Error("GetReconstructionManager", "Couldn't find Reconstruction Manager. Exit.") ;
exit(1);
}
TFolder* wPoolF = (TFolder*)aliceF->FindObject("WhiteBoard/RecPoints/PHOS/SmP");
TObject* wPool = wPoolF->FindObject("SmartPoints");
if(!wPool) {
- cout<<" Couldn't find Working Pool. Exit."<<endl;
+ Error("GetWorkingPool", "Couldn't find Working Pool. Exit.") ;
exit(1);
}
// --- Standard library ---
-#include <iostream.h>
-
// --- AliRoot header files ---
#include "AliPHOSFastRecParticle.h"
{
// Print the type, energy and momentum of the reconstructed particle
- cout << "AliPHOSFastRecParticle > " << "type is " << Name() << endl
- << " " << "Energy = " << fE << endl
- << " " << "Px = " << fPx << endl
- << " " << "Py = " << fPy << endl
- << " " << "Pz = " << fPz << endl ;
+ TString message ;
+ message = "AliPHOSFastRecParticle > type is %s\n" ;
+ message += " Energy = %f\n" ;
+ message += " Px = %f\n" ;
+ message += " Py = %f\n" ;
+ message += " Pz = %f\n" ;
+ Info("Print", message.Data(),
+ Name().Data(),
+ fE,
+ fPx,
+ fPy,
+ fPz );
}
// --- Standard library ---
-#include <iostream.h>
#include <stdlib.h>
// --- AliRoot header files ---
TString test(GetName()) ;
if (test != "IHEP" && test != "GPS2" && test != "MIXT") {
- cerr << "ERROR: " << ClassName() << "::Init -> " << test.Data()
- << " is not a known geometry (choose among IHEP, GPS2 and MIXT)" << endl ;
+ Error("Init", "%s is not a known geometry (choose among IHEP, GPS2 and MIXT)", test.Data() ) ;
abort() ;
}
}
}
else {
- if ( strcmp(fgGeom->GetName(), name) != 0 ) {
- cout << "AliPHOSGeometry <E> : current geometry is " << fgGeom->GetName() << endl
- << " you cannot call " << name << endl ;
- }
+ if ( strcmp(fgGeom->GetName(), name) != 0 )
+ ::Error("GetInstance", "Current geometry is %s. You cannot call %s", fgGeom->GetName(), name) ;
else
rv = (AliPHOSGeometry *) fgGeom ;
}
Float_t pphi = 2 * TMath::ATan( GetOuterBoxSize(0) / ( 2.0 * GetIPtoUpperCPVsurface() ) ) ;
pphi *= kRADDEG ;
if (pphi > fAngle){
- cout << "AliPHOSGeometry: PHOS modules overlap!\n";
- cout << "pphi = " << pphi << " fAngle " << fAngle << endl ;
+ Error("SetPHOSAngles", "PHOS modules overlap!\n pphi = %f fAngle = %f", pphi, fAngle);
}
pphi = fAngle;
else if ( opt == Degre() )
conv = 180. / TMath::Pi() ;
else {
- cout << "<I> AliPHOSGeometry::EmcXtalCoverage : " << opt << " unknown option; result in radian " << endl ;
+ Warning("EmcModuleCoverage", "%s unknown option; result in radian", opt) ;
conv = 1. ;
}
else if ( opt == Degre() )
conv = 180. / TMath::Pi() ;
else {
- cout << "<I> AliPHOSGeometry::EmcXtalCoverage : " << opt << " unknown option; result in radian " << endl ;
+ Warning("EmcXtalCoverage", "%s unknown option; result in radian", opt) ;
conv = 1. ;
}
#include "TParticle.h"
// --- Standard library ---
-#include <iostream.h>
// --- AliRoot header files ---
#include "AliRun.h"
// This is the ctor called by GetInstance and the only one that can be used
if( fHeaderFile.Contains("_") ) {
- cerr << "AliPHOSGetter::AliPHOSGetter -> Invalid file name (_ not allowed) " << fHeaderFile.Data() << endl ;
+ Error("AliPHOSGetter", "Invalid file name (_ not allowed) %s", fHeaderFile.Data() ) ;
abort() ;
}
if(!fFile) { //if file was not opened yet, read gAlice
fFile = TFile::Open(fHeaderFile.Data(),"update") ;
if (!fFile->IsOpen()) {
- cerr << "ERROR : AliPHOSGetter::AliPHOSGetter -> Cannot open " << fHeaderFile.Data() << endl ;
+ Error("AliPHOSGetter", "Cannot open %s", fHeaderFile.Data() ) ;
fFailed = kTRUE ;
return ;
}
}
if (!gAlice) {
- cerr << "ERROR : AliPHOSGetter::AliPHOSGetter -> Cannot find gAlice in " << fHeaderFile.Data() << endl ;
+ Error("AliPHOSGetter", "Cannot find gAlice in %s", fHeaderFile.Data() ) ;
fFailed = kTRUE ;
return ;
}
if (!PHOS()) {
if (fDebug)
- cout << "INFO: AliPHOSGetter:AliPHOSGetter -> Posting PHOS to Folders" << endl ;
+ Info("AliPHOSGetter", "-> Posting PHOS to Folders") ;
if (gAlice->GetDetector("PHOS")) {
AliConfig * conf = AliConfig::Instance() ;
conf->Add(static_cast<AliDetector*>(gAlice->GetDetector("PHOS"))) ;
conf->Add(static_cast<AliModule*>(gAlice->GetDetector("PHOS"))) ;
}
else
- cerr << "ERROR: AliPHOSGetter:AliPHOSGetter -> detector PHOS not found" << endl ;
+ Error("AliPHOSGetter", "detector PHOS not found") ;
}
fDebug=0;
else if ( what == "digits" )
return dynamic_cast<const TFolder *>(fDigitsFolder->FindObject("PHOS")) ;
else {
- cerr << "ERROR: AliPHOSGetter::GetFolder -> " << what.Data() << " illegal option (hits, sdigits, digits) " << endl ;
+ Error("GetFolder", " %s illegal option (hits, sdigits, digits)", what.Data() ) ;
return 0 ;
}
}
return fgObjGetter ;
}
else {
- //cout << "WARNING: AliPHOSGetter::GetInstance ERROR: not yet initialized" << endl ;
+ //Warning("GetInstance", "not yet initialized") ;
return 0 ;
}
}
TString branchName(branch->GetName() ) ;
TString branchTitle(branch->GetTitle() ) ;
if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){
- cerr << "WARNING: AliPHOSGetter::BranchExists -> branch " << dataname.Data() << " with title " << fBranchTitle << " already exits in "
- << name.Data() << endl;
+ Warning("BranchExists", "branch %s with title %s already exists in %s", dataname.Data(), fBranchTitle.Data(), name.Data() ) ;
return kTRUE ;
}
if ( branchName.BeginsWith(zername) && branchTitle.BeginsWith(titleName) ){
- cerr << "WARNING: AliPHOSGetter::BranchExists -> branch AliPHOS... with title " << branch->GetTitle() << " already exits in "
- << name.Data() << endl;
+ Warning("BranchExists", "branch AliPHOS... with title %s already exists in %s", branch->GetTitle(), name.Data() ) ;
return kTRUE ;
}
}
TTree * t = gAlice->TreeH() ;
if(t){
- cout << "INFO: AliPHOSGetter::ListBranches -> ****** Hits : " << endl ;
+ Info("ListBranches", "-> ****** Hits : ") ;
TObjArray * lob = t->GetListOfBranches() ;
TIter next(lob) ;
while ( (branch = static_cast<TBranch*>(next())) )
- cout << " " << branch->GetName() << endl ;
+ Info("ListBranches", " %s", branch->GetName()) ;
} else
- cerr << "WARNING::AliPHOSGetter::ListBranches -> TreeH not found for event " << event << endl ;
+ Warning("ListBranches", "TreeH not found for event %d", event ) ;
t = gAlice->TreeS() ;
if(t){
- cout << "INFO: AliPHOSGetter::ListBranches -> ****** SDigits : " << endl ;
+ Info("ListBranches", "-> ****** SDigits : ") ;
TObjArray * lob = t->GetListOfBranches() ;
TIter next(lob) ;
while ( (branch = static_cast<TBranch*>(next())) )
- cout << " " << branch->GetName() << " " << branch->GetTitle() << endl ;
+ Info("ListBranches", " %s %s", branch->GetName(), branch->GetTitle()) ;
} else
- cerr << "WARNING::AliPHOSGetter::ListBranches -> TreeS not found for event " << event << endl ;
+ Warning("ListBranches", "TreeS not found for event %d", event) ;
t = gAlice->TreeD() ;
if(t){
- cout << "INFO: AliPHOSGetter::ListBranches -> ****** Digits : " << endl ;
+ Info("ListBranches", "-> ****** Digits : ") ;
TObjArray * lob = t->GetListOfBranches() ;
TIter next(lob) ;
while ( (branch = static_cast<TBranch*>(next())) )
- cout << " " << branch->GetName() << " " << branch->GetTitle() << endl ;
+ Info("ListBranches", " %s %s", branch->GetName(), branch->GetTitle()) ;
} else
- cerr << "WARNING::AliPHOSGetter::ListBranches -> TreeD not found for event " << event << endl ;
+ Warning("ListBranches", "TreeD not found for event %d", event) ;
t = gAlice->TreeR() ;
if(t){
- cout << "INFO: AliPHOSGetter::ListBranches -> ****** Recon : " << endl ;
+ Info("ListBranches", "-> ****** Recon : ") ;
TObjArray * lob = t->GetListOfBranches() ;
TIter next(lob) ;
while ( (branch = static_cast<TBranch*>(next())) )
- cout << " " << branch->GetName() << " " << branch->GetTitle() << endl ;
+ Info("ListBranches", " %s %s", branch->GetName(), branch->GetTitle()) ;
} else
- cerr << "WARNING::AliPHOSGetter::ListBranches -> TreeR not found for event " << event << endl ;
+ Warning("ListBranches", "TreeR not found for event %d", event) ;
}
if(!fFile) { //if file was not opened yet, read gAlice
fFile = TFile::Open(fHeaderFile.Data(),"update") ;
if (!fFile->IsOpen()) {
- cerr << "ERROR : AliPHOSGetter::NewFile -> Cannot open " << fHeaderFile.Data() << endl ;
+ Error("NewFile", "Cannot open %s", fHeaderFile.Data() ) ;
fFailed = kTRUE ;
return fFailed ;
}
}
if (!gAlice) {
- cerr << "ERROR : AliPHOSGetter::AliPHOSGetter -> Cannot find gAlice in " << fHeaderFile.Data() << endl ;
+ Error("AliPHOSGetter", "Cannot find gAlice in %s", fHeaderFile.Data() ) ;
fFailed = kTRUE ;
return fFailed ;
}
AliPHOS * phos = dynamic_cast<AliPHOS*>(fModuleFolder->FindObject("PHOS")) ;
if (!phos)
if (fDebug)
- cout << "WARNING: AliPHOSGetter::PHOS -> PHOS module not found in Folders" << endl ;
+ Warning("PHOS", "-> PHOS module not found in Folders") ;
return phos ;
}
TFolder * primariesFolder = dynamic_cast<TFolder*>(fPrimariesFolder->FindObject("Primaries")) ;
if ( !primariesFolder ) {
if (fDebug) {
- cout << "WARNING: AliPHOSGetter::Post Primaries -> Folder //" << fPrimariesFolder->GetName() << "/Primaries/ not found!" << endl;
- cout << "INFO: AliPHOSGetter::Post Primaries -> Adding Folder //" << fPrimariesFolder->GetName() << "/Primaries/" << endl;
+ Warning("PostPrimaries", "-> Folder //%s/Primaries/ not found!", fPrimariesFolder->GetName()) ;
+ Info("PostPrimaries", "-> Adding Folder //%s/Primaries", fPrimariesFolder->GetName()) ;
}
primariesFolder = fPrimariesFolder->AddFolder("Primaries", "Primaries particles from TreeK") ;
}
// the hierarchy is //Folders/RunMC/Event/Data/Primaries
if ( !fPrimariesFolder ) {
- cerr << "ERROR: AliPHOSGetter::PrimariesRef -> Folder //" << fPrimariesFolder << " not found!" << endl;
+ Error("PrimariesRef", "Folder //%s not found", fPrimariesFolder) ;
abort() ;
}
TFolder * primariesFolder = dynamic_cast<TFolder *>(fPrimariesFolder->FindObject("Primaries")) ;
if ( !primariesFolder ) {
- cerr << "ERROR: AliPHOSGetter::PrimariesRef -> Folder //" << fPrimariesFolder << "/Primaries/ not found!" << endl;
+ Error("PrimariesRef", "Folder //%s/Primaries/ not found", fPrimariesFolder) ;
abort() ;
}
TObject * p = primariesFolder->FindObject("Primaries") ;
if(!p) {
- cerr << "ERROR: AliPHOSGetter::PrimariesRef -> " << primariesFolder->GetName() << "/Primaries not found !" << endl ;
+ Error("PrimariesRef","%s /Primaries not found !", primariesFolder->GetName() ) ;
abort() ;
}
else
TFolder * phosFolder = dynamic_cast<TFolder*>(fHitsFolder->FindObject("PHOS")) ;
if ( !phosFolder ) {
if (fDebug) {
- cout << "WARNING: AliPHOSGetter::Post H -> Folder //" << fHitsFolder << "/PHOS/ not found!" << endl;
- cout << "INFO: AliPHOSGetter::Post H -> Adding Folder //" << fHitsFolder << "/PHOS/" << endl;
+ Warning("PostHits", "-> Folder //%s/PHOS/ not found!", fHitsFolder) ;
+ Info("PostHits", "-> Adding Folder //%s/PHOS/", fHitsFolder) ;
}
phosFolder = fHitsFolder->AddFolder("PHOS", "Hits from PHOS") ;
}
// the hierarchy is //Folders/RunMC/Event/Data/PHOS/Hits
if ( !fHitsFolder ) {
- cerr << "ERROR: AliPHOSGetter::HitsRef -> Folder //" << fHitsFolder << " not found!" << endl;
+ Error("HitsRef", "Folder //%s not found !", fHitsFolder) ;
abort() ;
}
TFolder * phosFolder = dynamic_cast<TFolder *>(fHitsFolder->FindObject("PHOS")) ;
if ( !phosFolder ) {
- cerr << "ERROR: AliPHOSGetter::HitsRef -> Folder //" << fHitsFolder << "/PHOS/ not found!" << endl;
+ Error("HitsRef", "Folder //%s/PHOS/ not found !", fHitsFolder) ;
abort() ;
}
TObject * h = phosFolder->FindObject("Hits") ;
if(!h) {
- cerr << "ERROR: AliPHOSGetter::HitsRef -> " << phosFolder->GetName() << "/Hits not found !" << endl ;
+ Error("HitsRef", "%s/Hits not fount !", phosFolder->GetName() ) ;
abort() ;
}
else
TFolder * phosFolder = dynamic_cast<TFolder*>(fSDigitsFolder->FindObject("PHOS")) ;
if ( !phosFolder ) {
if (fDebug) {
- cout << "WARNING: AliPHOSGetter::Post S -> Folder //" << fSDigitsFolder << "/PHOS/ not found!" << endl;
- cout << "INFO: AliPHOSGetter::Post S -> Adding Folder //" << fHitsFolder << "/PHOS/" << endl;
+ Warning("PostSDigits", "-> Folder //%s/PHOS/ not found!", fSDigitsFolder) ;
+ Info("PostSDigits", "-> Adding Folder //%s/PHOS/", fHitsFolder) ;
}
phosFolder = fSDigitsFolder->AddFolder("PHOS", "SDigits from PHOS") ;
}
// the hierarchy is //Folders/RunMC/Event/Data/PHOS/SDigits/filename/SDigits
if ( !fSDigitsFolder ) {
- cerr << "ERROR: AliPHOSGetter::SDigitsRef -> Folder //" << fSDigitsFolder << " not found!" << endl;
+ Error("SDigitsRef", "Folder //%s not found !", fSDigitsFolder) ;
abort() ;
}
TFolder * phosFolder = dynamic_cast<TFolder *>(fSDigitsFolder->FindObject("PHOS")) ;
if ( !phosFolder ) {
- cerr << "ERROR: AliPHOSGetter::SDigitsRef -> Folder //" << fSDigitsFolder << "/PHOS/ not found!" << endl;
+ Error("SDigitsRef", "Folder //%s/PHOS not found !", fSDigitsFolder) ;
abort() ;
}
phosSubFolder = dynamic_cast<TFolder *>(phosFolder->FindObject(fHeaderFile)) ;
if(!phosSubFolder) {
- cerr << "ERROR: AliPHOSGetter::DigitesSRef -> Folder //Folders/RunMC/Event/Data/PHOS/" << file << "not found!" << endl;
+ Error("SDigitsRef", "Folder //Folders/RunMC/Event/Data/PHOS/%s not found !", file) ;
abort() ;
}
TObject * dis = phosSubFolder->FindObject(name) ;
if(!dis){
- cerr << "ERROR: AliPHOSGetter::DigitesSRef -> object " << name << " not found! " << endl ;
+ Error("SDigitsRef", "object %s not found !", name) ;
abort() ;
}
else
TTask * sd = dynamic_cast<TTask*>(fTasksFolder->FindObject("SDigitizer")) ;
if ( !sd ) {
- cerr << "ERROR: AliPHOSGetter::Post Ser -> Task //" << fTasksFolder << "/SDigitizer not found!" << endl;
+ Error("PostDigitizer", "Task //%s/SDigitizer not found !", fTasksFolder) ;
return kFALSE ;
}
TTask * phos = dynamic_cast<TTask*>(sd->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
if (fDebug) {
- cout <<"WARNING: AliPHOSGetter::Post Ser ->//" << fTasksFolder << "/SDigitizer/PHOS/ not found!" << endl;
- cout <<"INFO: AliPHOSGetter::Post Ser -> Adding //" << fTasksFolder << "/SDigitizer/PHOS/" << endl;
+ Warning("PostSDigitizer", "->//%s/SDigitizer/PHOS/ not found!", fTasksFolder) ;
+ Info("PostSDigitizer", "-> Adding //%s/SDigitizer/PHOS/", fTasksFolder) ;
}
phos = new TTask("PHOS", "") ;
sd->Add(phos) ;
AliPHOSSDigitizer * phossd = dynamic_cast<AliPHOSSDigitizer *>(phos->GetListOfTasks()->FindObject( sdigitizer->GetName() ));
if (phossd) {
if (fDebug)
- cout << "INFO: AliPHOSGetter::Post Ser -> Task " << sdigitizer->GetName() << " already exists" << endl ;
+ Info("PostSDigitizer", "-> Task %s already exists", sdigitizer->GetName()) ;
phos->GetListOfTasks()->Remove(phossd) ;
}
phos->Add(sdigitizer) ;
TTask * sd = dynamic_cast<TTask*>(fTasksFolder->FindObject("SDigitizer")) ;
if ( !sd ) {
- cerr << "ERROR: AliPHOSGetter::Post SerRef -> Task //" << fTasksFolder << "/SDigitizer not found!" << endl;
+ Error("SDigitizerRef", "Task //%s/SDigitizer not found !", fTasksFolder) ;
abort();
}
TTask * phos = dynamic_cast<TTask*>(sd->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
- cerr <<"ERROR: AliPHOSGetter::Post SerRef -> //" << fTasksFolder << "/SDigitizer/PHOS not found!" << endl;
+ Error("SDigitizerRef", "//%s/SDigitizer/PHOS not found !", fTasksFolder) ;
abort();
}
TTask * sd = dynamic_cast<TTask*>(fTasksFolder->FindObject("SDigitizer")) ;
if ( !sd ) {
- cerr << "ERROR: AliPHOSGetter::Post Ser -> Task //" << fTasksFolder << "/SDigitizer not found!" << endl;
+ Error("PostSDigitizer", "Task //%s/SDigitizer not found !", fTasksFolder) ;
return kFALSE ;
}
TTask * phos = dynamic_cast<TTask*>(sd->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
if (fDebug) {
- cout <<"WARNING: AliPHOSGetter::Post Ser -> //" << fTasksFolder << "/SDigitizer/PHOS/ not found!" << endl;
- cout <<"INFO: AliPHOSGetter::Post Ser -> Adding //" << fTasksFolder << "/SDigitizer/PHOS" << endl;
+ Error("PostSDigitizer", "-> //%s/SDigitizer/PHOS/ not found!", fTasksFolder) ;
+ Info("PostSDigitizer", "-> Adding //%s/SDigitizer/PHOS", fTasksFolder) ;
}
phos = new TTask("PHOS", "") ;
sd->Add(phos) ;
if ( !phosFolder ) {
if (fDebug) {
- cout << "WARNING: AliPHOSGetter::Post D -> Folder //" << fDigitsFolder << "/PHOS/ not found!" << endl;
- cout << "INFO: AliPHOSGetter::Post D -> Adding Folder //" << fDigitsFolder << "/PHOS/" << endl;
+ Warning("PostDigitizer", "-> Folder //%s/PHOS/ not found!", fDigitsFolder) ;
+ Info("PostDigitizer", "-> Adding Folder //%s/PHOS/", fDigitsFolder) ;
}
phosFolder = fDigitsFolder->AddFolder("PHOS", "Digits from PHOS") ;
}
// the hierarchy is //Folders/Run/Event/Data/PHOS/Digits/name
if ( !fDigitsFolder ) {
- cerr << "ERROR: AliPHOSGetter::DigitsRef -> Folder //" << fDigitsFolder << " not found!" << endl;
+ Error("DigitsRef", "Folder //%s not found !", fDigitsFolder) ;
abort() ;
}
TFolder * phosFolder = dynamic_cast<TFolder*>(fDigitsFolder->FindObject("PHOS")) ;
if ( !phosFolder ) {
- cerr << "ERROR: AliPHOSGetter::DigitsRef -> Folder //" << fDigitsFolder << "/PHOS/ not found!" << endl;
+ Error("DigitsRef", "Folder //%s/PHOS/ not found !", fDigitsFolder) ;
abort() ;
}
TObject * d = phosFolder->FindObject(name) ;
if(!d) {
- cerr << "ERROR: AliPHOSGetter::DigitsRef -> object " << name << " not found! " << endl ;
+ Error("DigitsRef", "object %s not found !", name) ;
abort() ;
}
else
TTask * sd = dynamic_cast<TTask*>(fTasksFolder->FindObject("Digitizer")) ;
if ( !sd ) {
- cerr << "ERROR: AliPHOSGetter::Post Der -> Task //" << fTasksFolder << "/Digitizer not found!" << endl;
+ Error("PostDigitizer", "Task //%s/Digitizer not found !", fTasksFolder) ;
return kFALSE ;
}
TTask * phos = dynamic_cast<TTask*>(sd->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
if (fDebug) {
- cout <<"WARNING: AliPHOSGetter::Post Der -> //" << fTasksFolder << "/Digitizer/PHOS not found!" << endl;
- cout <<"INFO: AliPHOSGetter::Post Der -> Adding //" << fTasksFolder << "/Digitizer/PHOS" << endl;
+ Error("PostDigitizer", "//%s/Digitizer/PHOS not found!", fTasksFolder) ;
+ Info("PostDigitizer", "Adding //%s/Digitizer/PHOS", fTasksFolder) ;
}
phos = new TTask("PHOS", "") ;
sd->Add(phos) ;
TTask * d = dynamic_cast<TTask*>(fTasksFolder->FindObject("Digitizer")) ;
if ( !d ) {
- cerr << "ERROR: AliPHOSGetter::Post Der -> Task //" << fTasksFolder << "/Digitizer not found!" << endl;
+ Error("PostDigitizer", "Task //%s/Digitizer not found !", fTasksFolder) ;
return kFALSE ;
}
TTask * phos = dynamic_cast<TTask*>(d->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
if (fDebug) {
- cout <<"WARNING: AliPHOSGetter::Post Der -> //" << fTasksFolder << "/Digitizer/PHOS not found!" << endl;
- cout <<"INFO: AliPHOSGetter::Post Der -> Adding //" << fTasksFolder << "/Digitizer/PHOS" << endl;
+ Warning("PostDigitizer", "//%s/Digitizer/PHOS not found!", fTasksFolder) ;
+ Info("PostDigitizer", "Adding //%s/Digitizer/PHOS", fTasksFolder) ;
}
phos = new TTask("PHOS", "") ;
d->Add(phos) ;
{
TTask * sd = dynamic_cast<TTask*>(fTasksFolder->FindObject("Digitizer")) ;
if ( !sd ) {
- cerr << "ERROR: AliPHOSGetter::Post DerRef -> Task //" << fTasksFolder << "/Digitizer not found!" << endl;
+ Error("DigitizerRef", "Task //%s/Digitizer not found !", fTasksFolder) ;
abort();
}
TTask * phos = dynamic_cast<TTask*>(sd->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
- cerr <<"ERROR: AliPHOSGetter::Post DerRef -> //" << fTasksFolder << "/Digitizer/PHOS" << endl;
+ Error("DigitizerRef", "//%s/Digitizer/PHOS", fTasksFolder) ;
abort();
}
if ( !phosFolder ) {
if (fDebug) {
- cout << "WARNING: AliPHOSGetter::Post RPo -> Folder //" << fRecoFolder->GetName() << "/PHOS/ not found!" << endl;
- cout << "INFO: AliPHOSGetter::Post Rpo -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS/" << endl;
+ Warning("PostRecPoints", "-> Folder //%s/PHOS/ not found!", fRecoFolder->GetName()) ;
+ Info("PostRecPoints", "-> Adding Folder //%s/PHOS/", fRecoFolder->GetName()) ;
}
phosFolder = fRecoFolder->AddFolder("PHOS", "Reconstructed data from PHOS") ;
}
TFolder * phosRPoEMCAFolder = dynamic_cast<TFolder*>(phosFolder->FindObject("EMCARecPoints")) ;
if ( !phosRPoEMCAFolder ) {
if (fDebug) {
- cout << "WARNING: AliPHOSGetter::Post RPo -> Folder //" << fRecoFolder->GetName() << "/PHOS/EMCARecPoints/ not found!" << endl;
- cout << "INFO: AliPHOSGetter::Post Rpo -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS/EMCARecPoints" << endl;
+ Warning("PostRecPoints", "-> Folder //%s/PHOS/EMCARecPoints/ not found!", fRecoFolder->GetName()) ;
+ Info("PostRecPoints", "-> Adding Folder //%s/PHOS/EMCARecPoints", fRecoFolder->GetName()) ;
}
phosRPoEMCAFolder = phosFolder->AddFolder("EMCARecPoints", "EMCA RecPoints from PHOS") ;
}
TFolder * phosRPoCPVFolder = dynamic_cast<TFolder*>(phosFolder->FindObject("CPVRecPoints")) ;
if ( !phosRPoCPVFolder ) {
if (fDebug) {
- cout << "WARNING: AliPHOSGetter::Post RPo -> Folder //" << fRecoFolder->GetName() << "/PHOS/CPVRecPoints/ not found!" << endl;
- cout << "INFO: AliPHOSGetter::Post Rpo -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS/CPVRecPoints/" << endl;
+ Warning("PostRecPoints", "-> Folder //%s/PHOS/CPVRecPoints/ not found!", fRecoFolder->GetName()) ;
+ Info("PostRecPoints", "-> Adding Folder //%s/PHOS/CPVRecPoints/", fRecoFolder->GetName()) ;
}
phosRPoCPVFolder = phosFolder->AddFolder("CPVRecPoints", "CPV RecPoints from PHOS") ;
}
// the hierarchy is //Folders/Run/Event/RecData/PHOS/EMCARecPoints/name
if ( !fRecoFolder ) {
- cerr << "ERROR: AliPHOSGetter::EmcRecPointsRef -> Folder //" << fRecoFolder->GetName() << " not found!" << endl;
+ Error("EmcRecPointsRef", "Folder //%s not found !", fRecoFolder->GetName() ) ;
abort() ;
}
TFolder * phosFolder = dynamic_cast<TFolder*>(fRecoFolder->FindObject("PHOS/EMCARecPoints")) ;
if ( !phosFolder ) {
- cerr << "ERROR: AliPHOSGetter::EmcRecPointsRef -> Folder //" << fRecoFolder->GetName() << "/PHOS/EMCARecPoints/ not found!" << endl;
+ Error("EmcRecPointsRef", "Folder //%s/PHOS/EMCARecPoints/ not found !", fRecoFolder->GetName() ) ;
abort() ;
}
TObject * erp = phosFolder->FindObject(name ) ;
if ( !erp ) {
- cerr << "ERROR: AliPHOSGetter::EmcRecPointsRef -> object " << name << " not found! " << endl ;
+ Error("EmcRecPointsRef", "object %s not found !", name) ;
abort() ;
}
return phosFolder->GetListOfFolders()->GetObjectRef(erp) ;
// the hierarchy is //Folders/Run/Event/RecData/PHOS/CPVRecPoints/name
if ( !fRecoFolder ) {
- cerr << "ERROR: AliPHOSGetter::CpvRecPointsRef -> Folder //" << fRecoFolder->GetName() << " not found!" << endl;
+ Error("CpvRecPointsRef", "Folder //%s not found !", fRecoFolder->GetName() ) ;
abort() ;
}
TFolder * phosFolder = dynamic_cast<TFolder*>(fRecoFolder->FindObject("PHOS/CPVRecPoints")) ;
if ( !phosFolder ) {
- cerr << "ERROR: AliPHOSGetter::CpvRecPointsRef -> Folder //" << fRecoFolder->GetName() << "/PHOS/CPVRecPoints/" << endl;
+ Error("CpvRecPointsRef", "Folder //%s/PHOS/CPVRecPoints/ not found !", fRecoFolder->GetName() ) ;
abort() ;
}
TObject * crp = phosFolder->FindObject(name ) ;
if ( !crp ) {
- cerr << "ERROR: AliPHOSGetter::CpvRecPointsRef -> object " << name << " not found " << endl ;
+ Error("CpvRecPointsRef", "object %s nott found", name ) ;
abort() ;
}
return phosFolder->GetListOfFolders()->GetObjectRef(crp) ;
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliPHOSGetter::Post Rer -> Task //" << fTasksFolder << "/Reconstructioner not found!" << endl;
+ Error("PostClusterizer", "Task //%s/Reconstructioner not found !", fTasksFolder) ;
return kFALSE ;
}
TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
if (fDebug) {
- cout <<"WARNING: AliPHOSGetter::Post Rer -> //" << fTasksFolder << "/Reconstructioner/PHOS not found!" << endl;
- cout <<"INFO: AliPHOSGetter::Post Rer -> Adding //" << fTasksFolder << "/Reconstructioner/PHOS" << endl;
+ Warning("PostClusterizer", "//%s/Reconstructioner/PHOS not found!", fTasksFolder) ;
+ Info("PostClusterizer", "Adding //%s/Reconstructioner/PHOS", fTasksFolder) ;
}
phos = new TTask("PHOS", "") ;
tasks->Add(phos) ;
AliPHOSClusterizer * phoscl = dynamic_cast<AliPHOSClusterizer*>(phos->GetListOfTasks()->FindObject(clu->GetName())) ;
if (phoscl) {
if (fDebug)
- cout << "INFO: AliPHOSGetter::Post Rer -> Task " << clu->GetName() << " already exists" << endl ;
+ Info("PostClusterizer", "Task %s already exists", clu->GetName()) ;
phoscl->Delete() ;
phos->GetListOfTasks()->Remove(phoscl) ;
}
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliPHOSGetter::ClusterizerRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
+ Error("ClusterizerRef", "Task //%s/Reconstructioner not found !", fTasksFolder->GetName() ) ;
abort() ;
}
TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
- cerr <<"WARNING: AliPHOSGetter::ClusterizerRef -> //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS" << endl;
+ Error("ClusterizerRef", " //%s/Reconstructioner/PHOS not founf !", fTasksFolder->GetName() ) ;
abort() ;
}
if(clu)
return l->GetObjectRef(clu) ;
else{
- cerr << "ERROR: AliPHOSGetter::ClusterizerRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner/clusterizer " << name << " not found!" << endl;
+ Error("ClusterizerRef", "Task //%s/Reconstructioner/clusterizer/%s not found", fTasksFolder->GetName(), name) ;
abort() ;
}
}
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliPHOSGetter::Post Rer -> Task//" << fTasksFolder << "/Reconstructioner not found!" << endl;
+ Error("PostClusterizer", "Task//%s/Reconstructioner not found !", fTasksFolder) ;
return kFALSE ;
}
TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
if (fDebug) {
- cout <<"WARNING: AliPHOSGetter::Post Rer -> //" << fTasksFolder << "/Reconstructioner/PHOS not found!" << endl;
- cout <<"INFO: AliPHOSGetter::Post Rer -> Adding //" << fTasksFolder << "/Reconstructioner/PHOS" << endl;
+ Warning("PostClusterizer", "//%s/Reconstructioner/PHOS not found!", fTasksFolder) ;
+ Info("PostClusterizer", "Adding //%s/Reconstructioner/PHOS", fTasksFolder) ;
}
phos = new TTask("PHOS", "") ;
tasks->Add(phos) ;
if ( !phosFolder ) {
if (fDebug) {
- cout << "WARNING: AliPHOSGetter::Post TS -> Folder //" << fRecoFolder->GetName() << "/PHOS/ not found!" << endl;
- cout << "INFO: AliPHOSGetter::Post TS -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS" << endl;
+ Warning("PostTrackSegments", "-> Folder //%s/PHOS/ not found", fRecoFolder->GetName()) ;
+ Info("PostTrackSegments", "-> Adding Folder //%s/PHOS", fRecoFolder->GetName()) ;
}
phosFolder = fRecoFolder->AddFolder("PHOS", "Reconstructed data from PHOS") ;
}
TFolder * phosTSFolder = dynamic_cast<TFolder*>(phosFolder->FindObject("TrackSegments")) ;
if ( !phosTSFolder ) {
if (fDebug) {
- cout << "WARNING: AliPHOSGetter::Post TS -> Folder //" << fRecoFolder->GetName() << "/PHOS/TrackSegments/ not found!" << endl;
- cout << "INFO: AliPHOSGetter::Post TS -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS/TrackSegments/" << endl;
+ Warning("PostTrackSegments", "-> Folder //%s/PHOS/TrackSegments/ not found!", fRecoFolder->GetName() ) ;
+ Info("PostTrackSegments", "-> Adding Folder //%s/PHOS/TrackSegments/", fRecoFolder->GetName()) ;
}
phosTSFolder = phosFolder->AddFolder("TrackSegments", "TrackSegments from PHOS") ;
}
// the hierarchy is //Folders/Run/Event/RecData/PHOS/TrackSegments/name
if ( !fRecoFolder ) {
- cerr << "ERROR: AliPHOSGetter::TrackSegmentsRef -> Folder //" << fRecoFolder->GetName() << "not found!" << endl;
+ Error("TrackSegmentsRef", "Folder //%s not found !", fRecoFolder->GetName() ) ;
abort() ;
}
TFolder * phosFolder = dynamic_cast<TFolder*>(fRecoFolder->FindObject("PHOS/TrackSegments")) ;
if ( !phosFolder ) {
- cerr << "ERROR: AliPHOSGetter::TrackSegmentsRef -> Folder //" << fRecoFolder->GetName() << "/PHOS/TrackSegments/ not found!" << endl;
+ Error("TrackSegmentsRef", "Folder //%s/PHOS/TrackSegments/ not found !", fRecoFolder->GetName() ) ;
abort() ;
}
TObject * tss = phosFolder->FindObject(name) ;
if (!tss) {
- cerr << "ERROR: AliPHOSGetter::TrackSegmentsRef -> object " << name << " not found! " << endl ;
+ Error("TrackSegmentsRef", "object %s not found !", name) ;
abort() ;
}
return phosFolder->GetListOfFolders()->GetObjectRef(tss) ;
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliPHOSGetter::Post Ter -> Task //" << fTasksFolder << "/Reconstructioner not found!" << endl;
+ Error("PostTrackSegmentMaker", "Task //%s/Reconstructioner not found !", fTasksFolder) ;
return kFALSE ;
}
TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
if (fDebug) {
- cout <<"WARNING: AliPHOSGetter::Post Rer -> //" << fTasksFolder << "/Reconstructioner/PHOS not found!" << endl;
- cout <<"INFO: AliPHOSGetter::Post Rer -> Adding //" << fTasksFolder << "/Reconstructioner/PHOS" << endl;
+ Warning("PostTrackSegmentMaker", "//%s/Reconstructioner/PHOS not found!", fTasksFolder) ;
+ Info("PostTrackSegmentMaker", "Adding //%s/Reconstructioner/PHOS", fTasksFolder) ;
}
phos = new TTask("PHOS", "") ;
tasks->Add(phos) ;
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliPHOSGetter::Post Ter -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
+ Error("PostTrackSegmentMaker", "Task //%s/Reconstructioner not found !", fTasksFolder->GetName() ) ;
return kFALSE ;
}
TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
if (fDebug) {
- cout <<"WARNING: AliPHOSGetter::Post Ter -> //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS not found!" << endl;
- cout <<"INFO: AliPHOSGetter::Post Ter -> Adding //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS" << endl;
+ Warning("PostTrackSegmentMaker", "//%s/Reconstructioner/PHOS not found!", fTasksFolder->GetName() ) ;
+ Info("PostTrackSegmentMaker", "Adding //%s/Reconstructioner/PHOS", fTasksFolder->GetName()) ;
}
phos = new TTask("PHOS", "") ;
tasks->Add(phos) ;
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliPHOSGetter::TSMakerRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
+ Error("TSMakerRef", "Task //%s/Reconstructioner not found !", fTasksFolder->GetName() ) ;
abort() ;
}
TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
- cerr <<"WARNING: AliPHOSGetter::TSMakerRef -> //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS not found!" << endl;
+ Error("TSMakerRef", "//%s/Reconstructioner/PHOS not found !", fTasksFolder->GetName() ) ;
abort() ;
}
if(tsm)
return l->GetObjectRef(tsm) ;
else {
- cerr << "ERROR: AliPHOSGetter::TSMakerRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS/TrackSegmentMarker/" << name << " not found!" << endl;
+ Error("TSMakerRef", "Task //%s/Reconstructioner/PHOS/TrackSegmentMarker/%s not found !", fTasksFolder->GetName(), name) ;
abort() ;
}
}
if ( !phosFolder ) {
if (fDebug) {
- cout << "WARNING: AliPHOSGetter::Post RPa -> Folder //" << fRecoFolder->GetName() << "/PHOS/ not found!" << endl;
- cout << "INFO: AliPHOSGetter::Post Rpa -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS/" << endl;
+ Warning("PostRecParticles", "-> Folder //%s/PHOS/ not found!", fRecoFolder->GetName()) ;
+ Info("PostRecParticles", "-> Adding Folder //%s/PHOS/", fRecoFolder->GetName()) ;
}
phosFolder = fRecoFolder->AddFolder("PHOS", "Reconstructed data from PHOS") ;
}
TFolder * phosRPaFolder = dynamic_cast<TFolder*>(phosFolder->FindObject("RecParticles")) ;
if ( !phosRPaFolder ) {
if (fDebug) {
- cout << "WARNING: AliPHOSGetter::Post RPa -> Folder //" << fRecoFolder->GetName() << "/PHOS/RecParticles/ not found!" << endl;
- cout << "INFO: AliPHOSGetter::Post RPa -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS/RecParticles/" << endl;
+ Warning("PostRecParticles", "-> Folder //%s/PHOS/RecParticles/ not found!", fRecoFolder->GetName()) ;
+ Info("PostRecParticles", "-> Adding Folder //%s/PHOS/RecParticles/", fRecoFolder->GetName()) ;
}
phosRPaFolder = phosFolder->AddFolder("RecParticles", "RecParticles from PHOS") ;
}
// the hierarchy is //Folders/Run/Event/RecData/PHOS/TrackSegments/name
if ( !fRecoFolder ) {
- cerr << "ERROR: AliPHOSGetter::RecParticlesRef -> Folder//" << fRecoFolder->GetName() << " not found!" << endl;
+ Error("RecParticlesRef", "Folder//%s not found !", fRecoFolder->GetName() ) ;
abort() ;
}
TFolder * phosFolder = dynamic_cast<TFolder*>(fRecoFolder->FindObject("PHOS/RecParticles")) ;
if ( !phosFolder ) {
- cerr << "ERROR: AliPHOSGetter::RecParticlesRef -> Folder //" << fRecoFolder->GetName() << "/PHOS/RecParticles/ not found!" << endl;
+ Error("RecParticlesRef", "Folder //%s/PHOS/RecParticles/ not found !", fRecoFolder->GetName() ) ;
abort() ;
}
TObject * tss = phosFolder->FindObject(name ) ;
if (!tss) {
- cerr << "ERROR: AliPHOSGetter::RecParticlesRef -> object " << name << " not found! " << endl ;
+ Error("RecParticlesRef", "object %s not found !", name) ;
abort() ;
}
return phosFolder->GetListOfFolders()->GetObjectRef(tss) ;
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliPHOSGetter::Post Per -> Task //" << fTasksFolder << "/Reconstructioner not found!" << endl;
+ Error("PostPID", "Task //%s/Reconstructioner not found !", fTasksFolder) ;
return kFALSE ;
}
TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
if (fDebug) {
- cout <<"WARNING: AliPHOSGetter::Post Per -> //" << fTasksFolder << "/Reconstructioner/PHOS not found!" << endl;
- cout <<"INFO: AliPHOSGetter::Post Per -> Adding //" << fTasksFolder << "/Reconstructioner/PHOS" << endl;
+ Warning("PostPID", "//%s/Reconstructioner/PHOS not found!", fTasksFolder) ;
+ Info("PostPID", "Adding //%s/Reconstructioner/PHOS", fTasksFolder) ;
}
phos = new TTask("PHOS", "") ;
tasks->Add(phos) ;
AliPHOSPID * phospid = dynamic_cast<AliPHOSPID*>(phos->GetListOfTasks()->FindObject(pid->GetName())) ;
if (phospid) {
if (fDebug)
- cout << "INFO: AliPHOSGetter::Post Per -> Task " << pid->GetName()
- << " already exists" << endl ;
+ Info("PostPID", "-> Task %s qlready exists", pid->GetName()) ;
phos->GetListOfTasks()->Remove(phospid) ;
}
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliPHOSGetter::Post Per -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
+ Error("PostPID", "Task //%s/Reconstructioner not found !", fTasksFolder->GetName() ) ;
return kFALSE ;
}
TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
if (fDebug) {
- cout <<"WARNING: AliPHOSGetter::Post Per -> //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS not found!" << endl;
- cout <<"INFO: AliPHOSGetter::Post Per -> Adding //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS" << endl;
+ Warning("PostPID", "//%s/Reconstructioner/PHOS not found!", fTasksFolder->GetName()) ;
+ Info("PostPID", "Adding //%s/Reconstructioner/PHOS", fTasksFolder->GetName()) ;
}
phos = new TTask("PHOS", "") ;
tasks->Add(phos) ;
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliPHOSGetter::PIDRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
- abort() ;
+ Error("PIDRef", "Task //%s/Reconstructioner not found !", fTasksFolder->GetName() ) ;
+ abort() ;
}
TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
- cerr << "ERROR: AliPHOSGetter::PIDRef -> //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS not found!" << endl;
+ Error("PIDRef", "//%s/Reconstructioner/PHOS not found !", fTasksFolder->GetName() ) ;
abort() ;
}
if(pid)
return l->GetObjectRef(pid) ;
else {
- cerr << "ERROR: AliPHOSGetter::PIDRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS/PID/" << name << " not found!" << endl;
+ Error("PIDRef", "Task //%s/Reconstructioner/PHOS/PID/%s not found !", fTasksFolder->GetName(), name) ;
abort() ;
}
TFolder * phosFolder = dynamic_cast<TFolder*>(fQAFolder->FindObject("PHOS")) ;
if ( !phosFolder ) {
if (fDebug) {
- cout << "WARNING: AliPHOSGetter::Post Q -> Folder //" << fQAFolder << "/PHOS/ not found!" << endl;
- cout << "INFO: AliPHOSGetter::Post Q -> Adding Folder //" << fQAFolder << "/PHOS/" << endl;
+ Warning("PostQA", "-> Folder //%s/PHOS/ not found!", fQAFolder) ;
+ Info("PostQA", "-> Adding Folder //%s/PHOS", fQAFolder) ;
}
phosFolder = fQAFolder->AddFolder("PHOS", "QA from PHOS") ;
}
// the hierarchy is //Folders/Run/Conditions/QA/PHOS
if ( !fQAFolder ) {
- cerr << "ERROR: AliPHOSGetter::AlarmsRef -> Folder //" << fQAFolder << " not found!" << endl;
+ Error("AlarmsRef", "Folder //%s not found !", fQAFolder) ;
abort() ;
}
TFolder * phosFolder = dynamic_cast<TFolder *>(fQAFolder->FindObject("PHOS")) ;
if ( !phosFolder ) {
- cerr << "ERROR: AliPHOSGetter::AlarmsRef -> Folder //" << fQAFolder << "/PHOS/ not found!" << endl;
+ Error("AlarmsRef", "Folder //%s/PHOS/ not found !", fQAFolder) ;
abort() ;
}
treeName += EventNumber() ;
TTree * tree = static_cast<TTree *>(file->Get(treeName.Data())) ;
if (!tree && fDebug)
- cout << "WARNING: AliPHOSGetter::TreeK -> " << treeName.Data() << " not found in " << filename.Data() << endl ;
+ Warning("TreeK", "-> %s not found in %s", treeName.Data(), filename.Data()) ;
return tree ;
}
treeName += EventNumber() ;
TTree * tree = static_cast<TTree *>(file->Get(treeName.Data())) ;
if (!tree && fDebug)
- cout << "WARNING: AliPHOSGetter::TreeH -> " << treeName.Data() << " not found in " << filename.Data() << endl ;
+ Warning("TreeH", "-> %s not found in %s", treeName.Data(), filename.Data()) ;
return tree ;
}
treeName += EventNumber() ;
TTree * tree = static_cast<TTree *>(file->Get(treeName.Data())) ;
if (!tree && fDebug)
- cout << "WARNING: AliPHOSGetter::TreeS -> " << treeName.Data() << " not found in " << filename.Data() << endl ;
+ Warning("TreeS", "-> %s not found in %s", treeName.Data(), filename.Data() );
return tree ;
}
treeName += EventNumber() ;
TTree * tree = static_cast<TTree *>(file->Get(treeName.Data())) ;
if (!tree && fDebug)
- cout << "WARNING: AliPHOSGetter::TreeD -> " << treeName.Data() << " not found in " << filename.Data() << endl ;
+ Warning("TreeD", "-> %s not found in %s", treeName.Data(), filename.Data()) ;
return tree ;
}
treeD = dynamic_cast<TTree*>(file->Get(treeName.Data()));
if(!treeD){ // TreeD not found in header file
if (fDebug)
- cout << "WARNING: AliPHOSGetter::ReadTreeD -> Cannot find TreeD in " << fDigitsFileName.Data() << endl;
+ Warning("ReadTreeD", "-> Cannot find TreeD in %s", fDigitsFileName.Data()) ;
return 1;
}
}
if ( !phosfound || !digitizerfound ) {
if (fDebug)
- cout << "WARNING: AliPHOSGetter::ReadTreeD -> Cannot find Digits and/or Digitizer with name "
- << fDigitsTitle << endl ;
+ Warning("ReadTreeD", "-> Cannot find Digits and/or Digitizer with name %s", fDigitsTitle.Data()) ;
return 2;
}
if(!file)
file = TFile::Open(filename);
if(!file){
- cout << "Can not open file " << filename << endl ;
+ Error ("ReadCalibrationDB", "Cannot open file %s", filename) ;
return ;
}
if(fcdb)
fcdb->Delete() ;
fcdb = dynamic_cast<AliPHOSCalibrationDB *>(file->Get("AliPHOSCalibrationDB")) ;
if(!fcdb)
- cout << "No database " << database << " in file " << filename << endl ;
+ Error ("ReadCalibrationDB", "No database %s in file %s", database, filename) ;
}
//____________________________________________________________________________
if(!treeH) {// TreeH not found in header file
if (fDebug)
- cout << "WARNING: AliPHOSGetter::ReadTreeH -> Cannot find TreeH in " << fHeaderFile << endl ;
+ Warning("ReadTreeH", "-> Cannot find TreeH in %s", fHeaderFile.Data() ) ;
TString searchFileName("PHOS.Hits") ;
if((strcmp(fBranchTitle.Data(),"Default")!=0)&&(strcmp(fBranchTitle.Data(),"")!=0)){
if ( (treeH = TreeH(searchFileName)) ) { //found TreeH in the file which contains the hits
if (fDebug)
- cout << "INFO: AliPHOSGetter::ReadTreeH -> TreeH found in " << searchFileName.Data() << endl ;
+ Info("ReadTreeH", "-> TreeH found in %s", searchFileName.Data()) ;
} else {
- cerr << "ERROR: AliPHOSGetter::ReadTreeH -> TreeH not found " << endl ;
+ Error("ReadTreeH", "TreeH not found") ;
return 1;
}
}
TBranch * hitsbranch = static_cast<TBranch*>(treeH->GetBranch("PHOS")) ;
if ( !hitsbranch ) {
if (fDebug)
- cout << "WARNING: AliPHOSGetter::ReadTreeH -> Cannot find branch PHOS" << endl ;
+ Warning("ReadTreeH", "-> Cannot find branch PHOS") ;
return 2;
}
if(!Hits())
}
//____________________________________________________________________________
-void AliPHOSGetter::Track(Int_t itrack)
+void AliPHOSGetter::Track(const Int_t itrack)
{
// Read the first entry of PHOS branch in hit tree gAlice->TreeH()
if(gAlice->TreeH()== 0){
- cerr << "ERROR: AliPHOSGetter::ReadTreeH: -> Cannot read TreeH " << endl ;
+ Error("Track", "Cannot read TreeH") ;
return ;
}
TBranch * hitsbranch = dynamic_cast<TBranch*>(gAlice->TreeH()->GetListOfBranches()->FindObject("PHOS")) ;
if ( !hitsbranch ) {
if (fDebug)
- cout << "WARNING: AliPHOSGetter::ReadTreeH -> Cannot find branch PHOS" << endl ;
+ Warning("Track", "Cannot find branch PHOS") ;
return ;
}
if(!Hits())
// so far only PHOS knows about this Tree
if(PHOS()->TreeQA()== 0){
- cerr << "ERROR: AliPHOSGetter::ReadTreeQA: can not read TreeQA " << endl ;
+ Error("ReadTreeQA", "Cannot read TreeQA") ;
return ;
}
TBranch * qabranch = PHOS()->TreeQA()->GetBranch("PHOS") ;
if (!qabranch) {
if (fDebug)
- cout << "WARNING: AliPHOSGetter::ReadTreeQA -> Cannot find QA Alarms for PHOS" << endl ;
+ Warning("ReadTreeQA", "Cannot find QA Alarms for PHOS");
return ;
}
treeR = dynamic_cast<TTree*>(file->Get(treeName.Data()));
if(!treeR){ // TreeR not found in header file
if (fDebug)
- cout << "WARNING: AliPHOSGetter::ReadTreeD -> Cannot find TreeR in " << fRecPointsFileName.Data() << endl;
+ Warning("ReadTreeD", "-> Cannot find TreeR in %s", fRecPointsFileName.Data()) ;
return 1;
}
}
if ( !phosemcrpfound || !phoscpvrpfound || !clusterizerfound) {
if (fDebug)
- cout << "WARNING: AliPHOSGetter::ReadTreeR -> Cannot find RecPoints and/or Clusterizer with name "
- << fRecPointsTitle << endl ;
+ Warning("ReadTreeR", "-> Cannot find RecPoints and/or Clusterizer with name %s", fRecPointsTitle.Data() ) ;
} else {
if(!EmcRecPoints(fRecPointsTitle) )
if ( !phostsfound || !tsmakerfound ) {
if (fDebug)
- cout << "WARNING: AliPHOSGetter::ReadTreeR -> Cannot find TrackSegments and/or TrackSegmentMaker with name "
- << fTrackSegmentsTitle << endl ;
+ Warning("ReadTreeR", "-> Cannot find TrackSegments and/or TrackSegmentMaker with name %s", fTrackSegmentsTitle.Data() ) ;
} else {
// Read and Post the TrackSegments
if(!TrackSegments(fTrackSegmentsTitle))
if ( !phosrpafound || !pidfound ) {
if (fDebug)
- cout << "WARNING: AliPHOSGetter::ReadTreeR -> Cannot find RecParticles and/or PID with name "
- << fRecParticlesTitle << endl ;
+ Warning("ReadTreeR", "-> Cannot find RecParticles and/or PID with name %s", fRecParticlesTitle.Data() ) ;
} else {
// Read and Post the RecParticles
if(!RecParticles(fRecParticlesTitle))
if(!treeS){ // TreeS not found in header file
if (fDebug)
- cout << "WARNING: AliPHOSGetter::ReadTreeS -> Cannot find TreeS in " << fileName.Data() << endl;
+ Warning("ReadTreeS", "-> Cannot find TreeS in %s", fileName.Data()) ;
return 1;
}
}
if ( !phosfound || !sdigitizerfound ) {
if (fDebug)
- cout << "WARNING: AliPHOSDigitizer::ReadSDigits -> Digits and/or Digitizer branch with name " << GetName()
- << " not found" << endl ;
+ Warning("ReadSDigits", "-> Digits and/or Digitizer branch with name %s not found", GetName()) ;
return 2;
}
}
if ( !phosfound || !sdigitizerfound ) {
if (fDebug)
- cout << "WARNING: AliPHOSGetter::ReadTreeS -> Digits and/or Digitizer branch not found" << endl ;
+ Warning("ReadTreeS", "-> Digits and/or Digitizer branch not found") ;
return ;
}
if (TreeK(fHeaderFile)) { // treeK found in header file
if (fDebug)
- cout << "INFO: AliPHOSGetter::ReadPrimaries -> TreeK found in " << fHeaderFile.Data() << endl ;
+ Info("ReadPrimaries", "-> TreeK found in %s", fHeaderFile.Data() );
fNPrimaries = gAlice->GetNtrack() ;
fAlice = 0 ;
} else { // treeK not found in header file
- cerr << "ERROR: AliPHOSGetter::ReadPrimaries -> TreeK not found " << endl ;
+ Error("ReadPrimaries", "TreeK not found") ;
return ;
}
// Reads the content of all Tree's S, D and R
if (event >= gAlice->TreeE()->GetEntries() ) {
- cerr << "ERROR: AliPHOSGetter::Event -> " << event << " not found in TreeE!" << endl ;
+ Error("Event", "%d not found in TreeE !", event) ;
return ;
}
}
if (!phosO) {
if(fDebug)
- cerr << "WARNING : AliPHOSGetter::ReturnO -> Object " << what << " not found in PHOS" << endl ;
+ Warning("ReturnO", "Object %s not found in PHOS", what.Data() ) ;
return 0 ;
}
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject(search)) ;
if (!tasks) {
- cerr << "ERROR: AliPHOSGetter::ReturnT -> Task " << what << " not found!" << endl ;
+ Error("ReturnT", "Task %s not found !", what.Data() ) ;
return 0 ;
}
TTask * phosT = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ;
if (!phosT) {
- cerr << "ERROR: AliPHOSGetter::ReturnT -> Task " << what << "/PHOS not found!" << endl ;
+ Error("ReturnT", "Task %s/PHOS not found !", what.Data() ) ;
return 0 ;
}
}
if(fDebug)
- cout << "WARNING: AliPHOSGetter::ReturnT -> Task " << search << "/PHOS/" << name << " not found!" << endl ;
+ Warning("ReturnT", "-> Task %s/PHOS/%s not found", search.Data(), name.Data() ) ;
return 0 ;
}
return ;
}
else {
- cerr << "WARNING: AliPHOSGetter::RemoveTask -> Unknown option " << opt.Data() << endl ;
+ Warning("RemoveTask", "Unknown option %s", opt.Data() );
return ;
}
phos = dynamic_cast<TTask*>(task->GetListOfTasks()->FindObject("PHOS")) ;
}
else {
- cerr << "WARNING: AliPHOSGetter::RemoveObjects -> Unknown option " << opt.Data() << endl ;
+ Warning("RemoveObjects", "Unknown option %s", opt.Data() ) ;
return ;
}
// --- Standard library ---
#include <stdlib.h>
-#include <iostream.h>
// --- AliRoot header files ---
public:
AliPHOSGetter(){ // ctor: this is a singleton, the ctor should never be called but cint needs it as public
- cerr << "ERROR: AliPHOSGetter is a singleton default ctor not callable" << endl ;
+ Error("ctor", "AliPHOSGetter is a singleton default ctor not callable") ;
abort() ;
}
AliPHOSGetter(const AliPHOSGetter & obj) {
// --- Standard library ---
#include <string.h>
#include <stdlib.h>
-#include <strstream.h>
// --- AliRoot header files ---
#include "AliPHOSHit.h"
{
// Print out Id and energy
- out << "AliPHOSHit = " << hit.GetId() << " " << hit.GetEnergy() << " " << hit.GetTime() << endl ;
+ //out << "AliPHOSHit = " << hit.GetId() << " " << hit.GetEnergy() << " " << hit.GetTime() << endl ;
+ Warning("operator <<", "Implement differently") ;
return out ;
}
// --- Standard library ---
-#include <iostream.h>
-
class AliPHOSHit : public AliHit {
// --- Standard library ---
-#include <iostream.h>
-
// --- AliRoot header files ---
#include "AliPHOSIhepAnalyze.h"
AliPHOSGetter * please = AliPHOSGetter::GetInstance(GetFileName().Data(),"PHOS");
const AliPHOSGeometry * fGeom = please->PHOSGeometry();
- cout << "Start CPV Analysis-1. Resolutions, cluster multiplicity and lengths"<<endl;
+ Info("AnalyzeCPV1", "Start CPV Analysis-1. Resolutions, cluster multiplicity and lengths") ;
for ( Int_t ievent=0; ievent<Nevents; ievent++) {
Int_t nTotalGen = 0;
Int_t nChargedGen = 0;
Int_t ntracks = gAlice->GetEvent(ievent);
- cout<<" >>>>>>>Event "<<ievent<<".<<<<<<<"<<endl;
+ Info("AnalyzeCPV1", ">>>>>>>Event %d .<<<<<<<", ievent) ;
// Get branch of CPV impacts
if (! (branchCPVimpacts =gAlice->TreeH()->GetBranch("PHOSCpvImpacts")) ) {
- cout<<" Couldn't find branch PHOSCpvImpacts. Exit."<<endl;
- return;
+ Info("AnalyzeCPV1", "Couldn't find branch PHOSCpvImpacts. Exit.") ;
+ return;
}
// Create and fill arrays of hits for each CPV module
gImpY = ygen;
}
}
- cout<<" Impact global (X,Z,Y) = "<<gImpX<<" "<<gImpZ<<" "<<gImpY<<endl;
- cout<<" Impact local (X,Z) = "<<locImpX<<" "<<locImpZ<<endl;
- cout<<" Reconstructed (X,Z) = "<<xrec<<" "<<zrec<<endl;
- cout<<" dxmin "<<dxmin<<" dzmin "<<dzmin<<endl<<endl;
+ Info("AnalyzeCPV1", "Impact global (X,Z,Y) = %f %f %f", gImpX, gImpZ, gImpY);
+ Info("AnalyzeCPV1", "Impact local (X,Z) = %f %f", locImpX, locImpZ);
+ Info("AnalyzeCPV1", "Reconstructed (X,Z) = %f %f", xrec, zrec);
+ Info("AnalyzeCPV1", "dxmin %f dzmin %f", dxmin, dzmin);
hDx ->Fill(dxmin);
hDz ->Fill(dzmin);
// hDr ->Fill(TMath::Sqrt(r2min));
}
delete [] hitsPerModule;
- cout<<"++++ Event "<<ievent<<": total "<<nTotalGen<<" impacts, "
- <<nChargedGen<<" charged impacts and "<<please->CpvRecPoints()->GetEntries()
- <<" rec. points."<<endl<<endl;
+ Info("AnalyzeCPV1", "++++ Event %d : total %d impacts, %d charged impacts and %d rec. points.",
+ ievent, nTotalGen, nChargedGen, please->CpvRecPoints()->GetEntries()) ;
}
// Save histograms
AliPHOSGetter * please = AliPHOSGetter::GetInstance(GetFileName().Data(),"PHOS");
const AliPHOSGeometry * fGeom = please->PHOSGeometry();
- cout << "Start EMC Analysis-1. Resolutions, cluster multiplicity and lengths"<<endl;
+ Info("AnalyzeCPV1", "Start EMC Analysis-1. Resolutions, cluster multiplicity and lengths");
for ( Int_t ievent=0; ievent<Nevents; ievent++) {
Int_t nTotalGen = 0;
Int_t ntracks = gAlice->GetEvent(ievent);
- cout<<" >>>>>>>Event "<<ievent<<".<<<<<<<"<<endl;
+ Info("AnalyzeCPV1", " >>>>>>>Event %d .<<<<<<<", ievent) ;
// Get branch of EMC impacts
if (! (branchEMCimpacts =gAlice->TreeH()->GetBranch("PHOSEmcImpacts")) ) {
- cout<<" Couldn't find branch PHOSEmcImpacts. Exit."<<endl;
+ Info("AnalyzeCPV1", " Couldn't find branch PHOSEmcImpacts. Exit.");
return;
}
gImpY = ygen;
}
}
- cout<<" Impact global (X,Z,Y) = "<<gImpX<<" "<<gImpZ<<" "<<gImpY<<endl;
- cout<<" Impact local (X,Z) = "<<locImpX<<" "<<locImpZ<<endl;
- cout<<" Reconstructed (X,Z) = "<<xrec<<" "<<zrec<<endl;
- cout<<" dxmin "<<dxmin<<" dzmin "<<dzmin<<endl<<endl;
+ Info("AnalyzeCPV1", " Impact global (X,Z,Y) = %f %f %f", gImpX, gImpZ, gImpY);
+ Info("AnalyzeCPV1", " Impact local (X,Z) = %f %f", locImpX, locImpZ);
+ Info("AnalyzeCPV1", " Reconstructed (X,Z) = %f %f", xrec, zrec);
+ Info("AnalyzeCPV1", " dxmin %f dzmin %f", dxmin, dzmin) ;
hDx ->Fill(dxmin);
hDz ->Fill(dzmin);
// hDr ->Fill(TMath::Sqrt(r2min));
}
delete [] hitsPerModule;
- cout<<"++++ Event "<<ievent<<": total "<<nTotalGen<<" impacts, "
- <<please->EmcRecPoints()->GetEntriesFast()<<" Emc rec. points."<<endl<<endl;
+ Info("AnalyzeCPV1", "++++ Event %d : total %d impacts, %d Emc rec. points.",
+ ievent, nTotalGen, please->EmcRecPoints()->GetEntriesFast()) ;
}
// Save histograms
for (Int_t itrack=0; itrack<ntracks; itrack++) {
branchCPVimpacts ->SetAddress(&fCpvImpacts);
- cout<<" branchCPVimpacts ->SetAddress(&fCpvImpacts) OK."<<endl;
+ Info("AnalyzeCPV1", " branchCPVimpacts ->SetAddress(&fCpvImpacts) OK.");
branchCPVimpacts ->GetEntry(itrack,0);
for (Int_t iModule=0; iModule < nOfModules; iModule++) {
Float_t dz = GenHit1->Z() - GenHit2->Z();
Float_t dr = TMath::Sqrt(dx*dx + dz*dz);
hDrij_cpv_g->Fill(dr);
-// cout<<"(dx dz dr): "<<dx<<" "<<dz<<" "<<endl;
+// Info("AnalyzeCPV1", "(dx dz dr): %f %f", dx, dz);
}
}
}
}
}
- cout<<" Event "<<nev<<". Total of "<<ngen_cpv<<" hits, "<<nrec_cpv<<" rec.points."<<endl;
+ Info("AnalyzeCPV1", " Event %d . Total of %d hits, %d rec.points.",
+ nev, ngen_cpv, nrec_cpv) ;
delete [] hitsPerModule;
hNrpX->Fill(rpMultX);
hNrpZ->Fill(rpMultZ);
hChi2->Fill(((AliPHOSEvalRecPoint*)pt)->Chi2Dof());
- cout<<"+++++ Event "<<ievent<<". (Mult,MultX,MultZ) = "<<rpMult<<" "<<rpMultX<<" "<<rpMultZ<<"+++++"<<endl;
+ Info("AnalyzeCPV1", "+++++ Event %d . (Mult,MultX,MultZ) = %d %d %d +++++",
+ ievent, rpMult, rpMultX, rpMultZ) ;
}
for (Int_t itrack=0; itrack<ntracks; itrack++) {
branchCPVimpacts ->SetAddress(&fCpvImpacts);
- cout<<" branchCPVimpacts ->SetAddress(&fCpvImpacts) OK."<<endl;
+ Info("AnalyzeCPV1", " branchCPVimpacts ->SetAddress(&fCpvImpacts) OK.");
branchCPVimpacts ->GetEntry(itrack,0);
for (Int_t iModule=0; iModule < nOfModules; iModule++) {
// Int_t ntracks = gAlice->GetEvent(ievent);
// Int_t nOfModules = fGeom->GetNModules();
-// cout<<" Tracks: "<<ntracks<<" Modules: "<<nOfModules<<endl;
+// Info("AnalyzeCPV1", " Tracks: "<<ntracks<<" Modules: "<<nOfModules);
// if (! (branchCPVimpacts =gAlice->TreeH()->GetBranch("PHOSCpvImpacts")) ) return;
// for (Int_t itrack=0; itrack<ntracks; itrack++) {
// branchCPVimpacts ->SetAddress(&fCpvImpacts);
-// cout<<" branchCPVimpacts ->SetAddress(&fCpvImpacts) OK."<<endl;
+// Info("AnalyzeCPV1", " branchCPVimpacts ->SetAddress(&fCpvImpacts) OK.");
// branchCPVimpacts ->GetEntry(itrack,0);
-// cout<<" branchCPVimpacts ->GetEntry(itrack,0) OK."<<endl;
+// Info("AnalyzeCPV1", " branchCPVimpacts ->GetEntry(itrack,0) OK.");
// for (Int_t iModule=0; iModule < nOfModules; iModule++) {
// impacts = (TClonesArray *)fCpvImpacts->At(iModule);
-// cout<<" fCpvImpacts->At(iModule) OK."<<endl;
+// Info("AnalyzeCPV1", " fCpvImpacts->At(iModule) OK.");
// // Do loop over impacts in the module
// for (Int_t iImpact=0; iImpact<impacts->GetEntries(); iImpact++) {
// impact=(AliPHOSImpact*)impacts->At(iImpact);
// impact->Print();
// if(IsCharged(impact->GetPid()))
// {
-// cout<<" Add charged hit..";
+// Info("AnalyzeCPV1", " Add charged hit..";
// new(hits[hits.GetEntriesFast()]) AliPHOSImpact(*impact);
-// cout<<"done."<<endl;
+// Info("AnalyzeCPV1", "done.");
// }
// }
// }
// fCpvImpacts->Clear();
// }
-// cout<<" PHOS event "<<ievent<<": "<<hits.GetEntries()<<" charged CPV hits."<<endl;
+// Info("AnalyzeCPV1", " PHOS event "<<ievent<<": "<<hits.GetEntries()<<" charged CPV hits.");
}
// }
// }
-// cout<<" PHOS module "<<iModule<<": "<<hits->GetEntries()<<" charged CPV hits."<<endl;
+// Info("AnalyzeCPV1", " PHOS module "<<iModule<<": "<<hits->GetEntries()<<" charged CPV hits.");
// }
Bool_t AliPHOSIhepAnalyze::IsCharged(Int_t pdg_code)
{
// For HIJING
- cout<<" pdg_code "<<pdg_code<<endl;
+ Info("AnalyzeCPV1", "pdg_code %d", pdg_code);
if(pdg_code==211 || pdg_code==-211 || pdg_code==321 || pdg_code==-321 || pdg_code==11 || pdg_code==-11 || pdg_code==2212 || pdg_code==-2212) return kTRUE;
else
return kFALSE;
}
else {
fDisabled=true;
- cerr << "AliPHOSMemoryWatcher::watch : I'm full !" << endl;
+ Error("watch", "I'm full !" ) ;
}
}
//_____________________________________________________________________________
#include "TTree.h"
// --- Standard library ---
-#include <iostream.h>
#include <stdlib.h>
fSplitFile = 0 ;
}
-
-// //____________________________________________________________________________
-// void AliPHOSPID::SetSplitFile(const TString splitFileName) const
-// {
-// // Diverts the Digits in a file separate from the hits file
-
-
-// TDirectory * cwd = gDirectory ;
-// TFile * splitFile = gAlice->InitTreeFile("R",splitFileName.Data());
-// splitFile->cd() ;
-// gAlice->Write(0, TObject::kOverwrite);
-
-// TTree *treeE = gAlice->TreeE();
-// if (!treeE) {
-// cerr << "ERROR: AliPHOSPID::SetSplitFile -> No TreeE found "<<endl;
-// abort() ;
-// }
-
-// // copy TreeE
-// AliHeader *header = new AliHeader();
-// treeE->SetBranchAddress("Header", &header);
-// treeE->SetBranchStatus("*",1);
-// TTree *treeENew = treeE->CloneTree();
-// treeENew->Write(0, TObject::kOverwrite);
-
-// // copy AliceGeom
-// TGeometry *AliceGeom = static_cast<TGeometry*>(cwd->Get("AliceGeom"));
-// if (!AliceGeom) {
-// cerr << "ERROR: AliPHOSPID::SetSplitFile -> AliceGeom was not found in the input file "<<endl;
-// abort() ;
-// }
-// AliceGeom->Write(0, TObject::kOverwrite) ;
-
-// gAlice->MakeTree("R",splitFile);
-// cwd->cd() ;
-// cout << "INFO: AliPHOSPID::SetSPlitMode -> RecParticles will be stored in " << splitFileName.Data() << endl ;
-// }
#include "TBenchmark.h"
// --- Standard library ---
-#include <iostream.h>
-#include <iomanip.h>
-
// --- AliRoot header files ---
#include "AliRun.h"
// }
// if ( phospidfound || pidfound ) {
-// cerr << "WARNING: AliPHOSPIDv0::Exec -> RecParticles and/or PIDtMaker branch with name "
-// << taskName.Data() << " already exits" << endl ;
+// Error("Exec", "RecParticles and/or PIDtMaker branch with name %s already exists", taskName.Data() ) ;
// return ;
// }
for(ievent = 0; ievent < nevents; ievent++){
gime->Event(ievent,"R") ;
- cout << "event " << ievent << " " << gime->EmcRecPoints() << " " << gime->TrackSegments() << endl ;
+ Info("Exec", "event %d %d %d", ievent, gime->EmcRecPoints(), gime->TrackSegments()) ;
MakeRecParticles() ;
WriteRecParticles(ievent);
if(strstr(option,"tim")){
gBenchmark->Stop("PHOSPID");
- cout << "AliPHOSPID:" << endl ;
- cout << " took " << gBenchmark->GetCpuTime("PHOSPID") << " seconds for PID "
- << gBenchmark->GetCpuTime("PHOSPID")/nevents << " seconds per event " << endl ;
- cout << endl ;
+ Info("Exec", "took %f seconds for PID %f seconds per event",
+ gBenchmark->GetCpuTime("PHOSPID"), gBenchmark->GetCpuTime("PHOSPID")/nevents) ;
}
}
AliPHOSGetter * gime = AliPHOSGetter::GetInstance(GetTitle(), taskName.Data(),fToSplit) ;
if ( gime == 0 ) {
- cerr << "ERROR: AliPHOSPIDv0::Init -> Could not obtain the Getter object !" << endl ;
+ Error("Init", "Could not obtain the Getter object !") ;
return ;
}
void AliPHOSPIDv0:: Print(Option_t * option) const
{
// Print the parameters used for the particle type identification
- cout << "=============== AliPHOSPID1 ================" << endl ;
- cout << "Making PID "<< endl ;
- cout << " Headers file: " << fHeaderFileName.Data() << endl ;
- cout << " RecPoints branch title: " << fRecPointsTitle.Data() << endl ;
- cout << " TrackSegments Branch title: " << fTrackSegmentsTitle.Data() << endl ;
- cout << " RecParticles Branch title " << fRecParticlesTitle.Data() << endl;
- cout << "with parameters: " << endl ;
- cout << " Maximal EMC - CPV distance (cm) " << fCpvEmcDistance << endl ;
- if(fIDOptions.Contains("dis",TString::kIgnoreCase ))
- cout << " dispersion cut " << fDispersion << endl ;
- if(fIDOptions.Contains("ell",TString::kIgnoreCase )){
- cout << " Eliptic cuts function: " << endl ;
- cout << fFormula->GetTitle() << endl ;
- }
- if(fIDOptions.Contains("tim",TString::kIgnoreCase ))
- cout << " Time Gate uzed: " << fTimeGate << endl ;
- cout << "============================================" << endl ;
+ TString message ;
+ message = "=============== AliPHOSPID1 ================\n" ;
+ message += "Making PID\n" ;
+ message += " Headers file: %s\n" ;
+ message += " RecPoints branch title: %s\n" ;
+ message += " TrackSegments Branch title: %s\n" ;
+ message += " RecParticles Branch title %s\n" ;
+ message += "with parameters:\n" ;
+ message += " Maximal EMC - CPV distance (cm) %f\n" ;
+ Info("Print", message.Data(),
+ fHeaderFileName.Data(),
+ fRecPointsTitle.Data(),
+ fTrackSegmentsTitle.Data(),
+ fRecParticlesTitle.Data(),
+ fCpvEmcDistance );
+
+ if(fIDOptions.Contains("dis",TString::kIgnoreCase ))
+ Info("Print", " dispersion cut %f", fDispersion ) ;
+ if(fIDOptions.Contains("ell",TString::kIgnoreCase ))
+ Info("Print", " Eliptic cuts function: %s", fFormula->GetTitle() ) ;
+ if(fIDOptions.Contains("tim",TString::kIgnoreCase ))
+ Info("Print", " Time Gate used: %f", fTimeGate) ;
}
//____________________________________________________________________________
taskName.Remove(taskName.Index(Version())-1) ;
TClonesArray * recParticles = gime->RecParticles(taskName) ;
- cout << "AliPHOSPIDv0: event "<<gAlice->GetEvNumber() << endl ;
- cout << " found " << recParticles->GetEntriesFast() << " RecParticles " << endl ;
-
+ TString message ;
+ message = "event %d\n" ;
+ message += " found %d RecParticles\n" ;
+ Info("PrintRecParticles", message.Data(), gAlice->GetEvNumber(), recParticles->GetEntriesFast() ) ;
+
if(strstr(option,"all")) { // printing found TS
-
- cout << " PARTICLE "
- << " Index " << endl ;
- // << " X "
- // << " Y "
- // << " Z "
- // << " # of primaries "
- // << " Primaries list " << endl;
+ Info("PrintRecParticles"," PARTICLE Index \n" ) ;
Int_t index ;
for (index = 0 ; index < recParticles->GetEntries() ; index++) {
// Int_t nprimaries;
// primaries = rp->GetPrimaries(nprimaries);
- cout << setw(10) << particle << " "
- << setw(5) << rp->GetIndexInList() << " " ;
- // << setw(4) << nprimaries << " ";
- // for (Int_t iprimary=0; iprimary<nprimaries; iprimary++)
- // cout << setw(4) << primaries[iprimary] << " ";
- cout << endl;
+ Info("PrintRecParticles", " %s %d\n", particle, rp->GetIndexInList()) ;
}
- cout << "-------------------------------------------" << endl ;
- }
-
+ }
}
// gime->SetRecParticlesTitle(BranchName()) ;
if ( gime == 0 ) {
- cerr << "ERROR: AliPHOSPIDv1::Init -> Could not obtain the Getter object !" << endl ;
+ Error("Init", "Could not obtain the Getter object !" ) ;
return ;
}
if((eff_pur==1)&&(R <2. )) prinsign= 1;
if((eff_pur==0)&&(R <9./2.)) prinsign= 1;
- if(R<0)cout<<"Error: Negative square?"<<endl;
+ if(R<0)
+ Error("GetPrincipalSign", "Negative square?") ;
return prinsign;
}
eff_pur = 2 ;
else{
eff_pur = -1;
- cout<<"Invalid Efficiency-Purity option"<<endl;
- cout<<"Possible options: HIGH EFFICIENCY = LOW PURITY"<<endl;
- cout<<" MEDIUM EFFICIENCY = MEDIUM PURITY"<<endl;
- cout<<" LOW EFFICIENCY = HIGH PURITY"<<endl;
+ TString message ;
+ message = "Invalid Efficiency-Purity option\n";
+ message += "Possible options: HIGH EFFICIENCY = LOW PURITY\n" ;
+ message += " MEDIUM EFFICIENCY = MEDIUM PURITY\n" ;
+ message += " LOW EFFICIENCY = HIGH PURITY\n" ;
}
return eff_pur;
if(Param.Contains("x0"))p=15;
if(Param.Contains("y0"))p=16;
if((i>4)||(i<0))
- cout<<"Error:: No parameter with index "<<i<<endl;
+ Error("SetEllipseParameter", "No parameter with index %d", i) ;
else if(p==-1)
- cout<<"Error:: No parameter with name "<<Param<<endl;
+ Error("SetEllipseParameter", "No parameter with name %s", Param.Data() ) ;
else
(*fParameters)(p,i) = par ;
}
if(Param.Contains("y0"))p=16;
if((i>4)||(i<0))
- cout<<"Error:: No parameter with index "<<i<<endl;
+ Error("GetParameterToCalculateEllipse", "No parameter with index", i) ;
else if(p==-1)
- cout<<"Error:: No parameter with name "<<Param<<endl;
+ Error("GetParameterToCalculateEllipse", "No parameter with name %s", Param.Data() ) ;
else
par = (*fParameters)(p,i) ;
// }
// if ( phospidfound || pidfound ) {
-// cerr << "WARNING: AliPHOSPIDv1::Exec -> RecParticles and/or PIDtMaker branch with name "
-// << taskName.Data() << " already exits" << endl ;
+// Error("Exec", "RecParticles and/or PIDtMaker branch with name %s already exists", taskName.Data() ) ;
// return ;
// }
// }
if(strstr(option,"tim")){
gBenchmark->Stop("PHOSPID");
- cout << "AliPHOSPID:" << endl ;
- cout << " took " << gBenchmark->GetCpuTime("PHOSPID") << " seconds for PID "
- << gBenchmark->GetCpuTime("PHOSPID")/nevents << " seconds per event " << endl ;
- cout << endl ;
- }
-
+ Info("Exec", "took %f seconds for PID %f seconds per event",
+ gBenchmark->GetCpuTime("PHOSPID"),
+ gBenchmark->GetCpuTime("PHOSPID")/nevents) ;
+ }
}
//____________________________________________________________________________
TObjArray * cpvRecPoints = gime->CpvRecPoints() ;
TClonesArray * trackSegments = gime->TrackSegments() ;
if ( !emcRecPoints || !cpvRecPoints || !trackSegments ) {
- cerr << "ERROR: AliPHOSPIDv1::MakeRecParticles -> RecPoints or TrackSegments not found ! " << endl ;
+ Error("MakeRecParticles", "RecPoints or TrackSegments not found !") ;
abort() ;
}
TClonesArray * recParticles = gime->RecParticles() ;
// YK: check if (emc != 0) !!!
if (!emc) {
- cerr << "ERROR: AliPHOSPIDv1::MakeRecParticles -> emc("
- <<ts->GetEmcIndex()<<") = " <<emc<< endl;
+ Error("MakeRecParticles", "-> emc(%d) = %d", ts->GetEmcIndex(), emc ) ;
abort();
}
Float_t e = emc->GetEnergy() ;
void AliPHOSPIDv1:: Print()
{
// Print the parameters used for the particle type identification
- cout << "=============== AliPHOSPID1 ================" << endl ;
- cout << "Making PID "<< endl ;
-// cout << " Headers file: " << fHeaderFileName.Data() << endl ;
-// cout << " RecPoints branch title: " << fRecPointsTitle.Data() << endl ;
-// cout << " TrackSegments Branch title: " << fTrackSegmentsTitle.Data() << endl ;
-// cout << " RecParticles Branch title " << fRecParticlesTitle.Data() << endl;
- cout << " Pricipal analysis file from 0.5 to 100 " << fFileName.Data() << endl;
- cout << " Name of parameters file "<<fFileNamePar.Data() << endl ;
- cout << " Matrix of Parameters: 18x4"<<endl;
- cout << " RCPV 6x3 [High Eff-Low Pur,Medium Eff-Pur, Low Eff-High Pur]"<<endl;
- cout << " TOF 6x3 [High Eff-Low Pur,Medium Eff-Pur, Low Eff-High Pur]"<<endl;
- cout << " PCA 5x4 [5 ellipse parametres and 4 parametres to calculate them: A/Sqrt(E) + B* E + C * E^2 + D]"<<endl;
- cout << " Energy Calibration 1x3 [3 parametres to calibrate energy: A + B* E + C * E^2]"<<endl;
+ TString message ;
+ message = "\n=============== AliPHOSPID1 ================\n" ;
+ message += "Making PID\n";
+ message += " Pricipal analysis file from 0.5 to 100 %s\n" ;
+ message += " Name of parameters file %s\n" ;
+ message += " Matrix of Parameters: 18x4\n" ;
+ message += " RCPV 6x3 [High Eff-Low Pur,Medium Eff-Pur, Low Eff-High Pur]\n" ;
+ message += " TOF 6x3 [High Eff-Low Pur,Medium Eff-Pur, Low Eff-High Pur]\n" ;
+ message += " PCA 5x4 [5 ellipse parametres and 4 parametres to calculate them: A/Sqrt(E) + B* E + C * E^2 + D]\n" ;
+ message += " Energy Calibration 1x3 [3 parametres to calibrate energy: A + B* E + C * E^2]\n" ;
+ Info("Print", message.Data(), fFileName.Data(), fFileNamePar.Data() ) ;
fParameters->Print() ;
- cout << "============================================" << endl ;
}
//____________________________________________________________________________
AliPHOSGetter *gime = AliPHOSGetter::GetInstance() ;
TClonesArray * recParticles = gime->RecParticles(BranchName()) ;
-
- cout << "AliPHOSPIDv1: event "<<gAlice->GetEvNumber() << endl ;
- cout << " found " << recParticles->GetEntriesFast() << " RecParticles " << endl ;
-
+
+ TString message ;
+ message = "event %d\n" ;
+ message += " found %d RecParticles\n" ;
+ Info("PrintRecParticles", message.Data(), gAlice->GetEvNumber(), recParticles->GetEntriesFast() ) ;
if(strstr(option,"all")) { // printing found TS
-
- cout << " PARTICLE "
- << " Index " << endl ;
+ message = " PARTICLE Index \n" ;
+ Info("PrintRecParticles", message.Data() ) ;
Int_t index ;
for (index = 0 ; index < recParticles->GetEntries() ; index++) {
- AliPHOSRecParticle * rp = (AliPHOSRecParticle * ) recParticles->At(index) ;
-
- cout << setw(10) << rp->Name() << " "
- << setw(5) << rp->GetIndexInList() << " " <<endl;
- cout << "Type "<< rp->GetType() << endl;
+ AliPHOSRecParticle * rp = (AliPHOSRecParticle * ) recParticles->At(index) ;
+ message = " %s %d Type %d\n" ;
+ Info("PrintRecParticles", message.Data(),
+ rp->Name().Data(),
+ rp->GetIndexInList(),
+ rp->GetType() );
}
- cout << "-------------------------------------------" << endl ;
- }
-
+ }
}
{
// Print the digits information
- cout << "AliPHOSPpsdRecPoint: " << endl ;
+ Info("Print","AliPHOSPpsdRecPoint: " ) ;
Int_t iDigit;
- cout << " Digit{s} # " ;
+ Info("Print"," Digit{s} # ") ;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
- cout << fDigitsList[iDigit] << " " ;
- cout << endl ;
-
- cout << " Multiplicity = " << fMulDigit << endl ;
- cout << " Stored at position " << fIndexInList << endl ;
+ Info("Print", "%d", fDigitsList[iDigit]) ;
+ Info("Print"," Multiplicity = %d", fMulDigit ) ;
+ Info("Print"," Stored at position %d", fIndexInList ) ;
}
// --- Standard library ---
-#include <iostream.h>
// --- AliRoot header files ---
#include "AliPHOSQAAlarm.h"
{
// print the message
- cout << "Event# " << fEvent << " " << fMessage << endl;
+ Info("Print", "Event# %d %s", fEvent, fMessage.Data()) ;
}
// --- Standard library ---
-#include <iostream.h>
// --- AliRoot header files ---
#include "AliPHOSQAChecker.h"
{
// print the checker and sub-checkers, if any, name.
- cout << "Checker : " << GetName() << endl ;
+ Info("Print", "Checker : %s", GetName()) ;
}
void AliPHOSQAChecker::PrintAlarms()
{
// Prints the alarms of all attached checkables
- cout << "Checker name : " << GetName() << endl ;
+ Info("PrintAlarms", "Checker name : %s", GetName()) ;
if ( !(fCheckablesList->IsEmpty() ) ) {
TIter next( fCheckablesList ) ;
AliPHOSQAVirtualCheckable * checkable ;
{
// Prints the checkables attached to this checker
if ( fCheckablesList->IsEmpty() )
- cout << "No checkables are checked by " << GetName() << endl ;
+ Info("Status", "No checkables are checked by %s", GetName()) ;
else {
- cout << "The following checkables are checked by " << GetName() << endl ;
+ Info("Status", "The following checkables are checked by %s", GetName()) ;
TIter next(fCheckablesList) ;
AliPHOSQAVirtualCheckable * checkable ;
while ( (checkable = (AliPHOSQAVirtualCheckable*)next() ) )
// --- Standard library ---
-#include <iostream.h>
-
// --- AliRoot header files ---
#include "AliPHOSQAFloatCheckable.h"
void AliPHOSQAFloatCheckable::Print() const
{
// Print the chekable name and its value
- cout << " Checkable-> " << GetName() << " : value = " << fValue << endl ;
+ Info("Print", "Checkable-> %s : value = %f", GetName(), fValue) ;
}
//____________________________________________________________________________
// --- Standard library ---
-#include <iostream.h>
-
// --- AliRoot header files ---
#include "AliPHOSQAIntCheckable.h"
void AliPHOSQAIntCheckable::Print() const
{
// Print the chekable name and its value
- cout << " Checkable-> " << GetName() << " : value = " << fValue << endl ;
+ Info("Print", "Checkable-> %s : value = %d", GetName(), fValue) ;
}
//____________________________________________________________________________
Float_t checked = 0. ;
if ( (fCheckable->HasA() == "I") && (fCheckable->HasA() == "F") ) {
- cout << " ERROR : checker " << GetName() << " says you got the wrong checkable "
- << fCheckable->GetName() << endl ;
- cout << " or the checkable has no value !" << endl ;
+ Error("CheckingOperation", "checker %s says you got the wrong checkable %s \n
+ or the checkable has no value !", GetName(), fCheckable->GetName()) ;
} else {
checked = fCheckable->GetValue();
if (checked < fMean-fRms || checked > fMean+fRms) {
{
// print the name
- cout << "Checker : " << GetName() << " : " << GetTitle() << " : Mean = " << fMean << " Rms = " << fRms << endl ;
+ Info("Print", "Checker : %s : %s : Mean = %f Rms = %f", GetName(), GetTitle(), fMean, fRms) ;
}
// --- Standard library ---
-#include <iostream.h>
-
// --- AliRoot header files ---
#include "AliPHOSQAObjectCheckable.h"
//____________________________________________________________________________
void AliPHOSQAObjectCheckable::Print() const
{
- cout << " Checkable-> " << GetName() << " : value = " << endl ;
+ Info("Print", "Checkable-> %s : value = ", GetName()) ;
if( fObject )
fObject->Print() ;
else
- cerr << "ERROR : no object specified yet " << endl ;
+ Info("Print", "no object specified yet" ) ;
}
// --- Standard library ---
-#include <iostream.h>
-
// --- AliRoot header files ---
#include "AliPHOSQAVirtualCheckable.h"
// Prints all the alarms
TObjArray * alarms = GetAlarms() ;
if (alarms->IsEmpty() )
- cout << " No alarms raised for checkable " << GetName() << endl ;
+ Info("Alarms", "No alarms raised for checkable %s", GetName()) ;
else {
TIter next(alarms);
AliPHOSQAAlarm * alarm ;
void AliPHOSQAVirtualCheckable::RaiseAlarm(const char * time, const char * checked, const char * checker, const char * message)
{
// Raise an alarm and store it in the appropriate folder : //Folders/Run/Conditions/QA/PHOS..
- // cout << message ;
+ // Info("RaiseAlarm", "%s", message) ;
AliPHOSQAAlarm * alarm = new AliPHOSQAAlarm(time, checked, checker, message) ;
GetAlarms()->Add(alarm) ;
}
// resets the list of alarms (delete the alarms from the list)
TObjArray * alarms = GetAlarms() ;
if (alarms->IsEmpty() )
- cout << " No alarms raised for checkable " << GetName() << endl ;
+ Info("ResetAlarms", "No alarms raised for checkable %s", GetName()) ;
else {
alarms->Delete() ;
- cout << " Reset alarms for checkable " << GetName() << endl ;
+ Info("ResetAlarms", " Reset alarms for checkable %s", GetName()) ;
}
}
// Tells which checkers are attached to this checkable
TList * list = fChecker->GetListOfTasks();
if (list->IsEmpty() )
- cout << "No checkers are in use for " << GetName() << endl ;
+ Info("Status", "No checkers are in use for %s", GetName()) ;
else {
- cout << "The following checkers are in use for " << GetName() << endl ;
+ Info("Status", "The following checkers are in use for %s", GetName()) ;
TIter next(list) ;
AliPHOSQAChecker * checker ;
while ( (checker = (AliPHOSQAChecker*)next() ) )
#include "TTree.h"
// --- Standard library ---
-#include <iostream.h>
//#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
sprintf(command,"zcat %s",fInName.Data());
FILE *dataFile = popen(command, "r");
if (dataFile == NULL) {
- cout << " Can not open file " << fInName.Data() << endl ;
+ Warning("ProcessRawFile", " Cannot open file %s\n", fInName.Data() ) ;
perror(fInName.Data()) ;
fStatus = -1 ;
return kFALSE ;
UInt_t w = 0x12345678;
Int_t swapo = memcmp(&w, "\x78\x56\x34\x12", sizeof(UInt_t)) == 0;
if(fDebug)
- cout << "swapo=" << swapo << endl;
+ Info("ProcessRawFile", "swapo=%f\n", swapo ) ;
UInt_t recBuf[300] ;
if (n < 0 )
perror(fInName.Data());
else
- cout << "Could not read physical record control words" << endl;
+ Error("ProcessRawFile", "Could not read physical record control words" ) ;
fStatus = -2 ;
return kFALSE;
}
if(fDebug)
- cout << "recbuf[0] = " << recBuf[0] << endl ;
+ Info("ProcessRawFile", "recbuf[0] = %d\n", recBuf[0] );
// Check if it is a ZEBRA file and if the words are swapped
UInt_t swapi = 0 ;
if (recBuf[0] != fMK1) {
Swab4(recBuf, &w, 1);
if (w != fMK1) {
- cout << "Does not look like a ZEBRA file\n";
+ Error("ProcessRawFile", "Does not look like a ZEBRA file\n" ) ;
pclose(dataFile) ;
fStatus = -2 ;
return kFALSE;
}
if(fDebug){
- cout << " w = " << w << endl ;;
- cout << " swapi = " << swapi << endl ;;
+ TString message ;
+ message = " w = %f\n" ;
+ message += " swapi = %f\n" ;
+ Info("ProcessRawFile", message.Data(), w, swapi ) ;
}
// Get number of words in physical record
UInt_t * recptr = recBuf; //Pointer to current position
if(recptr[7] != 1) {
- cout << "Can not handle fast blocks" << endl;
+ Error("ProcessRawFile", "Cannot handle fast blocks" ) ;
fStatus = -2 ;
return kFALSE;
}
// Logical record control words
UInt_t lrtyp = recptr[1];
if (lrtyp != 3) {
- cout << "Can not handle logical record type " << lrtyp << endl ;
+ Error("ProcessRawFile", "Can not handle logical record type %d", lrtyp ) ;
fStatus = -2 ;
return kFALSE;
}
recptr += 2;
if (recptr[0] != fCKW) {
- cout << "Bad check word" << endl;
+ Error("ProcessRawFile", "Bad check word" ) ;
fStatus = -2 ;
return kFALSE;
}
UInt_t evtno = recptr[2]; /* Event number */
if(fDebug)
- cout << "evtno=" << evtno << endl;
+ Info("ProcessRawFile", "evtno= %d", evtno);
UInt_t nh = recptr[4]; /* Number of header words in data bank */
recptr += nh;
new((*fDigits)[i])AliPHOSDigit(-1,absID,peak,0.,i) ;
if(fDebug){
if(peak>(UShort_t)1000)
- cout << "event=" << fEvent << " peak[" << i << "] = "<<peak << endl;
+ Info("ProcessRawFile", "event= %d peak[%d] = %f", fEvent, i, peak);
}
byteptr+=sizeof(UShort_t);
}
WriteDigits() ;
if(fDebug)
- cout << "event=" << fEvent << " written " << endl;
+ Info("ProcessRawFile", "event= %d written", fEvent) ;
// Read next record
UInt_t nb = nwphr *sizeof(UInt_t);
//____________________________________________________________________________
void AliPHOSRaw2Digits::Print(Option_t * option)const{
- cout << "----------AliPHOSRaw2Digits----------" << endl ;
- cout << "Input stream " << endl ;
- cout << "Current input File: " << fInName.Data() << endl ;
- cout << "Current output File: " << GetTitle() << endl ;
- cout << "Events processes in the last file " << fEvent << endl ;
- cout << "Input file status " ;
+ TString message ;
+ message = "----------AliPHOSRaw2Digits---------- \n" ;
+ message += "Input stream \n" ;
+ message += "Current input File: %s\n" ;
+ message += "Current output File: %s\n" ;
+ message += "Events processes in the last file %d\n" ;
+ message += "Input file status\n" ;
switch (fStatus){
- case 0: cout << "`Have not processed yet' " << endl ;
+ case 0: message += "`Have not processed yet'\n" ;
break ;
- case 1: cout << "`Processed normally' " << endl ;
+ case 1: message += "`Processed normally'\n" ;
break ;
- case -1: cout << "`File not found'" << endl ;
+ case -1: message += "`File not found'\n" ;
break ;
- case -2: cout << "`Error in reading' " << endl ;
+ case -2: message += "`Error in reading'\n" ;
break ;
- case -3: cout << "'Interupted'" << endl ;
+ case -3: message += "'Interupted'\n" ;
default: ;
}
- cout << "Connection table: " ;
+ message += "Connection table: " ;
if(fctdb)
- cout << fctdb->GetName() << " " << fctdb->GetTitle() << endl ;
+ message += "%s %s \n" ;
else
- cout << " no DB " << endl ;
-
+ message += " no DB \n" ;
+
+ Info("Print", message.Data(),
+ fInName.Data(),
+ GetTitle(),
+ fEvent,
+ fctdb->GetName(), fctdb->GetTitle() ) ;
}
Float_t dd = da/D;
Gi = dd*(2.- dd*Const*(1.-2.*Ai/Etot));
- cout<<" OneGamChi2 (Ai,Ei,Etot,&Gi,chi2) "<<Ai<<" "<<Ei<<" "<<Etot<<" "<<Gi<<" "<<da*da/D<<endl<<endl;
+ Info("OneGamChi2", " OneGamChi2 (Ai,Ei,Etot,&Gi,chi2) %f %f %f %f %f", Ai, Ei, Etot, Gi, da*da/D );
return da*da/D;
Float_t CelZ = geom->GetPadSizeZ();
Float_t CelY = geom->GetPadSizePhi();
-// // cout<<"CelZ: "<<CelZ<<" CelY: "<<CelY<<endl;
+// // Info("AG", "CelZ: %f CelY: %f", CelZ, CelY) ;
Float_t dx = CelZ/2.;
Float_t dy = CelY/2.;
+ TMath::ATan(x*y/(9*b*TMath::Sqrt((9*b)*(9*b) + x*x+y*y)));
Float_t Fcml = A*Fff/6.2831853071796;
-// cout<<" Fcml: "<<Fcml<<endl;
+// Info("Fcml", "Fcml: %f", Fcml) ;
return Fcml;
}
// --- Standard library ---
-#include <iostream.h>
-
// --- AliRoot header files ---
#include "AliPHOSRecManager.h"
{
if ( index > GetNPrimariesToRecParticles() ) {
if (fDebug)
- cout << "WARNING : AliPHOSRecParticle::GetPrimary -> " << index << " is larger that the number of primaries "
- << GetNPrimaries() << endl ;
+ Warning("GetPrimary", "%d is larger that the number of primaries %d", index, GetNPrimaries()) ;
return 0 ;
} else {
Int_t dummy ;
Int_t primaryindex = ((AliPHOSEmcRecPoint*)gime->EmcRecPoints()->At(emcRPindex))->GetPrimaries(dummy)[index] ;
// if (primaryindex >= 10000000) { // it comes from backgroundfile
// if (fDebug)
-// cout << "WARNING : AliPHOSRecParticle::GetPrimary -> not a signal primary" << endl ;
+// Warning("GetPrimary","-> not a signal primary") ;
// return 0 ;
// } else
return gime->Primary(primaryindex) ;
#include "TClonesArray.h"
// --- Standard library ---
-#include <iostream.h>
// --- AliRoot header files ---
for ( jndex = 0 ; jndex < nprimaries ; jndex++ ) { // all primaries in digit
if ( fMulTrack > fMaxTrack ) {
fMulTrack = - 1 ;
- cout << "AliPHOSRecPoint::GetNprimaries ERROR > increase fMaxTrack " << endl ;
+ Error("EvalPrimaries", "GetNprimaries ERROR > increase fMaxTrack" ) ;
break ;
}
Int_t newprimary = newprimaryarray[jndex] ;
// Thanks to getters, one can set
// parameters to reconstruction briks. The full set of parameters is saved in the
// corresponding branch: e.g. parameters of clusterizer are stored in branch
-// TreeR::AliPHOSClusterizer with the same title as the branch containing the RecPoints.
-// TTree does not support overwriting, therefore one can not produce several
+// TreeR::AliPHOSClusterizer with the same title as the branch containing the RecPoints. // TTree does not support overwriting, therefore one can not produce several
// branches with the same names and titles - use different titles.
//
// Use case:
#include "TFile.h"
// --- Standard library ---
-#include <iostream.h>
// --- AliRoot header files ---
#include "AliRun.h"
if(!fIsInitialized)
Init() ;
+ TString message(" ") ;
// gAlice->GetEvent(0) ;
// if(fSDigitizer->IsActive()&& gAlice->TreeS()){ //Will produce SDigits
// }
// if(!(sdigitizerNotFound && phosNotFound)){
-// cout << "AliPHOSReconstructioner error: "<< endl ;
-// cout << " Branches ''PHOS'' or ''AliPHOSSDigitizer'' with title ``" << fSDigitsBranch.Data() << "''" << endl ;
-// cout << " already exist in TreeS. ROOT does not allow updating/overwriting." << endl ;
-// cout << " Specify another title for branches or use ''StartFrom()'' method" << endl ;
-
+// message = " Branches PHOS or AliPHOSSDigitizer with title %s\n" ;
+// message += " already exist in TreeS. ROOT does not allow updating/overwriting.\n" ;
+// message += " Specify another title for branches or use StartFrom() method\n" ;
+// Error("Exec", message.Data(), fSDigitsBranch.Data() ) ;
// //mark all tasks as inactive
// TIter next(fTasks);
// TTask *task;
// }
// if(!(digitizerNotFound && phosNotFound)){
-// cout << "AliPHOSReconstructioner error: "<< endl ;
-// cout << " Branches ''PHOS'' or ''AliPHOSDigitizer'' with title ``" << fDigitsBranch.Data() << "''" << endl ;
-// cout << " already exist in TreeD. ROOT does not allow updating/overwriting." << endl ;
-// cout << " Specify another title for branches or use ''StartFrom()'' method" << endl ;
-
+// message = " Branches PHOS or AliPHOSDigitizer with title %s\n" ;
+// message += " already exist in TreeD. ROOT does not allow updating/overwriting.\n" ;
+// message += " Specify another title for branches or use StartFrom() method" ;
+// Error("Exec", message>Data(), fDigitsBranch.Data() ) ;
// //mark all tasks as inactive
// TIter next(fTasks);
// TTask *task;
// }
// if(!(clusterizerNotFound && emcNotFound && cpvNotFound)){
-// cout << "AliPHOSReconstructioner error: "<< endl ;
-// cout << " Branches ''PHOSEmcRP'', ''PHOSCpvRP'' or ''AliPHOSClusterizer'' with title ``"
-// << fRecPointBranch.Data() << "''" << endl ;
-// cout << " already exist in TreeR. ROOT does not allow updating/overwriting." << endl ;
-// cout << " Specify another title for branches or use ''StartFrom()'' method" << endl ;
-
+// message = " Branches PHOSEmcRP, PHOSCpvRP or AliPHOSClusterizer with title %s\n" ;
+// message += " already exist in TreeR. ROOT does not allow updating/overwriting.\n" ;
+// message += " Specify another title for branches or use StartFrom() method\n" ;
+// Error("Exec", message.Data(),fRecPointBranch.Data() ) ;
// //mark all tasks as inactive
// TIter next(fTasks);
// TTask *task;
// }
// if(!(tsMakerNotFound &&tsNotFound) ){
-// cout << "AliPHOSReconstructioner error: "<< endl ;
-// cout << " Branches ''PHOSTS'' or ''AliPHOSTrackSegmentMaker'' with title ``"
-// << fTSBranch.Data() << "''" << endl ;
-// cout << " already exist in TreeR. ROOT does not allow updating/overwriting." << endl ;
-// cout << " Specify another title for branches or use ''StartFrom()'' method" << endl ;
-
+// message = " Branches PHOSTS or AliPHOSTrackSegmentMaker with title %s\n" ;
+// message += " already exist in TreeR. ROOT does not allow updating/overwriting.\n" ;
+// message += " Specify another title for branches or use StartFrom() method\n" ;
+// Error("Exec", message.Data(),fTSBranch.Data() ) ;
// //mark all tasks as inactive
// TIter next(fTasks);
// TTask *task;
// }
// if(!pidNotFound || !rpNotFound ){
-// cout << "AliPHOSReconstructioner error: "<< endl ;
-// cout << " Branches ''PHOSRP'' or ''AliPHOSPID'' with title ``"
-// << fRecPartBranch.Data() << "''" << endl ;
-// cout << " already exist in TreeR. ROOT does not allow updating/overwriting." << endl ;
-// cout << " Specify another title for branches." << endl ;
-
+// message = " Branches PHOSRP or AliPHOSPID with title %s\n" ;
+// message += " already exist in TreeR. ROOT does not allow updating/overwriting.\n" ;
+// message += " Specify another title for branches.\n" ;
+// Error("Exec", message.Data(), fRecPartBranch.Data() ) ;
// //mark all tasks as inactive
// TIter next(fTasks);
// TTask *task;
// return ;
// }
-// cout << "There is no branch " << branch << "!"<< endl ;
-// cout << "Available branches `SDigits', `Digits', `RecPoints', `TrackSegments' and `RecParticles' " << endl ;
-
+//
+// TString message ;
+// message = "There is no branch %s !\n" ;
+// message += "Available branches `SDigits', `Digits', `RecPoints', `TrackSegments' and `RecParticles'\n" ;
+// Warning("SetBranchTitle", message.Data(), branch ) ;
// }
// //____________________________________________________________________________
// void AliPHOSReconstructioner::StartFrom(char * module,char* title)
// if(strstr(module,"PID") || strstr(module,"Particle") || strstr(module,"RP") )
// sprintf(moduleName,"AliPHOSPID") ;
// else{
-// cout << "Do not know such a module / Rec Object " << endl;
+// Warning("StartFrom", "Do not know such a module / Rec Object ") ;
// return ;
// }
void AliPHOSReconstructioner::Print(Option_t * option)const {
// Print reconstructioner data
- cout << "-----------------AliPHOSReconstructioner---------------" << endl ;
- cout << " Reconstruction of the header file " <<fHeaderFileName.Data() << endl ;
- cout << " with the following modules: " << endl ;
+ TString message ;
+ message = "-----------------AliPHOSReconstructioner---------------\n" ;
+ message += " Reconstruction of the header file %s\n" ;
+ message += " with the following modules:\n" ;
if(fSDigitizer->IsActive()){
- cout << " (+) " << fSDigitizer->GetName() << " to branch : " << fSDigitsBranch.Data() << endl ;
- cout << endl ;
+ message += " (+) %s to branch %s\n" ;
}
if(fDigitizer->IsActive()){
- cout << " (+) " << fDigitizer->GetName() << " to branch : " << fDigitsBranch.Data() << endl ;
- cout << endl ;
+ message += " (+) %s to branch %s\n" ;
}
if(fClusterizer->IsActive()){
- cout << " (+) " <<fClusterizer->GetName() << " to branch : " <<fRecPointBranch.Data() << endl ;
- cout << endl ;
+ message += " (+) %s to branch %s\n" ;
}
if(fTSMaker->IsActive()){
- cout << " (+) " << fTSMaker->GetName() << " to branch : " << fTSBranch.Data() << endl ;
- cout << endl ;
+ message += " (+) %s to branch %s\n" ;
}
-
if(fPID->IsActive()){
- cout << " (+) " << fPID->GetName() << " to branch : " <<fRecPartBranch.Data() << endl ;
- cout << endl ;
+ message += " (+) %s to branch %s\n" ;
}
-
-
+ Info("Print", message.Data(),
+ fHeaderFileName.Data(),
+ fSDigitizer->GetName(), fSDigitsBranch.Data(),
+ fDigitizer->GetName(), fDigitsBranch.Data() ,
+ fClusterizer->GetName(), fRecPointBranch.Data(),
+ fTSMaker->GetName(), fTSBranch.Data() ,
+ fPID->GetName(), fRecPartBranch.Data() ) ;
}
#include "TGeometry.h"
// --- Standard library ---
-#include <iomanip.h>
// --- AliRoot header files ---
#include "AliRun.h"
AliPHOSGetter * gime = AliPHOSGetter::GetInstance(GetTitle(), GetName(),fToSplit) ;
if ( gime == 0 ) {
- cerr << "ERROR: AliPHOSSDigitizer::Init -> Could not obtain the Getter object !"
- << endl ;
+ Error("Init" ,"Could not obtain the Getter object !") ;
return ;
}
if(strstr(option,"tim")){
gBenchmark->Stop("PHOSSDigitizer");
- cout << "AliPHOSSDigitizer:" << endl ;
- cout << " took " << gBenchmark->GetCpuTime("PHOSSDigitizer") << " seconds for SDigitizing "
- << gBenchmark->GetCpuTime("PHOSSDigitizer")/nevents << " seconds per event " << endl ;
- cout << endl ;
+ Info("Exec"," took %f seconds for SDigitizing %f seconds per event",
+ gBenchmark->GetCpuTime("PHOSSDigitizer"), gBenchmark->GetCpuTime("PHOSSDigitizer")/nevents) ;
}
}
const char * sdigitsTitle = sdigitsBranch ->GetTitle() ;
const char * sdigitizerTitle = sdigitizerBranch ->GetTitle() ;
if ( stitle.CompareTo(sdigitsTitle)==0 || stitle.CompareTo(sdigitizerTitle)==0 ){
- cerr << "ERROR: AliPHOSSdigitizer::SetSDigitsBranch -> Cannot overwrite existing branch with title " << title << endl ;
+ Error("SetSDigitsBranch", "Cannot overwrite existing branch with title %s", title) ;
return ;
}
- cout << "AliPHOSSdigitizer::SetSDigitsBranch -> Changing SDigits file from " << GetName() << " to " << title << endl ;
+ Info("SetSDigitsBranch", "-> Changing SDigits file from %s to %s", GetName(), title) ;
SetName(title) ;
void AliPHOSSDigitizer::Print(Option_t* option)const
{
// Prints parameters of SDigitizer
- cout << "------------------- "<< GetName() << " -------------" << endl ;
- cout << " Writing SDigits to branch with title " << GetName() << endl ;
- cout << " with digitization parameters A = " << fA << endl ;
- cout << " B = " << fB << endl ;
- cout << " Threshold for Primary assignment= " << fPrimThreshold << endl ;
- cout << "---------------------------------------------------"<<endl ;
+ TString message ;
+ message = "\n------------------- %s -------------\n" ;
+ message += " Writing SDigits to branch with title %s\n" ;
+ message += " with digitization parameters A = %f\n" ;
+ message += " B = %f\n" ;
+ message += " Threshold for Primary assignment= %f\n" ;
+ message += "---------------------------------------------------\n" ;
+ Info("Print", message.Data(), GetName(), GetName(), fA, fB, fPrimThreshold ) ;
}
AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
TString sdname(GetName()) ;
sdname.Remove(sdname.Index(GetTitle())-1) ;
- const TClonesArray * sdigits = gime->SDigits(sdname.Data()) ;
+ const TClonesArray * sdigits = gime->SDigits(sdname.Data()) ;
- cout << "AliPHOSSDigitiser: event " << gAlice->GetEvNumber() << endl ;
- cout << " Number of entries in SDigits list " << sdigits->GetEntriesFast() << endl ;
- cout << endl ;
+ TString message ;
+ message = "\nAliPHOSSDigitiser: event " ;
+ message += gAlice->GetEvNumber();
+ message += "\n Number of entries in SDigits list " ;
+ message += sdigits->GetEntriesFast() ;
+
if(strstr(option,"all")||strstr(option,"EMC")){
//loop over digits
AliPHOSDigit * digit;
- cout << "EMC sdigits " << endl ;
- cout << "Digit Id Amplitude Index Nprim Primaries list " << endl;
+ message += "\nEMC sdigits\n" ;
+ message += "Digit Id Amplitude Index Nprim Primaries list\n" ;
Int_t maxEmc = gime->PHOSGeometry()->GetNModules()*gime->PHOSGeometry()->GetNCristalsInModule() ;
Int_t index ;
for (index = 0 ; (index < sdigits->GetEntriesFast()) &&
((dynamic_cast<AliPHOSDigit *> (sdigits->At(index)))->GetId() <= maxEmc) ; index++) {
digit = dynamic_cast<AliPHOSDigit *>( sdigits->At(index) ) ;
- if(digit->GetNprimary() == 0) continue;
- cout << setw(6) << digit->GetId() << " " << setw(10) << digit->GetAmp() << " "
- << setw(6) << digit->GetIndexInList() << " "
- << setw(5) << digit->GetNprimary() <<" ";
-
+ if(digit->GetNprimary() == 0)
+ continue;
+ message += digit->GetId() ;
+ message += digit->GetAmp() ;
+ message += digit->GetIndexInList() ;
+ message += digit->GetNprimary() ;
Int_t iprimary;
for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++)
- cout << setw(5) << digit->GetPrimary(iprimary+1) << " ";
- cout << endl;
+ message += digit->GetPrimary(iprimary+1) ;
}
- cout << endl;
}
if(strstr(option,"all")||strstr(option,"CPV")){
//loop over CPV digits
AliPHOSDigit * digit;
- cout << "CPV sdigits " << endl ;
- cout << "Digit Id Amplitude Index Nprim Primaries list " << endl;
+
+ message += "CPV sdigits\n" ;
+ message += "Digit Id Amplitude Index Nprim Primaries list\n" ;
Int_t maxEmc = gime->PHOSGeometry()->GetNModules()*gime->PHOSGeometry()->GetNCristalsInModule() ;
Int_t index ;
for (index = 0 ; index < sdigits->GetEntriesFast(); index++) {
digit = dynamic_cast<AliPHOSDigit *>( sdigits->At(index) ) ;
if(digit->GetId() > maxEmc){
- cout << setw(6) << digit->GetId() << " " << setw(10) << digit->GetAmp() << " "
- << setw(6) << digit->GetIndexInList() << " "
- << setw(5) << digit->GetNprimary() <<" ";
-
+ message += "\n" ;
+ message += digit->GetId() ;
+ message += " " ;
+ message += digit->GetAmp() ;
+ message += " " ;
+ message += digit->GetIndexInList() ;
+ message += " " ;
+ message += digit->GetNprimary() ;
+ message += " " ;
Int_t iprimary;
- for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++)
- cout << setw(5) << digit->GetPrimary(iprimary+1) << " ";
- cout << endl;
+ for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++) {
+ message += digit->GetPrimary(iprimary+1) ;
+ message += "," ;
+ }
}
}
}
-
+ Info("PrintSDigits", message.Data() ) ;
}
//____________________________________________________________________________
// Print all information on this track Segment
- cout << "--------AliPHOSTrackSegment-------- "<<endl ;
- cout << "Stored at position " << fIndexInList << endl ;
- cout << "Emc RecPoint # " << fEmcRecPoint << endl ;
+ Info("Print", "--------AliPHOSTrackSegment-------- ");
+ Info("Print", "Stored at position %d", fIndexInList) ;
+ Info("Print", "Emc RecPoint # %d", fEmcRecPoint) ;
if(fPpsdUpRecPoint >= 0)
- cout << "CPV RecPoint # " << fPpsdUpRecPoint << endl ;
+ Info("Print", "CPV RecPoint # %d", fPpsdUpRecPoint) ;
else
- cout << "No CPV RecPoint " << endl ;
+ Info("Print", "No CPV RecPoint ");
- cout << "------------------------------------ " << endl ;
+ Info("Print", "------------------------------------ ") ;
}
//____________________________________________________________________________
fSplitFile = 0 ;
}
-// //____________________________________________________________________________
-// void AliPHOSTrackSegmentMaker::SetSplitFile(const TString splitFileName) const
-// {
-// // Diverts the TrackSegments in a file separate from the Digits file
-
-
-// TDirectory * cwd = gDirectory ;
-// TFile * splitFile = gAlice->InitTreeFile("R",splitFileName.Data());
-// splitFile->cd() ;
-// gAlice->Write(0, TObject::kOverwrite);
-
-// TTree *treeE = gAlice->TreeE();
-// if (!treeE) {
-// cerr << "ERROR: AliPHOSTrackSegmentMaker::SetSplitFile -> No TreeE found "<<endl;
-// abort() ;
-// }
-
-// // copy TreeE
-// AliHeader *header = new AliHeader();
-// treeE->SetBranchAddress("Header", &header);
-// treeE->SetBranchStatus("*",1);
-// TTree *treeENew = treeE->CloneTree();
-// treeENew->Write(0, TObject::kOverwrite);
-
-// // copy AliceGeom
-// TGeometry *AliceGeom = static_cast<TGeometry*>(cwd->Get("AliceGeom"));
-// if (!AliceGeom) {
-// cerr << "ERROR: AliPHOSTrackSegmentMaker::SetSplitFile -> AliceGeom was not found in the input file "<<endl;
-// abort() ;
-// }
-// AliceGeom->Write(0, TObject::kOverwrite);
-
-// gAlice->MakeTree("R",splitFile);
-// cwd->cd() ;
-// cout << "INFO: AliPHOSTrackSegmentMaker::SetSPlitMode -> TrackSegments will be stored in " << splitFileName.Data() << endl ;
-// }
// --- ROOT system ---
#include "TTask.h"
-class TFile ;
+class TFile ;
// --- Standard library ---
-#include <iostream.h>
// --- AliRoot header files ---
virtual ~ AliPHOSTrackSegmentMaker() ;
- virtual void Exec(Option_t * option){cout << "Not Defined" << endl ; }
- // virtual char* GetRecPointsBranch ()const{cout << "Not Defined" << endl ; return 0 ; }
- // virtual char* GetTrackSegmentsBranch ()const{cout << "Not Defined" << endl ; return 0 ; }
- virtual const Int_t GetTrackSegmentsInRun() const {cout << "Not Defined" << endl ; return 0 ; }
+ virtual void Exec(Option_t * option){Warning("Exec", "Not Defined" ) ; }
+ // virtual char* GetRecPointsBranch ()const{Warning("GetRecPointsBranch", "Not Defined" ) ; return 0 ; }
+ // virtual char* GetTrackSegmentsBranch ()const{Warning(" GetTrackSegmentsBranch", "Not Defined" ) ; return 0 ; }
+ virtual const Int_t GetTrackSegmentsInRun() const {Warning("GetTrackSegmentsInRun", "Not Defined" ) ; return 0 ; }
- virtual void Print(Option_t * option)const {cout << "Not Defined" << endl ; }
+ virtual void Print(Option_t * option)const {Warning("Print", "Not Defined" ) ; }
// virtual void Set... // method to choose recPoints: along z only, along x ...???
- // virtual void SetChoosingAlgirithm(){cout << "Not Defined" << endl ; return 0 ; }
- // virtual void SetMaxEmcCpvDistance(Float_t r) {cout << "Not Defined" << endl ; return 0 ; }
- // virtual void SetRecPointsBranch(const char * title){cout << "Not Defined" << endl ; }
- // virtual void SetTrackSegmentsBranch(const char * title){cout << "Not Defined" << endl ; }
+ // virtual void SetChoosingAlgirithm(){Warning("SetChoosingAlgirithm", "Not Defined" ) ; return 0 ; }
+ // virtual void SetMaxEmcCpvDistance(Float_t r) {Warning("SetMaxEmcCpvDistance", "Not Defined" ) ; return 0 ; }
+ // virtual void SetRecPointsBranch(const char * title){Warning("SetRecPointsBranch", "Not Defined" ) ; }
+ // virtual void SetTrackSegmentsBranch(const char * title){Warning("SetTrackSegmentsBranch", "Not Defined" ) ; }
// virtual void SetSplitFile(const TString splitFileName = "PHOS.RecData.root") const ;
- virtual const char * Version() const {cout << "Not Defined" << endl ; return 0 ; }
- virtual void WriteTrackSegments(Int_t event){cout << "Not Defined" << endl ; }
+ virtual const char * Version() const {Warning("Version", "Not Defined" ) ; return 0 ; }
+ virtual void WriteTrackSegments(Int_t event){Warning("WriteTrackSegments", "Not Defined" ) ; }
protected:
// new TrackSegment.
// If there is no CPV/PPSD RecPoint we make TrackSegment
// consisting from EMC alone. There is no TrackSegments without EMC RecPoint.
-//
-// In principle this class should be called from AliPHOSReconstructioner, but
+//// In principle this class should be called from AliPHOSReconstructioner, but
// one can use it as well in standalone mode.
// Use case:
// root [0] AliPHOSTrackSegmentMakerv1 * t = new AliPHOSTrackSegmentMaker("galice.root", "tracksegmentsname", "recpointsname")
#include "TTree.h"
#include "TSystem.h"
#include "TBenchmark.h"
-// --- Standard library ---
-#include <iostream.h>
-#include <iomanip.h>
+// --- Standard library ---
// --- AliRoot header files ---
branchname.Remove(branchname.Index(Version())-1) ;
AliPHOSGetter * gime = AliPHOSGetter::GetInstance(GetTitle(),branchname.Data(), fToSplit ) ;
if ( gime == 0 ) {
- cerr << "ERROR: AliPHOSTrackSegmentMakerv1::Init -> Could not obtain the Getter object !" << endl ;
+ Error("Init", "Could not obtain the Getter object !") ;
return ;
}
// }
// if ( phostsfound || tracksegmentmakerfound ) {
-// cerr << "WARNING: AliPHOSTrackSegmentMakerv1::Exec -> TrackSegments and/or TrackSegmentMaker branch with name "
-// << branchname.Data() << " already exits" << endl ;
+// Warning("Exec", "TrackSegments and/or TrackSegmentMaker branch with name %s already exists", branchname.Data() ) ;
// return ;
// }
// }
if(strstr(option,"tim")){
gBenchmark->Stop("PHOSTSMaker");
- cout << "AliPHOSTSMaker:" << endl ;
- cout << " took " << gBenchmark->GetCpuTime("PHOSTSMaker") << " seconds for making TS "
- << gBenchmark->GetCpuTime("PHOSTSMaker")/nevents << " seconds per event " << endl ;
- cout << endl ;
+ Info("Exec", "took %f seconds for making TS %f seconds per event",
+ gBenchmark->GetCpuTime("PHOSTSMaker"), gBenchmark->GetCpuTime("PHOSTSMaker")/nevents) ;
}
}
{
// Print TrackSegmentMaker parameters
+ TString message("") ;
if( strcmp(GetName(), "") != 0 ) {
- cout << "======== AliPHOSTrackSegmentMakerv1 ========" << endl ;
- cout << "Making Track segments "<< endl ;
- // cout << " Headers file: " << fHeaderFileName.Data() << endl ;
- // cout << " RecPoints branch file name: " << fRecPointsBranchTitle.Data() << endl ;
- // cout << " TrackSegments Branch file name: " << fTrackSegmentsBranchTitle.Data() << endl ;
- cout << "with parameters: " << endl ;
- cout << " Maximal EMC - CPV (PPSD) distance (cm)" << fRcpv << endl ;
- cout << "============================================" << endl ;
+ message = "\n======== AliPHOSTrackSegmentMakerv1 ========\n" ;
+ message += "Making Track segments\n" ;
+ message += "with parameters:\n" ;
+ message += " Maximal EMC - CPV (PPSD) distance (cm) %f\n" ;
+ message += "============================================\n" ;
+ Info("Print", message.Data(),fRcpv) ;
}
else
- cout << "AliPHOSTrackSegmentMakerv1 not initialized " << endl ;
+ Info("Print", "AliPHOSTrackSegmentMakerv1 not initialized ") ;
}
//____________________________________________________________________________
TClonesArray * trackSegments = AliPHOSGetter::GetInstance()->TrackSegments(taskName) ;
-
- cout << "AliPHOSTrackSegmentMakerv1: event "<<gAlice->GetEvNumber() << endl ;
- cout << " Found " << trackSegments->GetEntriesFast() << " trackSegments " << endl ;
-
+ TString message ;
+ message = "AliPHOSTrackSegmentMakerv1: event %d\n" ;
+ message += " Found %d TrackSegments\n" ;
+
if(strstr(option,"all")) { // printing found TS
- cout << "TrackSegment # " << " EMC RP# " << " CPV RP# " << endl ;
-
+ message += "TrackSegment # EMC RP# CPV RP# \n" ;
+ Info("PrintTrackSegments", message.Data(),
+ gAlice->GetEvNumber(),
+ trackSegments->GetEntriesFast() ) ;
Int_t index;
for (index = 0 ; index <trackSegments->GetEntriesFast() ; index++) {
AliPHOSTrackSegment * ts = (AliPHOSTrackSegment * )trackSegments->At(index) ;
- cout<<" "<< setw(4) << ts->GetIndexInList() << " "
- <<setw(4) << ts->GetEmcIndex()<< " "
- <<setw(4) << ts->GetCpvIndex()<< " " << endl ;
+ message = " %d %d %d\n" ;
+ Info("PrintTrackSegments", message.Data(), ts->GetIndexInList(), ts->GetEmcIndex(), ts->GetCpvIndex() ) ;
}
-
- cout << "-------------------------------------------------------"<< endl ;
}
}
#include <string.h>
#include <stdlib.h>
-#include <strstream.h>
// --- AliRoot header files ---
Int_t i;
if(fDebug) {
- cout << endl ;
+ TString st ;
for(i=0;i<35;i++)
- cout <<"*";
- cout << "INFO: " << ClassName() << "::Init ";
- for(i=0;i<35;i++)
- cout << "*";
- cout << endl;
-
+ st += "*";
+ Info("Init", "%s", st.Data()) ;
// Here the PHOS initialisation code (if any!)
AliPHOSGeometry * geom = GetGeometry() ;
if (geom!=0)
- cout << "AliPHOS" << Version() << " : PHOS geometry intialized for " << geom->GetName() << endl ;
+ Info("Init", "AliPHOS%s: PHOS geometry intialized for %s", Version().Data(), geom->GetName()) ;
else
- cout << "AliPHOS" << Version() << " : PHOS geometry initialization failed !" << endl ;
- for(i=0;i<80;i++)
- cout << "*" ;
- cout << endl;
-
+ Info("Init", "AliPHOS%s: PHOS geometry initialization failed !", Version().Data()) ;
+
+ Info("Init", "%s", st.Data()) ;
}
}
xyzte[4] = fAPDFactor * lightYield ;
// add current hit to the hit list
- //cout << "AliPHOSv1::StepManager " << primary << " " << tracknumber << endl ;
+ // Info("StepManager","%d %d", primary, tracknumber) ;
AddHit(fIshunt, primary,tracknumber, absid, xyzte);
// fill the relevant QA Checkables
Float_t pNorm = p.Py();
Float_t eloss = kdEdx;
-// cout << "CPVDigitize: YVK : "<<hitX<<" "<<hitZ<<" | "<<pX<<" "<<pZ<<" "<<pNorm<<endl;
+//Info("CPVDigitize", "YVK : %f %f | %f %f %d", hitX, hitZ, pX, pZ, pNorm) ;
Float_t dZY = pZ/pNorm * GetGeometry()->GetCPVGasThickness();
Float_t dXY = pX/pNorm * GetGeometry()->GetCPVGasThickness();
// Accumulates hits as long as the track stays in a single crystal or PPSD gas Cell
// if (gMC->IsTrackEntering())
-// cout << "Track enters the volume " << gMC->CurrentVolName() << endl;
+// Info("StepManager", "Track enters the volume %d", gMC->CurrentVolName()) ;
// if (gMC->IsTrackExiting())
-// cout << "Track leaves the volume " << gMC->CurrentVolName() << endl;
+// Info("StepManager", "Track leaves the volume %d", gMC->CurrentVolName()) ;
Int_t relid[4] ; // (box, layer, row, column) indices
Int_t absid ; // absolute cell ID number
xyze[3] = (fRecalibrationFactor/100.) * fAPDGain * fLightYield ;
- // cout<<"xyze[3]: "<<xyze[3]<< endl;
- //cout<<"lostenergy: "<<lostenergy<<endl;
+ // Info("StepManager", "xyze[3]: %f", xyze[3]) ;
+ // Info("StepManager", "lostenergy: %f", lostenergy) ;
// if(gMC->CurrentVolID(copy) == gMC->VolId("PPIN"))//We are inside the PIN diode
// {
-// cout<<" Inside PIN "<<endl;
+// Info("StepManager", "Inside PIN";
// gMC->TrackPosition(pos) ;
// global[0] = pos[0] ;
// global[1] = pos[1] ;
else
test = rp.GetPdgCode() ;
- cout << " SHOULD NOT BE USED until values of probabilities are properly set " << endl ;
- assert(1==0) ; // NB: ALL VALUES SHOLD BE CHECKED !!!!
+ Info("MakeType", "SHOULD NOT BE USED until values of probabilities are properly set ") ;
+ assert(1==0) ; // NB: ALL VALUES SHOULD BE CHECKED !!!!
switch (test) {
case 22: // it's a photon // NB: ALL VALUES SHOLD BE CHECKED !!!!
AliPHOSTrackSegmentMakerv1 * tracksegmentmaker = new AliPHOSTrackSegmentMakerv1() ;
//========== Creates the particle identifier
AliPHOSPIDv1 * particleidentifier = new AliPHOSPIDv1 ;
- cout << "AnalyzeOneEvent > using particle identifier " << particleidentifier->GetName() << endl ;
+ Info("PHOSHistos", "AnalyzeOneEvent > using particle identifier %s\n", particleidentifier->GetName() ) ;
TH1F * hEmcDigit = new TH1F("hEmcDigit","hEmcDigit",1000,0.,5.);
TH1F * hVetoDigit = new TH1F("hVetoDigit","hVetoDigit",1000,0.,3.e-5);
//========== Creates the Reconstructioner
AliPHOSReconstructioner * Reconstructioner = new AliPHOSReconstructioner(clusterizer, tracksegmentmaker, particleidentifier) ;
- cout << "Event " << ievent <<endl;
+ Info("PHOSHistos", "Event %d\n", ievent);
Int_t RelId[4] ;
//=========== Connects the various Tree's for evt