AliPhysics  6cf2591 (6cf2591)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FastAnalysis.C
Go to the documentation of this file.
1 
11 #include <TSelector.h>
12 #include <TQObject.h>
13 #ifndef __CINT__
14 # include <TParticle.h>
15 # include <TMath.h>
16 # include <TTree.h>
17 # include <TFile.h>
18 # include <THStack.h>
19 # include <TH1.h>
20 # include <TH2.h>
21 # include <TClonesArray.h>
22 # include <TAxis.h>
23 # include <TCanvas.h>
24 # include <TStopwatch.h>
25 # include <TStyle.h>
26 # include <TLegend.h>
27 # include <TLegendEntry.h>
28 # include <TMultiGraph.h>
29 # include <TGraph.h>
30 # include <TArrayI.h>
31 # include <TChain.h>
32 # include <TParameter.h>
33 # include <TSystem.h>
34 # include <TUrl.h>
35 # include <TGraph.h>
36 # include "FastShortHeader.C"
37 # include "FastMonitor.C"
38 // # include <TProof.h>
39 #else
40 class TTree;
41 class TH1;
42 class TH2;
43 class TH1D;
44 class THStack;
45 class TCanvas;
46 class TAxis;
47 class TStopwatch;
48 class TLegend;
49 class TMultiGraph;
50 class TParticle;
51 class TArrayI;
52 class TProof;
53 class TUrl;
54 class TVirtualPad;
55 class FastShortHeader;
56 #endif
57 
58 //====================================================================
62 struct FastAnalysis : public TSelector
63 {
66 
68 
69  TClonesArray* fParticles;
70 
74 
76 
77  ULong64_t fEventMult;
82 
94  FastAnalysis(Bool_t verb=false, Int_t monitor=0)
95  : fTree(0),
96  fHeader(0),
97  fParticles(0),
98  fVerbose(verb),
99  fEventMult(0),
100  fCentMethod(""),
101  fCentHist(0),
102  fOK(0),
103  fMonitor(monitor),
104  fCompatB(false)
105  {
106  }
110  virtual ~FastAnalysis()
111  {
112  if (fHeader) delete fHeader;
113  if (fParticles) delete fParticles;
114  }
120  void SetVerbose(Bool_t verb) { fVerbose = verb; }
125  {
126  // We disable monitoring in batch mode
127  if (gROOT->IsBatch()) {
128  Warning("SetupMonitor", "Batch processing, no monitoring");
129  return;
130  }
131 
132  // If the monitor frequency is 0 or negative, do nothing
133  if (fMonitor <= 0) {
134  Info("SetupMonitor", "Monitoring frequency too low");
135  return;
136  }
137 
138  // Get list of names of monitor objects.
139  TList* objs = GetMonitorObjects();
140  // If there's no monitored objects defined, do nothing
141  if (!objs || objs->GetEntries() < 1) {
142  Info("SetupMonitor", "No monitored objects defined");
143  return;
144  }
145 
146  FastMonitor* monitor = new FastMonitor(this, "FastMonitor");
147  TObject* obj = 0;
148  TIter next(objs);
149  while ((obj = next())) monitor->Register(obj);
150  monitor->Connect(fMonitor);
151  }
162  {
163  fHeader = new FastShortHeader;
164  fParticles = new TClonesArray("TParticle");
165  fTree->SetBranchAddress("header", &(fHeader->fRunNo));
166  fTree->SetBranchAddress("particles", &fParticles);
167  if (!fCentMethod.IsNull()) {
168  if (fCentMethod.EqualTo("B") && !fTree->GetBranch("B"))
169  fCompatB = true;
170  else
171  fTree->SetBranchAddress(fCentMethod, &fEventMult);
172  }
173  return true;
174  }
182  {
183  if (fCentMethod.IsNull()) return true;
184  if (fCompatB) {
185  Warning("SetupEstimator", "Using fixed estimator");
186  Double_t bs[] = { 0, 1.57, 2.22, 2.71, 3.13,
187  3.50, 4.94, 6.05, 6.98, 7.81,
188  8.55, 9.23, 9.88, 10.47, 11.04,
189  11.58, 12.09, 12.58, 13.05, 13.52,
190  13.97, 14.43, 14.96, 15.67, 20.00 };
191  Double_t cs[] = { 0.5, 1.5, 2.5, 3.5, 4.5,
192  7.5, 12.5, 17.5, 22.5, 27.5,
193  32.5, 37.5, 42.5, 47.5, 52.5,
194  57.5, 62.5, 67.5, 72.5, 77.5,
195  82.5, 87.5, 92.5, 97.5 };
196  TH1* h = new TH1D("rawB", "B to Centrality", 28, bs);
197  h->SetDirectory(0);
198  h->SetXTitle("b\\hbox{ [fm]}");
199  h->SetYTitle("c\\hbox{ [\\%]}");
200  h->SetBinContent(0,1);
201  for (Int_t i = 1; i <= h->GetNbinsX(); i++) {
202  h->SetBinContent(i, cs[i-1]);
203  }
204  // fCentHist = h;
205  return true;
206  }
207 
208  if (!fTree) {
209  Warning("SetupEstimator", "No tree defined!");
210  return false;
211  }
212  TFile* f = fTree->GetCurrentFile();
213  if (!f) {
214  Warning("SetupEstimator", "Failed to get current file from tree");
215  return false;
216  }
217  // TList* l = static_cast<TList*>(f->Get("estimators"));
218  // if (!l) {
219  // Warning("SetupEstimator",
220  // "Failed to get list of estimators from file %s",
221  // f->GetPath());
222  // f->ls();
223  // return false;
224  // }
225  // TObject* o = l->FindObject(fCentMethod);
226  TObject* o = f->Get(Form("estimators/%s",fCentMethod.Data()));
227  if (!o) {
228  Warning("SetupEstimator", "Failed to get %s from estimator list:",
229  fCentMethod.Data());
230  // l->ls();
231  f->ls();
232  return false;
233  }
234  if (!o->IsA()->InheritsFrom(TH1::Class())) {
235  Warning("SetupEstimator", "Estimator object %s is not a histogram "
236  "but a %s", o->GetName(), o->ClassName());
237  return false;
238  }
239  fCentHist = static_cast<TH1*>(o);
240  fCentHist->SetDirectory(0);
241  fTree->SetBranchAddress(fCentMethod, &fEventMult);
242  return true;
243  }
249  void Init(TTree* tree)
250  {
251  Info("Init", "Initializing with tree %p (%s)",
252  tree, (tree ? tree->ClassName() : ""));
253  if (!tree) return;
254 
255  TFile* file = tree->GetCurrentFile();
256  Info("Init", "Current file: (%p) %s", file,
257  (file ? file->GetName() : ""));
258 
259  fTree = tree;
260  if (!SetupBranches())
261  Fatal("Init", "Failed to set-up branches");
262  // if (!SetupEstimator())
263  // Fatal("Init", "Failed to set-up estimator");
264  }
269  virtual void Begin(TTree*)
270  {
271  SetupMonitor();
272  }
279  {
280  TFile* file = fTree->GetCurrentFile();
281  Info("Notify", "processing file: (%p) %s", file,
282  (file ? file->GetName() : ""));
283  if (!file) return true;
284  CopyEgHistogram();
285  if (!SetupBranches()) {
286  Warning("Notify", "Failed to set-up branches");
287  return false;
288  }
289  if (!SetupEstimator()) {
290  Warning("Notify", "Failed to set-up estimator");
291  return false;
292  }
293  return true;
294  }
302  virtual Bool_t Process(Long64_t entry)
303  {
304  Clear();
305  Int_t read = fTree->GetTree()->GetEntry(entry);
306  if (read <= 0) return false;
307 
308  if (fVerbose)
309  printf("Process event %7lld (0x%x) ",
310  entry, fHeader->fType);
311  if (!ProcessHeader()) {
312  if (fVerbose) Printf("No accepted");
313  return true;
314  }
315  fOK++;
316 
318 
319  return true;
320  }
326  virtual void SlaveTerminate()
327  {
328  Printf("A total of %ld events accepted", fOK);
329  TParameter<Long_t>* cnt = new TParameter<Long_t>("count",fOK,'+');
330  fOutput->Add(cnt);
331  fOutput->ls();
332  }
333  Int_t Version() const { return 2; }
334  /* @} */
335 
357  {
358 #if 0
359  Info("GetCentrality", "fCentHist=%p, fCentMethod=%s cent=%f",
360  fCentHist, fCentMethod.Data(), fHeader->fC);
361 #endif
362  if (!fCentHist) return fHeader->fC;
363  Int_t nBin = fCentHist->GetNbinsX();
364  Int_t bin = fCentHist->GetXaxis()->FindBin(fEventMult);
365  if (bin <= 0) {
366  Warning("", "Look-up of %f failed (%d)", fEventMult, bin);
367  return -1;
368  }
369  if (bin-1 == nBin && fEventMult == fCentHist->GetXaxis()->GetXmax()) {
370  bin = nBin;
371  }
372  if (bin > nBin) {
373  Warning("", "Look-up of %f failed (%d > %d)", fEventMult, bin, nBin);
374  return 200;
375  }
376  Double_t cent = fCentHist->GetBinContent(bin);
377  // Info("", "Look-up of %ld -> %d -> %5.1f%%", fEventMult, bin, cent);
378  return cent;
379  }
386  Long_t GetEventCount()
387  {
388  if (fOK > 0) return fOK;
389 
390  typedef TParameter<Long_t> Param_t;
391  Param_t* p = static_cast<Param_t*>(GetOutputObject("count",
392  Param_t::Class()));
393  if (!p) return 0;
394  return fOK = p->GetVal();
395  }
404  TObject* GetOutputObject(const char* name, TClass* cls)
405  {
406  TObject* o = fOutput->FindObject(name);
407  if (!o) {
408  Warning("GetOutputObject", "Object %s not found in output", name);
409  fOutput->ls();
410  return 0;
411  }
412  if (cls && !o->IsA()->InheritsFrom(cls)) {
413  Warning("GetOutputObject", "Object %s from output is not a %s, but a %s",
414  o->GetName(), cls->GetName(), o->ClassName());
415  return o;
416  }
417  return o;
418  }
420  {
421  if (fOutput->FindObject("eg")) return;
422  TFile* file = (fTree ? fTree->GetCurrentFile() : 0);
423  Info("CopyEgHistogram", "Current file: (%p) %s", file,
424  (file ? file->GetName() : ""));
425  if (!file) return;
426  TH1* egTitle = static_cast<TH1*>(file->Get("eg"));
427  if (!egTitle) {
428  Warning("CopyEgHistogram", "No EG histogram");
429  return;
430  }
431  TH1* copy = static_cast<TH1*>(egTitle->Clone());
432  copy->SetDirectory(0);
433  copy->Reset();
434  copy->Fill(0.5);
435  fOutput->Add(copy);
436  }
437  /* @} */
438 
455  virtual TList* GetMonitorObjects() { return 0; }
460  virtual void Clear(Option_t* option="")
461  {
462  fHeader->Clear(option);
463  fParticles->Clear();
464  fEventMult = 0;
465  }
475  virtual void ProcessParticles()
476  {
477  Int_t nParticles = fParticles->GetEntriesFast();
478  Int_t nOK = 0;
479  Int_t nSec = 0;
480  Int_t nNeut = 0;
481  Int_t nOut = 0;
482  for (Int_t iPart = 0; iPart < nParticles; iPart++) {
483  TObject* oPart = fParticles->At(iPart);
484  if (!oPart) continue;
485  if (!oPart->TestBit((1<<14)) || oPart->TestBit(1<<15)) {
486  // If this is a secondary, increment counter
487  nSec++;
488  if (!AcceptSecondaries()) continue;
489  }
490  if (!oPart->TestBit((1<<16))) {
491  // If this is neutral, increment counter
492  nNeut++;
493  if (!AcceptNeutrals()) continue;
494  }
495 
496  if (!ProcessParticle(static_cast<TParticle*>(oPart))) {
497  nOut++;
498  continue;
499  }
500  nOK++;
501  }
502  if (fVerbose)
503  Printf("ok:%7d sec:%7d neu=%7d out:%7d total:%7d",
504  nOK, nSec, nNeut, nOut, nParticles);
505 
506  }
519  virtual Bool_t AcceptSecondaries() const { return false; }
532  virtual Bool_t AcceptNeutrals() const { return false; }
545  virtual Bool_t ProcessParticle(const TParticle* p) = 0;
552  virtual Bool_t ProcessHeader() = 0;
553  /* @} */
554 
567  static Long_t ProofExec(const char* cmd=0)
568  {
569  Bool_t hasCmd = (cmd && cmd[0] != '\0');
570  TString lne;
571  lne.Form("gProof%s%s", (hasCmd ? "->" : ""), (hasCmd ? cmd : ""));
572  Printf("FastAnalysis::ProofExec: %s", lne.Data());
573  return gROOT->ProcessLine(lne);
574  }
575  static Bool_t ProofLoad(const char* file, const char* opt)
576  {
577  const char* real = gSystem->Which(gROOT->GetMacroPath(),
578  file, kReadPermission);
579  if (!real) {
580  ::Warning("ProofLoad", "%s not found in load path: %s",
581  file, gROOT->GetMacroPath());
582  delete real;
583  return false;
584  }
585  TString cc(opt); if (cc == "-") cc = "" ; else cc.Prepend("+");
586  Long_t ret = ProofExec(Form("Load(\"%s%s\",true)",real, cc.Data()));
587  if (ret != 0) {
588  ::Warning("ProofLoad", "Failed to load %s%s", real, cc.Data());
589  delete real;
590  return false;
591  }
592  delete real;
593  return true;
594  }
605  static Bool_t Str2KeyVal(const TString& in,
606  TString& key,
607  TString& val,
608  const char sep='=')
609  {
610  Int_t idx = in.Index(sep);
611  if (idx == kNPOS) return false;
612 
613  key = in(0,idx);
614  val = in(idx+1, in.Length()-idx-1);
615  return true;
616  }
622  static Bool_t SetupProof(TUrl& url, const char* opt,
623  const char* extra)
624  {
625  Long_t ret = 0;
626  gROOT->LoadClass("TProof", "libProof");
627  ret = gROOT->ProcessLine(Form("TProof::Reset(\"%s\")",url.GetUrl()));
628  ret = gROOT->ProcessLine(Form("TProof::Open(\"%s\")",url.GetUrl()));
629  if (!ret) {
630  Printf("Error: FastAnalysis::SetupProof: Failed to connect");
631  return false;
632  }
633  ret = ProofExec("ClearCache()");
634 
635  TString phy = gSystem->ExpandPathName("$(ALICE_PHYSICS)");
636  TString ali = gSystem->ExpandPathName("$(ALICE_ROOT)");
637  TString fwd = phy + "/PWGLF/FORWARD/analysis2";
638  TString mkLib = gSystem->GetMakeSharedLib();
639  mkLib.ReplaceAll("-std=c++14", "-std=c++98");
640  gROOT->SetMacroPath(Form("%s:%s/sim",
641  gROOT->GetMacroPath(), fwd.Data()));
642  ProofExec(Form("Exec(\"gSystem->SetMakeSharedLib(\\\"%s\\\")\")",
643  mkLib.Data()));
644 
645  if (!ProofLoad("FastMonitor.C", opt)) return false;
646  if (!ProofLoad("FastShortHeader.C", opt)) return false;
647  if (!ProofLoad("FastAnalysis.C", opt)) return false;
648  if (!ProofLoad("FastCentHelper.C", opt)) return false;
649  if (!extra || extra[0] == '\0') return true;
650  if (!ProofLoad(extra, opt)) return false;
651 
652  return true;
653  }
654 
655  //==================================================================
662  struct Maker : public TNamed
663  {
665  virtual ~Maker() {}
676  virtual FastAnalysis* Make(const TString& subtype,
677  Int_t monitor,
678  Bool_t verbose,
679  TString& uout) = 0;
683  virtual void List() const = 0;
687  virtual const char* Script() const = 0;
688  protected:
690  Maker(const char* type="");
691  ClassDef(Maker,0);
692  };
693  //==================================================================
694 #ifndef __CINT__
695 
698  struct Factory : public TObject
699  {
703  static Factory& Instance()
704  {
705  static Factory* instance = 0;
706  if (!instance) instance = new Factory;
707  return *instance;
708  }
722  FastAnalysis* Make(const TString& type,
723  const TString& subtype,
724  Int_t monitor,
725  Bool_t verbose,
726  TString& uout)
727  {
728  Bool_t help = (type.EqualTo("help",TString::kIgnoreCase) ||
729  type.EqualTo("list",TString::kIgnoreCase));
730  TIter next(&fList);
731  Maker* maker = 0;
732  while ((maker = static_cast<Maker*>(next()))) {
733  if (!help && !type.EqualTo(maker->GetName(), TString::kIgnoreCase))
734  continue;
735  if (help) Printf("%s", maker->GetName());
736  if (help ||
737  subtype.EqualTo("help", TString::kIgnoreCase) ||
738  subtype.EqualTo("list", TString::kIgnoreCase)) {
739  maker->List();
740  continue;
741  }
742 
743  FastAnalysis* a = maker->Make(subtype,monitor,verbose,uout);
744  if (a) return a;
745  }
746  return 0;
747  }
748  const char* Script(const TString& type) const
749  {
750  TIter next(&fList);
751  Maker* maker = 0;
752  while ((maker = static_cast<Maker*>(next()))) {
753  if (!type.EqualTo(maker->GetName(), TString::kIgnoreCase))
754  continue;
755  return maker->Script();
756  }
757  return 0;
758  }
764  void Register(Maker* m)
765  {
766  fList.Add(m);
767  }
768  private:
769  Factory() : fList() {}
771  };
772 #endif
773 
800  static Bool_t Run(const char* url,
801  const char* output,
802  FastAnalysis* a,
803  const char* script,
804  Long64_t nev=-1,
805  Long64_t offset=0,
806  Int_t monitor=-1,
807  Bool_t verbose=false,
808  const char* opt="")
809 
810  {
811  if (!a) {
812  Printf("Error: FastAnalysis::Run: No analyser given");
813  return false;
814  }
815  TUrl u(url);
816  if (!u.IsValid()) {
817  Printf("Error: FastAnalysis::Run: URL %s is invalid", u.GetUrl());
818  return false;
819  }
820 
821  TString treeName = u.GetAnchor();
822  if (treeName.IsNull()) treeName = "T";
823  TFile* file = TFile::Open(u.GetFile(), "READ");
824  if (!file) {
825  Printf("Error: FastAnalysis::Run: Failed to open %s",
826  u.GetFile());
827  return false;
828  }
829 
830  TChain* chain = new TChain(treeName, treeName);
831  TObject* o = file->Get(treeName);
832  if (!o) {
833  Printf("Error: FastAnalysis::Run: Couldn't get %s from %s",
834  treeName.Data(), u.GetFile());
835  file->Close();
836  return false;
837  }
838  Int_t cret = 0;
839  if (o->IsA()->InheritsFrom(TChain::Class()))
840  cret = chain->Add(static_cast<TChain*>(o));
841  else if (o->IsA()->InheritsFrom(TTree::Class()))
842  cret = chain->AddFile(u.GetFile());
843  else if (o->IsA()->InheritsFrom(TCollection::Class()))
844  cret = chain->AddFileInfoList(static_cast<TCollection*>(o));
845  file->Close();
846  if (cret <= 0 || chain->GetListOfFiles()->GetEntries() <= 0) {
847  Printf("Error: FastAnalysis::Run: Failed to create chain");
848  return false;
849  }
850 
851  TString proto = u.GetProtocol();
852  Bool_t isProof = (proto.EqualTo("proof") || proto.EqualTo("lite"));
853  if (isProof) {
854  if (!SetupProof(u,opt,script)) return false;
855  chain->SetProof();
856  }
857 
858  Printf("===================================================\n"
859  "\n"
860  " Processing chain %s with selector %s\n"
861  " Max events: %lld\n"
862  " Event offset: %lld\n"
863  " URL: %s\n"
864  "\n"
865  "===================================================",
866  chain->GetName(), a->GetName(), nev, offset, u.GetUrl());
867  if (nev < 0) nev = TChain::kBigNumber;
868  Long64_t ret = chain->Process(a, "", nev, offset);
869 
870  if (output && output[0] != '\0') {
871  TFile* out = TFile::Open(output, "RECREATE");
872  a->GetOutputList()->Write("out",TObject::kSingleKey);
873  out->Write();
874  Printf("Saved in %s", out->GetName());
875  }
876 
877  return ret > 0;
878  }
879 
889  static Bool_t Run(const char* url,
890  const char* output,
891  const char* opt="g")
892  {
893  Long64_t nev = -1;
894  Long64_t off = 0;
895  TString type = "";
896  TString sub = "";
897  Int_t monitor = -1;
898  Bool_t verbose = false;
899  TUrl u(url);
900  TString uout = "";
901  TObjArray* opts = TString(u.GetOptions()).Tokenize("&");
902  TObjString* token = 0;
903  TIter nextToken(opts);
904  while ((token = static_cast<TObjString*>(nextToken()))) {
905  TString& str = token->String();
906  if (str.IsNull()) continue;
907 
908  if (str.EqualTo("verbose")) {
909  verbose = true;
910  continue;
911  }
912  TString key, val;
913  if (!Str2KeyVal(str,key,val)) {
914  if (!uout.IsNull()) uout.Append("&");
915  uout.Append(str);
916  continue;
917  }
918 
919  if (key.EqualTo("events")) nev = val.Atoll();
920  else if (key.EqualTo("offset")) off = val.Atoll();
921  else if (key.EqualTo("type")) type = val;
922  else if (key.EqualTo("subtype")) sub = val;
923  else if (key.EqualTo("monitor")) monitor = val.Atoi();
924  else {
925  if (!uout.IsNull()) uout.Append("&");
926  uout.Append(str);
927  }
928  }
929  opts->Delete();
930  FastAnalysis* a = Factory::Instance().Make(type,sub, monitor,verbose,uout);
931  const char* s = Factory::Instance().Script(type);
932  if (type.EqualTo("help",TString::kIgnoreCase) ||
933  type.EqualTo("list",TString::kIgnoreCase) ||
934  sub .EqualTo("help",TString::kIgnoreCase) ||
935  sub .EqualTo("list",TString::kIgnoreCase)) return false;
936  u.SetOptions(uout);
937 
938  return Run(u.GetUrl(), output, a, s, nev, off, monitor, verbose, opt);
939  }
940 
942 };
943 
944 FastAnalysis::Maker::Maker(const char* type)
945  : TNamed(type, "")
946 {
947  // Automatically register
949 }
950 
951 
952 //
953 // EOF
954 //
955 
TObject * GetOutputObject(const char *name, TClass *cls)
Definition: FastAnalysis.C:404
return jsonbuilder str().c_str()
const Color_t cc[]
Definition: DrawKs.C:1
static Factory & Instance()
Definition: FastAnalysis.C:703
double Double_t
Definition: External.C:58
virtual void List() const =0
static Bool_t ProofLoad(const char *file, const char *opt)
Definition: FastAnalysis.C:575
FastAnalysis * Make(const TString &type, const TString &subtype, Int_t monitor, Bool_t verbose, TString &uout)
Definition: FastAnalysis.C:722
const char * url
FastShortHeader * fHeader
Definition: FastAnalysis.C:67
long long Long64_t
Definition: External.C:43
virtual Bool_t SetupEstimator()
Definition: FastAnalysis.C:181
void Clear(Option_t *option="")
ClassDef(FastAnalysis, 1)
TSystem * gSystem
TTree * fTree
Definition: FastAnalysis.C:65
void Init(TTree *tree)
Definition: FastAnalysis.C:249
TH1 * fCentHist
Definition: FastAnalysis.C:81
virtual ~FastAnalysis()
Definition: FastAnalysis.C:110
Int_t Version() const
Definition: FastAnalysis.C:333
virtual void Begin(TTree *)
Definition: FastAnalysis.C:269
static Bool_t SetupProof(TUrl &url, const char *opt, const char *extra)
Definition: FastAnalysis.C:622
Int_t fMonitor
Definition: FastAnalysis.C:85
TStopwatch fTimer
Definition: FastAnalysis.C:73
virtual Bool_t Process(Long64_t entry)
Definition: FastAnalysis.C:302
void Register(Maker *m)
Definition: FastAnalysis.C:764
Definition: External.C:92
void Connect(Int_t freq=-1)
Definition: FastMonitor.C:136
int Int_t
Definition: External.C:63
void CopyEgHistogram()
Definition: FastAnalysis.C:419
void SetVerbose(Bool_t verb)
Definition: FastAnalysis.C:120
Definition: External.C:212
const char * Script(const TString &type) const
Definition: FastAnalysis.C:748
unsigned long ULong_t
Definition: External.C:38
Long_t GetEventCount()
Definition: FastAnalysis.C:386
Double_t GetCentrality() const
Definition: FastAnalysis.C:356
TString fName
Definition: FastAnalysis.C:75
TClonesArray * fParticles
Definition: FastAnalysis.C:69
static Bool_t Run(const char *url, const char *output, FastAnalysis *a, const char *script, Long64_t nev=-1, Long64_t offset=0, Int_t monitor=-1, Bool_t verbose=false, const char *opt="")
Definition: FastAnalysis.C:800
static Bool_t Run(const char *url, const char *output, const char *opt="g")
Definition: FastAnalysis.C:889
virtual void ProcessParticles()
Definition: FastAnalysis.C:475
Bool_t fVerbose
Definition: FastAnalysis.C:71
static Bool_t Str2KeyVal(const TString &in, TString &key, TString &val, const char sep='=')
Definition: FastAnalysis.C:605
const char * fwd
TList * GetListOfFiles(const char *input=".")
Definition: RunFinalQA.C:114
void Register(TObject *descr, Bool_t proof=true)
Definition: FastMonitor.C:186
ULong64_t fEventMult
Definition: FastAnalysis.C:77
ULong_t fOK
Definition: FastAnalysis.C:83
virtual FastAnalysis * Make(const TString &subtype, Int_t monitor, Bool_t verbose, TString &uout)=0
Definition: External.C:220
virtual const char * Script() const =0
void SetupMonitor()
Definition: FastAnalysis.C:124
virtual Bool_t ProcessParticle(const TParticle *p)=0
Bool_t Notify()
Definition: FastAnalysis.C:278
Bool_t fCompatB
Definition: FastAnalysis.C:86
TFile * file
virtual TList * GetMonitorObjects()
Definition: FastAnalysis.C:455
const char Option_t
Definition: External.C:48
virtual void SlaveTerminate()
Definition: FastAnalysis.C:326
bool Bool_t
Definition: External.C:53
virtual Bool_t AcceptNeutrals() const
Definition: FastAnalysis.C:532
FastAnalysis(Bool_t verb=false, Int_t monitor=0)
Definition: FastAnalysis.C:94
virtual Bool_t ProcessHeader()=0
Maker(const char *type="")
Definition: FastAnalysis.C:944
TString fCentMethod
Definition: FastAnalysis.C:79
Bool_t SetupBranches()
Definition: FastAnalysis.C:161
Definition: External.C:196
virtual Bool_t AcceptSecondaries() const
Definition: FastAnalysis.C:519
virtual void Clear(Option_t *option="")
Definition: FastAnalysis.C:460
static Long_t ProofExec(const char *cmd=0)
Definition: FastAnalysis.C:567