#include <TMap.h>
#include <TChain.h>
#include <TProof.h>
+#include <TParameter.h>
#include "AliReconstruction.h"
#include "AliCodeTimer.h"
fChain(NULL)
{
// create reconstruction object with default parameters
+ gGeoManager = NULL;
for (Int_t iDet = 0; iDet < fgkNDetectors; iDet++) {
fReconstructor[iDet] = NULL;
// activate a default CDB storage
// First check if we have any CDB storage set, because it is used
// to retrieve the calibration and alignment constants
+ AliCodeTimerAuto("");
if (fInitCDBCalled) return;
fInitCDBCalled = kTRUE;
AliDebug(2, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
man->SetSpecificStorage(obj->GetName(), obj->GetTitle());
}
-
+ AliSysInfo::AddStamp("InitCDB");
}
//_____________________________________________________________________________
if (fRawReader && (chain = fRawReader->GetChain())) {
// Proof mode
if (gProof) {
- gProof->AddInput(gGeoManager);
- gGeoManager = NULL;
- gProof->AddInput(const_cast<TMap*>(AliCDBManager::Instance()->GetEntryCache()));
- gProof->SetParameter("RunNumber",AliCDBManager::Instance()->GetRun());
- gProof->AddInput((AliMagF*)AliTracker::GetFieldMap());
gProof->AddInput(this);
chain->SetProof();
chain->Process("AliReconstruction");
AliCodeTimerAuto("");
AliSysInfo::AddStamp("Start");
+ // Initialize raw-reader if any
InitRawReader(input);
- AliSysInfo::AddStamp("CreateRawReader");
// Initialize the CDB storage
InitCDB();
- AliSysInfo::AddStamp("InitCDB");
// Set run number in CDBManager (if it is not already set by the user)
if (!SetRunNumberFromData()) {
Abort("SetRunNumberFromData", TSelector::kAbortProcess);
return;
}
-
+
// Set CDB lock: from now on it is forbidden to reset the run number
// or the default storage or to activate any further storage!
SetCDBLock();
+}
+
+//_____________________________________________________________________________
+void AliReconstruction::Begin(TTree *)
+{
+ // Initialize AlReconstruction before
+ // going into the event loop
+ // Should follow the TSelector convention
+ // i.e. initialize only the object on the client side
+ if (fInput) {
+ if (AliReconstruction *reco = (AliReconstruction*)fInput->FindObject("AliReconstruction")) {
+ *this = *reco;
+ fInput->Remove(reco);
+ }
+ AliSysInfo::AddStamp("ReadInputInBegin");
+ }
+
// Import ideal TGeo geometry and apply misalignment
if (!gGeoManager) {
TString geom(gSystem->DirName(fGAliceFileName));
// Read the reconstruction parameters from OCDB
if (!InitRecoParams()) {
- Abort("InitRecoParams", TSelector::kAbortProcess);
- return;
+ AliWarning("Not all detectors have correct RecoParam objects initialized");
}
AliSysInfo::AddStamp("InitRecoParams");
-}
-
-//_____________________________________________________________________________
-void AliReconstruction::Begin(TTree *)
-{
- // Initialize AlReconstruction before
- // going into the event loop
- // Should follow the TSelector convention
- // i.e. initialize only the object on the client side
+ if (fInput) {
+ fInput->Add(gGeoManager);
+ gGeoManager = NULL;
+ fInput->Add(const_cast<TMap*>(AliCDBManager::Instance()->GetEntryCache()));
+ fInput->Add(new TParameter<Int_t>("RunNumber",AliCDBManager::Instance()->GetRun()));
+ fInput->Add((AliMagF*)AliTracker::GetFieldMap());
+ fInput->Add(this);
+ }
}
if (AliReconstruction *reco = (AliReconstruction*)fInput->FindObject("AliReconstruction")) {
*this = *reco;
}
- AliSysInfo::AddStamp("ReadSelectorInput");
+ AliSysInfo::AddStamp("ReadInputInSlaveBegin");
}
// get the run loader