AliRoot Core  3dc7879 (3dc7879)
AliAnalysisDataContainer.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 
17 //==============================================================================
18 // AliAnalysysDataContainer - Container of data of arbitrary type deriving
19 // from TObject used for analysis. A container must be connected to the
20 // output data slot of a single analysis task (producer) , but also as
21 // input slot for possibly several other tasks (consumers). The connected
22 // slots must enforce the same data type as the container (or a derived type).
23 // A container becomes the owner of the contained data once this was produced.
24 //
25 // Containers should be defined by the analysis module using:
26 //
27 // AliAnalysisModule::AddContainer(const char *name, TClass *type);
28 //
29 // A container should be connected to a producer:
30 
31 // AliAnalysisModule::ConnectOutput(AliAnalysisTask *task,
32 // AliAnalysisDataContainer *cont)
33 // and to its consumers:
34 //
35 // AliAnalysisModule::ConnectInput(AliAnalysisTask *task, Int_t islot,
36 // AliAnalysisDataContainer *cont)
37 //
38 // The container will create an implicit connection between the producer task
39 // and all consumers, which will become sub-tasks of the producer.
40 //
41 //==============================================================================
42 
43 #include <Riostream.h>
44 #include <TMethodCall.h>
45 
46 #include <TClass.h>
47 #include <TSystem.h>
48 #include <TFile.h>
49 #include <TTree.h>
50 #include <TH1.h>
51 #include <TROOT.h>
52 
53 #include "AliAnalysisManager.h"
55 #include "AliAnalysisDataSlot.h"
56 #include "AliAnalysisTask.h"
57 #include "AliLog.h"
58 #include <TBuffer.h>
59 
60 using std::endl;
61 using std::cout;
62 using std::ios;
63 using std::setiosflags;
64 using std::setprecision;
66 
67 //______________________________________________________________________________
69  fDataReady(kFALSE),
70  fOwnedData(kFALSE),
71  fFileName(),
72  fFolderName(),
73  fFile(NULL),
74  fData(NULL),
75  fType(NULL),
76  fProducer(NULL),
77  fConsumers(NULL)
78 {
79 // Dummy ctor.
80 }
81 
82 //______________________________________________________________________________
84  :TNamed(name,""),
85  fDataReady(kFALSE),
86  fOwnedData(kFALSE),
87  fFileName(),
88  fFolderName(),
89  fFile(NULL),
90  fData(NULL),
91  fType(type),
92  fProducer(NULL),
93  fConsumers(NULL)
94 {
96 
97  SetTitle(fType->GetName());
98 }
99 
100 //______________________________________________________________________________
102  :TNamed(cont),
103  fDataReady(cont.fDataReady),
104  fOwnedData(kFALSE),
105  fFileName(cont.fFileName),
106  fFolderName(cont.fFolderName),
107  fFile(NULL),
108  fData(cont.fData),
109  fType(NULL),
110  fProducer(cont.fProducer),
111  fConsumers(NULL)
112 {
114 
115  GetType();
116  if (cont.fConsumers) {
117  fConsumers = new TObjArray(2);
118  Int_t ncons = cont.fConsumers->GetEntriesFast();
119  for (Int_t i=0; i<ncons; i++) fConsumers->Add(cont.fConsumers->At(i));
120  }
121 }
122 
123 //______________________________________________________________________________
125 {
127 
128  if (fData && fOwnedData) delete fData;
129  if (fConsumers) delete fConsumers;
130 }
131 
132 //______________________________________________________________________________
134 {
136 
137  if (&cont != this) {
138  TNamed::operator=(cont);
139  fDataReady = cont.fDataReady;
140  fOwnedData = kFALSE;
141  fFileName = cont.fFileName;
142  fFolderName = cont.fFolderName;
143  fFile = NULL;
144  fData = cont.fData;
145  GetType();
146  fProducer = cont.fProducer;
147  if (cont.fConsumers) {
148  fConsumers = new TObjArray(2);
149  Int_t ncons = cont.fConsumers->GetEntriesFast();
150  for (Int_t i=0; i<ncons; i++) fConsumers->Add(cont.fConsumers->At(i));
151  }
152  }
153  return *this;
154 }
155 
156 //______________________________________________________________________________
157 void AliAnalysisDataContainer::Streamer(TBuffer &R__b)
158 {
160 
161  if (R__b.IsReading()) {
162  R__b.ReadClassBuffer(AliAnalysisDataContainer::Class(),this);
163  this->SetDataOwned(kTRUE);
164  } else {
165  R__b.WriteClassBuffer(AliAnalysisDataContainer::Class(),this);
166  }
167 }
168 
169 //______________________________________________________________________________
171 {
173 
174  AliAnalysisDataSlot *slot = consumer->GetInputSlot(islot);
175  if (!slot || !slot->GetType()) {
176  cout<<"Consumer task "<< consumer->GetName()<<" does not have an input/type #"<<islot<<endl;
177  //AliError(Form("Consumer task %s does not have an input #%i", consumer->GetName(),islot));
178  return;
179  }
180  if (!slot->GetType()->InheritsFrom(GetType())) {
181  cout<<"Data type "<<slot->GetTitle()<<" for input slot "<<islot<<" of task "<<consumer->GetName()<<" does not match container type "<<GetTitle()<<endl;
182  //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()));
183  return;
184  }
185 
186  if (!fConsumers) fConsumers = new TObjArray(2);
187  fConsumers->Add(consumer);
188  // Add the consumer task to the list of task of the producer
189  if (fProducer && !fProducer->GetListOfTasks()->FindObject(consumer))
190  fProducer->Add(consumer);
191 }
192 
193 //______________________________________________________________________________
195 {
197 
198  TIter next(fConsumers);
199  AliAnalysisTask *task;
200  while ((task=(AliAnalysisTask*)next())) {
201  if (!task->HasExecuted()) return kFALSE;
202  }
203  return kTRUE;
204 }
205 
206 //______________________________________________________________________________
208 {
210 
211  if (!fDataReady || !ClientsExecuted()) {
212  cout<<"Data not ready or not all clients of container "<<GetName()<<" executed. Data not deleted."<<endl;
213  //AliWarning(Form("Data not ready or not all clients of container %s executed. Data not deleted.", GetName()));
214  return;
215  }
216  if (!fOwnedData) {
217  cout<<"Data not owned by container "<<GetName()<<". Not deleted."<<endl;
218  //AliWarning(Form("Data not owned by container %s. Not deleted.", GetName()));
219  return;
220  }
221  delete fData;
222  fData = 0;
223  fDataReady = kFALSE;
224 }
225 
226 //______________________________________________________________________________
228 {
230 
232  if (!fType) cont->SetType(gROOT->GetClass(fTitle.Data()));
233  if (!fType) printf("AliAnalysisDataContainer: Unknown class: %s\n", GetTitle());
234  return fType;
235 }
236 
237 //______________________________________________________________________________
239 {
242 
243  if (!fDataReady || !GetType()) return;
244  Bool_t istree = fType->InheritsFrom(TTree::Class());
245  if (istree) {
246  TTree *tree = (TTree*)fData;
247  if (tree->GetReadEntry() != ientry) tree->GetEntry(ientry);
248  return;
249  }
250  Bool_t isbranch = fType->InheritsFrom(TBranch::Class());
251  if (isbranch) {
252  TBranch *branch = (TBranch*)fData;
253  if (branch->GetReadEntry() != ientry) branch->GetEntry(ientry);
254  return;
255  }
256 }
257 
258 //______________________________________________________________________________
259 Long64_t AliAnalysisDataContainer::Merge(TCollection *list)
260 {
263 
264  if (!list || !fData) return 0;
265  AliInfo(Form("Merging %d containers %s\n", list->GetEntries(), GetName()));
266  TMethodCall callEnv;
267  if (fData->IsA())
268  callEnv.InitWithPrototype(fData->IsA(), "Merge", "TCollection*");
269  if (!callEnv.IsValid() && !list->IsEmpty()) {
270  cout << "No merge interface for data stored by " << GetName() << ". Merging not possible !" << endl;
271  return 1;
272  }
273 
274  if (list->IsEmpty()) return 1;
275 
276  TIter next(list);
278  // Make a list where to temporary store the data to be merged.
279  TList *collectionData = new TList();
280  Int_t count = 0; // object counter
281  while ((cont=(AliAnalysisDataContainer*)next())) {
282  TObject *data = cont->GetData();
283  if (!data) continue;
284  if (strcmp(cont->GetName(), GetName())) {
285  cout << "Not merging containers with different names !" << endl;
286  continue;
287  }
288  AliInfo(Form(" ... merging object %s\n", data->GetName()));
289  collectionData->Add(data);
290  count++;
291  }
292  callEnv.SetParam((Long_t) collectionData);
293  callEnv.Execute(fData);
294  delete collectionData;
295 
296  return count+1;
297 }
298 
299 //______________________________________________________________________________
300 void AliAnalysisDataContainer::PrintContainer(Option_t *option, Int_t indent) const
301 {
303 
304  TString ind;
305  for (Int_t i=0; i<indent; i++) ind += " ";
306  TString opt(option);
307  opt.ToLower();
308  TString ctype = "Container";
309  if (IsExchange()) ctype = "Exchange container";
310  Bool_t dep = (opt.Contains("dep"))?kTRUE:kFALSE;
311  if (!dep) {
312  if (IsPostEventLoop()) printf("%s%s: %s DATA TYPE: %s POST_LOOP task\n", ind.Data(), ctype.Data(), GetName(), GetTitle());
313  else printf("%s%s: %s DATA TYPE: %s\n", ind.Data(), ctype.Data(), GetName(), GetTitle());
314  if (!fProducer)
315 // printf("%s = Data producer: task %s\n",ind.Data(),fProducer->GetName());
316 // else
317  printf("%s= Not connected to a data producer\n",ind.Data());
318  if (fConsumers && fConsumers->GetEntriesFast())
319  printf("%s = Client tasks indented below:\n", ind.Data());
320  }
321  if (!IsExchange()) {
322  if (!fFolderName.IsNull())
323  printf("%s = Filename: %s folder: %s\n", ind.Data(),fFileName.Data(), fFolderName.Data());
324  else
325  if (!fFileName.IsNull()) printf("%s = Filename: %s\n", ind.Data(),fFileName.Data());
326  }
327  ((AliAnalysisDataContainer*)this)->SetTouched(kTRUE);
328  TIter next(fConsumers);
329  AliAnalysisTask *task;
330  while ((task=(AliAnalysisTask*)next())) task->PrintTask(option, indent+3);
331 }
332 
333 //______________________________________________________________________________
334 Bool_t AliAnalysisDataContainer::SetData(TObject *data, Option_t *)
335 {
338 
339  AliAnalysisTask *task;
340  Bool_t init = kFALSE;
341  Int_t i, nc;
342  if (!fProducer) {
343  if (data != fData) init = kTRUE;
344  fData = data;
345  fDataReady = kTRUE;
346  if (fConsumers) {
347  nc = fConsumers->GetEntriesFast();
348  for (i=0; i<nc; i++) {
349  task = (AliAnalysisTask*)fConsumers->At(i);
350  task->CheckNotify(init);
351  }
352  }
353  return kTRUE;
354  }
355  // Check if it is the producer who published the data
356  if (fProducer->GetPublishedData()==data) {
357  fData = data;
358  fDataReady = kTRUE;
359  if (fConsumers) {
360  nc = fConsumers->GetEntriesFast();
361  for (i=0; i<nc; i++) {
362  task = (AliAnalysisTask*)fConsumers->At(i);
363  task->CheckNotify();
364  }
365  }
366  return kTRUE;
367  } else {
368  // Ignore data posting from other than the producer
369 // cout<<"Data for container "<<GetName()<<" can be published only by producer task "<<fProducer->GetName()<<endl;
370  //AliWarning(Form("Data for container %s can be published only by producer task %s", GetName(), fProducer->GetName()));
371  return kFALSE;
372  }
373 }
374 
375 //______________________________________________________________________________
376 void AliAnalysisDataContainer::SetFileName(const char *filename)
377 {
382 
383  fFileName = filename;
384  fFolderName = "";
385  Int_t index = fFileName.Index(":");
386  // Fill the folder name
387  if (index >= 0) {
388  fFolderName = fFileName(index+1, fFileName.Length()-index);
389  fFileName.Remove(index);
390  }
391  if (!fFileName.Length())
392  Fatal("SetFileName", "Empty file name");
393  if (fFileName.Index("/")>=0)
394  Fatal("SetFileName", "No slashes (/) allowed in the file name");
395 }
396 
397 //______________________________________________________________________________
399 {
401 
402  if (fProducer) {
403  cout<<"Data container "<<GetName()<<" already has a producer: "<<fProducer->GetName()<<endl;
404  //AliWarning(Form("Data container %s already has a producer: %s",GetName(),fProducer->GetName()));
405  }
406  if (fDataReady) {
407  cout<<GetName()<<" container contains data - cannot change producer!"<<endl;
408  //AliError(Form("%s container contains data - cannot change producer!", GetName()));
409  return;
410  }
411  AliAnalysisDataSlot *slot = prod->GetOutputSlot(islot);
412  if (!slot) {
413  cout<<"Producer task "<<prod->GetName()<<" does not have an output #"<<islot<<endl;
414  //AliError(Form("Producer task %s does not have an output #%i", prod->GetName(),islot));
415  return;
416  }
417  if (!slot->GetType()->InheritsFrom(GetType())) {
418  cout<<"Data type "<<slot->GetTitle()<<"for output slot "<<islot<<" of task "<<prod->GetName()<<" does not match container type "<<GetTitle()<<endl;
419  //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()));
420  return;
421  }
422 
423  fProducer = prod;
424  // Add all consumers as daughter tasks
425  TIter next(fConsumers);
426  AliAnalysisTask *cons;
427  while ((cons=(AliAnalysisTask*)next())) {
428  if (!prod->GetListOfTasks()->FindObject(cons)) prod->Add(cons);
429  }
430 }
431 
432 //______________________________________________________________________________
434 {
436 
437  AliAnalysisDataWrapper *pack = 0;
438  if (!fData) {
439  Error("ExportData", "Container %s - No data to be wrapped !", GetName());
440  return pack;
441  }
443  if (mgr && mgr->GetDebugLevel() > 1) printf(" ExportData: Wrapping data %s for container %s\n", fData->GetName(),GetName());
444  pack = new AliAnalysisDataWrapper(fData);
445  pack->SetName(fName.Data());
446  return pack;
447 }
448 
449 //______________________________________________________________________________
451 {
453 
454  if (pack) {
455  fData = pack->Data();
456  if (!fData) {
457  Error("ImportData", "No data was wrapped for container %s", GetName());
458  return;
459  }
461  if (mgr && mgr->GetDebugLevel() > 1) printf(" ImportData: Unwrapping data %s for container %s\n", fData->GetName(),GetName());
462  fDataReady = kTRUE;
463  // Imported wrappers do not own data anymore (AG 13-11-07)
464  pack->SetDeleteData(kFALSE);
465  }
466 }
467 
468 ClassImp (AliAnalysisDataWrapper)
469 
470 //______________________________________________________________________________
472  :TNamed(),
473  fData(data)
474 {
475 // Ctor.
476  if (data) SetName(data->GetName());
477 }
478 
479 //______________________________________________________________________________
481 {
482 // Dtor.
483  if (fData && TObject::TestBit(kDeleteData)) delete fData;
484 }
485 
486 //______________________________________________________________________________
488 {
489 // Assignment.
490  if (&other != this) {
491  TNamed::operator=(other);
492  fData = other.fData;
493  }
494  return *this;
495 }
496 
497 //______________________________________________________________________________
498 Long64_t AliAnalysisDataWrapper::Merge(TCollection *list)
499 {
500 // Merge a list of containers with this one. Containers in the list must have
501 // data of the same type.
502  if (TH1::AddDirectoryStatus()) TH1::AddDirectory(kFALSE);
503  if (!fData) return 0;
504  if (!list || list->IsEmpty()) return 1;
505 
506  SetDeleteData();
507 
508  TMethodCall callEnv;
509  if (fData->IsA())
510  callEnv.InitWithPrototype(fData->IsA(), "Merge", "TCollection*");
511  if (!callEnv.IsValid()) {
512  cout << "No merge interface for data stored by " << GetName() << ". Merging not possible !" << endl;
513  return 1;
514  }
515 
516  TIter next1(list);
518  // Make a list where to temporary store the data to be merged.
519  TList *collectionData = new TList();
520  Int_t count = 0; // object counter
521  // printf("Wrapper %s 0x%lx (data=%s) merged with:\n", GetName(), (ULong_t)this, fData->ClassName());
522  while ((cont=(AliAnalysisDataWrapper*)next1())) {
523  cont->SetDeleteData();
524  TObject *data = cont->Data();
525  if (!data) continue;
526  // printf(" - %s 0x%lx (data=%s)\n", cont->GetName(), (ULong_t)cont, data->ClassName());
527  collectionData->Add(data);
528  count++;
529  }
530  callEnv.SetParam((Long_t) collectionData);
531  callEnv.Execute(fData);
532  delete collectionData;
533 
534  return count+1;
535 }
536 
538 
539 //______________________________________________________________________________
541  :TObject(), fLfn(), fGUID(), fUrl(), fPfn(), fSE(),
542  fIsArchive(kFALSE), fImage(0), fNreplicas(0),
543  fStartBytes(0), fReadBytes(0), fSize(0), fOpenedAt(0),
544  fOpenTime(0.), fProcessingTime(0.), fThroughput(0.), fTimer()
545 {
546 // I/O constructor
547 }
548 
549 //______________________________________________________________________________
551  :TObject(), fLfn(), fGUID(), fUrl(), fPfn(), fSE(),
552  fIsArchive(kFALSE), fImage(0), fNreplicas(0),
553  fStartBytes(0), fReadBytes(0), fSize(0), fOpenedAt(0),
554  fOpenTime(0.), fProcessingTime(0.), fThroughput(0.), fTimer()
555 {
556 // Normal constructor
557  if (file->InheritsFrom("TAlienFile")) {
558  fLfn =(const char*)gROOT->ProcessLine(Form("((TAlienFile*)%p)->GetLfn();", file));
559  fGUID =(const char*)gROOT->ProcessLine(Form("((TAlienFile*)%p)->GetGUID();", file));
560  fUrl =(const char*)gROOT->ProcessLine(Form("((TAlienFile*)%p)->GetUrl();", file));
561  fPfn =(const char*)gROOT->ProcessLine(Form("((TAlienFile*)%p)->GetPfn();", file));
562  fSE = (const char*)gROOT->ProcessLine(Form("((TAlienFile*)%p)->GetSE();", file));
563  fImage = (Int_t)gROOT->ProcessLine(Form("((TAlienFile*)%p)->GetImage();", file));
564  fNreplicas = (Int_t)gROOT->ProcessLine(Form("((TAlienFile*)%p)->GetNreplicas();", file));
565  fOpenedAt = gROOT->ProcessLine(Form("((TAlienFile*)%p)->GetOpenTime();", file));
566  gROOT->ProcessLine(Form("((AliAnalysisFileDescriptor*)%p)->SetOpenTime(((TAlienFile*)%p)->GetElapsed());", this, file));
567  } else {
568  fLfn = file->GetName();
569  fPfn = file->GetName();
570  fUrl = file->GetName();
571  fSE = "local";
572  if (!fPfn.BeginsWith("/")) fPfn.Prepend(Form("%s/",gSystem->WorkingDirectory()));
573  fOpenedAt = time(0);
574  }
575  fStartBytes = TFile::GetFileBytesRead();
576  fIsArchive = file->IsArchive();
577  fSize = file->GetSize();
578 }
579 
580 //______________________________________________________________________________
582  :TObject(other), fLfn(other.fLfn), fGUID(other.fGUID),
583  fUrl(other.fUrl), fPfn(other.fPfn), fSE(other.fSE),
584  fIsArchive(other.fIsArchive), fImage(other.fImage),
586  fSize(other.fSize), fOpenedAt(other.fOpenedAt), fOpenTime(other.fOpenTime),
588 {
589 // CC
590 }
591 
592 //______________________________________________________________________________
594 {
595 // Assignment.
596  if (&other == this) return *this;
597  TObject::operator=(other);
598  fLfn = other.fLfn;
599  fGUID = other.fGUID;
600  fUrl = other.fUrl;
601  fPfn = other.fPfn;
602  fSE = other.fSE;
603  fIsArchive = other.fIsArchive;
604  fImage = other.fImage;
605  fNreplicas = other.fNreplicas;
606  fStartBytes = other.fStartBytes;;
607  fReadBytes = other.fReadBytes;
608  fSize = other.fSize;
609  fOpenedAt = other.fOpenedAt;
610  fOpenTime = other.fOpenTime;
612  fThroughput = other.fThroughput;
613  return *this;
614 }
615 
616 //______________________________________________________________________________
618 {
619 // Destructor
620 }
621 
622 //______________________________________________________________________________
624 {
625 // Must be called at the end of processing, providing file->GetBytesRead() as argument.
626  fTimer.Stop();
627  const Double_t megabyte = 1048576.;
628 // Long64_t stampnow = time(0);
629  fReadBytes = TFile::GetFileBytesRead()-fStartBytes;
630 // fProcessingTime = stampnow-fOpenedAt;
631  fProcessingTime = fTimer.RealTime();
632  Double_t readsize = fReadBytes/megabyte;
633  fThroughput = readsize/fProcessingTime;
634 }
635 
636 //______________________________________________________________________________
637 void AliAnalysisFileDescriptor::Print(Option_t*) const
638 {
639 // Print info about the file descriptor
640  const Double_t megabyte = 1048576.;
641  printf("===== Logical file name: %s =====\n", fLfn.Data());
642  printf(" Pfn: %s\n", fPfn.Data());
643  printf(" url: %s\n", fUrl.Data());
644  printf(" access time: %lld from SE: %s image %d/%d\n", fOpenedAt, fSE.Data(), fImage, fNreplicas);
645  printf(" open time: %g [sec]\n", fOpenTime);
646  printf(" file size: %g [MB], read size: %g [MB]\n", fSize/megabyte, fReadBytes/megabyte);
647  printf(" processing time [sec]: %g\n", fProcessingTime);
648  printf(" average throughput: %g [MB/sec]\n", fThroughput);
649 }
650 
651 //______________________________________________________________________________
652 void AliAnalysisFileDescriptor::SavePrimitive(std::ostream &out, Option_t *)
653 {
654 // Stream info to file
655  const Double_t megabyte = 1048576.;
656  out << "#################################################################" << endl;
657  out << "pfn " << fPfn.Data() << endl;
658  out << "url " << fUrl.Data() << endl;
659  out << "se " << fSE.Data() << endl;
660  out << "image " << fImage << endl;
661  out << "nreplicas " << fNreplicas << endl;
662  out << "openstamp " << fOpenedAt << endl;
663  std::ios_base::fmtflags original_flags = out.flags();
664  out << setiosflags(std::ios::fixed) << std::setprecision(3);
665  out << "opentime " << fOpenTime << endl;
666  out << "runtime " << fProcessingTime << endl;
667  out << "filesize " << fSize/megabyte << endl;
668  out << "readsize " << fReadBytes/megabyte << endl;
669  out << "throughput " << fThroughput << endl;
670  out.flags(original_flags);
671 }
672 
AliAnalysysTask - Class representing a basic analysis task. Any user-defined task should derive from...
AliAnalysisDataWrapper * ExportData() const
Wrapping.
TObject * GetPublishedData() const
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
void CheckNotify(Bool_t init=kFALSE)
TObject * fData
Wrapped data.
TString fUrl
url for the opened copy
#define TObjArray
virtual Long64_t Merge(TCollection *list)
Container merging.
virtual void PrintTask(Option_t *option="all", Int_t indent=0) const
static AliAnalysisManager * GetAnalysisManager()
TObject * GetData() const
Getters.
AliAnalysysManager Manager analysis class. Allows creation of several analysis tasks and data contain...
Bool_t fOwnedData
Flag data ownership.
void PrintContainer(Option_t *option="all", Int_t indent=0) const
Print connected tasks/status.
AliAnalysisTask * fProducer
Analysis task to which the slot belongs.
TROOT * gROOT
TString fSE
Storage element.
Long64_t fReadBytes
Number of bytes read.
TObjArray * fConsumers
List of consumers of the data.
Double_t fProcessingTime
Processing.
AliAnalysysDataContainer AliAnalysysDataContainer - Container of data of arbitrary type deriving from...
Long64_t fOpenedAt
Absolute value for time when opened.
TStopwatch fTimer
! Processing time
UInt_t GetDebugLevel() const
virtual Long64_t Merge(TCollection *list)
Merging.
bool init
Definition: XSection.C:263
Long64_t fSize
Size of the file in bytes.
TClass * fType
! Type of contained data
Bool_t fDataReady
Flag that data is ready.
TTree * tree
AliAnalysisDataContainer & operator=(const AliAnalysisDataContainer &cont)
Assignment.
void ImportData(AliAnalysisDataWrapper *pack)
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Long64_t fStartBytes
Total number of read bytes at start.
AliAnalysysDataSlot Class representing a data slot of an analysis task. An analysis slot enforces a c...
#define AliInfo(message)
Definition: AliLog.h:484
TString fPfn
physical file name
AliAnalysisDataSlot * GetOutputSlot(Int_t islot) const
AliAnalysisDataWrapper & operator=(const AliAnalysisDataWrapper &other)
Assignment.
TString fFolderName
Folder name in the output file.
TObject * fData
Contained data.
TClass * GetType() const
void SetDeleteData(Bool_t flag=kTRUE)
AliAnalysisDataSlot * GetInputSlot(Int_t islot) const
virtual void Print(Option_t *option="") const
mgr
Definition: runKineProof.C:24
TString fFileName
File storing the data.
Int_t fNreplicas
Number of replicas.
void SetFileName(const char *filename)
AliAnalysisFileDescriptor & operator=(const AliAnalysisFileDescriptor &other)
Assignment.
virtual Bool_t SetData(TObject *data, Option_t *option="")
void AddConsumer(AliAnalysisTask *cons, Int_t islot)
Bool_t HasExecuted() const
void SetProducer(AliAnalysisTask *prod, Int_t islot)
TString fLfn
logical file name
Double_t fOpenTime
Time elapsed to open file.
virtual void GetEntry(Long64_t ientry)