-// Author: Benjamin Hess 25/09/2008
+// Author: Benjamin Hess 29/01/2010
/*************************************************************************
- * Copyright (C) 2008-2009, Alexandru Bercuci, Benjamin Hess. *
+ * Copyright (C) 2009-2010, Alexandru Bercuci, Benjamin Hess. *
* All rights reserved. *
*************************************************************************/
+
//////////////////////////////////////////////////////////////////////////
// //
// AliEveTRDTrackList //
#include <AliTRDReconstructor.h>
-#include <EveDet/AliEveTRDTrackList.h>
#include <EveDet/AliEveTRDTrackList.h>
#include <EveDet/AliEveTRDTrackListEditor.h>
gROOT->ProcessLineSync(Form(".L %s+%c", pathname, forceReload ? '+' : ' '));
+ // We need this line... otherwise, in some cases, there will be problems concerning ACLIC
+ gROOT->ProcessLineSync(Form(".L %s", pathname));
+
AliEveTRDTrackListMacroType type = GetMacroType(name, kFALSE);
// Clean up again
TMacroData* macro = 0;
- Char_t** procCmds = 0;
+ TString* procCmds = 0;
AliEveTRDTrackListMacroType* mProcType = 0;
if (procIterator->GetEntries() > 0) {
- procCmds = new Char_t*[procIterator->GetEntries()];
+ procCmds = new TString[procIterator->GetEntries()];
mProcType = new AliEveTRDTrackListMacroType[procIterator->GetEntries()];
}
- Char_t** selCmds = 0;
+ TString* selCmds = 0;
AliEveTRDTrackListMacroType* mSelType = 0;
if (selIterator->GetEntries() > 0) {
- selCmds = new Char_t*[selIterator->GetEntries()];
+ selCmds = new TString[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
- sprintf(procCmds[i], macro->GetCmd());
+ 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
- sprintf(procCmds[i], macro->GetCmd());
+ 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
- sprintf(selCmds[i], macro->GetCmd());
+ selCmds[i] = macro->GetCmd();
} else {
Error("Apply process macros",
Form("Macro list corrupted: Macro \"%s/%s.C\" is not registered as a selection macro!",
// Loop over all pairs behind the current one - together with the other loop this will be a loop
// over all pairs. We have a pair of tracks, if and only if both tracks of the pair are selected (Rnr-state)
// and are not equal.
- // The correlated tracks process macro will applied to all pairs that will be additionally selected by
+ // The correlated tracks process macro will be applied to all pairs that will be additionally selected by
// all correlated tracks selection macros.
TEveElement::List_i iter2 = iter;
iter2++;
// Loop over all pairs behind the current one - together with the other loop this will be a loop
// over all pairs. We have a pair of tracks, if and only if both tracks of the pair are selected (Rnr-state)
// and are not equal.
- // The correlated tracks process macro will applied to all pairs that will be additionally selected by
+ // The correlated tracks process macro will be applied to all pairs that will be additionally selected by
// all correlated tracks selection macros.
TEveElement::List_i iter2 = iter;
iter2++;
// Clear root
// A.B. gROOT->Reset();
- // Select all tracks at first. A track is then deselect, if at least one selection macro
- // returns kFALSE for this track
- // Enable all tracks (Note: EnableListElements(..) will call "ElementChanged", which will cause unforeseen behavior!)
+ // Select all tracks at first. A track is then deselected, if at least one selection macro
+ // returns kFALSE for this track.
+ // Enable all tracks (Note: EnableListElements(..) will call "ElementChanged", which will cause unforeseen behaviour!)
for (TEveElement::List_i iter = this->BeginChildren(); iter != this->EndChildren(); ++iter) ((TEveElement*)(*iter))->SetRnrState(kTRUE);
SetRnrState(kTRUE);
if (strstr(f->GetMangledName(), "oPconstsPAliTRDtrackV1mUsP") != 0x0 &&
strstr(f->GetMangledName(), "cOconstsPAliTRDtrackV1mUsP") != 0x0)
{
- // Single track select macro?
+ // Correlated track select macro?
if (!strcmp(f->GetReturnTypeName(), "Bool_t"))
{
type = kCorrelTrackSelect;
}
- // single track histo macro?
+ // Correlated track histo macro?
else if (!strcmp(f->GetReturnTypeName(), "TH1*"))
{
type = kCorrelTrackHisto;