#include "AliV0vertexer.h"
#include "AliVertexer.h"
#include "AliVertexerTracks.h"
+#include "AliTriggerRunScalers.h"
+#include "AliCTPTimeParams.h"
ClassImp(AliReconstruction)
fRunInfo(NULL),
fEventInfo(),
fRunScalers(NULL),
+ fCTPTimeParams(NULL),
fRunLoader(NULL),
fRawReader(NULL),
fRunInfo(NULL),
fEventInfo(),
fRunScalers(NULL),
+ fCTPTimeParams(NULL),
fRunLoader(NULL),
fRawReader(NULL),
delete fRunScalers; fRunScalers = NULL;
if (rec.fRunScalers) fRunScalers = new AliTriggerRunScalers(*rec.fRunScalers);
-
+ delete fCTPTimeParams; fCTPTimeParams = NULL;
+ if (rec.fCTPTimeParams) fCTPTimeParams = new AliCTPTimeParams(*rec.fCTPTimeParams);
+
fRunLoader = NULL;
fRawReader = NULL;
fParentRawReader = NULL;
}
delete fGRPData;
delete fRunScalers;
+ delete fCTPTimeParams;
fOptions.Delete();
if (fAlignObjArray) {
fAlignObjArray->Delete();
void AliReconstruction::InitQA()
{
//Initialize the QA and start of cycle
- AliCodeTimerAuto("");
+ AliCodeTimerAuto("",0);
if (fInitQACalled) return;
fInitQACalled = kTRUE;
qam->SetCycleLength(AliQAv1::DETECTORINDEX_t(det), fQACycles[det]) ;
qam->SetWriteExpert(AliQAv1::DETECTORINDEX_t(det)) ;
}
- if (!fRawReader && !fInput && fQATasks.Contains(AliQAv1::kRAWS))
+ if (!fRawReader && !fInput && IsInTasks(AliQAv1::kRAWS))
fQATasks.ReplaceAll(Form("%d",AliQAv1::kRAWS), "") ;
qam->SetTasks(fQATasks) ;
qam->InitQADataMaker(AliCDBManager::Instance()->GetRun()) ;
Bool_t sameCycle = kFALSE ;
AliQADataMaker *qadm = qam->GetQADataMaker(AliQAv1::kGLOBAL);
AliInfo(Form("Initializing the global QA data maker"));
- if (fQATasks.Contains(Form("%d", AliQAv1::kRECPOINTS))) {
+ if (IsInTasks(AliQAv1::kRECPOINTS)) {
qadm->StartOfCycle(AliQAv1::kRECPOINTS, AliCDBManager::Instance()->GetRun(), sameCycle) ;
TObjArray **arr=qadm->Init(AliQAv1::kRECPOINTS);
AliTracker::SetResidualsArray(arr);
sameCycle = kTRUE ;
}
- if (fQATasks.Contains(Form("%d", AliQAv1::kESDS))) {
+ if (IsInTasks(AliQAv1::kESDS)) {
qadm->StartOfCycle(AliQAv1::kESDS, AliCDBManager::Instance()->GetRun(), sameCycle) ;
qadm->Init(AliQAv1::kESDS);
}
void AliReconstruction::MergeQA(const char *fileName)
{
//Initialize the QA and start of cycle
- AliCodeTimerAuto("") ;
+ AliCodeTimerAuto("",0) ;
AliQAManager::QAManager()->Merge(AliCDBManager::Instance()->GetRun(),fileName) ;
AliSysInfo::AddStamp("MergeQA") ;
}
// 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("");
+ AliCodeTimerAuto("",0);
if (fInitCDBCalled) return;
fInitCDBCalled = kTRUE;
fFillESD.Data(),
fQADetectors.Data());
fLoadCDB = MatchDetectorList(fLoadCDB,detMask);
- if (!((detMask >> AliDAQ::DetectorID("ITSSPD")) & 0x1)) {
+ if (!((detMask >> AliDAQ::DetectorID("ITSSPD")) & 0x1) &&
+ !((detMask >> AliDAQ::DetectorID("ITSSDD")) & 0x1) &&
+ !((detMask >> AliDAQ::DetectorID("ITSSSD")) & 0x1) ) {
// switch off the vertexer
- AliInfo("SPD is not in the list of active detectors. Vertexer switched off.");
+ AliInfo("SPD,SDD,SSD is not in the list of active detectors. Vertexer switched off.");
fRunVertexFinder = kFALSE;
}
if (!((detMask >> AliDAQ::DetectorID("TRG")) & 0x1)) {
//_____________________________________________________________________________
Bool_t AliReconstruction::LoadCDB()
{
- AliCodeTimerAuto("");
+ AliCodeTimerAuto("",0);
AliCDBManager::Instance()->Get("GRP/CTP/Config");
//_____________________________________________________________________________
Bool_t AliReconstruction::LoadTriggerScalersCDB()
{
- AliCodeTimerAuto("");
+ AliCodeTimerAuto("",0);
AliCDBEntry* entry = AliCDBManager::Instance()->Get("GRP/CTP/Scalers");
return kTRUE;
}
//_____________________________________________________________________________
+Bool_t AliReconstruction::LoadCTPTimeParamsCDB()
+{
+ AliCDBEntry* entry = AliCDBManager::Instance()->Get("GRP/CTP/CTPtiming");
+
+ if (entry) {
+
+ AliInfo("Found an AliCTPTimeParams in GRP/CTP/CTPtiming, reading it");
+ fCTPTimeParams = dynamic_cast<AliCTPTimeParams*> (entry->GetObject());
+ entry->SetOwner(0);
+ return kTRUE;
+ }
+
+ return kFALSE;
+}
+//_____________________________________________________________________________
Bool_t AliReconstruction::Run(const char* input)
{
// Run Run Run
- AliCodeTimerAuto("");
+ AliCodeTimerAuto("",0);
InitRun(input);
if (GetAbort() != TSelector::kContinue) return kFALSE;
Long64_t nEntries = (fLastEvent < 0) ? (TChain::kBigNumber) : (fLastEvent - fFirstEvent + 1);
// Proof mode
if (gProof) {
+ // Temporary fix for long raw-data runs (until socket timeout handling in PROOF is revised)
+ gProof->Exec("gEnv->SetValue(\"Proof.SocketActivityTimeout\",-1)", kTRUE);
if (gGrid)
gProof->Exec("TGrid::Connect(\"alien://\")",kTRUE);
//_____________________________________________________________________________
void AliReconstruction::InitRawReader(const char* input)
{
- AliCodeTimerAuto("");
+ AliCodeTimerAuto("",0);
// Init raw-reader and
// set the input in case of raw data
{
// Initialization of raw-reader,
// run number, CDB etc.
- AliCodeTimerAuto("");
+ AliCodeTimerAuto("",0);
AliSysInfo::AddStamp("Start");
// Initialize raw-reader if any
// going into the event loop
// Should follow the TSelector convention
// i.e. initialize only the object on the client side
- AliCodeTimerAuto("");
+ AliCodeTimerAuto("",0);
AliReconstruction *reco = NULL;
if (fInput) {
}
AliSysInfo::AddStamp("LoadTriggerScalersCDB");
+ if (!LoadCTPTimeParamsCDB()) {
+ Abort("LoadCTPTimeParamsCDB", TSelector::kAbortProcess);
+ return;
+ }
+ AliSysInfo::AddStamp("LoadCTPTimeParamsCDB");
// Read the reconstruction parameters from OCDB
if (!InitRecoParams()) {
// Initialization related to run-loader,
// vertexer, trackers, recontructors
// In proof mode it is executed on the slave
- AliCodeTimerAuto("");
+ AliCodeTimerAuto("",0);
TProofOutputFile *outProofFile = NULL;
if (fInput) {
if (AliDebugLevel() > 0) fInput->Print();
+ if (AliDebugLevel() > 10) fInput->Dump();
if (AliReconstruction *reco = (AliReconstruction*)fInput->FindObject("AliReconstruction")) {
*this = *reco;
}
}
}
if (AliMagF *map = (AliMagF*)fInput->FindObject("MagneticFieldMap")) {
- TGeoGlobalMagField::Instance()->SetField(map);
+ AliMagF *newMap = new AliMagF(*map);
+ if (!newMap->LoadParameterization()) {
+ Abort("AliMagF::LoadParameterization", TSelector::kAbortProcess);
+ return;
+ }
+ TGeoGlobalMagField::Instance()->SetField(newMap);
+ TGeoGlobalMagField::Instance()->Lock();
}
if (TNamed *outputFileName = (TNamed*)fInput->FindObject("PROOF_OUTPUTFILE"))
fProofOutputFileName = outputFileName->GetTitle();
{
// run the reconstruction over a single entry
// from the chain with raw data
- AliCodeTimerAuto("");
+ AliCodeTimerAuto("",0);
TTree *currTree = fChain->GetTree();
AliRawVEvent *event = NULL;
// run the reconstruction over a single event
// The event loop is steered in Run method
- AliCodeTimerAuto("");
+ AliCodeTimerAuto("",0);
if (iEvent >= fRunLoader->GetNumberOfEvents()) {
fRunLoader->SetEventNumber(iEvent);
}
// QA on single raw
- if (fRunQA) {
+ if (fRunQA && IsInTasks(AliQAv1::kRAWS)) {
AliQAManager::QAManager()->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
AliQAManager::QAManager()->RunOneEvent(fRawReader) ;
}
// write ESD
if (fCleanESD) CleanESD(fesd);
- if (fRunQA) {
+ if (fRunQA && IsInTasks(AliQAv1::kESDS)) {
AliQAManager::QAManager()->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
AliQAManager::QAManager()->RunOneEvent(fesd) ;
}
if (fRunGlobalQA) {
AliQADataMaker *qadm = AliQAManager::QAManager()->GetQADataMaker(AliQAv1::kGLOBAL);
qadm->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
- if (qadm && fQATasks.Contains(Form("%d", AliQAv1::kESDS)))
+ if (qadm && IsInTasks(AliQAv1::kESDS))
qadm->Exec(AliQAv1::kESDS, fesd);
}
// Finalize the run on the slave side
// Called after the exit
// from the event loop
- AliCodeTimerAuto("");
+ AliCodeTimerAuto("",0);
if (fIsNewRunLoader) { // galice.root didn't exist
fRunLoader->WriteHeader("OVERWRITE");
if (fRunGlobalQA) {
AliQADataMaker *qadm = AliQAManager::QAManager()->GetQADataMaker(AliQAv1::kGLOBAL);
if (qadm) {
- if (fQATasks.Contains(Form("%d", AliQAv1::kRECPOINTS)))
+ if (IsInTasks(AliQAv1::kRECPOINTS))
qadm->EndOfCycle(AliQAv1::kRECPOINTS);
- if (fQATasks.Contains(Form("%d", AliQAv1::kESDS)))
+ if (IsInTasks(AliQAv1::kESDS))
qadm->EndOfCycle(AliQAv1::kESDS);
qadm->Finish();
}
fOutput->Add(zipProofFile);
TString fileList(fProofOutputArchive.Data());
fileList.ReplaceAll(","," ");
- AliInfo(Form("Executing: zip -n root %s %s",zipProofFile->GetFileName(),fileList.Data()));
- gSystem->Exec(Form("zip -n root %s %s",zipProofFile->GetFileName(),fileList.Data()));
+ TString command;
+#if ROOT_SVN_REVISION >= 30174
+ command.Form("zip -n root %s/%s %s",zipProofFile->GetDir(kTRUE),zipProofFile->GetFileName(),fileList.Data());
+#else
+ command.Form("zip -n root %s/%s %s",zipProofFile->GetDir(),zipProofFile->GetFileName(),fileList.Data());
+#endif
+ AliInfo(Form("Executing: %s",command.Data()));
+ gSystem->Exec(command.Data());
}
}
}
{
// Create tags for the events in the ESD tree (the ESD tree is always present)
// In case of empty events the tags will contain dummy values
- AliCodeTimerAuto("");
+ AliCodeTimerAuto("",0);
// Do not call the ESD tag creator in case of PROOF-based reconstruction
if (!fInput) {
// run the local reconstruction
static Int_t eventNr=0;
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
TString detStr = detectors;
for (Int_t iDet = 0; iDet < kNDetectors; iDet++) {
AliInfo(Form("converting raw data digits into root objects for %s",
fgkDetectorName[iDet]));
// AliCodeTimerAuto(Form("converting raw data digits into root objects for %s",
-// fgkDetectorName[iDet]));
+// fgkDetectorName[iDet]),0);
loader->LoadDigits("update");
loader->CleanDigits();
loader->MakeDigitsContainer();
}
// local reconstruction
AliInfo(Form("running reconstruction for %s", fgkDetectorName[iDet]));
- //AliCodeTimerAuto(Form("running reconstruction for %s", fgkDetectorName[iDet]));
+ //AliCodeTimerAuto(Form("running reconstruction for %s", fgkDetectorName[iDet]),0);
loader->LoadRecPoints("update");
loader->CleanRecPoints();
loader->MakeRecPointsContainer();
if (fStopOnError) return kFALSE;
} else {
reconstructor->Reconstruct(digitsTree, clustersTree);
- if (fRunQA) {
+ if (fRunQA && IsInTasks(AliQAv1::kDIGITSR)) {
AliQAManager::QAManager()->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
AliQAManager::QAManager()->RunOneEventInOneDetector(iDet, digitsTree) ;
}
}
loader->UnloadDigits();
}
- if (fRunQA) {
+ if (fRunQA && IsInTasks(AliQAv1::kRECPOINTS)) {
AliQAManager::QAManager()->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
AliQAManager::QAManager()->RunOneEventInOneDetector(iDet, clustersTree) ;
}
{
// run the SPD trackleting (for SPD efficiency purpouses)
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
Double_t vtxPos[3] = {0, 0, 0};
Double_t vtxErr[3] = {0.0, 0.0, 0.0};
{
// run the barrel tracking
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
AliVertexer *vertexer = CreateVertexer();
if (!vertexer) return kFALSE;
{
// run the HLT barrel tracking
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
if (!fRunLoader) {
AliError("Missing runLoader!");
{
// run the muon spectrometer tracking
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
if (!fRunLoader) {
AliError("Missing runLoader!");
{
// run the barrel tracking
static Int_t eventNr=0;
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
AliInfo("running tracking");
{
// fill the event summary data
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
static Int_t eventNr=0;
TString detStr = detectors;
// stored in Trigger.root file and fills
// the corresponding esd entries
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
AliInfo("Filling trigger information into the ESD");
AliQAManager::QAManager()->ShowQA() ;
AliQAManager::Destroy() ;
- TGeoGlobalMagField::Instance()->SetField(NULL);
}
void AliReconstruction::WriteAlignmentData(AliESDEvent* esd)
{
// Fill the event info object
// ...
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
AliCentralTrigger *aCTP = NULL;
if (fRawReader) {