// Author: Benjamin Hess 25/09/2008
/*************************************************************************
- * Copyright (C) 2008, Alexandru Bercuci, Benjamin Hess. *
+ * Copyright (C) 2008-2009, Alexandru Bercuci, Benjamin Hess. *
* All rights reserved. *
*************************************************************************/
#include <EveDet/AliEveTRDTrackList.h>
#include <EveDet/AliEveTRDTrackListEditor.h>
-#include <qaRec/AliTRDrecoTask.h>
-#include <qaRec/macros/AliTRDperformanceTrain.h>
+#include <../PWG1/TRD/AliTRDrecoTask.h>
+#include <../PWG1/TRD/macros/AliTRDperformanceTrain.h>
ClassImp(AliEveTRDTrackList)
// use the return value of AddMacro (NOT_EXIST_ERROR is returned, if file does not exist)
// (-> You can also check for other return values (see AddMacro(...)))
- if(gSystem->Load("libANALYSIS.so")<0) return;
- if(gSystem->Load("libTRDqaRec.so")<0) return;
+ Char_t *libs[] = {"libANALYSIS.so", "libANALYSISalice.so", "libTENDER.so", "libPWG1.so"};
+ Int_t nlibs = static_cast<Int_t>(sizeof(libs)/sizeof(Char_t *));
+ for(Int_t ilib=0; ilib<nlibs; ilib++){
+ if(gSystem->Load(libs[ilib]) >= 0) continue;
+ AliError(Form("Fail loading %s.", libs[ilib]));
+ return;
+ }
+
AliTRDrecoTask *task = 0x0;
TList *fPlots = 0x0;
for(Int_t it=2; it<NTRDQATASKS; it++){
TMacroData* macro = 0;
- TString* procCmds = 0;
+ Char_t** procCmds = 0;
AliEveTRDTrackListMacroType* mProcType = 0;
if (procIterator->GetEntries() > 0) {
- procCmds = new TString[procIterator->GetEntries()];
+ procCmds = new Char_t*[procIterator->GetEntries()];
mProcType = new AliEveTRDTrackListMacroType[procIterator->GetEntries()];
}
- TString* selCmds = 0;
+ Char_t** selCmds = 0;
AliEveTRDTrackListMacroType* mSelType = 0;
if (selIterator->GetEntries() > 0) {
- selCmds = new TString[selIterator->GetEntries()];
+ selCmds = new Char_t*[selIterator->GetEntries()];
mSelType = new AliEveTRDTrackListMacroType[selIterator->GetEntries()];
}
// Collect the commands for each process macro and add them to "data-from-list"
for (Int_t i = 0; i < procIterator->GetEntries(); i++){
+ procCmds[i] = new Char_t[(fkMaxMacroPathNameLength + fkMaxApplyCommandLength)];
+ memset(procCmds[i], '\0', sizeof(Char_t) * (fkMaxMacroNameLength + fkMaxApplyCommandLength));
+
macro = (TMacroData*)fMacroList->GetValue(procIterator->At(i)->GetTitle());
if (!macro){
mProcType[i] = macroType;
numHistoMacros++;
// Create the command
- procCmds[i] = macro->GetCmd();
+ sprintf(procCmds[i], macro->GetCmd());
// Add to "data-from-list" -> Mark as a histo macro with the substring "(histo macro)"
fDataFromMacroList->Add(new TObjString(Form("%s (histo macro)", macro->GetName())));
} else if (macroType == kSingleTrackAnalyse || macroType == kCorrelTrackAnalyse) {
mProcType[i] = macroType;
// Create the command
- procCmds[i] = macro->GetCmd();
+ sprintf(procCmds[i], macro->GetCmd());
// Add to "data-from-list"
fDataFromMacroList->Add(new TObjString(macro->GetName()));
// Collect the commands for each selection macro and add them to "data-from-list"
for (Int_t i = 0; i < selIterator->GetEntries(); i++){
+ selCmds[i] = new Char_t[(fkMaxMacroPathNameLength + fkMaxApplyCommandLength)];
+ memset(selCmds[i], '\0', sizeof(Char_t) * (fkMaxMacroNameLength + fkMaxApplyCommandLength));
+
macro = (TMacroData*)fMacroList->GetValue(selIterator->At(i)->GetTitle());
if (!macro){
mSelType[i] = macroType;
// Create the command
- selCmds[i] = macro->GetCmd();
+ sprintf(selCmds[i], macro->GetCmd());
} else {
Error("Apply process macros",
Form("Macro list corrupted: Macro \"%s/%s.C\" is not registered as a selection macro!",