//
//==============================================================================
+#include "Riostream.h"
+
#include "TClass.h"
#include "TTree.h"
#include "TFile.h"
-#include "AliLog.h"
+//#include "AliLog.h"
#include "AliAnalysisDataContainer.h"
#include "AliAnalysisDataSlot.h"
}
return kTRUE;
} else {
- AliWarning(Form("Data for container %s can be published only by producer task %s",
- GetName(), fProducer->GetName()));
- return kFALSE;
+ cout<<"Data for container "<<GetName()<<" can be published only by producer task "<<fProducer->GetName()<<endl;
+ //AliWarning(Form("Data for container %s can be published only by producer task %s", GetName(), fProducer->GetName()));
+ return kFALSE;
}
}
}
fFile = new TFile(name, option);
if (fFile->IsZombie()) {
- AliError(Form("Cannot open file %s with option %s",name,option));
+ cout<<"Cannot open file "<<name<<" with option "<<option<<endl;
+ //AliError(Form("Cannot open file %s with option %s",name,option));
fFile = 0;
}
}
{
// Set the producer of data. The slot number is required for data type checking.
if (fProducer) {
- AliWarning(Form("Data container %s already has a producer: %s",
- GetName(),fProducer->GetName()));
+ cout<<"Data container "<<GetName()<<" already has a producer: "<<fProducer->GetName()<<endl;
+ //AliWarning(Form("Data container %s already has a producer: %s",GetName(),fProducer->GetName()));
}
if (fDataReady) {
- AliError(Form("%s container contains data - cannot change producer!", GetName()));
+ cout<<GetName()<<" container contains data - cannot change producer!"<<endl;
+ //AliError(Form("%s container contains data - cannot change producer!", GetName()));
return;
}
AliAnalysisDataSlot *slot = prod->GetOutputSlot(islot);
if (!slot) {
- AliError(Form("Producer task %s does not have an output #%i", prod->GetName(),islot));
+ cout<<"Producer task "<<prod->GetName()<<" does not have an output #"<<islot<<endl;
+ //AliError(Form("Producer task %s does not have an output #%i", prod->GetName(),islot));
return;
}
if (!slot->GetType()->InheritsFrom(fType)) {
- AliError(Form("Data type %s for output slot %i of task %s does not match container type %s",
- slot->GetType()->GetName(),islot,prod->GetName(),fType->GetName()));
+ cout<<"Data type "<<slot->GetType()->GetName()<<"for output slot "<<islot<<" of task "<<prod->GetName()<<" does not match container type "<<fType->GetName()<<endl;
+ //AliError(Form("Data type %s for output slot %i of task %s does not match container type %s", slot->GetType()->GetName(),islot,prod->GetName(),fType->GetName()));
return;
}
// Add a consumer for contained data;
AliAnalysisDataSlot *slot = consumer->GetInputSlot(islot);
if (!slot) {
- AliError(Form("Consumer task %s does not have an input #%i", consumer->GetName(),islot));
+ cout<<"Consumer task "<< consumer->GetName()<<" does not have an input #"<<islot<<endl;
+ //AliError(Form("Consumer task %s does not have an input #%i", consumer->GetName(),islot));
return;
}
if (!slot->GetType()->InheritsFrom(fType)) {
- AliError(Form("Data type %s for input slot %i of task %s does not match container type %s",
- slot->GetType()->GetName(),islot,consumer->GetName(),fType->GetName()));
+ cout<<"Data type "<<slot->GetType()->GetName()<<" for input slot "<<islot<<" of task "<<consumer->GetName()<<" does not match container type "<<fType->GetName()<<endl;
+ //AliError(Form("Data type %s for input slot %i of task %s does not match container type %s", slot->GetType()->GetName(),islot,consumer->GetName(),fType->GetName()));
return;
}
{
// Delete data if not needed anymore.
if (!fDataReady || !ClientsExecuted()) {
- AliWarning(Form("Data not ready or not all clients of container %s executed. Data not deleted.", GetName()));
+ cout<<"Data not ready or not all clients of container "<<GetName()<<" executed. Data not deleted."<<endl;
+ //AliWarning(Form("Data not ready or not all clients of container %s executed. Data not deleted.", GetName()));
return;
}
if (!fOwnedData) {
- AliWarning(Form("Data not owned by container %s. Not deleted.", GetName()));
+ cout<<"Data not owned by container "<<GetName()<<". Not deleted."<<endl;
+ //AliWarning(Form("Data not owned by container %s. Not deleted.", GetName()));
return;
}
delete fData;
// match.
//==============================================================================
+#include "Riostream.h"
+
#include "TClass.h"
#include "TTree.h"
-#include "AliLog.h"
+//#include "AliLog.h"
#include "AliAnalysisDataSlot.h"
#include "AliAnalysisTask.h"
// The error message in case of failure is posted by the caller.
if (!cont || !fType) return kFALSE;
if (!fType->InheritsFrom(cont->GetType())) {
- AliError(Form("Data slot of type %s of task %s cannot be connected to data container %s of type %s",
- fType->GetName(), fParent->GetName(), cont->GetName(), cont->GetType()->GetName()));
+ cout<<"Data slot of type "<<fType->GetName()<<" of task "<<fParent->GetName()<<" cannot be connected to data container "<<cont->GetName()<<" of type "<<cont->GetType()->GetName()<<endl;
+ //AliError(Form("Data slot of type %s of task %s cannot be connected to data container %s of type %s", fType->GetName(), fParent->GetName(), cont->GetName(), cont->GetType()->GetName()));
return kFALSE;
}
fContainer = cont;
// using SetBranchAddress because the address gets set by the first caller.
// Call this in MyTask::Init()
if (!fType->InheritsFrom(TTree::Class())) {
- AliFatal(Form("Cannot call GetBranchAddress() for data slot of task %s not pointing to tree-type data", fParent->GetName()));
+ cout<<"Cannot call GetBranchAddress() for data slot of task "<<fParent->GetName()<<" not pointing to tree-type data"<<endl;
+ //AliFatal(Form("Cannot call GetBranchAddress() for data slot of task %s not pointing to tree-type data", fParent->GetName()));
return NULL;
}
if (!IsDataReady()) {
- AliFatal(Form("Cannot call GetBranchAddress() for data slot of task %s while data is not ready", fParent->GetName()));
+ cout<<"Cannot call GetBranchAddress() for data slot of task "<<fParent->GetName()<<" while data is not ready"<<endl;
+ //AliFatal(Form("Cannot call GetBranchAddress() for data slot of task %s while data is not ready", fParent->GetName()));
return NULL;
}
TTree *tree = (TTree*)GetData();
TBranch *br = tree->GetBranch(branchname);
if (!br) {
- AliFatal(Form("Branch %s not found in tree %s as input of task %s...",
- branchname, tree->GetName(), fParent->GetName()));
+ cout<<"Branch "<<branchname<<" not found in tree "<<tree->GetName()<<" as input of task "<<fParent->GetName()<<"..."<<endl;
+ //AliFatal(Form("Branch %s not found in tree %s as input of task %s...", branchname, tree->GetName(), fParent->GetName()));
return NULL;
}
return br->GetAddress();
// Set a branch address for input tree. To be called during MyTask::Init()
// only if GetBranchAddress() returns a NULL pointer for a tree-type slot.
if (GetBranchAddress(branchname)) {
- AliError(Form("Branch address for %s already set by other task. Call first GetBranchAddress() in %s::Init()",
- branchname, fParent->GetName()));
+ cout<<"Branch address for "<<branchname<<" already set by other task. Call first GetBranchAddress() in "<<fParent->GetName()<<"::Init()"<<endl;
+ //AliError(Form("Branch address for %s already set by other task. Call first GetBranchAddress() in %s::Init()",branchname, fParent->GetName()));
return kFALSE;
}
TTree *tree = (TTree*)GetData();
{
// Retreives the data from the container if it is ready.
if (!fContainer) {
- AliError(Form("Data slot of type %s of task %s has no connected data container",
- fType->GetName(), fParent->GetName()));
+ cout<<"Data slot of type "<<fType->GetName()<<" of task "<<fParent->GetName()<<" has no connected data container"<<endl;
+ //AliError(Form("Data slot of type %s of task %s has no connected data container",fType->GetName(), fParent->GetName()));
return NULL;
}
if (!fContainer->IsDataReady()) return NULL;
{
// Check if data for this slot is ready in its container.
if (!fContainer) {
- AliError(Form("Data slot of type %s of task %s has no connected data container",
- fType->GetName(), fParent->GetName()));
+ cout<<"Data slot of type "<<fType->GetName()<<" of task "<<fParent->GetName()<<" has no connected data container"<<endl;
+ //AliError(Form("Data slot of type %s of task %s has no connected data container",fType->GetName(), fParent->GetName()));
return kFALSE;
}
return fContainer->IsDataReady();
//
//==============================================================================
+#include "Riostream.h"
+
#include "TClass.h"
#include "TFile.h"
#include "TTree.h"
-#include "AliLog.h"
+//#include "AliLog.h"
#include "AliAnalysisManager.h"
#include "AliAnalysisTask.h"
// Init() will be called many times when running with PROOF.
printf("AliAnalysisManager::Init(%s)\n", tree->GetName());
if (!fInitOK) {
- AliError("You have to call InitAnalysis first");
+ cout<<"You have to call InitAnalysis first"<<endl;
+ //AliError("You have to call InitAnalysis first");
return;
}
if (!tree) return;
printf("AliAnalysisManager::SlaveTerminate()\n");
if (!fOutput)
{
- AliError("ERROR: Output list not initialized.");
+ cout<<"ERROR: Output list not initialized."<<endl;
+ //AliError("ERROR: Output list not initialized.");
return;
}
TIter next(fOutputs);
// Connect input of an existing task to a data container.
if (!fTasks->FindObject(task)) {
AddTask(task);
- AliInfo(Form("Task %s not registered. Now owned by analysis manager", task->GetName()));
+ cout<<"Task "<<task->GetName()<<" not registered. Now owned by analysis manager"<<endl;
+ //AliInfo(Form("Task %s not registered. Now owned by analysis manager", task->GetName()));
}
Bool_t connected = task->ConnectInput(islot, cont);
return connected;
// Connect output of an existing task to a data container.
if (!fTasks->FindObject(task)) {
AddTask(task);
- AliInfo(Form("Task %s not registered. Now owned by analysis manager", task->GetName()));
+ cout<<"Task "<<task->GetName()<<"not registered. Now owned by analysis manager"<<endl;
+ //AliInfo(Form("Task %s not registered. Now owned by analysis manager", task->GetName()));
}
Bool_t connected = task->ConnectOutput(islot, cont);
return connected;
// }
// Check for top tasks (depending only on input data containers)
if (!fTasks->First()) {
- AliError("Analysis have no tasks !");
+ cout<<"Analysis has no tasks !"<<endl;
+ //AliError("Analysis have no tasks !");
return kFALSE;
}
TIter next(fTasks);
nzombies++;
iszombie = kTRUE;
}
- AliWarning(Form("Input slot %i of task %s has no container connected ! Declared zombie...",
- i,task->GetName()));
+ cout<<"Input slot "<<i<<" of task "<<task->GetName()<<" has no container connected ! Declared zombie..."<<endl;
+ //AliWarning(Form("Input slot %i of task %s has no container connected ! Declared zombie...",i,task->GetName()));
}
if (iszombie) continue;
// Check if cont is an input container
}
}
if (!ntop) {
- AliError("No top task defined. At least one task should be connected only to input containers");
+ cout<<"No top task defined. At least one task should be connected only to input containers"<<endl;
+ //AliError("No top task defined. At least one task should be connected only to input containers");
return kFALSE;
}
// Check now if there are orphan tasks
while ((task=(AliAnalysisTask*)next())) {
if (!task->IsUsed()) {
norphans++;
- AliWarning(Form("Task %s is orphan",task->GetName()));
+ cout<<"Task "<<task->GetName()<<" is orphan"<<endl;
+ //AliWarning(Form("Task %s is orphan",task->GetName()));
}
}
// Check the task hierarchy (no parent task should depend on data provided
for (i=0; i<ntop; i++) {
task = (AliAnalysisTask*)fTopTasks->At(i);
if (task->CheckCircularDeps()) {
- AliError("Found illegal circular dependencies between following tasks:");
+ cout<<"Found illegal circular dependencies between following tasks:"<<endl;
+ //AliError("Found illegal circular dependencies between following tasks:");
PrintStatus("dep");
return kFALSE;
}
{
// Execute analysis.
if (!fInitOK) {
- AliError("Analysis manager was not initialized !");
+ cout<<"Analysis manager was not initialized !"<<endl;
+ //AliError("Analysis manager was not initialized !");
return;
}
AliAnalysisTask *task;
while ((task=(AliAnalysisTask*)next())) task->SetActive(kFALSE);
AliAnalysisDataContainer *cont = (AliAnalysisDataContainer*)fInputs->At(0);
if (!cont) {
- AliError("Cannot execute analysis in TSelector mode without at least one top container");
+ cout<<"Cannot execute analysis in TSelector mode without at least one top container"<<endl;
+ //AliError("Cannot execute analysis in TSelector mode without at least one top container");
return;
}
cont->SetData(fTree); // This will notify all consumers
//
//==============================================================================
+#include "Riostream.h"
+
#include "TClass.h"
-#include "AliLog.h"
+//#include "AliLog.h"
#include "AliAnalysisTask.h"
#include "AliAnalysisDataSlot.h"
#include "AliAnalysisDataContainer.h"
for (i=0; i<fNinputs; i++) {
slot = (AliAnalysisDataSlot*)fInputs->At(i);
if (!slot) {
- AliError(Form("Input slot %i of task %s not defined !",i,GetName()));
+ cout<<"Input slot "<<i<<" of task "<<GetName()<<" not defined !"<<endl;
+ //AliError(Form("Input slot %i of task %s not defined !",i,GetName()));
return kFALSE;
}
if (!slot->IsConnected()) return kFALSE;
for (i=0; i<fNoutputs; i++) {
slot = (AliAnalysisDataSlot*)fOutputs->At(i);
if (!slot) {
- AliError(Form("Output slot %i of task %s not defined !",i,GetName()));
+ cout<<"Output slot "<<i<<" of task "<<GetName()<<" not defined !"<<endl;
+ //AliError(Form("Output slot %i of task %s not defined !",i,GetName()));
return kFALSE;
}
if (!slot->IsConnected()) return kFALSE;
// Connect an input slot to a data container.
AliAnalysisDataSlot *input = GetInputSlot(islot);
if (!input) {
- AliError(Form("Input slot %i not defined for analysis task %s", islot, GetName()));
+ cout<<"Input slot "<<islot<<" not defined for analysis task "<<GetName()<<endl;
+ //AliError(Form("Input slot %i not defined for analysis task %s", islot, GetName()));
return kFALSE;
}
// Check type matching
if (!input->GetType()->InheritsFrom(cont->GetType())) {
- AliError(Form("Data type %s for input %i of task %s not matching container %s of type %s",
- input->GetType()->GetName(), islot, GetName(), cont->GetName(), cont->GetType()->GetName()));
+ cout<<"Data type "<<input->GetType()->GetName()<<" for input "<<islot<<" of task "<<GetName()<<" not matching container "<<cont->GetName()<<" of type "<<cont->GetType()->GetName()<<endl;
+ //AliError(Form("Data type %s for input %i of task %s not matching container %s of type %s",input->GetType()->GetName(), islot, GetName(), cont->GetName(), cont->GetType()->GetName()));
return kFALSE;
}
// Connect the slot to the container as input
// Connect an output slot to a data container.
AliAnalysisDataSlot *output = GetOutputSlot(islot);
if (!output) {
- AliError(Form("Output slot %i not defined for analysis task %s", islot, GetName()));
+ cout<<"Output slot "<<islot<<" not defined for analysis task "<<GetName()<<endl;
+ //AliError(Form("Output slot %i not defined for analysis task %s", islot, GetName()));
return kFALSE;
}
// Check type matching
if (!output->GetType()->InheritsFrom(cont->GetType())) {
- AliError(Form("Data type %s for output %i of task %s not matching container %s of type %s",
- output->GetType()->GetName(), islot, GetName(), cont->GetName(), cont->GetType()->GetName()));
+ cout<<"Data type "<<output->GetType()->GetName()<<" for output "<<islot<<" of task "<<GetName()<<" not matching container "<<cont->GetName()<<" of type "<<cont->GetType()->GetName()<<endl;
+ //AliError(Form("Data type %s for output %i of task %s not matching container %s of type %s",output->GetType()->GetName(), islot, GetName(), cont->GetName(), cont->GetType()->GetName()));
return kFALSE;
}
// Connect the slot to the container as output
{
// Define an output slot and its type.
if (islot<0) {
- AliError(Form("Cannot define negative output slot number for task %s", GetName()));
+ cout<<"Cannot define negative output slot number for task "<<GetName()<<endl;
+ //AliError(Form("Cannot define negative output slot number for task %s", GetName()));
return;
}
AliAnalysisDataSlot *output = new AliAnalysisDataSlot(type, this);
// Retreive type of a given input slot.
AliAnalysisDataSlot *input = GetInputSlot(islot);
if (!input) {
- AliError(Form("Input slot %i not defined for analysis task %s", islot, GetName()));
+ cout<<"Input slot "<<islot<<" not defined for analysis task "<<GetName()<<endl;
+ //AliError(Form("Input slot %i not defined for analysis task %s", islot, GetName()));
return NULL;
}
return (input->GetType());
// Retreive type of a given output slot.
AliAnalysisDataSlot *output = GetOutputSlot(islot);
if (!output) {
- AliError(Form("Output slot %i not defined for analysis task %s", islot, GetName()));
+ cout<<"Output slot "<<islot<<" not defined for analysis task "<<GetName()<<endl;
+ //AliError(Form("Output slot %i not defined for analysis task %s", islot, GetName()));
return NULL;
}
return (output->GetType());
// the object has to be statically cast to the appropriate type.
AliAnalysisDataSlot *input = GetInputSlot(islot);
if (!input) {
- AliError(Form("Input slot %i not defined for analysis task %s", islot, GetName()));
+ cout<<"Input slot "<<islot<<" not defined for analysis task "<<GetName()<<endl;
+ //AliError(Form("Input slot %i not defined for analysis task %s", islot, GetName()));
return NULL;
}
return (input->GetData());
fPublishedData = 0;
AliAnalysisDataSlot *output = GetOutputSlot(iout);
if (!output) {
- AliError(Form("Output slot %i not defined for analysis task %s", iout, GetName()));
+ cout<<"Output slot "<<iout<<" not defined for analysis task "<<GetName()<<endl;
+ //AliError(Form("Output slot %i not defined for analysis task %s", iout, GetName()));
return kFALSE;
}
if (!output->IsConnected()) {
- AliError(Form("Output slot %i of analysis task %s not connected to any data container", iout, GetName()));
+ cout<<"Output slot "<<iout<<" of analysis task "<<GetName()<<" not connected to any data container"<<endl;
+ //AliError(Form("Output slot %i of analysis task %s not connected to any data container", iout, GetName()));
return kFALSE;
}
if (!fOutputReady) {
--- /dev/null
+#! /bin/sh
+
+make
--- /dev/null
+void SETUP()
+{
+ // Load the ANALYSIS_NEW library
+ gSystem->Load("libANALYSIS_NEW");
+
+ // Set the Inlucde paths
+ gSystem->SetIncludePath("-I$ROOTSYS/include -IANALYSIS_NEW");
+ gROOT->ProcessLine(".include ANALYSIS_NEW");
+
+ // Set our location, so that other packages can find us
+ gSystem->Setenv("ANALYSIS_NEW_INCLUDE", "ANALYSIS_NEW");
+}
-SRCS= AliAnalysisDataContainer.cxx \
- AliAnalysisTask.cxx AliAnalysisDataSlot.cxx AliAnalysisManager.cxx
+SRCS = AliAnalysisDataContainer.cxx AliAnalysisDataSlot.cxx \
+ AliAnalysisManager.cxx AliAnalysisTask.cxx
-HDRS= $(SRCS:.cxx=.h)
-DHDR:=AnalysisTaskLinkDef.h
+HDRS:= $(SRCS:.cxx=.h)
+
+DHDR= AnalysisTaskLinkDef.h
+
+EXPORT:=$(SRCS:.cxx=.h)
+
-EXPORT:=$(HDRS)