StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMaker.cxx
1 // $Id: StMaker.cxx,v 1.269 2020/02/20 22:26:33 genevb Exp $
2 //
3 //
20 #define STAR_LOGGER 1
21 #include "StMaker.h"
22 #include "Stiostream.h"
23 #include <stdio.h>
24 #include <stdlib.h>
25 
26 #include "TClass.h"
27 #include "TROOT.h"
28 #include "TError.h"
29 #if 0
30 #include "THtml.h"
31 #endif
32 #include "TH1.h"
33 
34 #include "TChain.h"
35 #include "TTree.h"
36 #include "TList.h"
37 #include "TClonesArray.h"
38 #include "TBrowser.h"
39 
40 #include "StChainOpt.h"
41 #include "TObjectSet.h"
42 #include "StChain.h"
43 #include "TTable.h"
44 #include "StMemStat.h"
45 #include "TAttr.h"
46 #include "StMkDeb.h"
47 #include "StMessMgr.h"
48 
53 Int_t StMaker::fgTallyMaker[kStFatal+1] = {0,0,0,0,0};
54 Int_t MaxWarnings = 26;
55 
56 class MyObjectSet : public TObjectSet
57 {
58  typedef void (*MyDelete_t)(void *p);
59 public:
60 MyObjectSet(const char *name,void *p,void *d):TObjectSet(name,(TObject*)p,0)
61  {fD=(MyDelete_t)d;}
62 ~MyObjectSet(){ (*fD)(GetObject());}
63 private:
64 MyDelete_t fD;
65 };
66 
67 /* geometry version from Maxim 09/29/2005
68 year2000 VMC
69 year_2a
70 year_2b
71 year2001 VMC
72 year2002 VMC
73 year2003 VMC
74 y2003a VMC
75 y2003b VMC
76 y2003x VMC
77 y2004 VMC
78 y2004a VMC
79 y2004b VMC
80 y2004c VMC
81 y2004x VMC
82 y2004y VMC
83 y2005 VMC
84 y2005b VMC
85 y2005c VMC
86 y2005x VMC
87 dev2005 - non-production
88 complete - non-production
89 ist1 - non-production VMC
90 pix1 - non-production
91 ----------------
92 old version of db tags
93 {"sd97", 19970101, 0},
94 {"sd98", 19980101, 0},
95 {"year_1a", 19990101, 0},
96 {"year_1b", 19990501, 0},
97 {"es99", 19990615, 0},
98 {"er99", 19990616,120000},
99 {"year_1c", 19991001, 0},
100 {"year_1d", 19991101, 0},
101 {"year_1e", 19991201, 0},
102 {"dc99", 19991206, 80000},
103 {"y2000", 20000614,175430},
104 {"year_2b", 20010501, 0},
105 {"year_2a", 20010610, 0},
106 {"year2001", 20010615, 0},
107 {"year2003", 20021115, 0},
108 {"y2003b", 20021115, 0},
109 {"y2003a", 20021115, 0},
110 {"y2003x", 20021115, 0},
111 {"y2004b", 20031120, 0},
112 {"y2004a", 20031120, 0},
113 {"y2004x", 20031120, 0},
114 {"y2004", 20031120, 0},
115 {"y2004c", 20031125, 0},
116 {"y2005x", 20041030, 0},
117 {"y2005", 20041030, 0},
118 {"y2005b", 20041101, 0},
119 {"y2005c", 20041201, 0},
120  Production
121 =============
122  MC:
123 
124  2000: y1a,y1b,y1h,y2000,year_1a,year_1b
125  2001: y2001,y2001n
126  2002: y2a,y2b,y2x,y2y,year_2a
127  2003: y2003,y2003x
128  2004: y2004a, y2004c,y2004,y2004y
129  2005: y2005,y2005x
130  2006: y2006c,y2006
131  2007: y2007g,y2007
132  upgr: upgr01, upgr05, upgr06, upgr07, upgr08, upgr09, upgr10, upgr11, upgr13
133 =============
134  rawData:
135  2000: y1h, y2000a (?), y2000
136  y2001
137  y2003
138  y2004
139  y2005b,y2005f
140  y2006g,y2006
141  y2007g,y2007
142  y2008
143 
144 04/29/09 Lidia
145  Geometry versions used for raw data productions
146  ry2008, ry2007g, ry2007, ry2006, ry2006g, ry2005f, ry2005b, ry2004, ry2003,
147  ry2001, ry2000, ry2000a, ry1h
148  Geometry versions used for MC data productions
149  y2008, y2007, y2007g, y2007h, y2006, y2006c, y2005, y2005b, y2005h, y2005x,
150  y2004, y2004a, y2004c, y2004y, y2003, y2003x, y2001, y2001n, y2000, y1h
151  Raw Data: MC:
152  ry1h, y1h,
153  ry2000, y2000,
154  ry2000a, <====== does not exists
155  ry2001, y2001,
156  y2001n,<====== the same as y2001
157  ry2003, y2003,
158  y2003x,
159  ry2004, y2004,
160  y2004a,
161  y2004c,
162  y2004y,
163  y2005,
164  ry2005b, y2005b,
165  ry2005f,
166  y2005h,
167  y2005x,
168  ry2006, y2006,
169  ry2006g,
170  y2006c,
171  ry2007, y2007,
172  ry2007g, y2007g,
173  y2007h,
174  ry2008, y2008,
175 
176 */
177 #include "GeometryDbAliases.h"
178 // Turn the logger of the current maker
179 #define TURN_LOGGER(maker) \
180  if (!fLogger) fLogger = StMessMgr::Instance(ClassName()); \
181  StTurnLogger SaveRestoreLogger(maker->GetLogger());
182 
183 
184 ClassImp(StMaker)
185 
186 
187 //_____________________________________________________________________________
188 StMaker::StMaker(const Char_t *name,const Char_t *):TDataSet(name,".maker"),
189  m_Number(0), m_LastRun(-3),
190  m_DebugLevel(0),m_MakeReturn(0),fStatus(0),
191  fLogger(0),fLoggerHold(0),m_Mode(0)
192 {
193  m_Attr=0;
194  m_Inputs = 0;
195  if (!fgStChain) { // it is first maker, it is chain
196  fgTopChain = fgStChain = this;
197  gROOT->GetListOfBrowsables()->Add(this,GetName());
198  AddData(0,".make");
199  } else { // add this maker to chain
200  fgStChain->AddData(this,".make");
201  }
202  m_DataSet = new TObjectSet(".data") ;Add(m_DataSet);
203  m_ConstSet = new TObjectSet(".const");Add(m_ConstSet);
204  m_GarbSet = new TObjectSet(".garb" );Add(m_GarbSet);
205  m_Inputs = new TObjectSet(".aliases" );Add(m_Inputs);
206  m_Runco = new TObjectSet(".runco" );Add(m_Runco);
207  AddHist(0); m_Histograms = GetHistList();
208  StMemStat::doPs(GetName(), "Construct");
209  m_Timer.Stop();
210  fMemStatMake = 0;
211  fMemStatClear = 0;
212  memset(fTallyMaker,0,(kStFatal+1)*sizeof(Int_t));
213  SetActive();
214  StMkDeb::Register(this);
215 }
216 
217 //_____________________________________________________________________________
218 void StMaker::AddMaker(StMaker *mk)
219 {
220  TDataSet *dotmk = Find(".make");
221  if (!dotmk) dotmk = new TDataSet(".make",this);
222  mk->Shunt(dotmk);
223 }
224 //_____________________________________________________________________________
225 StMaker::~StMaker()
226 {
227  if (fgTopChain == this) fgTopChain = 0;
228  if (fgStChain == this) fgStChain = 0;
229  delete fMemStatMake; fMemStatMake = 0;
230  delete fMemStatClear; fMemStatClear = 0;
231  TDataSet *ds = this;
232  Cleanup(ds);
233  StMkDeb::Cancel(this);
234  // delete fLogger; fLogger = 0;
235 }
236 //_____________________________________________________________________________
237 const Char_t *StMaker::GetName() const
238 {
239  static Int_t occ = 0;
240  const Char_t *name = TNamed::GetName();
241  if (name && *name ) return name;
242  TString ts(ClassName());
243  ts+="#"; ts+=(occ++);
244  ((TNamed*)this)->SetName(ts.Data());
245  return GetName();
246 }
247 //______________________________________________________________________________
248 void StMaker::SetNumber(Int_t number)
249 {
250  StMaker *par = GetParentMaker();
251  if (par) par->SetNumber(number);
252  m_Number = number;
253  SetIventNumber(number);
254 }
255 //______________________________________________________________________________
256 Int_t StMaker::GetNumber() const
257 {
258  StMaker *par = GetParentMaker();
259  if (par) return par->GetNumber();
260  return m_Number;
261 }
262 //______________________________________________________________________________
263 StMaker *StMaker::GetParentMaker() const
264 {
265  TDataSet *par = GetParent(); if (!par) return 0;
266  return (StMaker*)par->GetParent();
267 }
268 //______________________________________________________________________________
269 StMaker *StMaker::GetMaker(const Char_t *mkname)
270 {
271  TString path(".make/"); path+=mkname;
272  return (StMaker*)GetDataSet((const char*)path);
273 }
274 //______________________________________________________________________________
275 TObject *StMaker::GetDirObj(const Char_t *dir) const
276 {
277  TObjectSet *h = (TObjectSet*)Find(dir);
278  if (!h) return 0;
279  return h->GetObject();
280 }
281 //______________________________________________________________________________
282 void StMaker::SetDirObj(TObject *obj,const Char_t *dir)
283 {
284  TObjectSet *set = (TObjectSet *)Find(dir);
285  if (!set) { // No dir, make it
286  set = new TObjectSet(dir); Add(set);}
287  set->SetObject(obj);
288 }
289 //______________________________________________________________________________
290 TDataSet *StMaker::AddObj(TObject *obj,const Char_t *dir,int owner)
291 {
292  assert (dir[0]=='.');
293  if (strcmp(".hist",dir)==0) { //Histogram directory
294  AddHist((TH1*)obj); return 0;
295  } else if (strcmp(".data",dir)==0) { //.data
296  return ToWhiteBoard(obj->GetName(),obj,owner);
297 
298  } else if (strcmp(".const",dir)==0) { //.const
299  return ToWhiteConst(obj->GetName(),obj);
300  } else { assert(0 && "No .data || .const ||.hist");}
301 }
302 //______________________________________________________________________________
303  void StMaker::AddHist(TH1 *h,const Char_t *)
304 {
305  TObjectSet *set = (TObjectSet*)Find(".hist");
306  if (!set) { // No dir, make it
307  set = new TObjectSet(".hist"); Add(set);}
308 
309  TList *list = (TList *)set->GetObject();
310  if (!list) {// No list, make it
311  list = new TList(); set->SetObject(list);}
312 
313  if (!h) return ;
314  if(!list->FindObject(h)) list->Add(h);
315  if (h->InheritsFrom(TH1::Class())) h->SetDirectory(0);
316 }
317 //______________________________________________________________________________
318 void StMaker::AddRunco (Double_t par,const Char_t *name,const Char_t *comment)
319 {
320  assert (name && name && comment[0]);
321 
322  TDataSet *dp = new TDataSet(name,m_Runco);
323  TString ts(" // "); ts += comment;
324  Char_t buf[40];
325  sprintf(buf,"%f",par);
326  ts.Replace(0,0,buf);
327  dp->SetTitle((const char*)ts);
328 }
329 
330 
331 //______________________________________________________________________________
332 void StMaker::AddData(TDataSet *ds, const Char_t *dir)
333 {
334  assert (dir); assert(dir[0]=='.');
335  TDataSet *set = Find(dir);
336  if (!set) { // No dir, make it
337  set = new TObjectSet(dir); Add(set);}
338  if (!ds) return;
339  Int_t dotMake = (strcmp(dir,".make")==0);
340  Int_t inhMake = ds->InheritsFrom(StMaker::Class());
341  if (dotMake!=inhMake) {
342  Error("AddData","Add to %s is NOT allowed: %s.%s\n"
343  ,dir,ds->ClassName(),ds->GetName());
344  return;}
345 
346  TList *tl = set->GetList();
347  if (!tl || !tl->FindObject(ds->GetName())) {
348  set->Add(ds);
349  } else {
350  Error("AddData","Data %s/%s is not added. ***Name clash***",dir,ds->GetName());
351  return;
352  }
353  return;
354 }
355 //______________________________________________________________________________
356 TDataSet *StMaker::GetData(const Char_t *name, const Char_t *dir) const
357 {
358  TDataSet *set = Find(dir);
359  if (!set) return 0;
360  if (!name || !name[0]) return set;
361  return set->Find(name);
362 }
363 //______________________________________________________________________________
364 TDataSet *StMaker::ToWhiteBoard(const Char_t *name, void *dat)
365 {
366  TObjectSet *envelop = new TObjectSet(name,(TObject*)dat,0);
367  envelop->SetTitle(".envelop");
368  AddData(envelop,".data");
369  return envelop;
370 }
371 //______________________________________________________________________________
372 TDataSet *StMaker::ToWhiteBoard(const Char_t *name, void *dat, void *owner)
373 {
374  MyObjectSet *envelop = new MyObjectSet(name,dat,owner);
375  envelop->SetTitle(".envelop");
376  AddData(envelop,".data");
377  return envelop;
378 }
379 //______________________________________________________________________________
380 TDataSet *StMaker::ToWhiteBoard(const Char_t *name, TObject *dat, Int_t owner)
381 {
382  TObjectSet *envelop = new TObjectSet(name,dat,owner);
383  envelop->SetTitle(".envelop");
384  AddData(envelop,".data");
385  return envelop;
386 }
387 //______________________________________________________________________________
388 TDataSet *StMaker::ToWhiteConst(const Char_t *name, void *dat)
389 {
390  TObjectSet *envelop = new TObjectSet(name,(TObject*)dat,0);
391  envelop->SetTitle(".envelop");
392  AddData(envelop,".const");
393  return envelop;
394 }
395 //______________________________________________________________________________
396 TDataSet *StMaker::ToWhiteConst(const Char_t *name, TObject *dat)
397 {
398  TObjectSet *envelop = new TObjectSet(name,dat,0);
399  envelop->SetTitle(".envelop");
400  AddData(envelop,".const");
401  return envelop;
402 }
403 //______________________________________________________________________________
404 TDataSet *StMaker::WhiteBoard(const Char_t *name, void *v) const
405 {
406  void **dat = (void **)v;
407  *dat = 0;
408  TDataSet *ds = GetDataSet(name);
409  if (!ds) return 0;
410  if (strcmp(".envelop",ds->GetTitle())==0) {*dat = ds->GetObject();}
411  else {*dat = ds ;}
412  return ds;
413 }
414 //______________________________________________________________________________
415 void StMaker::AddAlias(const Char_t *log, const Char_t *act,const Char_t *dir)
416 {
417  TDataSet *ali = new TDataSet(log);
418  ali->SetTitle(act);
419  AddData(ali,dir);
420 }
421 //______________________________________________________________________________
422 void StMaker::SetNotify(const Char_t *about, StMaker *mk)
423 {
424  TDataSet *ali = new TObjectSet(about,mk,0);
425  AddData(ali,".notify");
426 }
427 //______________________________________________________________________________
428 void StMaker::NotifyEm(const Char_t *about, const void *ptr)
429 {
430 // Turn the logger of the current maker
431  TURN_LOGGER(this);
432 
433  TDataSet *set = Find(".notify");
434  if (!set) return;
435  TDataSetIter iter(set);
436  TObjectSet *os=0;
437  while((os=(TObjectSet*)iter())) {
438  if (strcmp(about,os->GetName())) continue;
439  StMaker *mk=(StMaker*)os->GetObject();
440  if (!mk) continue;
441  TURN_LOGGER(mk);
442  mk->NotifyMe(about,ptr);
443  }
444 
445 }
446 //______________________________________________________________________________
447 void StMaker::SetAlias(const Char_t *log, const Char_t *act,const Char_t *dir)
448 {
449  TDataSet *ali = GetData(log,dir);
450  if (ali) {
451  if (!strcmp(act,ali->GetTitle())) return;
452  } else {
453  ali = new TDataSet(log); AddData(ali,dir);
454  }
455  ali->SetTitle(act);
456 
457  if (GetDebug()) {
458 #ifdef STAR_LOGGER
459  LOG_DEBUG << "<" << ClassName() << "(" << GetName() << "::SetAlias> "
460  << log << " = " << act << endm;
461 #else
462  printf("<%s(%s)::SetAlias> %s = %s\n",ClassName(),GetName(),log,act);
463 #endif
464  }
465 }
466 //______________________________________________________________________________
467 void StMaker::SetOutput(const Char_t *log,TDataSet *ds)
468 {
469  Int_t idx;
470  const Char_t *logname = log;
471  if (!logname || !logname[0]) logname = ds->GetName();
472  TString act = ds->Path();
473  while ((idx=act.Index(".make/"))>=0) act.Replace(0,idx+6,"");
474  SetOutput(logname,act);
475 }
476 
477 //______________________________________________________________________________
478 void StMaker::SetOutputAll(TDataSet *ds, Int_t level)
479 {
480  TDataSet *set;
481  TDataSetIter next(ds,level);
482  while ((set = next())) SetOutput(set);
483 }
484 
485 //______________________________________________________________________________
486 TList *StMaker::GetMakeList() const
487 { TDataSet *ds = Find(".make");
488  if (!ds) return 0;
489  return ds->GetList();
490 }
491 //______________________________________________________________________________
492 TString StMaker::GetAlias(const Char_t *log,const Char_t *dir) const
493 {
494  Int_t nspn = strcspn(log," /");
495  TString act(log,nspn);
496  TDataSet *in = GetData(act,dir);
497  act ="";
498  if (in) {act = in->GetTitle(); act += log+nspn;}
499  return act;
500 }
501 //______________________________________________________________________________
502 TDataSet *StMaker::FindDataSet(const Char_t *logInput,
503  const StMaker *uppMk,
504  const StMaker *dowMk) const
505 {
506  TURN_LOGGER(this);
507 
508 TDataSetIter nextMk(0);
509 TString actInput,findString,tmp;
510 TDataSet *dataset=0,*dir;
511 StMaker *parent,*mk;
512 Int_t icol,islas;
513 
514  for (int itry=0;itry<2;itry++) {
515  actInput = (!itry)? GetInput(logInput).Data():logInput;
516  dataset = 0;
517  if (actInput.IsNull()) continue;
518  // Direct try
519  //if (actInput.Contains(".")) dataset = Find(actInput);
520  // GVB: The use of TString::Contains() [above] is time-expensive for
521  // finding a single character. Using strchr() [below] is much faster.
522  if (strchr(actInput.Data(),'.')) dataset = Find(actInput);
523  if (dataset) goto FOUND;
524 
525  if (actInput==GetName()) dataset = m_DataSet;
526  if (dataset) goto FOUND;
527 
528  // Not so evident, do some editing
529 
530 
531  icol = actInput.Index(":");
532  if (icol>=0) {//there is maker name is hidden
533  tmp = actInput;
534  tmp.Replace(0,0,".make/"); icol +=6;
535  tmp.Replace(icol,1,"/.data/");
536  dataset = Find((const char*)tmp); // .make/MAKER/.data/...
537  if (dataset) goto FOUND;
538  dataset = Find((const char*)tmp+6); // MAKER/.data/...
539  if (dataset) goto FOUND;
540  tmp.Replace(icol,7,"/.const/");
541  dataset = Find((const char*)tmp); // .make/MAKER/.const/...
542  if (dataset) goto FOUND;
543  dataset = Find((const char*)tmp+6); // MAKER/.const/...
544  if (dataset) goto FOUND;
545  goto DOWN;
546  }
547 
548  if (m_DataSet) {
549  islas = actInput.Index("/");
550  if (islas>0) {
551  tmp.Replace(0,999,actInput,islas);
552  if (tmp == GetName()) { //
553  tmp = actInput;
554  tmp.Replace(0,islas+1,"");
555  dataset = m_DataSet->Find(tmp);
556  if (dataset) goto FOUND;
557  dataset = m_ConstSet->Find(tmp);
558  if (dataset) goto FOUND;
559  }
560  }
561 
562  dataset = m_DataSet->Find(actInput);
563  if (dataset) goto FOUND;
564  dataset = m_ConstSet->Find(actInput);
565  if (dataset) goto FOUND;
566  }
567 
568  // Try to search DOWN
569  DOWN: if (!(dir = Find(".make"))) goto UP;
570 
571  nextMk.Reset(dir);
572  while ((mk = (StMaker* )nextMk()))
573  {
574  if (mk==dowMk) continue;
575  dataset = mk->FindDataSet(actInput,this,0);
576  if (dataset) goto FOUND;
577  }
578 
579  // Try to search UP
580  UP: if (uppMk) return 0;
581 
582  parent = GetMaker(this); if (!parent) goto NOTFOUND;
583  dataset = parent->FindDataSet(actInput,0,this);
584  if (dataset) goto FOUND;
585 
586  // Not FOUND
587  NOTFOUND:
588  if (!dowMk && GetDebug()>1) //PrintWarning message
589  if ((MaxWarnings--) > 0) Warning("GetDataSet"," \"%s\" Not Found ***\n",(const char*)actInput);
590  dataset = 0; continue;
591 
592  // DataSet FOUND
593  FOUND: if (uppMk || dowMk) return dataset;
594  if (GetDebug()<2) return dataset;
595 #ifdef STAR_LOGGER
596  LOG_DEBUG << Form("<%s::%s> DataSet %s FOUND in %s\n"
597  ,ClassName(),"GetDataSet",logInput,(const char*)dataset->Path()) << endm;
598 #else
599  printf("Remark: <%s::%s> DataSet %s FOUND in %s\n"
600  ,ClassName(),"GetDataSet",logInput,(const char*)dataset->Path());
601 #endif
602  break;
603  }
604  return dataset;
605 
606 }
607 //______________________________________________________________________________
608 TDataSet *StMaker::GetDataBase(const Char_t *logInput,const TDatime *td)
609 {
610  TURN_LOGGER(this);
611  TDataSet *ds = 0;
612  StMaker *mk = GetMakerInheritsFrom("St_db_Maker");
613  if (mk) ds = mk->GetDataBase(logInput,td);
614  return ds;
615 }
616 //______________________________________________________________________________
617 StMaker *StMaker::GetMakerInheritsFrom (const Char_t *mktype) const
618 {
619  TURN_LOGGER(this);
620  StMaker *mk = 0;
621  StMakerIter mkiter(this);
622  while ((mk = mkiter.NextMaker())) {//loop over makers
623  if (mk->InheritsFrom(mktype)) break;
624  }
625  return mk;
626 }
627 //______________________________________________________________________________
628 void StMaker::SetFlavor(const Char_t *flav,const Char_t *tabname)
629 {
630  StMaker *mk = GetMakerInheritsFrom("St_db_Maker");
631  if (mk) mk->SetFlavor(flav,tabname);
632 }
633 //_____________________________________________________________________________
634 void StMaker::Clear(Option_t *option)
635 {
636  TURN_LOGGER(this);
637 
638  m_MakeReturn = 0;
639  if(option){};
640  if (m_DataSet) m_DataSet->Delete();
641 
642 // Reset lists of event objects
643 
644  TIter next(GetMakeList(),kIterBackward);
645  StMaker *maker;
646  Int_t curr = StMkDeb::GetCurrent();
647  while ((maker = (StMaker* )next())) {
648  assert(maker->TestBIT(kCleaBeg)==0);
649  StMkDeb::SetCurrent(maker,3);
650  maker->SetBIT(kCleaBeg);
651  maker->StartTimer();
652  if (maker->fMemStatClear && GetNumber()>20) maker->fMemStatClear->Start();
653  TURN_LOGGER(maker);
654  maker->Clear(option);
655  if (maker->fMemStatClear && GetNumber()>20) maker->fMemStatClear->Stop();
656  maker->StopTimer();
657  maker->ResetBIT(kCleaBeg);
658  StMkDeb::SetCurrent(curr);
659  }
660  TCollection::EmptyGarbageCollection();
661  StMemStat::doPs(GetName(), "Clear");
662  // Maker=StChain or whatever is called "Eread" would
663  // reach this with a NULL pointer when executed from a macro
664  // such as doEvent(). Same reason for the patch below ...
665  //else printf("StMaker::Clear :: cannot call method doPs on NULL pointer [%s]\n",GetName()) ;
666  return;
667 
668 }
669 //_____________________________________________________________________________
670 Int_t StMaker::Init()
671 {
672  TURN_LOGGER(this);
673  TObject *objLast,*objHist;
674  TList *tl = GetMakeList();
675  if (!tl) return kStOK;
676 
677  TIter nextMaker(tl);
678  StMaker *maker;
679  Int_t curr = StMkDeb::GetCurrent();
680  while ((maker = (StMaker* )nextMaker())) {
681 
682  TURN_LOGGER(maker);
683  // save last created histogram in current Root directory
684  gROOT->cd();
685  objLast = gDirectory->GetList()->Last();
686 
687  // Initialise maker
688 
689  assert( !( maker->TestBIT(kInitBeg) || maker->TestBIT(kInitEnd) ));
690  StMkDeb::SetCurrent(maker,1);
691  maker->SetBIT(kInitBeg);
692  maker->StartTimer();
693 
694  if (GetDebug()) {
695  LOG_DEBUG << "*** Call << " << maker->ClassName() << ":Init() ***" << endm;
696  }
697  TString ts1(maker->ClassName()); ts1+="("; ts1+=maker->GetName(); ts1+=")::";
698  TString ts2 = ts1; ts2+="Make ";
699  maker->fMemStatMake = new StMemStat(ts2);
700  ts2 = ts1; ts2+="Clear";
701  maker->fMemStatClear = new StMemStat(ts2);
702 
703  if ( maker->Init()) {
704  LOG_ERROR << " Maker "<< maker->GetName() << " failed in Init" << endm;
705  return kStErr;
706  }
707  maker->StopTimer();
708 
709 // Add the Maker histograms in the Maker histograms list
710 // and remove it from the ROOT system directory
711  gROOT->cd();
712  TIter nextHist(gDirectory->GetList());
713  Int_t ready = !objLast;
714  while((objHist=nextHist())) {// loop over gDirectory
715  if (!ready && objHist!=objLast) continue;
716  ready = 1999;
717  if (objHist==objLast) continue;
718  if (!objHist->InheritsFrom("TH1")) continue;
719 
720 // Move the histogram from the ROOT list into the "maker's" list
721  ((TH1*)objHist)->SetDirectory(0);
722  maker->AddHist((TH1*)objHist);
723  }
724  StMemStat::doPs(maker->GetName(), "Init");
725  maker->ResetBIT(kInitBeg);
726  maker->SetBIT (kInitEnd);
727  StMkDeb::SetCurrent(curr);
728  }
729  return kStOK;
730 }
731 //_____________________________________________________________________________
732 void StMaker::StartMaker()
733 {
734  // Save the previous logger status
735  if (!fLoggerHold) fLoggerHold = new StTurnLogger(GetLogger());
736  if (!m_DataSet) {//Keep legacy code
737  m_DataSet = Find(".data");
738  if (!m_DataSet) {m_DataSet = new TObjectSet(".data"); Add(m_DataSet);}
739  }
740  /*if (GetNumber()>3)*/
741  if (fMemStatMake && GetNumber()>20) fMemStatMake->Start();
742 
743 
744 
745  StartTimer();
746 }
747 //_____________________________________________________________________________
748 void StMaker::EndMaker(Int_t ierr)
749 {
750  SetMakeReturn(ierr);
751 
752  // check dimension in case of logic problem
753  int idx = ierr%10;
754  if ( idx <= kStFatal ){
755  fgTallyMaker[idx]++;
756  fTallyMaker [idx]++;
757  }
758  if (m_DataSet) m_DataSet->Pass(ClearDS,0);
759  if (m_GarbSet) m_GarbSet->Delete();
760  StMemStat::doPs(GetName(), "EndMaker");
761 
762  /* if (GetNumber()>3)*/
763  if (fMemStatMake && GetNumber()>20) fMemStatMake->Stop();
764 
765  StopTimer();
766  // Restore the previous logger status
767  if (fLoggerHold) { delete fLoggerHold; fLoggerHold = 0;}
768 
769 }
770 
771 //_____________________________________________________________________________
777 {
778  if (TestBIT(kFiniEnd)) return 1;
779  TURN_LOGGER(this);
780 
781  Int_t nerr = 0;
782  Int_t run = GetRunNumber();
783  if (run>-1) FinishRun(run);
784 
785  TIter next(GetMakeList(),kIterBackward);
786  StMaker *maker;
787  Double_t totalCpuTime = 0;
788  Double_t totalRealTime = 0;
789  while ((maker = (StMaker* )next()))
790  {
791  totalCpuTime += maker->CpuTime();
792  totalRealTime += maker->RealTime();
793  }
794 
795  // Printrelative time
796  if (!totalRealTime) totalRealTime = 1;
797  if (!totalCpuTime ) totalCpuTime = 1;
798 
799  next.Reset();
800  Int_t fst=1;
801  while ((maker = (StMaker*)next())) {
802  #ifdef STAR_LOGGER
803  TURN_LOGGER(maker);
804 
805  if (fst) {
806  fst=0;
807  LOG_QA <<
808  Form("=================================================================================") << endm;
809  LOG_QA <<
810  Form("QAInfo:Chain %20s::%-20s Ast =%6.2f Cpu =%6.2f "
811  ,ClassName(),GetName(),totalRealTime,totalCpuTime) << endm;
812  }
813  LOG_QA <<
814  Form("QAInfo:Maker %20s::%-20s Ast =%6.2f(%4.1f%%) Cpu =%6.2f(%4.1f%%) "
815  ,maker->ClassName(),maker->GetName()
816  ,maker->RealTime()
817  ,100*maker->RealTime()/totalRealTime
818  ,maker->CpuTime()
819  ,100*maker->CpuTime()/totalCpuTime) << endm;
820 
821  static const Char_t *ee[]={"nStOK","nStWarn","nStEOF","nStErr","nStFatal"};
822  TString tail("");
823  for (Int_t j=0;j<=kStFatal;j++) {
824  if (fTallyMaker[j]) tail += Form(" %s=%d",ee[j],fTallyMaker[j]);}
825  if (tail != "") LOG_QA << (const Char_t *) tail << endm;
826 #else
827  if (fst) {
828  fst=0;
829  Printf("=================================================================================\n");
830  Printf("QAInfo: Chain %20s::%-20s Ast =%6.2f Cpu =%6.2f "
831  ,ClassName(),GetName(),totalRealTime,totalCpuTime);
832  }
833  printf("QAInfo: Maker %20s::%-20s Ast =%6.2f(%4.1f%%) Cpu =%6.2f(%4.1f%%) "
834  ,maker->ClassName(),maker->GetName()
835  ,maker->RealTime()
836  ,100*maker->RealTime()/totalRealTime
837  ,maker->CpuTime()
838  ,100*maker->CpuTime()/totalCpuTime);
839 
840  static const Char_t *ee[]={"nStOK","nStWarn","nStEOF","nStErr","nStFatal"};
841  for (Int_t j=0;j<=kStFatal;j++) {
842  if (fTallyMaker[j]) printf(" %s=%d",ee[j],fTallyMaker[j]);}
843  printf("\n");
844 #endif
845  }
846 
847  next.Reset();
848  Int_t curr = StMkDeb::GetCurrent();
849  while ((maker = (StMaker* )next()))
850  {
851  TURN_LOGGER(maker);
852 
853  if (maker->TestBIT(kFiniEnd)) {
854  maker->Warning("Finish","maker %s.%s Finished twice"
855  ,maker->GetName(),maker->ClassName());
856  continue;}
857  StMkDeb::SetCurrent(maker,4);
858  maker->SetBIT(kFiniBeg);
859  if ( maker->Finish() ) nerr++;
860  maker->ResetBIT(kFiniBeg);
861  maker->SetBIT (kFiniEnd);
862  StMkDeb::SetCurrent(curr);
863  }
864  if (!GetParent()) {// Only for top maker
865 #ifdef STAR_LOGGER
866  LOG_INFO << "--------------Error Codes-------------------------" << endm;
867  LOG_INFO << " nStOK nStWarn nStEOF nStErr nStFatal" << endm;
868  TString tail("");
869  for( Int_t i=0; i<=kStFatal; i++) tail += Form("%10d",fgTallyMaker[i]);
870  if (tail != "")
871  LOG_INFO << (const Char_t *)tail << endm;
872  LOG_INFO << "--------------------------------------------------" << endm;
873 #else
874  printf("\n--------------Error Codes-------------------------\n");
875  printf(" nStOK nStWarn nStEOF nStErr nStFatal \n");
876  for( Int_t i=0; i<=kStFatal; i++) printf("%10d",fgTallyMaker[i]);
877  printf("\n--------------------------------------------------\n");
878 #endif
879  }
880 //VP Printf("=================================================================================\n");
881 
882  if (GetParent()==0) StMemStat::Summary();
883  // delete fLogger; fLogger=0;
884  return nerr;
885 }
886 
887 //_____________________________________________________________________________
899 {
900  TURN_LOGGER(this);
901 
902 // Loop on all makers
903  Int_t ret,run=-1,oldrun;
904  TList *tl = GetMakeList();
905  if (!tl) return kStOK;
906  StEvtHddr *hd = GetEvtHddr();
907  TIter nextMaker(tl);
908  StMaker *maker;
909  fgFailedMaker = 0;
910  Int_t curr = StMkDeb::GetCurrent();
911  while ((maker = (StMaker* )nextMaker())) {
912  if (!maker->IsActive()) continue;
913  TURN_LOGGER(maker);
914  assert(!maker->TestBIT(kMakeBeg));
915  maker->SetBIT(kMakeBeg);
916  StMkDeb::SetCurrent(maker,2);
917  oldrun = maker->m_LastRun;
918  if (hd && hd->GetRunNumber()!=oldrun) {
919  if (oldrun>-1) maker->FinishRun(oldrun);
920  run = hd->GetRunNumber();
921  if (Debug() && this == fgStChain && m_LastRun!=run){
922  m_LastRun = run;
923 #ifdef STAR_LOGGER
924  LOG_INFO << " +++ New RunNumber found=" << run << " (previous = " << oldrun << ")" << endm;
925 #else
926  printf(" +++ New RunNumber found=%d (previous = %d)\n",run,oldrun);
927 #endif
928  hd->Print();
929  }
930  maker->InitRun(run);
931  maker->m_LastRun=run;
932  }
933 // Call Maker
934  if (fgTestMaker) { fgTestMaker->SetNext(maker); fgTestMaker->Make();}
935 
936  maker->StartMaker();
937  ret = maker->Make();
938  assert((ret%10)>=0 && (ret%10)<=kStFatal);
939  maker->EndMaker(ret);
940 
941  if (Debug() || ret) {
942 #ifdef STAR_LOGGER
943  LOG_INFO << "*** " << maker->ClassName() << "::Make() == "
944  << RetCodeAsString(ret) << "(" << ret << ") ***"
945  << endm;
946 #else
947  printf("*** %s::Make() == %s(%d) ***\n"
948  ,maker->ClassName(),RetCodeAsString(ret),ret);
949 #endif
950  }
951  maker->ResetBIT(kMakeBeg);
952  StMkDeb::SetCurrent(curr);
953  if ((ret%10)>kStWarn) { //something unusual
954  if ((ret%10) != kStERR) return ret;
956  fgFailedMaker = maker;
957  if (maker->IAttr(".Privilege")) return ret;
958  continue;
959  }
960 
961  }
962  return kStOK;
963 }
964 //_____________________________________________________________________________
965 void StMaker::FatalErr(Int_t Ierr, const Char_t *com)
966 {
967 #ifdef STAR_LOGGER
968  LOG_QA << Form("QAInfo:%s::Fatal: Error %d %s",GetName(),Ierr,com) << endm;
969  LOG_FATAL << Form("QAInfo:%s::Fatal: Error %d %s",GetName(),Ierr,com) << endm;
970 #else
971  printf("QAInfo:%s::Fatal: Error %d %s\n",GetName(),Ierr,com);
972 #endif
973  StMaker *parent = (StMaker *)GetParent();
974  if (parent) ((StMaker*)parent)->FatalErr(Ierr,com);
975 #ifndef STAR_LOGGER
976  fflush(stdout);
977 #endif
978 }
979 //_____________________________________________________________________________
980 StMaker *StMaker::GetMaker(const TDataSet *ds)
981 {
982  const TDataSet *par = ds;
983  while (par && (par = par->GetParent()) && strncmp(".maker",par->GetTitle(),6)) {}
984  return ( StMaker*) par;
985 }
986 
987 //_____________________________________________________________________________
993 EDataSetPass StMaker::ClearDS (TDataSet* ds,void * )
994 {
995  if (ds->InheritsFrom(TTable::Class())){
996  TTable *table = (TTable *)ds;
997  Int_t setSize = table->GetTableSize();
998  table->ReAllocate();
999  memset((void *)table->At(table->GetNRows()),127,table->GetRowSize());
1000  //if (setSize && (setSize - table->GetTableSize() > 100)) {
1001  if (setSize && table->GetTableSize() == 0){
1002  table->Warning("ReAllocate"," Table %s has purged from %d to %d "
1003  ,table->GetName(),setSize,(Int_t) table->GetTableSize());
1004  }
1005  table->NaN();
1006  }
1007  return kContinue;
1008 }
1009 //_____________________________________________________________________________
1010 void StMaker::PrintInfo()
1011 {
1012  const char *cvs = GetCVS();
1013  const char *built = 0;
1014  if (cvs && cvs[0]) built = strstr(cvs,"built");
1015  else cvs = "No CVS tag was defined";
1016 #ifdef STAR_LOGGER
1017  if (built > cvs) { LOG_QA << Form("QAInfo:%-20s %s from %.*s",ClassName(),built,built-cvs,cvs)<< endm; }
1018  else { LOG_QA << Form("QAInfo:%-20s from %s",ClassName(),cvs) << endm; }
1019 #else
1020  if (built > cvs) printf("QAInfo:%-20s %s from %.*s\n",ClassName(),built,built-cvs,cvs);
1021  else printf("QAInfo:%-20s from %s\n",ClassName(),cvs);
1022 #endif
1023 // Printinfo for all defined Makers
1024  TIter next(GetMakeList());
1025  StMaker *maker;
1026  while ((maker = (StMaker* )next())) {
1027  maker->PrintInfo();
1028  }
1029 }
1030 
1031 //_____________________________________________________________________________
1034 {
1035  StEvtHddr *hd = GetEvtHddr();
1036  return hd->GetIventNumber();
1037 }
1038 
1039 //_____________________________________________________________________________
1040 void StMaker::SetIventNumber(Int_t iv)
1041 {
1042  StEvtHddr *hd = GetEvtHddr();
1043  hd->SetIventNumber(iv);
1044 }
1045 //_____________________________________________________________________________
1046 Int_t StMaker::GetEventNumber() const
1047 {
1048  StEvtHddr *hd = GetEvtHddr();
1049  return hd->GetEventNumber();
1050 }
1051 
1052 //_____________________________________________________________________________
1055 {
1056  StEvtHddr *hd = GetEvtHddr();
1057  return hd->GetRunNumber();
1058 }
1059 //_____________________________________________________________________________
1060 StMaker *StMaker::GetParentChain() const
1061 {
1062  const StMaker *mk = GetParentMaker();
1063  while(mk && !mk->IsChain()) {mk = mk->GetParentMaker();}
1064  return (StMaker*) mk;
1065 }
1066 //_____________________________________________________________________________
1067 const TDatime &StMaker::GetDateTime() const
1068 {
1069  const StEvtHddr *hd = GetEvtHddr();
1070  return hd->GetDateTime();
1071 }
1072 //_____________________________________________________________________________
1073 const TDatime &StMaker::GetDBTime() const
1074 {
1075  StMaker *mk = GetMakerInheritsFrom("St_db_Maker");
1076  assert(mk);
1077  return mk->GetDateTime();
1078 }
1079 
1080 
1081 //_____________________________________________________________________________
1082 Int_t StMaker::GetDate() const {return GetDateTime().GetDate();}
1083 //_____________________________________________________________________________
1084 Int_t StMaker::GetTime() const {return GetDateTime().GetTime();}
1085 //_____________________________________________________________________________
1086 const Char_t *StMaker::GetEventType() const
1087 {
1088  StEvtHddr *hd = GetEvtHddr();
1089  return hd->GetEventType();
1090 }
1091 
1092 //_____________________________________________________________________________
1098 void StMaker::PrintTimer(Option_t *option)
1099 {
1100  if(option){};
1101 #ifdef STAR_LOGGER
1102  LOG_QA << Form("QAInfo:%-20s: Real Time = %6.2f seconds Cpu Time = %6.2f seconds, Entries = %d",GetName()
1103  ,m_Timer.RealTime(),m_Timer.CpuTime(),m_Timer.Counter()) << endm;
1104 #else
1105  Printf("QAInfo:%-20s: Real Time = %6.2f seconds Cpu Time = %6.2f seconds, Entries = %d",GetName()
1106  ,m_Timer.RealTime(),m_Timer.CpuTime(),m_Timer.Counter());
1107 #endif
1108 }
1109 void StMaker::lsMakers(const StMaker *top)
1110 {
1111  TDataSetIter iter((TDataSet*)top,20);
1112  Int_t N=0;
1113  for(const TDataSet *mk=top;mk;mk = iter.Next()) {
1114  if (! mk->InheritsFrom("StMaker")) continue;
1115  Int_t l=iter.GetDepth();
1116  N++;
1117  Char_t space[20]; memset(space,' ',sizeof(space));space[l]=0;
1118 #ifdef STAR_LOGGER
1119  LOG_QA << Form("%s %s::%s",space,mk->ClassName(),mk->GetName()) << endm;
1120 #else
1121  printf("%3d(%d) - %s %s::%s\n",N,l/2,space,mk->ClassName(),mk->GetName());
1122 #endif
1123  }
1124 }
1125 
1126 
1127 
1128 #if 0
1129 //_____________________________________________________________________________
1130 static void MakeAssociatedClassList(const TObject *obj, const Char_t *classDir=0)
1131 {
1148  if (!obj) return;
1149  const Char_t *thisDir = classDir;
1150  if (thisDir == 0 || thisDir[0] == 0)
1151  thisDir = gSystem->DirName(obj->IsA()->GetImplFileName());
1152  const Char_t *thisClassName = obj->IsA()->GetName();
1153  // Loop over all *.h files within <thisDir> to find
1154  // C++ class declarations
1155  void *dirhandle = 0;
1156  TString className;
1157  if ( (dirhandle = gSystem->OpenDirectory(thisDir)) )
1158  {
1159  const Char_t *n = 0;
1160  ifstream headerFile;
1161  Char_t inBuffer[128] = {0};
1162  Int_t lBuf = sizeof(inBuffer);
1163  Char_t *nextSym = inBuffer;
1164  Int_t status = 0;
1165  const Char_t keyWord[] = "class";
1166  const Int_t lKeyWord = sizeof(keyWord);
1167 
1168  while ( (n = gSystem->GetDirEntry(dirhandle)) ) {
1169  // look for *.h* files but *Cint.h
1170  if (!strstr(n,".h") || strstr(n,"Cint.h") ) continue;
1171  Char_t *fullFile = gSystem->ConcatFileName(thisDir,n);
1172  headerFile.open(fullFile);
1173  if (headerFile.fail()) continue;
1174  while (headerFile.getline(inBuffer,lBuf) && !headerFile.eof()) {
1175  nextSym = inBuffer;
1176  if (status==0) status = 1;
1177  do {
1178  /*
1179  ************************************************************
1180  *
1181  * |<===========================================+
1182  * | |
1183  * $-->(1)<===+ |
1184  * | ' ' | |
1185  * |---->| |
1186  * |"class" ' ' |
1187  * |------>(2)--->(3)<===+ |
1188  * | ' ' | |
1189  * |---->| |
1190  * | name |
1191  * |------>(4)<===+ |
1192  * | ' ' | |
1193  * |---->| |
1194  * | ";" |
1195  * |------>(5)-------->|
1196  * | | add2list
1197  * | ":" |
1198  * |------->|
1199  *
1200  ************************************************************
1201  */
1202  switch (status) {
1203  case 1: {
1204  if (*nextSym == ' ' || *nextSym == '\t') break;
1205  const Char_t *classFound = strstr(nextSym,keyWord);
1206  if ( classFound && classFound == nextSym){
1207  status = 2;
1208  nextSym += lKeyWord-2;
1209  }
1210  else status = 0;
1211  break;
1212  }
1213  case 2: status = 0;
1214  if (*nextSym == ' ' || *nextSym == '\t') status = 3;
1215  break;
1216  case 3:
1217  if (*nextSym == ' ' || *nextSym == '\t') break;
1218  status = 0;
1219  if (isalpha(*nextSym)) {
1220  className = *nextSym;
1221  nextSym++;
1222  while (isalnum(*nextSym) || *nextSym == '_' ) {
1223  className += *nextSym++; status = 4;
1224  }
1225  nextSym--;
1226  }
1227  break;
1228  case 4:
1229  if (*nextSym == ' ' || *nextSym == '\t') break;
1230  status = 0;
1231  if (*nextSym == 0 || *nextSym == ':' || *nextSym == '{' ||
1232  ( *nextSym == '/' &&
1233  (*(nextSym+1) == '/' || *(nextSym+1) == '*')
1234  )
1235  ) status = 5;
1236  break;
1237  case 5:
1238  if (strcmp(thisClassName,className.Data())) {
1239  printf(" MakeDoc: %s\n", className.Data());
1240  TClass *cl = gROOT->GetClass(className.Data());
1241  if (cl && !cl->InheritsFrom("StMaker") ) {
1242  gHtml->MakeClass((Text_t *)className.Data());
1243  }
1244  }
1245  default: status = 1;
1246  break;
1247  };
1248  } while (*(++nextSym) && status ); // end of buffer
1249  } // eof()
1250  headerFile.close();
1251  delete [] fullFile;
1252  }
1253  }
1254 }
1255 //_____________________________________________________________________________
1256 void StMaker::MakeDoc(const TString &stardir,const TString &outdir, Bool_t baseClasses)
1257 {
1287  // Define the type of the OS
1288  TString STAR = stardir;
1289  TString delim = ":";
1290  //Bool_t NT=kFALSE; variable assigned but never used
1291 
1292  if (strcmp(gSystem->GetName(),"WinNT") == 0 ) {
1293  //NT=kTRUE;
1294  delim = ";";
1295  STAR.ReplaceAll("$(afs)","//sol/afs");
1296  }
1297  else
1298  STAR.ReplaceAll("$(afs)","/afs");
1299 
1300  TString classname = IsA()->GetName();
1301 
1302  THtml thisHtml;
1303 
1304  // if (!gHtml) gHtml = new THtml;
1305 
1306  // Define the set of the subdirectories with the STAR class sources
1307  // | ---------------------- | ------------ | ------------------ |
1308  // | Directory name Class name Share library name |
1309  // | ---------------------- | ------------ | ------------------ |
1310  const Char_t *source[] = {"StRoot/St_base" , "TDataSet" , "St_base"
1311  ,"StRoot/StChain" , "StMaker" , "StChain"
1312  //,"StRoot/StUtilities" , "StMessage" , "StUtilities"
1313  ,"StRoot/StarClassLibrary", "" , ""
1314  ,"StRoot/StEvent" , "StEvent" , "StEvent"
1315  ,"StRoot/St_TLA_Maker" , "St_TLA_Maker", "St_TLA_Maker"
1316  ,"include" , "" , ""
1317  ,"include/tables" , "" , ""
1318  };
1319 
1320  const Int_t lsource = sizeof(source)/sizeof(const Char_t *);
1321 
1322  TString classDir = gSystem->DirName(IsA()->GetImplFileName());
1323  TString lookup = STAR;
1324  lookup += delim;
1325 
1326  lookup += STAR;
1327  lookup += "/";
1328  lookup += classDir;
1329  lookup += delim;
1330 
1331  lookup += STAR;
1332  lookup += "/StRoot/";
1333  lookup += classname;
1334 
1335  // Add class name base
1336 
1337  Int_t i = 0;
1338  for (i=0;i<lsource-3;i+=3) {
1339  lookup += delim;
1340  lookup += STAR;
1341  lookup += "/";
1342  lookup += source[i];
1343  // Load extra share library if any
1344  const Char_t *cl = source[i+1];
1345  const Char_t *so = source[i+2];
1346  if (cl && cl[0] && so && so[0] && !gROOT->GetClass(cl))
1347  {
1348  if (gSystem->Load(so))
1349  printf(" Failed to load the share library %s for class %s\n",so,cl);
1350  }
1351  }
1352 
1353 // cout << lookup.Data() << endl << endl;
1354 
1355 // const Char_t *c = ClassName(); // This trick has to be done since a bug within ROOT
1356 
1357  lookup.ReplaceAll("//StRoot/","/StRoot/");
1358  thisHtml.SetSourceDir(lookup);
1359 
1360  TString odir = outdir;
1361 // odir.ReplaceAll("$(STAR)",STAR);
1362  gSystem->ExpandPathName(odir);
1363  thisHtml.SetOutputDir(odir);
1364 
1365  // Create the list of the classes defined with the loaded DLL's to be documented
1366 
1367  Char_t *classes[] = {
1368  "St_Module", "TTable"
1369  ,"TDataSet", "TDataSetIter", "TFileSet"
1370  ,"StMaker", "StChain"
1371  ,"table_head_st"
1372  };
1373  Int_t nclass = sizeof(classes)/4;
1374  // Create the definitions of the classes not derived from TObjects
1375  TString header = "$STAF/inc/table_header.h";
1376 
1377  gSystem->ExpandPathName(header);
1378  header.ReplaceAll("//inc/","/inc/");
1379  gROOT->LoadMacro(header);
1380 
1381  TClass header1("table_head_st",1,"table_header.h","table_header.h");
1382 
1383  // Update the docs of the base classes
1384  static Bool_t makeAllAtOnce = kTRUE;
1385  if (makeAllAtOnce && baseClasses) {
1386  makeAllAtOnce = kFALSE;
1387  // thisHtml.MakeAll(); // VF 10/09/99
1388  for (i=0;i<nclass;i++) thisHtml.MakeClass(classes[i]);
1389  thisHtml.MakeIndex();
1390 // MakeAssociatedClassList(this, classDir.Data());
1391  }
1392 
1393  if (baseClasses) {gHtml= &thisHtml; MakeAssociatedClassList(this, classDir.Data()); }
1394  // Create the doc for this class
1395  printf(" Making html for <%s>\n",classname.Data());
1396  thisHtml.MakeClass((Char_t *)classname.Data());
1397  // Create the associated classes docs
1398  // Loop on all makers
1399  TList *tl = GetMakeList();
1400  if (tl) {
1401  TIter nextMaker(tl);
1402  StMaker *maker;
1403  while ((maker = (StMaker* )nextMaker()))
1404  maker->MakeDoc(stardir,outdir,kFALSE);
1405  }
1406 }
1407 #endif
1408 
1409 //_____________________________________________________________________________
1410 void StMaker::Streamer(TBuffer &)
1411 { LOG_FATAL << Form("%s::Streamer - attempt to write %s",ClassName(),GetName()) << endm;
1412  assert(0);
1413 }
1414 //______________________________________________________________________________
1415 StMaker *StMaker::New(const Char_t *classname, const Char_t *name, void *title)
1416 {
1417  // This static method creates a new StMaker object if provided
1418 
1419  StMaker *maker = 0;
1420  if (classname)
1421  {
1422  TClass *cl = gROOT->GetClass(classname);
1423  if (cl) {
1424  maker = (StMaker *)cl->New();
1425  if (maker) {
1426  if (name && strlen(name)) maker->SetName(name);
1427  if (title) maker->SetTitle((Char_t *) title);
1428  }
1429  }
1430  }
1431  return maker;
1432 }
1433 //_____________________________________________________________________________
1434 void StMaker::SetDebug(Int_t l)
1435 {
1436  m_DebugLevel = l;
1437  StMessMgr *log = GetLogger();
1438  if (log) log->SetLevel(Debug());
1439 }
1440 
1441 //_____________________________________________________________________________
1442 void StMaker::SetDEBUG(Int_t l)
1443 {
1444  SetDebug(l);
1445 // Loop on all makers
1446  TList *tl = GetMakeList();
1447  if (!tl) return;
1448 
1449  TIter nextMaker(tl);
1450  StMaker *maker;
1451  while ((maker = (StMaker* )nextMaker())) maker->SetDEBUG(l);
1452 }
1453 //_____________________________________________________________________________
1467 Int_t StMaker::SetAttr(const Char_t *key, const Char_t *val, const Char_t *to)
1468 {
1469 
1470  Int_t count = 0;
1471  TString tk(key);tk.ToLower();tk.ReplaceAll(" ","");tk.ReplaceAll("\t","");
1472  if (!val) val ="";
1473  TString tv(val);tv = tv.Strip(TString::kBoth) ;tv.ReplaceAll("\t","");
1474  if (!to || !to[0]) to =".";
1475  TString tt(to ); tt.ReplaceAll(" ","");tt.ReplaceAll("\t","");
1476  TString tn(tt),tc("*");
1477  Int_t idx = tt.Index("::");
1478  if (idx>=0) {//Case with class name
1479  tn.Replace(0 ,idx+2,""); if (!tn.Length()) tn = "*";
1480  tc=tt;
1481  tc.Replace(idx,999 ,""); if (!tc.Length()) tc = "*";
1482  }
1483  Int_t act=0;
1484  if (tn==".") {act = 1;}
1485  else if (tn=="*") {act = 5;}
1486  else if (tn==GetName()) {act = 1;}
1487  else {act = 4;}
1488 
1489  if (tc=="*") {act |=2;}
1490  else if (InheritsFrom(tc.Data())) {act |=2;}
1491 
1492  TString fullName(ClassName()); fullName+="::"; fullName+=GetName();
1493 
1494  if ((act&3)==3) { // this attribute is for this maker
1495  count++;
1496  if (tk == ".call") {
1497  TString command("(("); command += ClassName(); command+="*)";
1498  Char_t buf[20]; sprintf(buf,"%p",(void*)this);
1499  command +=buf; command +=")->"; command+=tv;command+=";";
1500  gROOT->ProcessLineFast(command.Data(),0);}
1501  else {
1502  if (!m_Attr) m_Attr = new TAttr(GetName());
1503  m_Attr->SetAttr(tk.Data(), tv.Data());
1504  if (Debug() > 1) {
1505  LOG_DEBUG << Form("SetAttr(\"%s\",\"%s\",\"%s\")",tk.Data(),tv.Data(),fullName.Data()) << endm;
1506  }
1507  }
1508  }
1509  if (!(act&4)) return count;
1510 
1511  // Loop on all makers
1512  TList *tl = GetMakeList();
1513  if (!tl) return count;
1514 
1515  TIter nextMaker(tl);
1516  StMaker *maker;
1517  while ((maker = (StMaker*)nextMaker())) count += maker->SetAttr(tk.Data(),tv.Data(),to);
1518  return count;
1519 }
1520 Int_t StMaker::SetAttr(const StMaker *mk)
1521 {
1522  if (!mk) return 0;
1523  if (!mk->m_Attr) return 0;
1524  if (!m_Attr) m_Attr = new TAttr;
1525  return m_Attr->SetAttr(mk->m_Attr);
1526 }
1527 //_____________________________________________________________________________
1528 Int_t StMaker::SetAttr(const Char_t *key, Int_t val, const Char_t *to)
1529 {
1530  TString ts; ts+=val; return SetAttr(key, ts.Data(), to);
1531 }
1532 //_____________________________________________________________________________
1533 Int_t StMaker::SetAttr(const Char_t *key, UInt_t val, const Char_t *to)
1534 {
1535  TString ts; ts+=val; return SetAttr(key, ts.Data(), to);
1536 }
1537 //_____________________________________________________________________________
1538 Int_t StMaker::SetAttr(const Char_t *key, Double_t val, const Char_t *to)
1539 {
1540  TString ts; ts+=val; return SetAttr(key, ts.Data(), to);
1541 }
1542 
1543 //_____________________________________________________________________________
1544 const Char_t *StMaker::SAttr(const Char_t *key) const
1545 {
1546  if (!m_Attr) return "";
1547  return m_Attr->SAttr(key);
1548 }
1549 //_____________________________________________________________________________
1550 Int_t StMaker::IAttr(const Char_t *key) const
1551 {
1552  if (!m_Attr) return 0;
1553  return m_Attr->IAttr(key);
1554 }
1555 //_____________________________________________________________________________
1556 UInt_t StMaker::UAttr(const Char_t *key) const
1557 {
1558  if (!m_Attr) return 0;
1559  return m_Attr->UAttr(key);
1560 }
1561 //_____________________________________________________________________________
1562 Double_t StMaker::DAttr(const Char_t *key) const
1563 {
1564  if (!m_Attr) return 0;
1565  return m_Attr->DAttr(key);
1566 }
1567 //_____________________________________________________________________________
1568 void StMaker::PrintAttr() const
1569 {
1570  if (!m_Attr) return ;
1571  m_Attr->PrintAttr();
1572 }
1573 
1574 //_____________________________________________________________________________
1575 Int_t StMaker::InitRun (Int_t runumber) {return 0;}
1576 //_____________________________________________________________________________
1577 Int_t StMaker::FinishRun(Int_t runumber) {return 0;}
1578 
1579 //_____________________________________________________________________________
1580 Int_t StMaker::Cleanup(TDataSet *&ds)
1581 {
1582 
1583  if (!ds->TObject::TestBit(TObject::kNotDeleted)) {ds=0;return 0;}
1584  TSeqCollection *list = ds->TDataSet::GetCollection();
1585  if (!list) return 0;
1586  assert(list->IsA()==TList::Class() || list->IsA()==TObjArray::Class());
1587 
1588  Int_t kount = 0;
1589  TIter iter(list);
1590  TDataSet *son;
1591  Int_t num = list->Capacity();
1592  for (Int_t i=0; i<num; i++) {
1593  son = (TDataSet*)iter.Next();
1594  if (!son) continue;
1595  if (!son->TObject::TestBit(TObject::kNotDeleted)) {list->Remove(son); continue;}
1596  TDataSet* par = son->TDataSet::GetParent();
1597  if ( par != ds) {list->Remove(son); continue;}
1598  assert (son->InheritsFrom(TDataSet::Class()));
1599  if (son->InheritsFrom(StMaker::Class())) continue;//Delay cleanup
1600  kount = Cleanup(son) + 1;
1601  }
1602  if (!ds->InheritsFrom(TObjectSet::Class())) return kount;
1603  TObjectSet *os = (TObjectSet*)ds;
1604  TObject *to = os->GetObject();
1605  if (!to) return kount;
1606  if (!to->TObject::TestBit(TObject::kNotDeleted)) {
1607  os->DoOwner(0); os->SetObject(0); return kount+1;}
1608  if (!os->IsOwner()) {os->SetObject(0); return kount;}
1609  if (!to->InheritsFrom(TDataSet::Class())) return kount;
1610  TDataSet *t = (TDataSet*)to;
1611  return kount + Cleanup(t);
1612 }
1613 //_____________________________________________________________________________
1614 StEvtHddr *StMaker::GetEvtHddr() const
1615 {
1616  StEvtHddr *hddr = (StEvtHddr*)GetDataSet("EvtHddr");
1617  if(!hddr) hddr = new StEvtHddr((TDataSet*)m_ConstSet);
1618  return hddr;
1619 }
1620 //_____________________________________________________________________________
1621  void StMaker::SetDateTime(Int_t idat,Int_t itim)
1622 {
1623  StEvtHddr *hddr = GetEvtHddr();
1624  hddr->SetDateTime(idat,itim);
1625 }
1626 
1627 //_____________________________________________________________________________
1628 const Char_t *StMaker::RetCodeAsString(Int_t kode)
1629 {
1630 static const Char_t *retCodes[] = {
1631  "StOK" ,"StWarn" ,"StEOF" ,"StERR" ,"StFATAL" ,0,0,0,0,0,
1632  "StOK!" ,"StWarn!" ,"StEOF!" ,"StSKIP" ,"StSTOP" ,0,0,0,0,0,
1633  "StOK!!","StWarn!!","StEOF!!","StSKIP!","StSTOP!" ,0,0,0,0,0};
1634 
1635  assert(kode>=0);
1636  if (kode>=30) kode = kode%10+20;
1637  const Char_t *res = retCodes[kode];
1638  if (!res) res = "StUNKNOWN";
1639  return res;
1640 
1641 }
1642 
1643 //_____________________________________________________________________________
1644 StMakerIter::StMakerIter(const StMaker *mk,Int_t secondary)
1645 {
1646  fState = 0;
1647  fMaker = mk;
1648  fMakerIter = 0;
1649  fIter = new TDataSetIter(fMaker->Find(".make"));
1650  fItWas = (TDataSet*)(-1);
1651  fSecond = secondary;
1652 
1653 }
1654 //_____________________________________________________________________________
1655 StMakerIter::~StMakerIter()
1656 {
1657  delete fIter; fIter = 0;
1658  delete fMakerIter; fMakerIter = 0;
1659  fMaker=0; fState = 0;
1660 }
1661 //_____________________________________________________________________________
1662 StMaker *StMakerIter::NextMaker()
1663 {
1664  TDataSet *ds;
1665  if (!fMaker) return 0;
1666 
1667 AGAIN: switch (fState) {
1668 
1669  case 0: //current maker
1670  ds = fIter->Next();
1671  if (ds == fItWas) goto AGAIN; //used already, go to Next
1672  fState = 2; if (!ds) goto AGAIN; //no more, go to UP
1673  fState = 1; //go to Down
1674  delete fMakerIter;
1675  fMakerIter = new StMakerIter((StMaker*)ds,1);
1676  goto AGAIN;
1677 
1678  case 1: // Recursive iteration
1679  ds = fMakerIter->NextMaker();
1680  if (ds) return (StMaker* )ds;
1681  fState = 0; goto AGAIN; //no more in downstaires,go curren
1682 
1683  case 2:
1684  delete fMakerIter; fMakerIter=0;
1685  delete fIter; fIter = 0;
1686  fState = 3;
1687  return (StMaker*)fMaker;
1688 
1689  case 3: // go upper when started
1690  if (fSecond) return 0;
1691  TDataSet *par = fMaker->GetParent();
1692  fItWas = fMaker; fMaker = 0;
1693  if (!par) return 0;
1694  if (strcmp(".make",par->GetName())) return 0;
1695  fMaker = (StMaker* )par->GetParent();
1696  if (!fMaker) return 0;
1697  delete fIter; fIter = new TDataSetIter(par);
1698  fState = 0; goto AGAIN;
1699  }
1700  assert(0); return 0;
1701 }
1702 //_____________________________________________________________________________
1703 Int_t StMaker::AliasDate(const Char_t *alias)
1704 
1705 {
1706 
1707  Int_t n = strcspn(alias," ."); if (n<3) return 0;
1708  Int_t i;
1709  for (i=0;fDbAlias[i].tag && strncmp(alias,fDbAlias[i].tag,n);i++) {}
1710  return fDbAlias[i].date;
1711 }
1712 //_____________________________________________________________________________
1713 Int_t StMaker::AliasTime(const Char_t *alias)
1714 
1715 {
1716 
1717  Int_t n = strcspn(alias," ."); if (n<3) return 0;
1718  Int_t i;
1719  for (i=0;fDbAlias[i].tag && strncmp(alias,fDbAlias[i].tag,n);i++) {}
1720  return fDbAlias[i].time;
1721 }
1722 //_____________________________________________________________________________
1723 const Char_t *StMaker::AliasGeometry(const Char_t *alias)
1724 
1725 {
1726 
1727  Int_t n = strcspn(alias," ."); if (n<3) return 0;
1728  Int_t i;
1729  for (i=0;fDbAlias[i].tag && strncmp(alias,fDbAlias[i].tag,n);i++) {}
1730  return fDbAlias[i].geometry;
1731 }
1732 //_____________________________________________________________________________
1733 const DbAlias_t *StMaker::GetDbAliases() {return fDbAlias;}
1734 //_____________________________________________________________________________
1735 const StChainOpt *StMaker::GetChainOpt() const
1736 {
1737  StMaker *mk = GetMaker(this);
1738  if (!mk) return 0;
1739  return mk->GetChainOpt();
1740 }
1741 //_____________________________________________________________________________
1742 TFile *StMaker::GetTFile() const
1743 {
1744  const static Char_t *mktype = "StBFChain";
1745  StMaker *mk = 0;
1746  if (this->InheritsFrom(mktype)) {mk = (StMaker *) this;}
1747  else {
1748  StMakerIter mkiter(GetChain());
1749  while ((mk = mkiter.NextMaker())) {//loop over makers
1750  if (mk->InheritsFrom(mktype)) {// take first TFile in any BFC
1751  const StChainOpt *opt = mk->GetChainOpt();
1752  if (!opt) continue;
1753  if (opt->GetTFile()) break;
1754  }
1755  }
1756  }
1757  if (! mk) return 0;
1758  const StChainOpt *opt = mk->GetChainOpt();
1759  if (!opt) return 0;
1760  return opt->GetTFile();
1761 }
1762 
1763 ClassImp(StTestMaker)
1764 //_____________________________________________________________________________
1765 StTestMaker::StTestMaker(const Char_t *name):StMaker(name)
1766 {
1767  fNext=0; fLast=0;
1768  if (fgStChain == this ) {fgStChain=0;}
1769  else {Shunt() ;}
1770  fgTestMaker = this;
1771 }
1772 //_____________________________________________________________________________
1773 void StTestMaker::SetNext(StMaker *mk)
1774 {
1775  fLast=fNext;
1776  fNext=mk;
1777 }
1778 //_____________________________________________________________________________
1779 void StTestMaker::Print(const Char_t *) const
1780 {
1781 #ifdef STAR_LOGGER
1782  if (fLast) { LOG_INFO << Form("%s: Last Maker %s::%s(%p)",
1783  ClassName(),fLast->ClassName(),fLast->GetName(),(void*)fLast)<< endm;}
1784  if (fNext) { LOG_INFO << Form("%s: Next Maker %s::%s(%p)",
1785  ClassName(),fNext->ClassName(),fNext->GetName(),(void*)fNext) << endm;}
1786 #else
1787  if (fLast) printf("%s: Last Maker %s::%s(%p)\n",
1788  ClassName(),fLast->ClassName(),fLast->GetName(),(void*)fLast);
1789  if (fNext) printf("%s: Next Maker %s::%s(%p)\n",
1790  ClassName(),fNext->ClassName(),fNext->GetName(),(void*)fNext);
1791 #endif
1792 }
1793 //________________________________________________________________________________
1794 Int_t StMaker::Skip(Int_t NoEventSkip)
1795 {
1796  TURN_LOGGER(this);
1797 // Loop on all makers
1798  TList *tl = GetMakeList();
1799  if (!tl) return kStOK;
1800  TIter nextMaker(tl);
1801  StMaker *maker;
1802  fgFailedMaker = 0;
1803  while ((maker = (StMaker* )nextMaker())) {
1804  if (!maker->IsActive()) continue;
1805  maker->Skip(NoEventSkip);
1806  }
1807  return kStOK;
1808 }
1809 
1810 //_____________________________________________________________________________
1811 // $Log: StMaker.cxx,v $
1812 // Revision 1.269 2020/02/20 22:26:33 genevb
1813 // Replace TString::Contains() with faster strchr()
1814 //
1815 // Revision 1.268 2019/07/22 18:27:11 smirnovd
1816 // Move doPs function from StMaker to StMemStat
1817 //
1818 // Revision 1.267 2019/07/16 21:33:03 smirnovd
1819 // Use simple test to check whether environment variable is defined
1820 //
1821 // From std::getenv documentation:
1822 //
1823 // Return value:
1824 //
1825 // Character string identifying the value of the environmental variable or null
1826 // pointer if such variable is not found.
1827 //
1828 // Revision 1.266 2019/07/16 21:32:43 smirnovd
1829 // Remove seemingly outdated macro-based branching
1830 //
1831 // The use of TMEMSTATinSTAR and STAR_LOGGER_BUG macros looks obsolete
1832 //
1833 // Revision 1.265 2016/05/17 16:00:23 jeromel
1834 // Dinension check protection
1835 //
1836 // Revision 1.264 2016/04/21 01:39:24 perev
1837 // Warnoff
1838 //
1839 // Revision 1.263 2015/07/19 23:01:21 fisyak
1840 // Remove numbers from lsMakers
1841 //
1842 // Revision 1.262 2013/10/09 21:58:52 fisyak
1843 // Print hidden maker
1844 //
1845 // Revision 1.261 2013/07/18 14:09:58 fisyak
1846 // Move GeometryDbAliases into separate h-file, (disable for the moment simpletpc, upgr20, upgr21, dev13, and devE)
1847 //
1848 // Revision 1.260 2013/07/15 17:15:19 jwebb
1849 // Updated timestamp for eStar simu.
1850 //
1851 // Revision 1.259 2013/07/10 19:30:41 jwebb
1852 // Added eStar2 definition.
1853 //
1854 // Revision 1.258 2013/06/11 10:08:40 jeromel
1855 // Slight blabla change
1856 //
1857 // Revision 1.257 2013/03/13 22:12:29 jeromel
1858 // Some spacing + DbAlias geo name should be _1 and _2
1859 //
1860 // Revision 1.256 2013/02/21 22:53:05 jwebb
1861 // Defined first cut geometries with and without pixel detector.
1862 //
1863 // Revision 1.255 2013/02/06 21:58:39 jwebb
1864 // Addition of y2012b geometry tag to properly include the MTD.
1865 //
1866 // Revision 1.254 2012/12/14 17:14:36 jwebb
1867 // Added y2013 geometry tag with date/time 20121215/0.
1868 //
1869 // Revision 1.253 2012/11/07 23:05:45 fisyak
1870 // Add geometries y2011b, y2012b (wall), devT? (iTpx upgrade)
1871 //
1872 // Revision 1.252 2012/06/29 16:13:22 perev
1873 // Add dev14 geometry
1874 //
1875 // Revision 1.251 2012/06/09 22:46:52 fisyak
1876 // Synchronize tag and geometry version for y2006h, thanks to Xianglei, bug #2374
1877 //
1878 // Revision 1.250 2012/05/31 21:54:36 fisyak
1879 // Add y2012a and devT geometry tags
1880 //
1881 // Revision 1.249 2012/04/27 00:17:45 perev
1882 // Cleanup
1883 //
1884 // Revision 1.248 2012/01/30 17:19:59 perev
1885 // devE geometry added
1886 //
1887 // Revision 1.247 2011/12/22 19:41:19 perev
1888 // dev13 geo added
1889 //
1890 // Revision 1.246 2011/10/13 19:08:03 perev
1891 // y2011a added
1892 //
1893 // Revision 1.245 2011/10/05 20:57:16 perev
1894 // Register y2012
1895 //
1896 // Revision 1.244 2011/07/19 20:49:16 perev
1897 // Cleanup
1898 //
1899 // Revision 1.243 2011/06/20 15:13:50 fisyak
1900 // Force to call Finish with SIGTERM signal obtained from condor_vacate_job after time limit reached
1901 //
1902 // Revision 1.242 2011/04/25 22:12:58 perev
1903 // y2008e
1904 //
1905 // Revision 1.241 2011/03/28 21:11:32 fisyak
1906 // Move back y2011 time stamp from 20101212 to 20101215
1907 //
1908 // Revision 1.240 2011/03/28 20:51:03 fisyak
1909 // Move y2011 time stamp from 20101215 to 20101212
1910 //
1911 // Revision 1.239 2011/03/14 17:38:01 perev
1912 // copy/paste fix
1913 //
1914 // Revision 1.238 2011/03/11 16:43:21 perev
1915 // support cone honey sandwich fix geometries
1916 //
1917 // Revision 1.237 2011/02/02 20:13:09 perev
1918 // y2005i added
1919 //
1920 // Revision 1.236 2010/12/22 17:46:30 perev
1921 // y2008c y2009b y2010b added
1922 //
1923 // Revision 1.235 2010/11/19 20:00:55 fisyak
1924 // Add y2008b (requested by Jason)
1925 //
1926 // Revision 1.234 2010/07/21 21:39:29 fisyak
1927 // Add alias for y2011
1928 //
1929 // Revision 1.233 2010/06/01 20:18:30 perev
1930 // Added y2009b and y2010a geometry tags to support simulation requests
1931 //
1932 // Revision 1.232 2010/05/24 14:25:54 fisyak
1933 // move alias time stamp for y2010 from 20091214 to 20091215 (back, as it was before 2010/04/06)
1934 //
1935 // Revision 1.231 2010/04/30 17:13:20 fine
1936 // RT #1911. Protect against of the died pointer
1937 //
1938 // Revision 1.230 2010/04/27 21:31:44 fine
1939 // remove the logger destruction side effect
1940 //
1941 // Revision 1.229 2010/04/23 22:40:08 fine
1942 // RT #1911. Close the local logger at Finish
1943 //
1944 // Revision 1.228 2010/04/06 19:06:10 fisyak
1945 // shift y2010 tag from 20091215 to 20091214 because beginTime for the first tpcPadGainT0 for run X was set 20091214.215645
1946 //
1947 // Revision 1.227 2010/01/27 20:36:56 perev
1948 // GetValidity removed. It is St_db_Maker::GetValidity() now
1949 //
1950 // Revision 1.226 2009/11/19 18:35:02 perev
1951 // y2006h = y200hg+ecalgeo6
1952 //
1953 // Revision 1.225 2009/11/19 18:24:44 perev
1954 // y2009a and inherited from it y2010
1955 //
1956 // Revision 1.224 2009/11/16 20:16:22 fine
1957 // Make the TDatime const interfaces
1958 //
1959 // Revision 1.223 2009/11/16 19:52:46 fine
1960 // Fix the signature of the StMaker::GetDate... methods
1961 //
1962 // Revision 1.222 2009/11/10 20:21:03 fisyak
1963 // Keep only geometry tags which were used in production
1964 //
1965 // Revision 1.221 2009/11/10 17:41:19 fine
1966 // remove the compilation warning on SL5
1967 //
1968 // Revision 1.220 2009/10/29 18:34:17 perev
1969 // y2010 added
1970 //
1971 // Revision 1.219 2009/10/13 18:56:47 perev
1972 // WhiteBoard improve
1973 //
1974 // Revision 1.218 2009/04/28 22:45:57 perev
1975 // WhiteBoard cleanup
1976 //
1977 // Revision 1.217 2009/03/20 03:17:34 perev
1978 // upgr16a==upgr16+tpc2009
1979 //
1980 // Revision 1.216 2009/03/16 21:52:24 perev
1981 // TMemStat & StMemStat handling improved
1982 //
1983 // Revision 1.215 2009/03/13 21:52:15 perev
1984 // y2005h and y2007h added
1985 //
1986 // Revision 1.214 2009/01/26 14:32:49 fisyak
1987 // rename TMemStat => StMemStat due clash with ROOT class
1988 //
1989 // Revision 1.213 2009/01/04 20:41:26 perev
1990 // fix , alias must be y2009, not 8
1991 //
1992 // Revision 1.212 2008/12/31 02:11:27 perev
1993 // y2009
1994 //
1995 // Revision 1.211 2008/12/21 18:59:33 perev
1996 // GetDBTime() added
1997 //
1998 // Revision 1.210 2008/07/26 01:54:37 perev
1999 // add y2007a
2000 //
2001 // Revision 1.209 2008/06/03 22:33:14 fisyak
2002 // Add geometries for y2005g, y2006g and y2007g; use ROOT convention for variable definitions
2003 //
2004 // Revision 1.208 2008/05/22 16:22:34 fine
2005 // Protection against of the carsh with cvs=0, Issue #1005
2006 //
2007 // Revision 1.207 2008/03/20 18:59:35 perev
2008 // upgr15 added
2009 //
2010 // Revision 1.206 2008/03/05 00:01:52 fisyak
2011 // Move Skip method in base class
2012 //
2013 // Revision 1.205 2008/01/21 01:23:02 perev
2014 // WarnOff
2015 //
2016 // Revision 1.204 2008/01/20 00:33:49 perev
2017 // Copy attributes from maker to maker added
2018 //
2019 // Revision 1.203 2007/11/15 02:03:51 perev
2020 // y2008
2021 //
2022 // Revision 1.202 2007/10/13 01:27:04 perev
2023 // u2007 ==> upgr20
2024 //
2025 // Revision 1.201 2007/10/11 21:37:20 perev
2026 // Add upgr14
2027 //
2028 // Revision 1.200 2007/10/04 02:50:01 perev
2029 // Geometries u2007 & u2007a added
2030 //
2031 // Revision 1.199 2007/08/27 19:54:41 fisyak
2032 // Just account that only StBFChain has TFile
2033 //
2034 // Revision 1.198 2007/08/24 23:57:24 perev
2035 // More informative err message
2036 //
2037 // Revision 1.197 2007/07/12 19:17:20 fisyak
2038 // Add fTopChain - a pointer to TopChain (for embedding), add method GetMakerInheritsFrom
2039 //
2040 // Revision 1.196 2007/04/26 20:36:49 perev
2041 // Some ChainOpt fixes
2042 //
2043 // Revision 1.194 2007/04/26 03:59:16 perev
2044 // new WhiteBoard methods
2045 //
2046 // Revision 1.193 2007/04/17 05:07:41 perev
2047 // GetTFile()==>StMaker. Jerome request
2048 //
2049 // Revision 1.192 2007/04/13 17:48:11 potekhin
2050 // Added a stub for y2006c
2051 //
2052 // Revision 1.191 2007/03/12 17:51:19 perev
2053 // new signature of GetDataBase()
2054 //
2055 // Revision 1.190 2007/02/22 22:50:18 potekhin
2056 // Added three geometry tags: Y2005F and Y2006B, due to the added dead area in the SSD,
2057 // and also incorporating the updated Barrel EMC code.
2058 //
2059 // Revision 1.189 2007/02/05 20:57:10 potekhin
2060 // a) corrected a few typos in the comments
2061 // b) added y2006a to the list of geometries
2062 // c) created a placeholder for the VMC test tag
2063 //
2064 // Revision 1.188 2007/01/25 06:28:02 fine
2065 // connect Logger and Maker debug levels
2066 //
2067 // Revision 1.187 2006/12/21 23:13:06 potekhin
2068 // Included the upgr12 tag (corrected IGT)
2069 //
2070 // Revision 1.186 2006/12/18 23:36:34 potekhin
2071 // Removed an extraneous CVS tag from top
2072 //
2073 // Revision 1.185 2006/12/18 23:34:58 potekhin
2074 // Adding the tags UPGR10 and UPGR11, recently
2075 // introduced in the geometry.
2076 //
2077 // Revision 1.184 2006/12/14 23:44:09 fisyak
2078 // Add upgr06 and upgr09
2079 //
2080 // Revision 1.183 2006/12/01 17:50:14 jeromel
2081 // upgr08 added
2082 //
2083 // Revision 1.182 2006/11/21 16:34:38 fisyak
2084 // remove geometry pix1 and add upgr07
2085 //
2086 // Revision 1.181 2006/11/03 16:24:56 jeromel
2087 // Oops. hard-coded should be greater than advertized.
2088 //
2089 // Revision 1.180 2006/11/03 15:06:56 jeromel
2090 // Added y2007 placeholder - timestamp for new run will start at 20061101 (simu)
2091 //
2092 // Revision 1.179 2006/10/09 19:39:52 fisyak
2093 // Add geometry y2005e
2094 //
2095 // Revision 1.178 2006/10/04 18:51:25 fisyak
2096 // Add new geometry tags: upgr04 and upgr04, remove rference to xdf
2097 //
2098 // Revision 1.177 2006/08/07 22:44:38 fisyak
2099 // Assert => R__ASSERT for ROOT 5.12
2100 //
2101 // Revision 1.176 2006/05/08 15:15:37 jeromel
2102 // upgr03
2103 //
2104 // Revision 1.175 2006/03/10 00:09:01 jeromel
2105 // 2 options did not have the proper number of elements (unlikely worked / no-one used upgr02 for sure) + minor cosmetics
2106 //
2107 // Revision 1.174 2006/01/31 21:11:01 fisyak
2108 // Add y2006,upgr01 and upgr02
2109 //
2110 // Revision 1.173 2005/12/18 23:17:02 perev
2111 // uInt_t attributes fix
2112 //
2113 // Revision 1.172 2005/12/07 18:56:16 perev
2114 // PrintAttr() method added
2115 //
2116 // Revision 1.171 2005/11/22 21:37:04 fisyak
2117 // add more Simu time stamps (reflecting new SVT), and clean up
2118 //
2119 // Revision 1.170 2005/10/06 18:55:45 fisyak
2120 // Add all used simulation time stamps and geometries
2121 //
2122 // Revision 1.169 2005/09/09 21:32:32 perev
2123 // ERROR message ==> INFO
2124 //
2125 // Revision 1.168 2005/08/29 21:42:21 fisyak
2126 // switch from fBits to fStatus for StMaker control bits
2127 //
2128 // Revision 1.167 2005/07/18 19:04:53 fine
2129 // get rid of an unvisible redundant blank after end of like. Caused ICC compilatiion error
2130 //
2131 // Revision 1.166 2005/06/13 03:03:43 fine
2132 // fix cpp macro to save/restore maker logger
2133 //
2134 // Revision 1.165 2005/04/10 20:38:35 jeromel
2135 // TimeStamp now corrected. Hopefully,
2136 // http://www.star.bnl.gov/STAR/comp/prod/MCGeometry.html#Year5
2137 // should reflect all timestamps correctely.
2138 //
2139 // Revision 1.164 2005/04/10 20:32:27 jeromel
2140 // Expanded geo (several missing in the past / doc not accurate)
2141 //
2142 // Revision 1.163 2005/03/09 23:42:26 perev
2143 // Clear() removed from Finish()
2144 //
2145 // Revision 1.162 2005/02/05 00:56:20 perev
2146 // More tests for second call Finish()
2147 //
2148 // Revision 1.161 2004/11/16 17:48:10 fine
2149 // fixed the doPs method printout
2150 //
2151 // Revision 1.160 2004/11/13 00:28:57 fine
2152 // move the logger instantiation away of the ctor to be able to get the csubclass name
2153 //
2154 // Revision 1.159 2004/11/04 22:26:38 fine
2155 // populate the package with save/restore the logger and edit some messages
2156 //
2157 // Revision 1.158 2004/11/03 22:30:12 fine
2158 // Instantiate the logger per maker and clean up
2159 //
2160 // Revision 1.157 2004/11/03 16:41:21 fine
2161 // add new logger invocation (optional)
2162 //
2163 // Revision 1.156 2004/11/02 02:11:15 jeromel
2164 // Updated aliases for y2005 (note 5 days offset comparing to advertized value for breathing room margin)
2165 //
2166 // Revision 1.155 2004/09/07 18:42:19 fisyak
2167 // Make icc happy
2168 //
2169 // Revision 1.154 2004/09/03 20:33:31 perev
2170 // Attributes, cleanup
2171 //
2172 // Revision 1.153 2004/09/03 00:05:48 jeromel
2173 // Comment block oxygenized, removed unused var
2174 //
2175 // Revision 1.152 2004/09/01 22:09:51 perev
2176 // new methods SetAttr and IAttr,DAttr,SAttr added
2177 //
2178 // Revision 1.151 2004/08/03 00:49:03 perev
2179 // bug fix, wrong maker for dops name
2180 //
2181 // Revision 1.150 2004/08/02 19:44:14 perev
2182 // Bug fix, doPs Clear was not called
2183 //
2184 // Revision 1.149 2004/07/23 17:06:18 perev
2185 // AliasDate & AliasTime moved fro db maker to StMaker
2186 //
2187 // Revision 1.148 2004/04/26 00:07:12 perev
2188 // RetCodeAsString(kode) added. String form of STAR return codes
2189 //
2190 // Revision 1.147 2004/04/15 16:05:28 fine
2191 // Add extra data-mmeber and method for the coming STAR logger
2192 //
2193 // Revision 1.146 2004/04/15 00:21:32 perev
2194 // SetDateTime(int,int) added
2195 //
2196 // Revision 1.145 2004/04/09 21:10:20 jeromel
2197 // PrintInfo only in debug mode
2198 //
2199 // Revision 1.144 2004/04/09 01:59:00 jeromel
2200 // Bug fix.
2201 //
2202 // Revision 1.143 2004/04/08 21:32:41 perev
2203 // MemStat improving
2204 //
2205 // Revision 1.142 2004/04/07 18:16:10 perev
2206 // MemStat for Make bug fixed
2207 //
2208 // Revision 1.141 2004/03/15 23:57:01 jeromel
2209 // Protect against NULL
2210 //
2211 // Revision 1.140 2004/02/17 19:53:14 perev
2212 // Make more robust
2213 //
2214 // Revision 1.139 2004/01/28 04:37:26 perev
2215 // Printof new Run added
2216 //
2217 // Revision 1.138 2004/01/26 22:47:26 perev
2218 // Account stage (init,make,..)
2219 //
2220 // Revision 1.137 2004/01/14 22:33:12 fisyak
2221 // restore built time
2222 //
2223 // Revision 1.136 2003/11/17 22:19:20 perev
2224 // count memory only after 3 events, to avoid non event memory
2225 //
2226 // Revision 1.135 2003/11/13 02:54:34 perev
2227 // Safe destructor of TDataSet like object added
2228 //
2229 // Revision 1.134 2003/11/05 19:56:32 perev
2230 // Simple debugging class added
2231 //
2232 // Revision 1.133 2003/10/07 00:22:30 perev
2233 // PrintInfo simplified
2234 //
2235 // Revision 1.132 2003/09/28 21:12:45 jeromel
2236 // Unused var NT removed/commented
2237 //
2238 // Revision 1.131 2003/09/02 17:55:29 perev
2239 // gcc 3.2 updates + WarnOff
2240 //
2241 // Revision 1.130 2003/07/03 19:40:14 perev
2242 // Cleanup prints in Finish
2243 //
2244 // Revision 1.129 2003/07/01 16:59:16 perev
2245 // error codes for Maker added
2246 //
2247 // Revision 1.128 2003/06/23 23:43:39 perev
2248 // InitRun called even if no run at all
2249 //
2250 // Revision 1.127 2003/05/01 16:56:50 jeromel
2251 // Extraneous declaration removed
2252 //
2253 // Revision 1.126 2003/04/30 20:36:23 perev
2254 // Warnings cleanup. Modified lines marked VP
2255 //
2256 // Revision 1.125 2002/04/28 00:53:42 jeromel
2257 // More doc added ...
2258 //
2259 // Revision 1.124 2002/04/14 21:51:12 perev
2260 // Obsolete StBroadcast
2261 //
2262 // Revision 1.123 2002/03/12 21:19:00 fisyak
2263 // Set only one StEvtHddr as default option (due to Embedding)
2264 //
2265 // Revision 1.122 2002/02/22 21:16:21 perev
2266 // new method NotifyMe
2267 //
2268 // Revision 1.121 2002/02/02 23:31:14 jeromel
2269 // doxygenized. Added some text for the Make() method.
2270 //
2271 // Revision 1.120 2001/11/18 00:58:07 perev
2272 // Broadcast method added
2273 //
2274 // Revision 1.119 2001/10/13 20:23:45 perev
2275 // SetFlavor working before and after Init()
2276 //
2277 // Revision 1.118 2001/08/14 16:42:48 perev
2278 // InitRun call improved
2279 //
2280 // Revision 1.117 2001/06/05 22:04:47 perev
2281 // Summary only on top
2282 //
2283 // Revision 1.116 2001/06/01 02:47:31 perev
2284 // Memory consumption measurement added
2285 //
2286 // Revision 1.115 2001/05/31 02:40:29 perev
2287 // const(ing)
2288 //
2289 // Revision 1.114 2001/05/10 17:43:20 perev
2290 // Defence against saving maker added
2291 //
2292 // Revision 1.113 2001/05/10 17:33:20 perev
2293 // Defence against saving maker added
2294 //
2295 // Revision 1.112 2001/05/04 19:15:40 perev
2296 // Fatal() -> FatalErr()
2297 //
2298 // Revision 1.111 2001/04/14 01:55:39 perev
2299 // Reverse iter for Clear() and Finish()
2300 //
2301 // Revision 1.110 2001/04/12 22:23:22 perev
2302 // Small bug fixed (fine found)
2303 //
2304 // Revision 1.109 2001/03/02 16:54:44 perev
2305 // doPs fix
2306 //
2307 // Revision 1.108 2001/03/01 02:08:02 perev
2308 // StMem into doPs
2309 //
2310 // Revision 1.107 2001/01/23 22:02:51 fine
2311 // warning message has been re-introduced
2312 //
2313 // Revision 1.106 2000/11/25 18:59:48 fisyak
2314 // Add warning for failed Initialization
2315 //
2316 // Revision 1.105 2000/08/07 22:41:37 perev
2317 // remove redundant prInt_t in case of error
2318 //
2319 // Revision 1.104 2000/08/04 21:03:38 perev
2320 // Leaks + Clear() cleanup
2321 //
2322 // Revision 1.103 2000/07/30 01:39:04 perev
2323 // StMem::Printadded
2324 //
2325 // Revision 1.102 2000/07/27 19:05:34 perev
2326 // Small memleak in StMakerIter fixed, thanx Akio
2327 //
2328 // Revision 1.101 2000/07/21 21:54:43 fisyak
2329 // Respore lost ps after memory leak correction
2330 //
2331 // Revision 1.100 2000/07/14 01:52:19 perev
2332 // SetIvent called in SetNumber
2333 //
2334 // Revision 1.99 2000/07/04 02:36:01 perev
2335 // AddMaker method added & gStChain removed
2336 //
2337 // Revision 1.98 2000/07/01 00:17:37 fisyak
2338 // Remove memory leak
2339 //
2340 // Revision 1.97 2000/06/21 23:59:24 perev
2341 // getDataBase loop over makers added
2342 //
2343 // Revision 1.96 2000/06/21 21:12:39 perev
2344 // StMakerIter class added
2345 //
2346 // Revision 1.95 2000/06/09 22:12:29 fisyak
2347 // Reduce level of noise
2348 //
2349 // Revision 1.94 2000/05/30 21:04:41 fine
2350 // Fix typo in the ReAllocate message
2351 //
2352 // Revision 1.93 2000/05/20 01:17:54 perev
2353 // NaN added
2354 //
2355 // Revision 1.92 2000/05/20 01:11:07 perev
2356 // IventNumber and BfcStatus added
2357 //
2358 // Revision 1.91 2000/04/20 14:25:17 perev
2359 // Minor simplification
2360 //
2361 // Revision 1.90 2000/04/13 02:53:35 perev
2362 // StMaker::GetValidity added
2363 //
2364 // Revision 1.89 2000/04/07 15:41:42 perev
2365 // Printout error codes improved
2366 //
2367 // Revision 1.88 2000/04/05 02:45:13 fine
2368 // call-counter has been added
2369 //
2370 // Revision 1.87 2000/04/03 23:46:48 perev
2371 // Increased error check
2372 //
2373 // Revision 1.86 2000/03/23 00:15:22 fine
2374 // Adjusted to libSTAR for ROOT 2.24
2375 //
2376 // Revision 1.85 2000/03/01 22:56:25 fisyak
2377 // Adjust ps for RedHat 6.1
2378 //
2379 // Revision 1.84 2000/01/07 22:31:43 perev
2380 // one more argument for SetOutputAll
2381 //
2382 // Revision 1.83 2000/01/04 17:27:06 perev
2383 // Use timestamp instead of current one
2384 //
2385 // Revision 1.82 1999/12/28 21:23:22 fine
2386 // StChain::MakeDoc corrections
2387 //
2388 // Revision 1.81 1999/12/22 16:22:45 fine
2389 // MakeIndex for html doc introduced. Thankls Art
2390 //
2391 // Revision 1.80 1999/12/06 01:57:30 fine
2392 // Time statistic fixed
2393 //
2394 // Revision 1.77 1999/12/01 22:56:30 perev
2395 // .runco directory & AddRunco method introduced
2396 //
2397 // Revision 1.76 1999/11/19 21:02:11 didenko
2398 // valeri's changes
2399 //
2400 // Revision 1.75 1999/10/19 03:23:55 fine
2401 // Some new comments
2402 //
2403 // Revision 1.74 1999/09/24 16:32:40 fisyak
2404 // add return for Init/Finish Run
2405 //
2406 // Revision 1.73 1999/09/24 14:51:51 fisyak
2407 // Add implementation for InitRun/FinishRun
2408 //
2409 // Revision 1.72 1999/09/23 21:24:57 perev
2410 // recovered debug level init(lost)
2411 //
2412 // Revision 1.71 1999/09/21 15:05:17 perev
2413 // InitRun & FinishRun added
2414 //
2415 // Revision 1.70 1999/09/14 17:30:37 fine
2416 // some clean ups
2417 //
2418 // Revision 1.69 1999/09/13 23:22:53 fine
2419 // improved version of MakeDoc with MakeAssociatedClassList function
2420 //
2421 // Revision 1.68 1999/09/13 16:39:24 fine
2422 // MakeDoc ExpandPath removed to keep path short
2423 //
2424 // Revision 1.67 1999/09/13 13:30:46 fine
2425 // non-active new method MakeAssociatedClassList to be introduced new release
2426 //
2427 // Revision 1.66 1999/09/12 16:54:50 fine
2428 // StMaker::MakeDoc() adjusted to multi-level makers. Some bug fix also
2429 //
2430 // Revision 1.65 1999/09/12 15:02:53 fine
2431 // Multi-level maker source dirs introduced for MakeDoc method
2432 //
2433 // Revision 1.64 1999/09/12 01:42:14 fine
2434 // StMAker::MakeDoc has been adjusted to the new source tree
2435 //
2436 // Revision 1.63 1999/09/08 00:13:35 fisyak
2437 // Add static *GetChain()
2438 //
2439 // Revision 1.62 1999/09/03 23:11:48 perev
2440 // Add .runcont directory
2441 //
2442 // Revision 1.61 1999/09/02 22:27:11 fisyak
2443 // Add SetDEBUG
2444 //
2445 // Revision 1.60 1999/08/06 13:01:37 fisyak
2446 // Add Active flag
2447 //
2448 // Revision 1.59 1999/07/29 01:05:23 fisyak
2449 // move bfc to StBFChain
2450 //
2451 // Revision 1.58 1999/07/17 23:29:22 fisyak
2452 // Add Peter Jacobs QAInfo tag in printout
2453 //
2454 // Revision 1.57 1999/07/17 19:08:45 perev
2455 // StMemoryInfo added
2456 //
2457 // Revision 1.55 1999/07/15 13:56:47 perev
2458 // cleanup
2459 //
2460 // Revision 1.54 1999/07/13 02:19:34 perev
2461 // GetCVS,StEvtHddr,etc...
2462 //
2463 // Revision 1.53 1999/07/12 02:33:09 perev
2464 // Add SetMode
2465 //
2466 // Revision 1.52 1999/07/11 21:04:06 fisyak
2467 // Clash resolion
2468 //
2469 // Revision 1.51 1999/07/11 20:40:35 perev
2470 // Move Clear from StChain to StMaker
2471 //
2472 // Revision 1.50 1999/07/11 01:59:04 perev
2473 // add GetCVSTag again
2474 //
2475 // Revision 1.49 1999/07/11 01:33:33 fine
2476 // makedoc some corrections for MakeDoc
2477 //
2478 // Revision 1.48 1999/07/09 22:00:22 perev
2479 // GetCVS into StMaker
2480 //
2481 // Revision 1.47 1999/06/11 23:45:31 perev
2482 // cleanup
2483 //
2484 // Revision 1.46 1999/06/11 22:56:03 perev
2485 // Merge 2 updates
2486 //
2487 // Revision 1.45 1999/06/11 21:50:47 perev
2488 // garb->Delete()
2489 //
2490 // Revision 1.44 1999/06/11 17:45:57 perev
2491 // assert StMaker::Streamer to forbid to write it
2492 //
2493 // Revision 1.43 1999/05/23 04:05:02 fine
2494 // The lost since 1.35 Wed Mar 10 20:23:58 timer functions have been re-introduced
2495 //
2496 // Revision 1.42 1999/05/23 03:25:07 perev
2497 // Start & Stop Timer instead of benchmark
2498 //
2499 // Revision 1.41 1999/05/22 17:50:18 perev
2500 // StMaker::EndMaker ps added
2501 //
2502 // Revision 1.40 1999/05/13 20:56:50 perev
2503 // Supress too much warnings
2504 //
2505 // Revision 1.39 1999/05/10 17:16:44 perev
2506 // AddHist typo
2507 //
2508 // Revision 1.38 1999/05/10 15:37:51 perev
2509 // Save of hisogramm in StMaker::Init
2510 //
2511 // Revision 1.37 1999/05/07 20:51:31 perev
2512 // AddData bug fix
2513 //
2514 // Revision 1.36 1999/05/07 15:46:10 perev
2515 // Added test for the same object into AddObj
2516 //
2517 // Revision 1.35 1999/05/06 22:15:32 perev
2518 // fix objLast should not be included in StMaker::Init
2519 //
2520 // Revision 1.34 1999/05/06 21:27:10 perev
2521 // StMaker remove his from hdirectory
2522 //
2523 // Revision 1.33 1999/05/06 00:47:43 fine
2524 // maker's histogram is removed from the ROOT system gDirectory
2525 //
2526 // Revision 1.32 1999/05/06 00:23:45 fine
2527 // StMaker::MakeDoc some extra comments have been introduced
2528 //
2529 // Revision 1.31 1999/05/06 00:19:04 fine
2530 // StMaker::MakeDoc method has been re-introduced for the 3d time
2531 //
2532 // Revision 1.30 1999/05/05 16:23:07 perev
2533 // add recreation of m_DataSet to keep old codes
2534 //
2535 // Revision 1.29 1999/05/03 22:29:28 perev
2536 // Bug in GetDataSet fix. Thanks to Bill Love
2537 //
2538 // Revision 1.28 1999/05/01 00:53:38 perev
2539 // GetDataSet bug fix NAME == NAME/.data
2540 //
2541 // Revision 1.26 1999/04/30 14:58:41 perev
2542 // cd() added to StMaker class
2543 //
2544 // Revision 1.25 1999/04/16 14:22:00 fisyak
2545 // replace break in Makers loop from ==kStErr to >kStWarn to account EOF
2546 //
2547 // Revision 1.24 1999/03/28 02:57:51 perev
2548 // Add .const in searching path in GetDataSet
2549 //
2550 // Revision 1.23 1999/03/20 20:57:35 perev
2551 // add StEvtHddr.h and fix Get/SetNumber in maker
2552 //
2553 // Revision 1.22 1999/03/19 20:30:49 perev
2554 // GetCVSTag introduced
2555 //
2556 // Revision 1.21 1999/03/11 01:23:59 perev
2557 // new schema StChain
2558 //
2559 // Revision 1.14 1998/12/21 19:42:51 fisyak
2560 // Move ROOT includes to non system
2561 //
2562 // Revision 1.13 1998/11/19 01:23:57 fine
2563 // StChain::MakeDoc has been introduced, StChain::MakeDoc has been fixed (see macros/bfc_doc.C macro
2564 //
2565 // Revision 1.12 1998/11/18 22:46:09 fine
2566 // The lost MakeDoc method has been re-introduced
2567 //
2568 // Revision 1.9 1998/09/23 20:22:52 fisyak
2569 // Prerelease SL98h
2570 //
2571 // Revision 1.10 1998/10/06 18:00:27 perev
2572 // cleanup
2573 // Revision 1.8 1998/09/22 01:39:07 fine
2574 // Some make up
2575 //
2576 // Revision 1.6 1998/08/18 14:05:02 fisyak
2577 // Add to bfc dst
2578 //
2579 // Revision 1.5 1998/07/20 15:08:09 fisyak
2580 // Add tcl and tpt
static StMaker * fgFailedMaker
current pointer to StChain
Definition: StMaker.h:77
void * ReAllocate(Int_t newsize)
Definition: TTable.cxx:1234
Definition: FJcore.h:367
Int_t fTallyMaker[kStFatal+1]
counters
Definition: StMaker.h:80
virtual EDataSetPass Pass(EDataSetPass(*callback)(TDataSet *), Int_t depth=0)
Definition: TDataSet.cxx:689
virtual Long_t GetRowSize() const
Returns the size (in bytes) of one table row.
Definition: TTable.cxx:1395
virtual void AddData(TDataSet *data, const char *dir=".data")
User methods.
Definition: StMaker.cxx:332
virtual Bool_t DoOwner(Bool_t done=kTRUE)
Definition: TObjectSet.cxx:85
virtual TDataSet * Next(TDataSet::EDataSetPass mode=TDataSet::kContinue)
virtual Int_t GetNumber() const
STAR methods.
Definition: StMaker.cxx:256
virtual void Delete(Option_t *opt="")
Definition: TDataSet.cxx:320
static void Summary()
Definition: StMemStat.cxx:87
virtual void Remove(TDataSet *set)
Remiove the &quot;set&quot; from this TDataSet.
Definition: TDataSet.cxx:641
static StTestMaker * fgTestMaker
current pointer to failed maker
Definition: StMaker.h:78
virtual void Clear(Option_t *option="")
User defined functions.
Definition: StMaker.cxx:634
Int_t m_Number
Integer mode of maker.
Definition: StMaker.h:82
TDataSet * m_Runco
list of logOuput:ActualOuput
Definition: StMaker.h:73
StMemStat * fMemStatMake
Timer object.
Definition: StMaker.h:87
Int_t m_DebugLevel
Last Run number.
Definition: StMaker.h:84
TObjectSet(const Char_t *name, TObject *obj=0, Bool_t makeOwner=kTRUE)
to be documented
Definition: TObjectSet.cxx:31
Int_t m_MakeReturn
Debug level.
Definition: StMaker.h:85
Definition: TAttr.h:17
virtual void SetBIT(EMakerStatus k)
Maker Status Bits.
Definition: StMaker.h:204
virtual Int_t Make()
Definition: StMaker.cxx:898
virtual void SetObject(TObject *obj)
The depricated method (left here for the sake of the backward compatibility)
Definition: TObjectSet.h:59
static StMaker * fgTopChain
list of Histograms
Definition: StMaker.h:75
static StMaker * fgStChain
pointer to top StChain
Definition: StMaker.h:76
virtual Long_t GetNRows() const
Returns the number of the used rows for the wrapped table.
Definition: TTable.cxx:1388
TStopwatch m_Timer
Make() return flag.
Definition: StMaker.h:86
Int_t NaN()
Definition: TTable.cxx:1474
StMemStat * fMemStatClear
StMemStat for Make.
Definition: StMaker.h:88
virtual TObject * GetObject() const
The depricated method (left here for the sake of the backward compatibility)
Definition: TDataSet.cxx:428
void SetAttr(const char *key, const char *val)
Definition: TAttr.cxx:39
virtual const char * GetName() const
special overload
Definition: StMaker.cxx:237
Definition: Stypes.h:42
Definition: Stypes.h:40
virtual Int_t GetRunNumber() const
Returns the current RunNumber.
Definition: StMaker.cxx:1054
static EDataSetPass ClearDS(TDataSet *ds, void *user)
Definition: StMaker.cxx:993
virtual void Shunt(TDataSet *newParent=0)
Definition: TDataSet.cxx:810
virtual Long_t GetTableSize() const
Returns the number of the allocated rows.
Definition: TTable.cxx:1402
Definition: TTable.h:48
virtual Int_t Finish()
Definition: StMaker.cxx:776
virtual Int_t GetIventNumber() const
Returns the current event number.
Definition: StMaker.cxx:1033
const void * At(Int_t i) const
Returns a pointer to the i-th row of the table.
Definition: TTable.cxx:303
virtual TString Path() const
return the full path of this data set
Definition: TDataSet.cxx:626
Int_t m_LastRun
Serial event number.
Definition: StMaker.h:83
virtual TObject * GetObject() const
The depricated method (left here for the sake of the backward compatibility)
Definition: TObjectSet.h:56
Definition: Stypes.h:44
virtual TDataSet * Find(const char *path) const
Definition: TDataSet.cxx:362
Definition: Stypes.h:45
virtual void PrintTimer(Option_t *option="")
Definition: StMaker.cxx:1098