ClassImp(AliMUONCheck)
/// \endcond
+const TString AliMUONCheck::fgkDefaultOutFileName = "output.txt"; //!< default output file name
+
AliMUONCheck::AliMUONCheck(const char* galiceFile, const char* esdFile,Int_t firstEvent, Int_t lastEvent,const char* outDir)
: TObject(),
fFileName(galiceFile),
fFileNameSim(),
fesdFileName(esdFile),
fkOutDir(outDir),
+fOutFileName(fgkDefaultOutFileName),
fFirstEvent(firstEvent),
fLastEvent(lastEvent)
{
fFileNameSim(galiceFileSim),
fesdFileName(esdFile),
fkOutDir(outDir),
+fOutFileName(fgkDefaultOutFileName),
fFirstEvent(firstEvent),
fLastEvent(lastEvent)
{
if (!tree)
{
Error("CheckESD", "no ESD tree found");
- AliError(Form("CheckESD", "no ESD tree found"));
+ AliError(Form("no ESD tree found"));
return ;
}
fESD->ReadFromTree(tree);
for (ievent = fFirstEvent; ievent < endOfLoop; ++ievent )
{
nev++;
- tree->GetEvent(ievent);
- if (!fESD)
+ if (tree->GetEvent(ievent) <= 0)
{
Error("CheckESD", "no ESD object found for event %d", ievent);
return ;
gSystem->cd(fkOutDir);
- FILE *outtxt=fopen("output.txt","a");
- freopen("output.txt","a",outtxt);
+ FILE *outtxt=fopen(fOutFileName.Data(),"a");
if(pdc06TriggerResponse){
fprintf(outtxt," \n");
printf("**************************************************************** \n");
gSystem->cd(fkOutDir);
- FILE *outtxt=fopen("output.txt","a");
- freopen("output.txt","a",outtxt);
+ FILE *outtxt=fopen(fOutFileName.Data(),"a");
fprintf(outtxt," \n");
fprintf(outtxt,"=================================================================\n");
fprintf(outtxt,"================ MUONkine SUMMARY ================\n");
// Output values
- for ( Int_t ichamber = 0; ichamber < 14; ++ichamber )
+ for ( Int_t ichamber = 0; ichamber < nchambers; ++ichamber )
{
printf(">>> Chamber %2d nChannels Bending %5d nChannels NonBending %5d \n",
ichamber+1,