#include <TSystem.h>
#include <TROOT.h>
#include <TPluginManager.h>
-#include <TStopwatch.h>
#include <TGeoManager.h>
#include <TLorentzVector.h>
#include "AliReconstruction.h"
+#include "AliCodeTimer.h"
#include "AliReconstructor.h"
#include "AliLog.h"
#include "AliRunLoader.h"
CleanUp();
fOptions.Delete();
fSpecCDBUri.Delete();
+
+ AliCodeTimer::Instance()->Print();
}
//_____________________________________________________________________________
{
// run the reconstruction
+ AliCodeTimerAuto("")
+
// set the input
if (!input) input = fInput.Data();
TString fileName(input);
}
}
-
- TStopwatch stopwatch;
- stopwatch.Start();
-
// get the possibly already existing ESD file and tree
AliESD* esd = new AliESD(); AliESD* hltesd = new AliESD();
TFile* fileOld = NULL;
}
- AliInfo(Form("Execution time for filling ESD : R:%.2fs C:%.2fs",
- stopwatch.RealTime(),stopwatch.CpuTime()));
-
file->cd();
if (fWriteESDfriend)
tree->SetBranchStatus("ESDfriend*",0);
{
// run the local reconstruction
- TStopwatch stopwatch;
- stopwatch.Start();
+ AliCodeTimerAuto("")
AliCDBManager* man = AliCDBManager::Instance();
Bool_t origCache = man->GetCacheFlag();
if (!reconstructor) continue;
if (reconstructor->HasLocalReconstruction()) continue;
+ AliCodeTimerStart(Form("running reconstruction for %s", fgkDetectorName[iDet]));
AliInfo(Form("running reconstruction for %s", fgkDetectorName[iDet]));
- TStopwatch stopwatchDet;
- stopwatchDet.Start();
-
+
+ AliCodeTimerStart(Form("Loading calibration data from OCDB for %s", fgkDetectorName[iDet]));
AliInfo(Form("Loading calibration data from OCDB for %s", fgkDetectorName[iDet]));
man->SetCacheFlag(kTRUE);
TString calibPath = Form("%s/Calib/*", fgkDetectorName[iDet]);
man->GetAll(calibPath); // entries are cached!
+ AliCodeTimerStop(Form("Loading calibration data from OCDB for %s", fgkDetectorName[iDet]));
+
if (fRawReader) {
fRawReader->RewindEvents();
reconstructor->Reconstruct(fRunLoader, fRawReader);
} else {
reconstructor->Reconstruct(fRunLoader);
}
- AliInfo(Form("Execution time for %s: R:%.2fs C:%.2fs",
- fgkDetectorName[iDet],
- stopwatchDet.RealTime(),stopwatchDet.CpuTime()));
+
+ AliCodeTimerStop(Form("running reconstruction for %s", fgkDetectorName[iDet]));
// unload calibration data
man->UnloadFromCache(calibPath);
if (fStopOnError) return kFALSE;
}
- AliInfo(Form("Execution time: R:%.2fs C:%.2fs",
- stopwatch.RealTime(),stopwatch.CpuTime()));
-
return kTRUE;
}
{
// run the local reconstruction
- TStopwatch stopwatch;
- stopwatch.Start();
+ AliCodeTimerAuto("")
TString detStr = detectors;
for (Int_t iDet = 0; iDet < fgkNDetectors; iDet++) {
if (fRawReader && reconstructor->HasDigitConversion()) {
AliInfo(Form("converting raw data digits into root objects for %s",
fgkDetectorName[iDet]));
- TStopwatch stopwatchDet;
- stopwatchDet.Start();
+ AliCodeTimerAuto(Form("converting raw data digits into root objects for %s",
+ fgkDetectorName[iDet]));
loader->LoadDigits("update");
loader->CleanDigits();
loader->MakeDigitsContainer();
reconstructor->ConvertDigits(fRawReader, digitsTree);
loader->WriteDigits("OVERWRITE");
loader->UnloadDigits();
- AliInfo(Form("Execution time for %s: R:%.2fs C:%.2fs",
- fgkDetectorName[iDet],
- stopwatchDet.RealTime(),stopwatchDet.CpuTime()));
}
// local reconstruction
if (!reconstructor->HasLocalReconstruction()) continue;
AliInfo(Form("running reconstruction for %s", fgkDetectorName[iDet]));
- TStopwatch stopwatchDet;
- stopwatchDet.Start();
+ AliCodeTimerAuto(Form("running reconstruction for %s", fgkDetectorName[iDet]));
loader->LoadRecPoints("update");
loader->CleanRecPoints();
loader->MakeRecPointsContainer();
}
loader->WriteRecPoints("OVERWRITE");
loader->UnloadRecPoints();
- AliInfo(Form("Execution time for %s: R:%.2fs C:%.2fs",
- fgkDetectorName[iDet],
- stopwatchDet.RealTime(),stopwatchDet.CpuTime()));
}
if ((detStr.CompareTo("ALL") != 0) && !detStr.IsNull()) {
if (fStopOnError) return kFALSE;
}
- AliInfo(Form("Execution time: R:%.2fs C:%.2fs",
- stopwatch.RealTime(),stopwatch.CpuTime()));
-
return kTRUE;
}
{
// run the barrel tracking
- TStopwatch stopwatch;
- stopwatch.Start();
+ AliCodeTimerAuto("")
AliESDVertex* vertex = NULL;
Double_t vtxPos[3] = {0, 0, 0};
}
delete vertex;
- AliInfo(Form("Execution time: R:%.2fs C:%.2fs",
- stopwatch.RealTime(),stopwatch.CpuTime()));
-
return kTRUE;
}
{
// run the HLT barrel tracking
- TStopwatch stopwatch;
- stopwatch.Start();
+ AliCodeTimerAuto("")
if (!fRunLoader) {
AliError("Missing runLoader!");
delete tracker;
}
- AliInfo(Form("Execution time: R:%.2fs C:%.2fs",
- stopwatch.RealTime(),stopwatch.CpuTime()));
-
return kTRUE;
}
{
// run the muon spectrometer tracking
- TStopwatch stopwatch;
- stopwatch.Start();
+ AliCodeTimerAuto("")
if (!fRunLoader) {
AliError("Missing runLoader!");
delete tracker;
- AliInfo(Form("Execution time: R:%.2fs C:%.2fs",
- stopwatch.RealTime(),stopwatch.CpuTime()));
-
return kTRUE;
}
{
// run the barrel tracking
- TStopwatch stopwatch;
- stopwatch.Start();
+ AliCodeTimerAuto("")
AliInfo("running tracking");
track->RelateToVertex(esd->GetVertex(),fieldZ, kMaxD);
}
- AliInfo(Form("Execution time: R:%.2fs C:%.2fs",
- stopwatch.RealTime(),stopwatch.CpuTime()));
-
return kTRUE;
}
{
// fill the event summary data
- TStopwatch stopwatch;
- stopwatch.Start();
- AliInfo("filling ESD");
+ AliCodeTimerAuto("")
TString detStr = detectors;
for (Int_t iDet = 0; iDet < fgkNDetectors; iDet++) {
if (fStopOnError) return kFALSE;
}
- AliInfo(Form("Execution time: R:%.2fs C:%.2fs",
- stopwatch.RealTime(),stopwatch.CpuTime()));
-
return kTRUE;
}
// stored in Trigger.root file and fills
// the corresponding esd entries
+ AliCodeTimerAuto("")
+
AliInfo("Filling trigger information into the ESD");
if (fRawReader) {