StChain/StMaker.cxx

00001 // $Id: StMaker.cxx,v 1.214 2009/01/26 14:32:49 fisyak Exp $ 00002 // 00003 // 00020 #define STAR_LOGGER 1 00021 #include "Stiostream.h" 00022 #include <stdio.h> 00023 #include <stdlib.h> 00024 00025 #include "TSystem.h" 00026 #include "TClass.h" 00027 #include "TROOT.h" 00028 #include "TError.h" 00029 #if 0 00030 #include "THtml.h" 00031 #endif 00032 #include "TH1.h" 00033 00034 #include "TChain.h" 00035 #include "TTree.h" 00036 #include "TList.h" 00037 #include "TClonesArray.h" 00038 #include "TBrowser.h" 00039 00040 #include "StMaker.h" 00041 #include "StChainOpt.h" 00042 #include "TObjectSet.h" 00043 #include "StChain.h" 00044 #include "TTable.h" 00045 00046 #include "StMemStat.h" 00047 #include "TAttr.h" 00048 #include "StMkDeb.h" 00049 #include "StMessMgr.h" 00050 00051 StMaker *StMaker::fgTopChain = 0; 00052 StMaker *StMaker::fgStChain = 0; 00053 StMaker *StMaker::fgFailedMaker = 0; 00054 StTestMaker *StMaker::fgTestMaker = 0; 00055 Int_t StMaker::fgTallyMaker[kStFatal+1] = {0,0,0,0,0}; 00056 Int_t MaxWarnings = 26; 00057 /* geometry version from Maxim 09/29/2005 00058 year2000 VMC 00059 year_2a 00060 year_2b 00061 year2001 VMC 00062 year2002 VMC 00063 year2003 VMC 00064 y2003a VMC 00065 y2003b VMC 00066 y2003x VMC 00067 y2004 VMC 00068 y2004a VMC 00069 y2004b VMC 00070 y2004c VMC 00071 y2004x VMC 00072 y2004y VMC 00073 y2005 VMC 00074 y2005b VMC 00075 y2005c VMC 00076 y2005x VMC 00077 dev2005 - non-production 00078 complete - non-production 00079 ist1 - non-production VMC 00080 pix1 - non-production 00081 ---------------- 00082 old version of db tags 00083 {"sd97", 19970101, 0}, 00084 {"sd98", 19980101, 0}, 00085 {"year_1a", 19990101, 0}, 00086 {"year_1b", 19990501, 0}, 00087 {"es99", 19990615, 0}, 00088 {"er99", 19990616,120000}, 00089 {"year_1c", 19991001, 0}, 00090 {"year_1d", 19991101, 0}, 00091 {"year_1e", 19991201, 0}, 00092 {"dc99", 19991206, 80000}, 00093 {"y2000", 20000614,175430}, 00094 {"year_2b", 20010501, 0}, 00095 {"year_2a", 20010610, 0}, 00096 {"year2001", 20010615, 0}, 00097 {"year2003", 20021115, 0}, 00098 {"y2003b", 20021115, 0}, 00099 {"y2003a", 20021115, 0}, 00100 {"y2003x", 20021115, 0}, 00101 {"y2004b", 20031120, 0}, 00102 {"y2004a", 20031120, 0}, 00103 {"y2004x", 20031120, 0}, 00104 {"y2004", 20031120, 0}, 00105 {"y2004c", 20031125, 0}, 00106 {"y2005x", 20041030, 0}, 00107 {"y2005", 20041030, 0}, 00108 {"y2005b", 20041101, 0}, 00109 {"y2005c", 20041201, 0}, 00110 Production 00111 ============= 00112 MC: 00113 00114 2000: y1a,y1b,y1h,y2000,year_1a,year_1b 00115 2001: y2001,y2001n 00116 2002: y2a,y2b,y2x,y2y,year_2a 00117 2003: y2003,y2003x 00118 2004: y2004a, y2004c,y2004,y2004y 00119 2005: y2005,y2005x 00120 2006: y2006c,y2006 00121 2007: y2007g,y2007 00122 upgr: upgr01, upgr05, upgr06, upgr07, upgr08, upgr09, upgr10, upgr11, upgr13 00123 ============= 00124 rawData: 00125 2000: y1h, y2000a (?), y2000 00126 y2001 00127 y2003 00128 y2004 00129 y2005b,y2005f 00130 y2006g,y2006 00131 y2007g,y2007 00132 y2008 00133 00134 */ 00135 static const DbAlias_t fDbAlias[] = {// geometry Comment old 00136 {"sd97", 19970101, 0, "year2000", ""}, // {"sd97", 19970101, 0} 00137 {"sd98", 19980101, 0, "year2000", ""}, // {"sd98", 19980101, 0} 00138 {"y1a", 19990101, 0, "year2000", ""}, 00139 {"year_1a", 19990101, 0, "year2000", ""}, // {"year_1a", 19990101, 0} 00140 {"y1b", 19990501, 0, "year2000", ""}, 00141 {"year_1b", 19990501, 0, "year2000", ""}, // {"year_1b", 19990501, 0} 00142 {"y1s", 19990501, 0, "year2000", ""}, 00143 {"year_1s", 19990501, 0, "year2000", ""}, 00144 {"es99", 19990615, 0, "year2000", ""}, // {"es99", 19990615, 0} 00145 {"er99", 19990616,120000, "year2000", ""}, // {"er99", 19990616,120000} 00146 {"year_1c", 19991001, 0, "year2000", ""}, // {"year_1c", 19991001, 0} 00147 {"y1d", 19991101, 0, "year2000", ""}, 00148 {"year_1d", 19991101, 0, "year2000", ""}, // {"year_1d", 19991101, 0} 00149 {"y1e", 19991201, 0, "year2000", ""}, 00150 {"year_1e", 19991201, 0, "year2000", ""}, // {"year_1e", 19991201, 0} 00151 {"dc99", 19991206, 80000, "year2000", ""}, // {"dc99", 19991206, 80000} 00152 {"y1h", 20000614,175430, "year2000", ""}, 00153 {"y2000", 20000614,175430, "year2000", ""}, // {"y2000", 20000614,175430} 00154 {"y2b", 20010501, 0, "year_2b", ""}, 00155 {"y2001", 20010501, 0, "year2001", ""}, 00156 {"year_2b", 20010501, 0, "year_2b", ""}, // {"year_2b", 20010501, 0} 00157 {"year2002", 20010502, 0, "year2002", ""}, 00158 {"y2a", 20010610, 0, "year_2a", ""}, 00159 {"year_2a", 20010610, 0, "year_2a", ""}, // {"year_2a", 20010610, 0} 00160 {"y2001n", 20010615, 0, "year2001", ""}, 00161 {"year2001", 20010615, 0, "year2001", ""}, // {"year2001", 20010615, 0} 00162 {"y2003", 20021115, 0, "year2003", ""}, 00163 {"year2003", 20021115, 0, "year2003", ""}, // {"year2003", 20021115, 0} 00164 {"y2003x", 20021115, 1, "y2003x", ""}, // {"y2003x", 20021115, 0} 00165 {"y2003a", 20021115, 2, "y2003a", ""}, // {"y2003a", 20021115, 0} 00166 {"y2003b", 20021115, 3, "y2003b", ""}, // {"y2003b", 20021115, 0} 00167 {"y2003c", 20021115, 4, "y2003c", "new SVT"}, 00168 {"y2004", 20031120, 0, "y2004", ""}, // {"y2004", 20031120, 0} 00169 {"y2004x", 20031120, 1, "y2004x", ""}, // {"y2004x", 20031120, 0} 00170 {"y2004y", 20031120, 2, "y2004y", ""}, 00171 {"y2004a", 20031120, 3, "y2004a", ""}, // {"y2004a", 20031120, 0} 00172 {"y2004b", 20031120, 4, "y2004b", ""}, // {"y2004b", 20031120, 0} 00173 {"y2004c", 20031125, 0, "y2004c", ""}, // {"y2004c", 20031125, 0} 00174 {"y2004d", 20031125, 1, "y2004d", "new SVT"}, 00175 // Dead area in SSD, in version y2005f 00176 {"y2005x", 20041030, 0, "y2005x", ""}, // {"y2005x", 20041030, 0} 00177 {"y2005", 20041030, 0, "y2005", ""}, // {"y2005", 20041030, 0} 00178 {"y2005b", 20041101, 0, "y2005b", ""}, // {"y2005b", 20041101, 0} 00179 {"y2005c", 20041201, 0, "y2005c", ""}, // {"y2005c", 20041201, 0} 00180 {"y2005d", 20041201, 1, "y2005d", "y2005c + new SVT"}, // {"y2005d", 20041201, 0} 00181 {"y2005e", 20041201, 2, "y2005e", "y2005d + new SSD"}, // {"y2005e", 20041201, 0} 00182 {"y2005f", 20041201, 3, "y2005f", "y2005e + SSD5/CALB2"},// {"y2005e", 20041201, 0} 00183 {"y2005g", 20041201, 4, "y2005g", "y2005f + SVT dead material"},//{"y2005e", 20041201, 0} 00184 00185 // Dead area in SSD, in version y2006b 00186 {"y2006", 20051201, 0, "y2006", "base for y2006: y2005e+fixed TPC plane"}, 00187 {"y2006a", 20051201, 1, "y2006a", "y2006+new FPD"}, 00188 {"y2006b", 20051201, 2, "y2006b", "y2006+new FPD+SSD5/CALB2"},// code versions indicated 00189 {"y2006c", 20051201, 3, "y2006c", "y2006+new FPD+SSD5/CALB2+noPMD"},// 00190 {"y2006g", 20051201, 4, "y2006g", "y2006c + SVT dead material"}, 00191 00192 // in preparation 00193 {"y2007", 20061105, 0, "y2007", "base geometry for y2007"}, // advertized simu 20061101 00194 {"y2007a", 20061105, 1, "y2007a", "the material of the water channels is now carbon "}, // advertized simu 20061101 00195 {"y2007g", 20061105, 4, "y2007g", "y2007b + SVT dead material"}, 00196 00197 // SVT/SSD is out 00198 {"y2008", 20071101, 0, "y2008", "base for y2008: SVT/SSD out, cone is lost"}, 00199 {"y2008a", 20071101, 1, "y2008a", "base for y2008: SVT/SSD out, cone in separate SCON"}, 00200 // 00201 {"y2009", 20081215, 0, "y2009", "Practically place holder yet(VP)"}, 00202 00203 // development tags 00204 // {"dev2005", 20190101, 0, "dev2005", "non-production"}, 00205 // {"complete", 20190101, 1, "complete", "non-production"}, 00206 // {"ist1", 20190101, 2, "ist1", "non-production"}, 00207 // {"pix1", 20190101, 3, "pix1", "non-production, old is not in present starsim tags"}, 00208 {"upgr01", 20190101, 4, "upgr01", ""}, 00209 {"upgr02", 20190101, 5, "upgr02", ""}, 00210 {"upgr03", 20190101, 6, "upgr03", ""}, 00211 {"upgr04", 20190101, 7, "upgr04", ""}, 00212 {"upgr05", 20190101, 8, "upgr05", ""}, 00213 {"upgr06", 20190101, 9, "upgr06", ""}, // what happened to 6? Historical not re-used 00214 {"upgr07", 20190101, 10, "upgr07", ""}, 00215 {"upgr08", 20190101, 11, "upgr08", ""}, 00216 {"upgr09", 20190101, 12, "upgr09", ""}, 00217 {"upgr10", 20190101, 13, "upgr10", ""}, 00218 {"upgr11", 20190101, 14, "upgr11", ""}, 00219 {"upgr12", 20190101, 15, "upgr12", ""}, 00220 {"upgr13", 20190101, 16, "upgr13", ""}, 00221 {"upgr14", 20190101, 17, "upgr14", ""}, 00222 {"upgr15", 20190101, 18, "upgr15", ""}, 00223 {"upgr16", 20190101, 19, "upgr16", ""}, 00224 {"upgr17", 20190101, 20, "upgr17", ""}, 00225 // Future development: 00226 {"simpletpc", 20200102, 16, "simpletpc",""}, 00227 {"upgr20", 20200102, 17, "upgr20", "y2007 + one TOF"}, // advertized simu 20061101 00228 {"upgr21", 20200102, 18, "upgr21", "y2007 + full TOF"}, // advertized simu 20061101 00229 {0, 0, 0, 0, 0} 00230 }; 00231 00232 // Turn the logger of the current maker 00233 #define TURN_LOGGER(maker) \ 00234 if (!fLogger) fLogger = StMessMgr::Instance(ClassName()); \ 00235 StTurnLogger SaveRestoreLogger(maker->GetLogger()); 00236 00237 00238 ClassImp(StMaker) 00239 00240 static void doPs(const Char_t *who,const Char_t *where); 00241 00242 //_____________________________________________________________________________ 00243 StMaker::StMaker(const Char_t *name,const Char_t *):TDataSet(name,".maker"), 00244 m_Mode(0), m_Number(0), m_LastRun(-3), 00245 m_DebugLevel(0),m_MakeReturn(0),fStatus(0), 00246 fLogger(0),fLoggerHold(0) 00247 { 00248 m_Attr=0; 00249 m_Inputs = 0; 00250 if (!fgStChain) { // it is first maker, it is chain 00251 fgTopChain = fgStChain = this; 00252 gROOT->GetListOfBrowsables()->Add(this,GetName()); 00253 AddData(0,".make"); 00254 } else { // add this maker to chain 00255 fgStChain->AddData(this,".make"); 00256 } 00257 m_DataSet = new TObjectSet(".data") ;Add(m_DataSet); 00258 m_ConstSet = new TObjectSet(".const");Add(m_ConstSet); 00259 m_GarbSet = new TObjectSet(".garb" );Add(m_GarbSet); 00260 m_Inputs = new TObjectSet(".aliases" );Add(m_Inputs); 00261 m_Runco = new TObjectSet(".runco" );Add(m_Runco); 00262 AddHist(0); m_Histograms = GetHistList(); 00263 ::doPs(GetName(),"constructor"); 00264 m_Timer.Stop(); 00265 fMemStatMake = 0; 00266 fMemStatClear = 0; 00267 memset(fTallyMaker,0,(kStFatal+1)*sizeof(Int_t)); 00268 SetActive(); 00269 StMkDeb::Register(this); 00270 } 00271 00272 //_____________________________________________________________________________ 00273 void StMaker::AddMaker(StMaker *mk) 00274 { 00275 TDataSet *dotmk = Find(".make"); 00276 if (!dotmk) dotmk = new TDataSet(".make",this); 00277 mk->Shunt(dotmk); 00278 } 00279 //_____________________________________________________________________________ 00280 StMaker::~StMaker() 00281 { 00282 if (fgTopChain == this) fgTopChain = 0; 00283 if (fgStChain == this) fgStChain = 0; 00284 delete fMemStatMake; fMemStatMake = 0; 00285 delete fMemStatClear; fMemStatClear = 0; 00286 TDataSet *ds = this; 00287 Cleanup(ds); 00288 StMkDeb::Cancel(this); 00289 } 00290 //_____________________________________________________________________________ 00291 const Char_t *StMaker::GetName() const 00292 { 00293 static Int_t occ = 0; 00294 const Char_t *name = TNamed::GetName(); 00295 if (name && *name ) return name; 00296 TString ts(ClassName()); 00297 ts+="#"; ts+=(occ++); 00298 ((TNamed*)this)->SetName(ts.Data()); 00299 return GetName(); 00300 } 00301 //______________________________________________________________________________ 00302 void StMaker::SetNumber(Int_t number) 00303 { 00304 StMaker *par = GetParentMaker(); 00305 if (par) par->SetNumber(number); 00306 m_Number = number; 00307 SetIventNumber(number); 00308 } 00309 //______________________________________________________________________________ 00310 Int_t StMaker::GetNumber() const 00311 { 00312 StMaker *par = GetParentMaker(); 00313 if (par) return par->GetNumber(); 00314 return m_Number; 00315 } 00316 //______________________________________________________________________________ 00317 StMaker *StMaker::GetParentMaker() const 00318 { 00319 TDataSet *par = GetParent(); if (!par) return 0; 00320 return (StMaker*)par->GetParent(); 00321 } 00322 //______________________________________________________________________________ 00323 StMaker *StMaker::GetMaker(const Char_t *mkname) 00324 { 00325 TString path(".make/"); path+=mkname; 00326 return (StMaker*)GetDataSet((const char*)path); 00327 } 00328 //______________________________________________________________________________ 00329 TObject *StMaker::GetDirObj(const Char_t *dir) const 00330 { 00331 TObjectSet *h = (TObjectSet*)Find(dir); 00332 if (!h) return 0; 00333 return h->GetObject(); 00334 } 00335 //______________________________________________________________________________ 00336 void StMaker::SetDirObj(TObject *obj,const Char_t *dir) 00337 { 00338 TObjectSet *set = (TObjectSet *)Find(dir); 00339 if (!set) { // No dir, make it 00340 set = new TObjectSet(dir); Add(set);} 00341 set->SetObject(obj); 00342 } 00343 //______________________________________________________________________________ 00344 TObjectSet *StMaker::AddObj(TObject *obj,const Char_t *dir) 00345 { 00346 assert (dir[0]=='.'); 00347 TObjectSet *set = (TObjectSet*)Find(dir); 00348 if (!set) { // No dir, make it 00349 set = new TObjectSet(dir); Add(set);} 00350 00351 TList *list = (TList *)set->GetObject(); 00352 if (!list) {// No list, make it 00353 list = new TList(); 00354 set->SetObject((TObject*)list);} 00355 if (!obj) return set; 00356 if(!list->FindObject(obj)) list->Add(obj); 00357 return set; 00358 } 00359 //______________________________________________________________________________ 00360 void StMaker::AddHist(TH1 *h,const Char_t *dir) 00361 { 00362 if (dir){/*unused*/} 00363 if (!h) {AddObj(0,".hist");return;} 00364 if (h->InheritsFrom(TH1::Class())) h->SetDirectory(0); 00365 AddObj(h,".hist"); 00366 } 00367 //______________________________________________________________________________ 00368 void StMaker::AddRunco (Double_t par,const Char_t *name,const Char_t *comment) 00369 { 00370 assert (name && name && comment[0]); 00371 00372 TDataSet *dp = new TDataSet(name,m_Runco); 00373 TString ts(" // "); ts += comment; 00374 Char_t buf[40]; 00375 sprintf(buf,"%f",par); 00376 ts.Replace(0,0,buf); 00377 dp->SetTitle((const char*)ts); 00378 } 00379 00380 00381 //______________________________________________________________________________ 00382 TDataSet *StMaker::AddData(TDataSet *ds, const Char_t *dir) 00383 { 00384 assert (dir); assert(dir[0]=='.'); 00385 TDataSet *set = Find(dir); 00386 if (!set) { // No dir, make it 00387 set = new TObjectSet(dir); Add(set);} 00388 if (!ds) return set; 00389 Int_t dotMake = (strcmp(dir,".make")==0); 00390 Int_t inhMake = ds->InheritsFrom(StMaker::Class()); 00391 if (dotMake!=inhMake) { 00392 Error("AddData","Add to %s is NOT allowed: %s.%s\n" 00393 ,dir,ds->ClassName(),ds->GetName()); 00394 return 0;} 00395 00396 TList *tl = set->GetList(); 00397 if (!tl || !tl->FindObject(ds->GetName())) { 00398 set->Add(ds); 00399 } else { 00400 Error("AddData","Data %s/%s is not added. ***Name clash***",dir,ds->GetName()); 00401 return 0; 00402 } 00403 return set; 00404 } 00405 //______________________________________________________________________________ 00406 TDataSet *StMaker::GetData(const Char_t *name, const Char_t *dir) const 00407 { 00408 TDataSet *set = Find(dir); 00409 if (!set) return 0; 00410 return set->Find(name); 00411 } 00412 //______________________________________________________________________________ 00413 void StMaker::ToWhiteBoard(const Char_t *name, void *dat) 00414 { 00415 TObjectSet *envelop = new TObjectSet(name,(TObject*)dat,0); 00416 envelop->SetTitle(".envelop"); 00417 AddData(envelop,".data"); 00418 } 00419 //______________________________________________________________________________ 00420 void StMaker::ToWhiteConst(const Char_t *name, void *dat) 00421 { 00422 TObjectSet *envelop = new TObjectSet(name,(TObject*)dat,0); 00423 envelop->SetTitle(".envelop"); 00424 AddData(envelop,".const"); 00425 } 00426 //______________________________________________________________________________ 00427 void StMaker::ToWhiteBoard(const Char_t *name, TObject *dat, Int_t owner) 00428 { 00429 TObjectSet *envelop = new TObjectSet(name,dat,owner); 00430 envelop->SetTitle(".envelop"); 00431 AddData(envelop,".data"); 00432 } 00433 //______________________________________________________________________________ 00434 void StMaker::ToWhiteConst(const Char_t *name, TObject *dat, Int_t owner) 00435 { 00436 TObjectSet *envelop = new TObjectSet(name,dat,owner); 00437 envelop->SetTitle(".envelop"); 00438 AddData(envelop,".const"); 00439 } 00440 //______________________________________________________________________________ 00441 void *StMaker::WhiteBoard(const Char_t *name, void *v) const 00442 { 00443 void **dat = (void **)v; 00444 *dat = 0; 00445 TDataSet *ds = GetDataSet(name); 00446 if (!ds) return 0; 00447 if (strcmp(".envelop",ds->GetTitle())==0) {*dat = ds->GetObject();} 00448 else {*dat = ds ;} 00449 return ds->GetObject(); 00450 } 00451 //______________________________________________________________________________ 00452 void StMaker::AddAlias(const Char_t *log, const Char_t *act,const Char_t *dir) 00453 { 00454 TDataSet *ali = new TDataSet(log); 00455 ali->SetTitle(act); 00456 AddData(ali,dir); 00457 } 00458 //______________________________________________________________________________ 00459 void StMaker::SetNotify(const Char_t *about, StMaker *mk) 00460 { 00461 TDataSet *ali = new TObjectSet(about,mk,0); 00462 AddData(ali,".notify"); 00463 } 00464 //______________________________________________________________________________ 00465 void StMaker::NotifyEm(const Char_t *about, const void *ptr) 00466 { 00467 // Turn the logger of the current maker 00468 TURN_LOGGER(this); 00469 00470 TDataSet *set = Find(".notify"); 00471 if (!set) return; 00472 TDataSetIter iter(set); 00473 TObjectSet *os=0; 00474 while((os=(TObjectSet*)iter())) { 00475 if (strcmp(about,os->GetName())) continue; 00476 StMaker *mk=(StMaker*)os->GetObject(); 00477 if (!mk) continue; 00478 TURN_LOGGER(mk); 00479 mk->NotifyMe(about,ptr); 00480 } 00481 00482 } 00483 //______________________________________________________________________________ 00484 void StMaker::SetAlias(const Char_t *log, const Char_t *act,const Char_t *dir) 00485 { 00486 TDataSet *ali = GetData(log,dir); 00487 if (ali) { 00488 if (!strcmp(act,ali->GetTitle())) return; 00489 } else { 00490 ali = new TDataSet(log); AddData(ali,dir); 00491 } 00492 ali->SetTitle(act); 00493 00494 if (GetDebug()) { 00495 #ifdef STAR_LOGGER 00496 LOG_DEBUG << "<" << ClassName() << "(" << GetName() << "::SetAlias> " 00497 << log << " = " << act << endm; 00498 #else 00499 printf("<%s(%s)::SetAlias> %s = %s\n",ClassName(),GetName(),log,act); 00500 #endif 00501 } 00502 } 00503 //______________________________________________________________________________ 00504 void StMaker::SetOutput(const Char_t *log,TDataSet *ds) 00505 { 00506 Int_t idx; 00507 const Char_t *logname = log; 00508 if (!logname || !logname[0]) logname = ds->GetName(); 00509 TString act = ds->Path(); 00510 while ((idx=act.Index(".make/"))>=0) act.Replace(0,idx+6,""); 00511 SetOutput(logname,act); 00512 } 00513 00514 //______________________________________________________________________________ 00515 void StMaker::SetOutputAll(TDataSet *ds, Int_t level) 00516 { 00517 TDataSet *set; 00518 TDataSetIter next(ds,level); 00519 while ((set = next())) SetOutput(set); 00520 } 00521 00522 //______________________________________________________________________________ 00523 TList *StMaker::GetMakeList() const 00524 { TDataSet *ds = Find(".make"); 00525 if (!ds) return 0; 00526 return ds->GetList(); 00527 } 00528 //______________________________________________________________________________ 00529 TString StMaker::GetAlias(const Char_t *log,const Char_t *dir) const 00530 { 00531 Int_t nspn = strcspn(log," /"); 00532 TString act(log,nspn); 00533 TDataSet *in = GetData(act,dir); 00534 act =""; 00535 if (in) {act = in->GetTitle(); act += log+nspn;} 00536 return act; 00537 } 00538 //______________________________________________________________________________ 00539 TDataSet *StMaker::FindDataSet(const Char_t *logInput, 00540 const StMaker *uppMk, 00541 const StMaker *dowMk) const 00542 { 00543 TURN_LOGGER(this); 00544 00545 TDataSetIter nextMk(0); 00546 TString actInput,findString,tmp; 00547 TDataSet *dataset,*dir; 00548 StMaker *parent,*mk; 00549 Int_t icol,islas; 00550 00551 actInput = GetInput(logInput); 00552 if (actInput.IsNull()) actInput = logInput; 00553 00554 00555 // Direct try 00556 dataset = 0; 00557 if (actInput.Contains(".")) dataset = Find(actInput); 00558 if (dataset) goto FOUND; 00559 00560 if (actInput==GetName()) dataset = m_DataSet; 00561 if (dataset) goto FOUND; 00562 00563 // Not so evident, do some editing 00564 00565 00566 icol = actInput.Index(":"); 00567 if (icol>=0) {//there is maker name is hidden 00568 tmp = actInput; 00569 tmp.Replace(0,0,".make/"); icol +=6; 00570 tmp.Replace(icol,1,"/.data/"); 00571 dataset = Find((const char*)tmp); // .make/MAKER/.data/... 00572 if (dataset) goto FOUND; 00573 dataset = Find((const char*)tmp+6); // MAKER/.data/... 00574 if (dataset) goto FOUND; 00575 tmp.Replace(icol,7,"/.const/"); 00576 dataset = Find((const char*)tmp); // .make/MAKER/.const/... 00577 if (dataset) goto FOUND; 00578 dataset = Find((const char*)tmp+6); // MAKER/.const/... 00579 if (dataset) goto FOUND; 00580 goto DOWN; 00581 } 00582 00583 if (m_DataSet) { 00584 islas = actInput.Index("/"); 00585 if (islas>0) { 00586 tmp.Replace(0,999,actInput,islas); 00587 if (tmp == GetName()) { // 00588 tmp = actInput; 00589 tmp.Replace(0,islas+1,""); 00590 dataset = m_DataSet->Find(tmp); 00591 if (dataset) goto FOUND; 00592 dataset = m_ConstSet->Find(tmp); 00593 if (dataset) goto FOUND; 00594 } 00595 } 00596 00597 dataset = m_DataSet->Find(actInput); 00598 if (dataset) goto FOUND; 00599 dataset = m_ConstSet->Find(actInput); 00600 if (dataset) goto FOUND; 00601 } 00602 00603 // Try to search DOWN 00604 DOWN: if (!(dir = Find(".make"))) goto UP; 00605 00606 nextMk.Reset(dir); 00607 while ((mk = (StMaker* )nextMk())) 00608 { 00609 if (mk==dowMk) continue; 00610 dataset = mk->FindDataSet(actInput,this,0); 00611 if (dataset) goto FOUND; 00612 } 00613 00614 // Try to search UP 00615 UP: if (uppMk) return 0; 00616 00617 parent = GetMaker(this); if (!parent) goto NOTFOUND; 00618 dataset = parent->FindDataSet(actInput,0,this); 00619 if (dataset) goto FOUND; 00620 00621 // Not FOUND 00622 NOTFOUND: 00623 if (!dowMk && GetDebug()>1) //PrintWarning message 00624 if ((MaxWarnings--) > 0) Warning("GetDataSet"," \"%s\" Not Found ***\n",(const char*)actInput); 00625 return 0; 00626 00627 // DataSet FOUND 00628 FOUND: if (uppMk || dowMk) return dataset; 00629 if (GetDebug()<2) return dataset; 00630 printf("Remark: <%s::%s> DataSet %s FOUND in %s\n" 00631 ,ClassName(),"GetDataSet",logInput,(const char*)dataset->Path()); 00632 00633 return dataset; 00634 00635 } 00636 //______________________________________________________________________________ 00637 TDataSet *StMaker::GetDataBase(const Char_t *logInput,const TDatime *td) 00638 { 00639 TURN_LOGGER(this); 00640 TDataSet *ds = 0; 00641 StMaker *mk = GetMakerInheritsFrom("St_db_Maker"); 00642 if (mk) ds = mk->GetDataBase(logInput,td); 00643 return ds; 00644 } 00645 //______________________________________________________________________________ 00646 StMaker *StMaker::GetMakerInheritsFrom (const Char_t *mktype) const 00647 { 00648 TURN_LOGGER(this); 00649 StMaker *mk = 0; 00650 StMakerIter mkiter(this); 00651 while ((mk = mkiter.NextMaker())) {//loop over makers 00652 if (mk->InheritsFrom(mktype)) break; 00653 } 00654 return mk; 00655 } 00656 //______________________________________________________________________________ 00657 void StMaker::SetFlavor(const Char_t *flav,const Char_t *tabname) 00658 { 00659 StMaker *mk = GetMakerInheritsFrom("St_db_Maker"); 00660 if (mk) mk->SetFlavor(flav,tabname); 00661 } 00662 //______________________________________________________________________________ 00663 Int_t StMaker::GetValidity(const TTable *tb, TDatime *val) const 00664 { 00665 StMaker *mk = GetMaker(tb); 00666 if (!mk) return 10; 00667 if (!mk->InheritsFrom("St_db_Maker")) return 11; 00668 return mk->GetValidity(tb,val); 00669 } 00670 //_____________________________________________________________________________ 00671 void StMaker::Clear(Option_t *option) 00672 { 00673 TURN_LOGGER(this); 00674 00675 m_MakeReturn = 0; 00676 if(option){}; 00677 if (m_DataSet) m_DataSet->Delete(); 00678 00679 // Reset lists of event objects 00680 00681 TIter next(GetMakeList(),kIterBackward); 00682 StMaker *maker; 00683 Int_t curr = StMkDeb::GetCurrent(); 00684 while ((maker = (StMaker* )next())) { 00685 assert(maker->TestBIT(kCleaBeg)==0); 00686 StMkDeb::SetCurrent(maker,3); 00687 maker->SetBIT(kCleaBeg); 00688 maker->StartTimer(); 00689 if (maker->fMemStatClear && GetNumber()>20) maker->fMemStatClear->Start(); 00690 TURN_LOGGER(maker); 00691 maker->Clear(option); 00692 if (maker->fMemStatClear && GetNumber()>20) maker->fMemStatClear->Stop(); 00693 maker->StopTimer(); 00694 maker->ResetBIT(kCleaBeg); 00695 StMkDeb::SetCurrent(curr); 00696 } 00697 TCollection::EmptyGarbageCollection(); 00698 doPs(GetName(),"Clear"); 00699 // Maker=StChain or whatever is called "Eread" would 00700 // reach this with a NULL pointer when executed from a macro 00701 // such as doEvent(). Same reason for the patch below ... 00702 //else printf("StMaker::Clear :: cannot call method doPs on NULL pointer [%s]\n",GetName()) ; 00703 return; 00704 00705 } 00706 //_____________________________________________________________________________ 00707 Int_t StMaker::Init() 00708 { 00709 TURN_LOGGER(this); 00710 TObject *objLast,*objHist; 00711 TList *tl = GetMakeList(); 00712 if (!tl) return kStOK; 00713 00714 TIter nextMaker(tl); 00715 StMaker *maker; 00716 Int_t curr = StMkDeb::GetCurrent(); 00717 while ((maker = (StMaker* )nextMaker())) { 00718 00719 TURN_LOGGER(maker); 00720 // save last created histogram in current Root directory 00721 gROOT->cd(); 00722 objLast = gDirectory->GetList()->Last(); 00723 00724 // Initialise maker 00725 00726 assert(maker->TestBIT(kInitBeg)|maker->TestBIT(kInitEnd)==0); 00727 StMkDeb::SetCurrent(maker,1); 00728 maker->SetBIT(kInitBeg); 00729 maker->StartTimer(); 00730 00731 if (GetDebug()) { 00732 #ifdef STAR_LOGGER 00733 LOG_DEBUG << "*** Call << " << maker->ClassName() << ":Init() ***" << endm; 00734 #else 00735 printf("\n*** Call %s::Init() ***\n\n",maker->ClassName()); 00736 #endif 00737 } 00738 TString ts1(maker->ClassName()); ts1+="("; ts1+=maker->GetName(); ts1+=")::"; 00739 TString ts2 = ts1; ts2+="Make "; 00740 maker->fMemStatMake = new StMemStat(ts2); 00741 ts2 = ts1; ts2+="Clear"; 00742 maker->fMemStatClear = new StMemStat(ts2); 00743 00744 if ( maker->Init()) { 00745 #ifdef STAR_LOGGER 00746 LOG_ERROR << " Maker "<< maker->GetName() << " failed in Init" << endm; 00747 #else 00748 printf(" Maker %s failed in Init\n", maker->GetName()); 00749 #endif 00750 return kStErr; 00751 } 00752 maker->StopTimer(); 00753 00754 // Add the Maker histograms in the Maker histograms list 00755 // and remove it from the ROOT system directory 00756 gROOT->cd(); 00757 TIter nextHist(gDirectory->GetList()); 00758 Int_t ready = !objLast; 00759 while((objHist=nextHist())) {// loop over gDirectory 00760 if (!ready && objHist!=objLast) continue; 00761 ready = 1999; 00762 if (objHist==objLast) continue; 00763 if (!objHist->InheritsFrom("TH1")) continue; 00764 00765 // Move the histogram from the ROOT list into the "maker's" list 00766 ((TH1*)objHist)->SetDirectory(0); 00767 maker->AddHist((TH1*)objHist); 00768 } 00769 ::doPs(maker->GetName(),"Init"); 00770 maker->ResetBIT(kInitBeg); 00771 maker->SetBIT (kInitEnd); 00772 StMkDeb::SetCurrent(curr); 00773 } 00774 return kStOK; 00775 } 00776 //_____________________________________________________________________________ 00777 void StMaker::StartMaker() 00778 { 00779 // Save the previous logger status 00780 if (!fLoggerHold) fLoggerHold = new StTurnLogger(GetLogger()); 00781 if (!m_DataSet) {//Keep legacy code 00782 m_DataSet = Find(".data"); 00783 if (!m_DataSet) {m_DataSet = new TObjectSet(".data"); Add(m_DataSet);} 00784 } 00785 /*if (GetNumber()>3)*/ 00786 if (fMemStatMake) if (GetNumber()>20) fMemStatMake->Start(); 00787 else 00788 if (GetDebug()) { 00789 #ifdef STAR_LOGGER 00790 LOG_DEBUG << "StMaker::StartMaker : cannot use StMemStat (no Init()) in [" << 00791 GetName() << "]" << endm; 00792 #else 00793 printf("StMaker::StartMaker : cannot use StMemStat (no Init()) in [%s]\n",GetName()); 00794 #endif 00795 } 00796 00797 00798 00799 StartTimer(); 00800 } 00801 //_____________________________________________________________________________ 00802 void StMaker::EndMaker(Int_t ierr) 00803 { 00804 SetMakeReturn(ierr); 00805 fgTallyMaker[ierr%10]++; 00806 fTallyMaker [ierr%10]++; 00807 if (m_DataSet) m_DataSet->Pass(ClearDS,0); 00808 if (m_GarbSet) m_GarbSet->Delete(); 00809 ::doPs(GetName(),"EndMaker"); 00810 00811 /*if (GetNumber()>3)*/ 00812 if (fMemStatMake) if (GetNumber()>20) fMemStatMake->Stop(); 00813 else 00814 if (GetDebug()) { 00815 #ifdef STAR_LOGGER 00816 LOG_DEBUG << "StMaker::EndMaker : cannot use StMemStat (no Init()) in [" 00817 << GetName() 00818 << "]" 00819 << endm ; 00820 #else 00821 printf("StMaker::EndMaker : cannot use StMemStat (no Init()) in [%s]\n",GetName()); 00822 #endif 00823 } 00824 00825 00826 StopTimer(); 00827 // Restore the previous logger status 00828 if (fLoggerHold) { delete fLoggerHold; fLoggerHold = 0;} 00829 00830 } 00831 00832 //_____________________________________________________________________________ 00837 Int_t StMaker::Finish() 00838 { 00839 if (TestBIT(kFiniEnd)) return 1; 00840 TURN_LOGGER(this); 00841 00842 Int_t nerr = 0; 00843 Int_t run = GetRunNumber(); 00844 if (run>-1) FinishRun(run); 00845 00846 TIter next(GetMakeList(),kIterBackward); 00847 StMaker *maker; 00848 Double_t totalCpuTime = 0; 00849 Double_t totalRealTime = 0; 00850 while ((maker = (StMaker* )next())) 00851 { 00852 totalCpuTime += maker->CpuTime(); 00853 totalRealTime += maker->RealTime(); 00854 } 00855 00856 // Printrelative time 00857 if (!totalRealTime) totalRealTime = 1; 00858 if (!totalCpuTime ) totalCpuTime = 1; 00859 00860 next.Reset(); 00861 Int_t fst=1; 00862 while ((maker = (StMaker*)next())) { 00863 #ifdef STAR_LOGGER 00864 TURN_LOGGER(maker); 00865 00866 if (fst) { 00867 fst=0; 00868 LOG_QA << 00869 Form("=================================================================================") << endm; 00870 LOG_QA << 00871 Form("QAInfo:Chain %20s::%-20s Ast =%6.2f Cpu =%6.2f " 00872 ,ClassName(),GetName(),totalRealTime,totalCpuTime) << endm; 00873 } 00874 LOG_QA << 00875 Form("QAInfo:Maker %20s::%-20s Ast =%6.2f(%4.1f%%) Cpu =%6.2f(%4.1f%%) " 00876 ,maker->ClassName(),maker->GetName() 00877 ,maker->RealTime() 00878 ,100*maker->RealTime()/totalRealTime 00879 ,maker->CpuTime() 00880 ,100*maker->CpuTime()/totalCpuTime) << endm; 00881 00882 static const Char_t *ee[]={"nStOK","nStWarn","nStEOF","nStErr","nStFatal"}; 00883 TString tail(""); 00884 for (Int_t j=0;j<=kStFatal;j++) { 00885 if (fTallyMaker[j]) tail += Form(" %s=%d",ee[j],fTallyMaker[j]);} 00886 if (tail != "") LOG_QA << (const Char_t *) tail << endm; 00887 #else 00888 if (fst) { 00889 fst=0; 00890 Printf("=================================================================================\n"); 00891 Printf("QAInfo: Chain %20s::%-20s Ast =%6.2f Cpu =%6.2f " 00892 ,ClassName(),GetName(),totalRealTime,totalCpuTime); 00893 } 00894 printf("QAInfo: Maker %20s::%-20s Ast =%6.2f(%4.1f%%) Cpu =%6.2f(%4.1f%%) " 00895 ,maker->ClassName(),maker->GetName() 00896 ,maker->RealTime() 00897 ,100*maker->RealTime()/totalRealTime 00898 ,maker->CpuTime() 00899 ,100*maker->CpuTime()/totalCpuTime); 00900 00901 static const Char_t *ee[]={"nStOK","nStWarn","nStEOF","nStErr","nStFatal"}; 00902 for (Int_t j=0;j<=kStFatal;j++) { 00903 if (fTallyMaker[j]) printf(" %s=%d",ee[j],fTallyMaker[j]);} 00904 printf("\n"); 00905 #endif 00906 } 00907 00908 next.Reset(); 00909 Int_t curr = StMkDeb::GetCurrent(); 00910 while ((maker = (StMaker* )next())) 00911 { 00912 TURN_LOGGER(maker); 00913 00914 if (maker->TestBIT(kFiniEnd)) { 00915 maker->Warning("Finish","maker %s.%s Finished twice" 00916 ,maker->GetName(),maker->ClassName()); 00917 continue;} 00918 StMkDeb::SetCurrent(maker,4); 00919 maker->SetBIT(kFiniBeg); 00920 if ( maker->Finish() ) nerr++; 00921 maker->ResetBIT(kFiniBeg); 00922 maker->SetBIT (kFiniEnd); 00923 StMkDeb::SetCurrent(curr); 00924 } 00925 if (!GetParent()) {// Only for top maker 00926 #ifdef STAR_LOGGER 00927 LOG_INFO << "--------------Error Codes-------------------------" << endm; 00928 LOG_INFO << " nStOK nStWarn nStEOF nStErr nStFatal" << endm; 00929 TString tail(""); 00930 for( Int_t i=0; i<=kStFatal; i++) tail += Form("%10d",fgTallyMaker[i]); 00931 if (tail != "") 00932 LOG_INFO << (const Char_t *)tail << endm; 00933 LOG_INFO << "--------------------------------------------------" << endm; 00934 #else 00935 printf("\n--------------Error Codes-------------------------\n"); 00936 printf(" nStOK nStWarn nStEOF nStErr nStFatal \n"); 00937 for( Int_t i=0; i<=kStFatal; i++) printf("%10d",fgTallyMaker[i]); 00938 printf("\n--------------------------------------------------\n"); 00939 #endif 00940 } 00941 //VP Printf("=================================================================================\n"); 00942 00943 if (GetParent()==0) StMemStat::Summary(); 00944 return nerr; 00945 } 00946 00947 //_____________________________________________________________________________ 00958 Int_t StMaker::Make() 00959 { 00960 TURN_LOGGER(this); 00961 00962 // Loop on all makers 00963 Int_t ret,run=-1,oldrun; 00964 TList *tl = GetMakeList(); 00965 if (!tl) return kStOK; 00966 StEvtHddr *hd = GetEvtHddr(); 00967 TIter nextMaker(tl); 00968 StMaker *maker; 00969 fgFailedMaker = 0; 00970 Int_t curr = StMkDeb::GetCurrent(); 00971 while ((maker = (StMaker* )nextMaker())) { 00972 if (!maker->IsActive()) continue; 00973 TURN_LOGGER(maker); 00974 assert(maker->TestBIT(kMakeBeg)==0); 00975 maker->SetBIT(kMakeBeg); 00976 StMkDeb::SetCurrent(maker,2); 00977 oldrun = maker->m_LastRun; 00978 if (hd && hd->GetRunNumber()!=oldrun) { 00979 if (oldrun>-1) maker->FinishRun(oldrun); 00980 run = hd->GetRunNumber(); 00981 if (Debug() && this == fgStChain && m_LastRun!=run){ 00982 m_LastRun = run; 00983 #ifdef STAR_LOGGER 00984 LOG_INFO << " +++ New RunNumber found=" << run << " (previous = " << oldrun << ")" << endm; 00985 #else 00986 printf(" +++ New RunNumber found=%d (previous = %d)\n",run,oldrun); 00987 #endif 00988 hd->Print(); 00989 } 00990 maker->InitRun(run); 00991 maker->m_LastRun=run; 00992 } 00993 // Call Maker 00994 if (fgTestMaker) { fgTestMaker->SetNext(maker); fgTestMaker->Make();} 00995 00996 maker->StartMaker(); 00997 ret = maker->Make(); 00998 assert((ret%10)>=0 && (ret%10)<=kStFatal); 00999 maker->EndMaker(ret); 01000 01001 if (Debug() || ret) 01002 #ifdef STAR_LOGGER 01003 LOG_INFO << "*** " << maker->ClassName() << "::Make() == " 01004 << RetCodeAsString(ret) << "(" << ret << ") ***" 01005 << endm; 01006 #else 01007 printf("*** %s::Make() == %s(%d) ***\n" 01008 ,maker->ClassName(),RetCodeAsString(ret),ret); 01009 #endif 01010 maker->ResetBIT(kMakeBeg); 01011 StMkDeb::SetCurrent(curr); 01012 if ((ret%10)>kStWarn) { //something unusual 01013 if ((ret%10) != kStERR) return ret; 01015 fgFailedMaker = maker; 01016 if (maker->IAttr(".Privilege")) return ret; 01017 continue; 01018 } 01019 01020 } 01021 return kStOK; 01022 } 01023 //_____________________________________________________________________________ 01024 void StMaker::FatalErr(Int_t Ierr, const Char_t *com) 01025 { 01026 #ifdef STAR_LOGGER 01027 LOG_QA << Form("QAInfo:%s::Fatal: Error %d %s",GetName(),Ierr,com) << endm; 01028 LOG_FATAL << Form("QAInfo:%s::Fatal: Error %d %s",GetName(),Ierr,com) << endm; 01029 #else 01030 printf("QAInfo:%s::Fatal: Error %d %s\n",GetName(),Ierr,com); 01031 #endif 01032 StMaker *parent = (StMaker *)GetParent(); 01033 if (parent) ((StMaker*)parent)->FatalErr(Ierr,com); 01034 #ifndef STAR_LOGGER 01035 fflush(stdout); 01036 #endif 01037 } 01038 //_____________________________________________________________________________ 01039 StMaker *StMaker::GetMaker(const TDataSet *ds) 01040 { 01041 const TDataSet *par = ds; 01042 while (par && (par = par->GetParent()) && strncmp(".maker",par->GetTitle(),6)) {} 01043 return ( StMaker*) par; 01044 } 01045 01046 //_____________________________________________________________________________ 01052 EDataSetPass StMaker::ClearDS (TDataSet* ds,void * ) 01053 { 01054 if (ds->InheritsFrom(TTable::Class())){ 01055 TTable *table = (TTable *)ds; 01056 Int_t setSize = table->GetTableSize(); 01057 table->ReAllocate(); 01058 memset((void *)table->At(table->GetNRows()),127,table->GetRowSize()); 01059 //if (setSize && (setSize - table->GetTableSize() > 100)) { 01060 if (setSize && table->GetTableSize() == 0){ 01061 table->Warning("ReAllocate"," Table %s has purged from %d to %d " 01062 ,table->GetName(),setSize,table->GetTableSize()); 01063 } 01064 table->NaN(); 01065 } 01066 return kContinue; 01067 } 01068 //_____________________________________________________________________________ 01069 void StMaker::PrintInfo() 01070 { 01071 const char *cvs = GetCVS(); 01072 const char *built = 0; 01073 if (cvs && cvs[0]) built = strstr(cvs,"built"); 01074 else cvs = "No CVS tag was defined"; 01075 #ifdef STAR_LOGGER 01076 if (built > cvs) LOG_QA << Form("QAInfo:%-20s %s from %.*s",ClassName(),built,built-cvs,cvs)<< endm; 01077 else LOG_QA << Form("QAInfo:%-20s from %s",ClassName(),cvs) << endm; 01078 #else 01079 if (built > cvs) printf("QAInfo:%-20s %s from %.*s\n",ClassName(),built,built-cvs,cvs); 01080 else printf("QAInfo:%-20s from %s\n",ClassName(),cvs); 01081 #endif 01082 // Printinfo for all defined Makers 01083 TIter next(GetMakeList()); 01084 StMaker *maker; 01085 while ((maker = (StMaker* )next())) { 01086 maker->PrintInfo(); 01087 } 01088 } 01089 01090 //_____________________________________________________________________________ 01092 Int_t StMaker::GetIventNumber() const 01093 { 01094 StEvtHddr *hd = GetEvtHddr(); 01095 return hd->GetIventNumber(); 01096 } 01097 01098 //_____________________________________________________________________________ 01099 void StMaker::SetIventNumber(Int_t iv) 01100 { 01101 StEvtHddr *hd = GetEvtHddr(); 01102 hd->SetIventNumber(iv); 01103 } 01104 //_____________________________________________________________________________ 01105 Int_t StMaker::GetEventNumber() const 01106 { 01107 StEvtHddr *hd = GetEvtHddr(); 01108 return hd->GetEventNumber(); 01109 } 01110 01111 //_____________________________________________________________________________ 01113 Int_t StMaker::GetRunNumber() const 01114 { 01115 StEvtHddr *hd = GetEvtHddr(); 01116 return hd->GetRunNumber(); 01117 } 01118 //_____________________________________________________________________________ 01119 StMaker *StMaker::GetParentChain() const 01120 { 01121 const StMaker *mk = GetParentMaker(); 01122 while(mk && !mk->IsChain()) {mk = mk->GetParentMaker();} 01123 return (StMaker*) mk; 01124 } 01125 //_____________________________________________________________________________ 01126 TDatime StMaker::GetDateTime() const 01127 { 01128 StEvtHddr *hd = GetEvtHddr(); 01129 return hd->GetDateTime(); 01130 } 01131 //_____________________________________________________________________________ 01132 TDatime StMaker::GetDBTime() const 01133 { 01134 StMaker *mk = GetMakerInheritsFrom("St_db_Maker"); 01135 assert(mk); 01136 return mk->GetDateTime(); 01137 } 01138 01139 01140 //_____________________________________________________________________________ 01141 Int_t StMaker::GetDate() const {return GetDateTime().GetDate();} 01142 //_____________________________________________________________________________ 01143 Int_t StMaker::GetTime() const {return GetDateTime().GetTime();} 01144 //_____________________________________________________________________________ 01145 const Char_t *StMaker::GetEventType() const 01146 { 01147 StEvtHddr *hd = GetEvtHddr(); 01148 return hd->GetEventType(); 01149 } 01150 01151 //_____________________________________________________________________________ 01157 void StMaker::PrintTimer(Option_t *option) 01158 { 01159 if(option){}; 01160 #ifdef STAR_LOGGER 01161 LOG_QA << Form("QAInfo:%-20s: Real Time = %6.2f seconds Cpu Time = %6.2f seconds, Entries = %d",GetName() 01162 ,m_Timer.RealTime(),m_Timer.CpuTime(),m_Timer.Counter()) << endm; 01163 #else 01164 Printf("QAInfo:%-20s: Real Time = %6.2f seconds Cpu Time = %6.2f seconds, Entries = %d",GetName() 01165 ,m_Timer.RealTime(),m_Timer.CpuTime(),m_Timer.Counter()); 01166 #endif 01167 } 01168 void StMaker::lsMakers(const StMaker *top) 01169 { 01170 TDataSetIter iter((TDataSet*)top,20); 01171 Int_t N=0; 01172 for(const TDataSet *mk=top;mk;mk = iter.Next()) { 01173 if(strncmp(".maker",mk->GetTitle(),6)!=0) continue; 01174 Int_t l=iter.GetDepth(); 01175 N++; 01176 Char_t space[20]; memset(space,' ',sizeof(space));space[l]=0; 01177 01178 printf("%3d(%d) - %s %s::%s\n",N,l/2,space,mk->ClassName(),mk->GetName()); 01179 } 01180 } 01181 01182 01183 01184 #if 0 01185 //_____________________________________________________________________________ 01186 static void MakeAssociatedClassList(const TObject *obj, const Char_t *classDir=0) 01187 { 01204 if (!obj) return; 01205 const Char_t *thisDir = classDir; 01206 if (thisDir == 0 || thisDir[0] == 0) 01207 thisDir = gSystem->DirName(obj->IsA()->GetImplFileName()); 01208 const Char_t *thisClassName = obj->IsA()->GetName(); 01209 // Loop over all *.h files within <thisDir> to find 01210 // C++ class declarations 01211 void *dirhandle = 0; 01212 TString className; 01213 if ( (dirhandle = gSystem->OpenDirectory(thisDir)) ) 01214 { 01215 const Char_t *n = 0; 01216 ifstream headerFile; 01217 Char_t inBuffer[128] = {0}; 01218 Int_t lBuf = sizeof(inBuffer); 01219 Char_t *nextSym = inBuffer; 01220 Int_t status = 0; 01221 const Char_t keyWord[] = "class"; 01222 const Int_t lKeyWord = sizeof(keyWord); 01223 01224 while ( (n = gSystem->GetDirEntry(dirhandle)) ) { 01225 // look for *.h* files but *Cint.h 01226 if (!strstr(n,".h") || strstr(n,"Cint.h") ) continue; 01227 Char_t *fullFile = gSystem->ConcatFileName(thisDir,n); 01228 headerFile.open(fullFile); 01229 if (headerFile.fail()) continue; 01230 while (headerFile.getline(inBuffer,lBuf) && !headerFile.eof()) { 01231 nextSym = inBuffer; 01232 if (status==0) status = 1; 01233 do { 01234 /* 01235 ************************************************************ 01236 * 01237 * |<===========================================+ 01238 * | | 01239 * $-->(1)<===+ | 01240 * | ' ' | | 01241 * |---->| | 01242 * |"class" ' ' | 01243 * |------>(2)--->(3)<===+ | 01244 * | ' ' | | 01245 * |---->| | 01246 * | name | 01247 * |------>(4)<===+ | 01248 * | ' ' | | 01249 * |---->| | 01250 * | ";" | 01251 * |------>(5)-------->| 01252 * | | add2list 01253 * | ":" | 01254 * |------->| 01255 * 01256 ************************************************************ 01257 */ 01258 switch (status) { 01259 case 1: { 01260 if (*nextSym == ' ' || *nextSym == '\t') break; 01261 const Char_t *classFound = strstr(nextSym,keyWord); 01262 if ( classFound && classFound == nextSym){ 01263 status = 2; 01264 nextSym += lKeyWord-2; 01265 } 01266 else status = 0; 01267 break; 01268 } 01269 case 2: status = 0; 01270 if (*nextSym == ' ' || *nextSym == '\t') status = 3; 01271 break; 01272 case 3: 01273 if (*nextSym == ' ' || *nextSym == '\t') break; 01274 status = 0; 01275 if (isalpha(*nextSym)) { 01276 className = *nextSym; 01277 nextSym++; 01278 while (isalnum(*nextSym) || *nextSym == '_' ) { 01279 className += *nextSym++; status = 4; 01280 } 01281 nextSym--; 01282 } 01283 break; 01284 case 4: 01285 if (*nextSym == ' ' || *nextSym == '\t') break; 01286 status = 0; 01287 if (*nextSym == 0 || *nextSym == ':' || *nextSym == '{' || 01288 ( *nextSym == '/' && 01289 (*(nextSym+1) == '/' || *(nextSym+1) == '*') 01290 ) 01291 ) status = 5; 01292 break; 01293 case 5: 01294 if (strcmp(thisClassName,className.Data())) { 01295 printf(" MakeDoc: %s\n", className.Data()); 01296 TClass *cl = gROOT->GetClass(className.Data()); 01297 if (cl && !cl->InheritsFrom("StMaker") ) { 01298 gHtml->MakeClass((Text_t *)className.Data()); 01299 } 01300 } 01301 default: status = 1; 01302 break; 01303 }; 01304 } while (*(++nextSym) && status ); // end of buffer 01305 } // eof() 01306 headerFile.close(); 01307 delete [] fullFile; 01308 } 01309 } 01310 } 01311 //_____________________________________________________________________________ 01312 void StMaker::MakeDoc(const TString &stardir,const TString &outdir, Bool_t baseClasses) 01313 { 01343 // Define the type of the OS 01344 TString STAR = stardir; 01345 TString delim = ":"; 01346 //Bool_t NT=kFALSE; variable assigned but never used 01347 01348 if (strcmp(gSystem->GetName(),"WinNT") == 0 ) { 01349 //NT=kTRUE; 01350 delim = ";"; 01351 STAR.ReplaceAll("$(afs)","//sol/afs"); 01352 } 01353 else 01354 STAR.ReplaceAll("$(afs)","/afs"); 01355 01356 TString classname = IsA()->GetName(); 01357 01358 THtml thisHtml; 01359 01360 // if (!gHtml) gHtml = new THtml; 01361 01362 // Define the set of the subdirectories with the STAR class sources 01363 // | ---------------------- | ------------ | ------------------ | 01364 // | Directory name Class name Share library name | 01365 // | ---------------------- | ------------ | ------------------ | 01366 const Char_t *source[] = {"StRoot/St_base" , "TDataSet" , "St_base" 01367 ,"StRoot/StChain" , "StMaker" , "StChain" 01368 //,"StRoot/StUtilities" , "StMessage" , "StUtilities" 01369 ,"StRoot/StarClassLibrary", "" , "" 01370 ,"StRoot/StEvent" , "StEvent" , "StEvent" 01371 ,"StRoot/St_TLA_Maker" , "St_TLA_Maker", "St_TLA_Maker" 01372 ,"include" , "" , "" 01373 ,"include/tables" , "" , "" 01374 }; 01375 01376 const Int_t lsource = sizeof(source)/sizeof(const Char_t *); 01377 01378 TString classDir = gSystem->DirName(IsA()->GetImplFileName()); 01379 TString lookup = STAR; 01380 lookup += delim; 01381 01382 lookup += STAR; 01383 lookup += "/"; 01384 lookup += classDir; 01385 lookup += delim; 01386 01387 lookup += STAR; 01388 lookup += "/StRoot/"; 01389 lookup += classname; 01390 01391 // Add class name base 01392 01393 Int_t i = 0; 01394 for (i=0;i<lsource-3;i+=3) { 01395 lookup += delim; 01396 lookup += STAR; 01397 lookup += "/"; 01398 lookup += source[i]; 01399 // Load extra share library if any 01400 const Char_t *cl = source[i+1]; 01401 const Char_t *so = source[i+2]; 01402 if (cl && cl[0] && so && so[0] && !gROOT->GetClass(cl)) 01403 { 01404 if (gSystem->Load(so)) 01405 printf(" Failed to load the share library %s for class %s\n",so,cl); 01406 } 01407 } 01408 01409 // cout << lookup.Data() << endl << endl; 01410 01411 // const Char_t *c = ClassName(); // This trick has to be done since a bug within ROOT 01412 01413 lookup.ReplaceAll("//StRoot/","/StRoot/"); 01414 thisHtml.SetSourceDir(lookup); 01415 01416 TString odir = outdir; 01417 // odir.ReplaceAll("$(STAR)",STAR); 01418 gSystem->ExpandPathName(odir); 01419 thisHtml.SetOutputDir(odir); 01420 01421 // Create the list of the classes defined with the loaded DLL's to be documented 01422 01423 Char_t *classes[] = { 01424 "St_Module", "TTable" 01425 ,"TDataSet", "TDataSetIter", "TFileSet" 01426 ,"StMaker", "StChain" 01427 ,"table_head_st" 01428 }; 01429 Int_t nclass = sizeof(classes)/4; 01430 // Create the definitions of the classes not derived from TObjects 01431 TString header = "$STAF/inc/table_header.h"; 01432 01433 gSystem->ExpandPathName(header); 01434 header.ReplaceAll("//inc/","/inc/"); 01435 gROOT->LoadMacro(header); 01436 01437 TClass header1("table_head_st",1,"table_header.h","table_header.h"); 01438 01439 // Update the docs of the base classes 01440 static Bool_t makeAllAtOnce = kTRUE; 01441 if (makeAllAtOnce && baseClasses) { 01442 makeAllAtOnce = kFALSE; 01443 // thisHtml.MakeAll(); // VF 10/09/99 01444 for (i=0;i<nclass;i++) thisHtml.MakeClass(classes[i]); 01445 thisHtml.MakeIndex(); 01446 // MakeAssociatedClassList(this, classDir.Data()); 01447 } 01448 01449 if (baseClasses) {gHtml= &thisHtml; MakeAssociatedClassList(this, classDir.Data()); } 01450 // Create the doc for this class 01451 printf(" Making html for <%s>\n",classname.Data()); 01452 thisHtml.MakeClass((Char_t *)classname.Data()); 01453 // Create the associated classes docs 01454 // Loop on all makers 01455 TList *tl = GetMakeList(); 01456 if (tl) { 01457 TIter nextMaker(tl); 01458 StMaker *maker; 01459 while ((maker = (StMaker* )nextMaker())) 01460 maker->MakeDoc(stardir,outdir,kFALSE); 01461 } 01462 } 01463 #endif 01464 //_____________________________________________________________________________ 01465 static void doPs(const Char_t *who, const Char_t *where) 01466 { 01467 static const Char_t *ps =0; 01468 if (!ps) { 01469 // execute shell 01470 ps = gSystem->Getenv("StarEndMakerShell"); 01471 ps = (ps) ? "yes" : ""; 01472 } 01473 if (!ps[0]) return; 01474 #ifdef STAR_LOGGER_BUG 01475 LOG_QA << Form("QAInfo: doPs for %20s:%12s \t",who,where); 01476 #else 01477 printf("QAInfo: doPs for %20s:%12s \t",who,where); 01478 #endif 01479 StMemStat::PrintMem(0); 01480 #if 0 01481 #ifdef STAR_LOGGER_BUG 01482 LOG_QA << endm; 01483 #else 01484 printf("\n"); 01485 #endif 01486 #endif 01487 } 01488 01489 //_____________________________________________________________________________ 01490 void StMaker::Streamer(TBuffer &) 01491 { LOG_FATAL << Form("%s::Streamer - attempt to write %s",ClassName(),GetName()) << endm; 01492 assert(0); 01493 } 01494 //______________________________________________________________________________ 01495 StMaker *StMaker::New(const Char_t *classname, const Char_t *name, void *title) 01496 { 01497 // This static method creates a new StMaker object if provided 01498 01499 StMaker *maker = 0; 01500 if (classname) 01501 { 01502 TClass *cl = gROOT->GetClass(classname); 01503 if (cl) { 01504 maker = (StMaker *)cl->New(); 01505 if (maker) { 01506 if (name && strlen(name)) maker->SetName(name); 01507 if (title) maker->SetTitle((Char_t *) title); 01508 } 01509 } 01510 } 01511 return maker; 01512 } 01513 //_____________________________________________________________________________ 01514 void StMaker::SetDebug(Int_t l) 01515 { 01516 m_DebugLevel = l; 01517 StMessMgr *log = GetLogger(); 01518 if (log) log->SetLevel(m_DebugLevel); 01519 } 01520 01521 //_____________________________________________________________________________ 01522 void StMaker::SetDEBUG(Int_t l) 01523 { 01524 SetDebug(l); 01525 // Loop on all makers 01526 TList *tl = GetMakeList(); 01527 if (!tl) return; 01528 01529 TIter nextMaker(tl); 01530 StMaker *maker; 01531 while ((maker = (StMaker* )nextMaker())) maker->SetDEBUG(l); 01532 } 01533 //_____________________________________________________________________________ 01547 Int_t StMaker::SetAttr(const Char_t *key, const Char_t *val, const Char_t *to) 01548 { 01549 01550 Int_t count = 0; 01551 TString tk(key);tk.ToLower();tk.ReplaceAll(" ","");tk.ReplaceAll("\t",""); 01552 if (!val) val =""; 01553 TString tv(val);tv = tv.Strip(TString::kBoth) ;tv.ReplaceAll("\t",""); 01554 if (!to || !to[0]) to ="."; 01555 TString tt(to ); tt.ReplaceAll(" ","");tt.ReplaceAll("\t",""); 01556 TString tn(tt),tc("*"); 01557 Int_t idx = tt.Index("::"); 01558 if (idx>=0) {//Case with class name 01559 tn.Replace(0 ,idx+2,""); if (!tn.Length()) tn = "*"; 01560 tc=tt; 01561 tc.Replace(idx,999 ,""); if (!tc.Length()) tc = "*"; 01562 } 01563 Int_t act=0; 01564 if (tn==".") {act = 1;} 01565 else if (tn=="*") {act = 5;} 01566 else if (tn==GetName()) {act = 1;} 01567 else {act = 4;} 01568 01569 if (tc=="*") {act |=2;} 01570 else if (InheritsFrom(tc.Data())) {act |=2;} 01571 01572 TString fullName(ClassName()); fullName+="::"; fullName+=GetName(); 01573 01574 if ((act&3)==3) { // this attribute is for this maker 01575 count++; 01576 if (tk == ".call") { 01577 TString command("(("); command += ClassName(); command+="*)"; 01578 Char_t buf[20]; sprintf(buf,"%p",(void*)this); 01579 command +=buf; command +=")->"; command+=tv;command+=";"; 01580 gROOT->ProcessLineFast(command.Data(),0);} 01581 else { 01582 if (!m_Attr) m_Attr = new TAttr(GetName()); 01583 m_Attr->SetAttr(tk.Data(), tv.Data()); 01584 if (Debug() > 1) { 01585 LOG_DEBUG << Form("SetAttr","(\"%s\",\"%s\",\"%s\")",tk.Data(),tv.Data(),fullName.Data()) << endm; 01586 } 01587 } 01588 } 01589 if (!(act&4)) return count; 01590 01591 // Loop on all makers 01592 TList *tl = GetMakeList(); 01593 if (!tl) return count; 01594 01595 TIter nextMaker(tl); 01596 StMaker *maker; 01597 while ((maker = (StMaker*)nextMaker())) count += maker->SetAttr(tk.Data(),tv.Data(),to); 01598 return count; 01599 } 01600 Int_t StMaker::SetAttr(const StMaker *mk) 01601 { 01602 if (!mk) return 0; 01603 if (!mk->m_Attr) return 0; 01604 if (!m_Attr) m_Attr = new TAttr; 01605 return m_Attr->SetAttr(mk->m_Attr); 01606 } 01607 //_____________________________________________________________________________ 01608 Int_t StMaker::SetAttr(const Char_t *key, Int_t val, const Char_t *to) 01609 { 01610 TString ts; ts+=val; return SetAttr(key, ts.Data(), to); 01611 } 01612 //_____________________________________________________________________________ 01613 Int_t StMaker::SetAttr(const Char_t *key, UInt_t val, const Char_t *to) 01614 { 01615 TString ts; ts+=val; return SetAttr(key, ts.Data(), to); 01616 } 01617 //_____________________________________________________________________________ 01618 Int_t StMaker::SetAttr(const Char_t *key, Double_t val, const Char_t *to) 01619 { 01620 TString ts; ts+=val; return SetAttr(key, ts.Data(), to); 01621 } 01622 01623 //_____________________________________________________________________________ 01624 const Char_t *StMaker::SAttr(const Char_t *key) const 01625 { 01626 if (!m_Attr) return ""; 01627 return m_Attr->SAttr(key); 01628 } 01629 //_____________________________________________________________________________ 01630 Int_t StMaker::IAttr(const Char_t *key) const 01631 { 01632 if (!m_Attr) return 0; 01633 return m_Attr->IAttr(key); 01634 } 01635 //_____________________________________________________________________________ 01636 UInt_t StMaker::UAttr(const Char_t *key) const 01637 { 01638 if (!m_Attr) return 0; 01639 return m_Attr->UAttr(key); 01640 } 01641 //_____________________________________________________________________________ 01642 Double_t StMaker::DAttr(const Char_t *key) const 01643 { 01644 if (!m_Attr) return 0; 01645 return m_Attr->DAttr(key); 01646 } 01647 //_____________________________________________________________________________ 01648 void StMaker::PrintAttr() const 01649 { 01650 if (!m_Attr) return ; 01651 m_Attr->PrintAttr(); 01652 } 01653 01654 //_____________________________________________________________________________ 01655 Int_t StMaker::InitRun (Int_t runumber) {return 0;} 01656 //_____________________________________________________________________________ 01657 Int_t StMaker::FinishRun(Int_t runumber) {return 0;} 01658 01659 //_____________________________________________________________________________ 01660 Int_t StMaker::Cleanup(TDataSet *&ds) 01661 { 01662 01663 if (!ds->TObject::TestBit(TObject::kNotDeleted)) {ds=0;return 0;} 01664 TSeqCollection *list = ds->TDataSet::GetCollection(); 01665 if (!list) return 0; 01666 assert(list->IsA()==TList::Class() || list->IsA()==TObjArray::Class()); 01667 01668 Int_t kount = 0; 01669 TIter iter(list); 01670 TDataSet *son; 01671 Int_t num = list->Capacity(); 01672 for (Int_t i=0; i<num; i++) { 01673 son = (TDataSet*)iter.Next(); 01674 if (!son) continue; 01675 if (!son->TObject::TestBit(TObject::kNotDeleted)) {list->Remove(son); continue;} 01676 TDataSet* par = son->TDataSet::GetParent(); 01677 if ( par != ds) {list->Remove(son); continue;} 01678 assert (son->InheritsFrom(TDataSet::Class())); 01679 if (son->InheritsFrom(StMaker::Class())) continue;//Delay cleanup 01680 kount = Cleanup(son) + 1; 01681 } 01682 if (!ds->InheritsFrom(TObjectSet::Class())) return kount; 01683 TObjectSet *os = (TObjectSet*)ds; 01684 TObject *to = os->GetObject(); 01685 if (!to) return kount; 01686 if (!to->TObject::TestBit(TObject::kNotDeleted)) { 01687 os->DoOwner(0); os->SetObject(0); return kount+1;} 01688 if (!os->IsOwner()) {os->SetObject(0); return kount;} 01689 if (!to->InheritsFrom(TDataSet::Class())) return kount; 01690 TDataSet *t = (TDataSet*)to; 01691 return kount + Cleanup(t); 01692 } 01693 //_____________________________________________________________________________ 01694 StEvtHddr *StMaker::GetEvtHddr() const 01695 { 01696 StEvtHddr *hddr = (StEvtHddr*)GetDataSet("EvtHddr"); 01697 if(!hddr) hddr = new StEvtHddr((TDataSet*)m_ConstSet); 01698 return hddr; 01699 } 01700 //_____________________________________________________________________________ 01701 void StMaker::SetDateTime(Int_t idat,Int_t itim) 01702 { 01703 StEvtHddr *hddr = GetEvtHddr(); 01704 hddr->SetDateTime(idat,itim); 01705 } 01706 01707 //_____________________________________________________________________________ 01708 const Char_t *StMaker::RetCodeAsString(Int_t kode) 01709 { 01710 static const Char_t *retCodes[] = { 01711 "StOK" ,"StWarn" ,"StEOF" ,"StERR" ,"StFATAL" ,0,0,0,0,0, 01712 "StOK!" ,"StWarn!" ,"StEOF!" ,"StSKIP" ,"StSTOP" ,0,0,0,0,0, 01713 "StOK!!","StWarn!!","StEOF!!","StSKIP!","StSTOP!" ,0,0,0,0,0}; 01714 01715 assert(kode>=0); 01716 if (kode>=30) kode = kode%10+20; 01717 const Char_t *res = retCodes[kode]; 01718 if (!res) res = "StUNKNOWN"; 01719 return res; 01720 01721 } 01722 01723 //_____________________________________________________________________________ 01724 StMakerIter::StMakerIter(const StMaker *mk,Int_t secondary) 01725 { 01726 fState = 0; 01727 fMaker = mk; 01728 fMakerIter = 0; 01729 fIter = new TDataSetIter(fMaker->Find(".make")); 01730 fItWas = (TDataSet*)(-1); 01731 fSecond = secondary; 01732 01733 } 01734 //_____________________________________________________________________________ 01735 StMakerIter::~StMakerIter() 01736 { 01737 delete fIter; fIter = 0; 01738 delete fMakerIter; fMakerIter = 0; 01739 fMaker=0; fState = 0; 01740 } 01741 //_____________________________________________________________________________ 01742 StMaker *StMakerIter::NextMaker() 01743 { 01744 TDataSet *ds; 01745 if (!fMaker) return 0; 01746 01747 AGAIN: switch (fState) { 01748 01749 case 0: //current maker 01750 ds = fIter->Next(); 01751 if (ds == fItWas) goto AGAIN; //used already, go to Next 01752 fState = 2; if (!ds) goto AGAIN; //no more, go to UP 01753 fState = 1; //go to Down 01754 delete fMakerIter; 01755 fMakerIter = new StMakerIter((StMaker*)ds,1); 01756 goto AGAIN; 01757 01758 case 1: // Recursive iteration 01759 ds = fMakerIter->NextMaker(); 01760 if (ds) return (StMaker* )ds; 01761 fState = 0; goto AGAIN; //no more in downstaires,go curren 01762 01763 case 2: 01764 delete fMakerIter; fMakerIter=0; 01765 delete fIter; fIter = 0; 01766 fState = 3; 01767 return (StMaker*)fMaker; 01768 01769 case 3: // go upper when started 01770 if (fSecond) return 0; 01771 TDataSet *par = fMaker->GetParent(); 01772 fItWas = fMaker; fMaker = 0; 01773 if (!par) return 0; 01774 if (strcmp(".make",par->GetName())) return 0; 01775 fMaker = (StMaker* )par->GetParent(); 01776 if (!fMaker) return 0; 01777 delete fIter; fIter = new TDataSetIter(par); 01778 fState = 0; goto AGAIN; 01779 } 01780 assert(0); return 0; 01781 } 01782 //_____________________________________________________________________________ 01783 Int_t StMaker::AliasDate(const Char_t *alias) 01784 01785 { 01786 01787 Int_t n = strcspn(alias," ."); if (n<3) return 0; 01788 Int_t i; 01789 for (i=0;fDbAlias[i].tag && strncmp(alias,fDbAlias[i].tag,n);i++) {} 01790 return fDbAlias[i].date; 01791 } 01792 //_____________________________________________________________________________ 01793 Int_t StMaker::AliasTime(const Char_t *alias) 01794 01795 { 01796 01797 Int_t n = strcspn(alias," ."); if (n<3) return 0; 01798 Int_t i; 01799 for (i=0;fDbAlias[i].tag && strncmp(alias,fDbAlias[i].tag,n);i++) {} 01800 return fDbAlias[i].time; 01801 } 01802 //_____________________________________________________________________________ 01803 Char_t *StMaker::AliasGeometry(const Char_t *alias) 01804 01805 { 01806 01807 Int_t n = strcspn(alias," ."); if (n<3) return 0; 01808 Int_t i; 01809 for (i=0;fDbAlias[i].tag && strncmp(alias,fDbAlias[i].tag,n);i++) {} 01810 return fDbAlias[i].geometry; 01811 } 01812 //_____________________________________________________________________________ 01813 const DbAlias_t *StMaker::GetDbAliases() {return fDbAlias;} 01814 //_____________________________________________________________________________ 01815 const StChainOpt *StMaker::GetChainOpt() const 01816 { 01817 StMaker *mk = GetMaker(this); 01818 if (!mk) return 0; 01819 return mk->GetChainOpt(); 01820 } 01821 //_____________________________________________________________________________ 01822 TFile *StMaker::GetTFile() const 01823 { 01824 const static Char_t *mktype = "StBFChain"; 01825 StMaker *mk = 0; 01826 if (this->InheritsFrom(mktype)) {mk = (StMaker *) this;} 01827 else { 01828 StMakerIter mkiter(GetChain()); 01829 while ((mk = mkiter.NextMaker())) {//loop over makers 01830 if (mk->InheritsFrom(mktype)) {// take first TFile in any BFC 01831 const StChainOpt *opt = mk->GetChainOpt(); 01832 if (!opt) continue; 01833 if (opt->GetTFile()) break; 01834 } 01835 } 01836 } 01837 if (! mk) return 0; 01838 const StChainOpt *opt = mk->GetChainOpt(); 01839 if (!opt) return 0; 01840 return opt->GetTFile(); 01841 } 01842 01843 ClassImp(StTestMaker) 01844 //_____________________________________________________________________________ 01845 StTestMaker::StTestMaker(const Char_t *name):StMaker(name) 01846 { 01847 fNext=0; fLast=0; 01848 if (fgStChain == this ) {fgStChain=0;} 01849 else {Shunt() ;} 01850 fgTestMaker = this; 01851 } 01852 //_____________________________________________________________________________ 01853 void StTestMaker::SetNext(StMaker *mk) 01854 { 01855 fLast=fNext; 01856 fNext=mk; 01857 } 01858 //_____________________________________________________________________________ 01859 void StTestMaker::Print(const Char_t *) const 01860 { 01861 #ifdef STAR_LOGGER 01862 if (fLast) { LOG_INFO << Form("%s: Last Maker %s::%s(%p)", 01863 ClassName(),fLast->ClassName(),fLast->GetName(),(void*)fLast)<< endm;} 01864 if (fNext) { LOG_INFO << Form("%s: Next Maker %s::%s(%p)", 01865 ClassName(),fNext->ClassName(),fNext->GetName(),(void*)fNext) << endm;} 01866 #else 01867 if (fLast) printf("%s: Last Maker %s::%s(%p)\n", 01868 ClassName(),fLast->ClassName(),fLast->GetName(),(void*)fLast); 01869 if (fNext) printf("%s: Next Maker %s::%s(%p)\n", 01870 ClassName(),fNext->ClassName(),fNext->GetName(),(void*)fNext); 01871 #endif 01872 } 01873 //________________________________________________________________________________ 01874 Int_t StMaker::Skip(Int_t NoEventSkip) 01875 { 01876 TURN_LOGGER(this); 01877 // Loop on all makers 01878 TList *tl = GetMakeList(); 01879 if (!tl) return kStOK; 01880 TIter nextMaker(tl); 01881 StMaker *maker; 01882 fgFailedMaker = 0; 01883 while ((maker = (StMaker* )nextMaker())) { 01884 if (!maker->IsActive()) continue; 01885 maker->Skip(NoEventSkip); 01886 } 01887 return kStOK; 01888 } 01889 01890 //_____________________________________________________________________________ 01891 // $Log: StMaker.cxx,v $ 01892 // Revision 1.214 2009/01/26 14:32:49 fisyak 01893 // rename TMemStat => StMemStat due clash with ROOT class 01894 // 01895 // Revision 1.213 2009/01/04 20:41:26 perev 01896 // fix , alias must be y2009, not 8 01897 // 01898 // Revision 1.212 2008/12/31 02:11:27 perev 01899 // y2009 01900 // 01901 // Revision 1.211 2008/12/21 18:59:33 perev 01902 // GetDBTim() added 01903 // 01904 // Revision 1.210 2008/07/26 01:54:37 perev 01905 // add y2007a 01906 // 01907 // Revision 1.209 2008/06/03 22:33:14 fisyak 01908 // Add geometries for y2005g, y2006g and y2007g; use ROOT convention for variable definitions 01909 // 01910 // Revision 1.208 2008/05/22 16:22:34 fine 01911 // Protection against of the carsh with cvs=0, Issue #1005 01912 // 01913 // Revision 1.207 2008/03/20 18:59:35 perev 01914 // upgr15 added 01915 // 01916 // Revision 1.206 2008/03/05 00:01:52 fisyak 01917 // Move Skip method in base class 01918 // 01919 // Revision 1.205 2008/01/21 01:23:02 perev 01920 // WarnOff 01921 // 01922 // Revision 1.204 2008/01/20 00:33:49 perev 01923 // Copy attributes from maker to maker added 01924 // 01925 // Revision 1.203 2007/11/15 02:03:51 perev 01926 // y2008 01927 // 01928 // Revision 1.202 2007/10/13 01:27:04 perev 01929 // u2007 ==> upgr20 01930 // 01931 // Revision 1.201 2007/10/11 21:37:20 perev 01932 // Add upgr14 01933 // 01934 // Revision 1.200 2007/10/04 02:50:01 perev 01935 // Geometries u2007 & u2007a added 01936 // 01937 // Revision 1.199 2007/08/27 19:54:41 fisyak 01938 // Just account that only StBFChain has TFile 01939 // 01940 // Revision 1.198 2007/08/24 23:57:24 perev 01941 // More informative err message 01942 // 01943 // Revision 1.197 2007/07/12 19:17:20 fisyak 01944 // Add fTopChain - a pointer to TopChain (for embedding), add method GetMakerInheritsFrom 01945 // 01946 // Revision 1.196 2007/04/26 20:36:49 perev 01947 // Some ChainOpt fixes 01948 // 01949 // Revision 1.194 2007/04/26 03:59:16 perev 01950 // new WhiteBoard methods 01951 // 01952 // Revision 1.193 2007/04/17 05:07:41 perev 01953 // GetTFile()==>StMaker. Jerome request 01954 // 01955 // Revision 1.192 2007/04/13 17:48:11 potekhin 01956 // Added a stub for y2006c 01957 // 01958 // Revision 1.191 2007/03/12 17:51:19 perev 01959 // new signature of GetDataBase() 01960 // 01961 // Revision 1.190 2007/02/22 22:50:18 potekhin 01962 // Added three geometry tags: Y2005F and Y2006B, due to the added dead area in the SSD, 01963 // and also incorporating the updated Barrel EMC code. 01964 // 01965 // Revision 1.189 2007/02/05 20:57:10 potekhin 01966 // a) corrected a few typos in the comments 01967 // b) added y2006a to the list of geometries 01968 // c) created a placeholder for the VMC test tag 01969 // 01970 // Revision 1.188 2007/01/25 06:28:02 fine 01971 // connect Logger and Maker debug levels 01972 // 01973 // Revision 1.187 2006/12/21 23:13:06 potekhin 01974 // Included the upgr12 tag (corrected IGT) 01975 // 01976 // Revision 1.186 2006/12/18 23:36:34 potekhin 01977 // Removed an extraneous CVS tag from top 01978 // 01979 // Revision 1.185 2006/12/18 23:34:58 potekhin 01980 // Adding the tags UPGR10 and UPGR11, recently 01981 // introduced in the geometry. 01982 // 01983 // Revision 1.184 2006/12/14 23:44:09 fisyak 01984 // Add upgr06 and upgr09 01985 // 01986 // Revision 1.183 2006/12/01 17:50:14 jeromel 01987 // upgr08 added 01988 // 01989 // Revision 1.182 2006/11/21 16:34:38 fisyak 01990 // remove geometry pix1 and add upgr07 01991 // 01992 // Revision 1.181 2006/11/03 16:24:56 jeromel 01993 // Oops. hard-coded should be greater than advertized. 01994 // 01995 // Revision 1.180 2006/11/03 15:06:56 jeromel 01996 // Added y2007 placeholder - timestamp for new run will start at 20061101 (simu) 01997 // 01998 // Revision 1.179 2006/10/09 19:39:52 fisyak 01999 // Add geometry y2005e 02000 // 02001 // Revision 1.178 2006/10/04 18:51:25 fisyak 02002 // Add new geometry tags: upgr04 and upgr04, remove rference to xdf 02003 // 02004 // Revision 1.177 2006/08/07 22:44:38 fisyak 02005 // Assert => R__ASSERT for ROOT 5.12 02006 // 02007 // Revision 1.176 2006/05/08 15:15:37 jeromel 02008 // upgr03 02009 // 02010 // Revision 1.175 2006/03/10 00:09:01 jeromel 02011 // 2 options did not have the proper number of elements (unlikely worked / no-one used upgr02 for sure) + minor cosmetics 02012 // 02013 // Revision 1.174 2006/01/31 21:11:01 fisyak 02014 // Add y2006,upgr01 and upgr02 02015 // 02016 // Revision 1.173 2005/12/18 23:17:02 perev 02017 // uInt_t attributes fix 02018 // 02019 // Revision 1.172 2005/12/07 18:56:16 perev 02020 // PrintAttr() method added 02021 // 02022 // Revision 1.171 2005/11/22 21:37:04 fisyak 02023 // add more Simu time stamps (reflecting new SVT), and clean up 02024 // 02025 // Revision 1.170 2005/10/06 18:55:45 fisyak 02026 // Add all used simulation time stamps and geometries 02027 // 02028 // Revision 1.169 2005/09/09 21:32:32 perev 02029 // ERROR message ==> INFO 02030 // 02031 // Revision 1.168 2005/08/29 21:42:21 fisyak 02032 // switch from fBits to fStatus for StMaker control bits 02033 // 02034 // Revision 1.167 2005/07/18 19:04:53 fine 02035 // get rid of an unvisible redundant blank after end of like. Caused ICC compilatiion error 02036 // 02037 // Revision 1.166 2005/06/13 03:03:43 fine 02038 // fix cpp macro to save/restore maker logger 02039 // 02040 // Revision 1.165 2005/04/10 20:38:35 jeromel 02041 // TimeStamp now corrected. Hopefully, 02042 // http://www.star.bnl.gov/STAR/comp/prod/MCGeometry.html#Year5 02043 // should reflect all timestamps correctely. 02044 // 02045 // Revision 1.164 2005/04/10 20:32:27 jeromel 02046 // Expanded geo (several missing in the past / doc not accurate) 02047 // 02048 // Revision 1.163 2005/03/09 23:42:26 perev 02049 // Clear() removed from Finish() 02050 // 02051 // Revision 1.162 2005/02/05 00:56:20 perev 02052 // More tests for second call Finish() 02053 // 02054 // Revision 1.161 2004/11/16 17:48:10 fine 02055 // fixed the doPs method printout 02056 // 02057 // Revision 1.160 2004/11/13 00:28:57 fine 02058 // move the logger instantiation away of the ctor to be able to get the csubclass name 02059 // 02060 // Revision 1.159 2004/11/04 22:26:38 fine 02061 // populate the package with save/restore the logger and edit some messages 02062 // 02063 // Revision 1.158 2004/11/03 22:30:12 fine 02064 // Instantiate the logger per maker and clean up 02065 // 02066 // Revision 1.157 2004/11/03 16:41:21 fine 02067 // add new logger invocation (optional) 02068 // 02069 // Revision 1.156 2004/11/02 02:11:15 jeromel 02070 // Updated aliases for y2005 (note 5 days offset comparing to advertized value for breathing room margin) 02071 // 02072 // Revision 1.155 2004/09/07 18:42:19 fisyak 02073 // Make icc happy 02074 // 02075 // Revision 1.154 2004/09/03 20:33:31 perev 02076 // Attributes, cleanup 02077 // 02078 // Revision 1.153 2004/09/03 00:05:48 jeromel 02079 // Comment block oxygenized, removed unused var 02080 // 02081 // Revision 1.152 2004/09/01 22:09:51 perev 02082 // new methods SetAttr and IAttr,DAttr,SAttr added 02083 // 02084 // Revision 1.151 2004/08/03 00:49:03 perev 02085 // bug fix, wrong maker for dops name 02086 // 02087 // Revision 1.150 2004/08/02 19:44:14 perev 02088 // Bug fix, doPs Clear was not called 02089 // 02090 // Revision 1.149 2004/07/23 17:06:18 perev 02091 // AliasDate & AliasTime moved fro db maker to StMaker 02092 // 02093 // Revision 1.148 2004/04/26 00:07:12 perev 02094 // RetCodeAsString(kode) added. String form of STAR return codes 02095 // 02096 // Revision 1.147 2004/04/15 16:05:28 fine 02097 // Add extra data-mmeber and method for the coming STAR logger 02098 // 02099 // Revision 1.146 2004/04/15 00:21:32 perev 02100 // SetDateTime(int,int) added 02101 // 02102 // Revision 1.145 2004/04/09 21:10:20 jeromel 02103 // PrintInfo only in debug mode 02104 // 02105 // Revision 1.144 2004/04/09 01:59:00 jeromel 02106 // Bug fix. 02107 // 02108 // Revision 1.143 2004/04/08 21:32:41 perev 02109 // MemStat improving 02110 // 02111 // Revision 1.142 2004/04/07 18:16:10 perev 02112 // MemStat for Make bug fixed 02113 // 02114 // Revision 1.141 2004/03/15 23:57:01 jeromel 02115 // Protect against NULL 02116 // 02117 // Revision 1.140 2004/02/17 19:53:14 perev 02118 // Make more robust 02119 // 02120 // Revision 1.139 2004/01/28 04:37:26 perev 02121 // Printof new Run added 02122 // 02123 // Revision 1.138 2004/01/26 22:47:26 perev 02124 // Account stage (init,make,..) 02125 // 02126 // Revision 1.137 2004/01/14 22:33:12 fisyak 02127 // restore built time 02128 // 02129 // Revision 1.136 2003/11/17 22:19:20 perev 02130 // count memory only after 3 events, to avoid non event memory 02131 // 02132 // Revision 1.135 2003/11/13 02:54:34 perev 02133 // Safe destructor of TDataSet like object added 02134 // 02135 // Revision 1.134 2003/11/05 19:56:32 perev 02136 // Simple debugging class added 02137 // 02138 // Revision 1.133 2003/10/07 00:22:30 perev 02139 // PrintInfo simplified 02140 // 02141 // Revision 1.132 2003/09/28 21:12:45 jeromel 02142 // Unused var NT removed/commented 02143 // 02144 // Revision 1.131 2003/09/02 17:55:29 perev 02145 // gcc 3.2 updates + WarnOff 02146 // 02147 // Revision 1.130 2003/07/03 19:40:14 perev 02148 // Cleanup prints in Finish 02149 // 02150 // Revision 1.129 2003/07/01 16:59:16 perev 02151 // error codes for Maker added 02152 // 02153 // Revision 1.128 2003/06/23 23:43:39 perev 02154 // InitRun called even if no run at all 02155 // 02156 // Revision 1.127 2003/05/01 16:56:50 jeromel 02157 // Extraneous declaration removed 02158 // 02159 // Revision 1.126 2003/04/30 20:36:23 perev 02160 // Warnings cleanup. Modified lines marked VP 02161 // 02162 // Revision 1.125 2002/04/28 00:53:42 jeromel 02163 // More doc added ... 02164 // 02165 // Revision 1.124 2002/04/14 21:51:12 perev 02166 // Obsolete StBroadcast 02167 // 02168 // Revision 1.123 2002/03/12 21:19:00 fisyak 02169 // Set only one StEvtHddr as default option (due to Embedding) 02170 // 02171 // Revision 1.122 2002/02/22 21:16:21 perev 02172 // new method NotifyMe 02173 // 02174 // Revision 1.121 2002/02/02 23:31:14 jeromel 02175 // doxygenized. Added some text for the Make() method. 02176 // 02177 // Revision 1.120 2001/11/18 00:58:07 perev 02178 // Broadcast method added 02179 // 02180 // Revision 1.119 2001/10/13 20:23:45 perev 02181 // SetFlavor working before and after Init() 02182 // 02183 // Revision 1.118 2001/08/14 16:42:48 perev 02184 // InitRun call improved 02185 // 02186 // Revision 1.117 2001/06/05 22:04:47 perev 02187 // Summary only on top 02188 // 02189 // Revision 1.116 2001/06/01 02:47:31 perev 02190 // Memory consumption measurement added 02191 // 02192 // Revision 1.115 2001/05/31 02:40:29 perev 02193 // const(ing) 02194 // 02195 // Revision 1.114 2001/05/10 17:43:20 perev 02196 // Defence against saving maker added 02197 // 02198 // Revision 1.113 2001/05/10 17:33:20 perev 02199 // Defence against saving maker added 02200 // 02201 // Revision 1.112 2001/05/04 19:15:40 perev 02202 // Fatal() -> FatalErr() 02203 // 02204 // Revision 1.111 2001/04/14 01:55:39 perev 02205 // Reverse iter for Clear() and Finish() 02206 // 02207 // Revision 1.110 2001/04/12 22:23:22 perev 02208 // Small bug fixed (fine found) 02209 // 02210 // Revision 1.109 2001/03/02 16:54:44 perev 02211 // doPs fix 02212 // 02213 // Revision 1.108 2001/03/01 02:08:02 perev 02214 // StMem into doPs 02215 // 02216 // Revision 1.107 2001/01/23 22:02:51 fine 02217 // warning message has been re-introduced 02218 // 02219 // Revision 1.106 2000/11/25 18:59:48 fisyak 02220 // Add warning for failed Initialization 02221 // 02222 // Revision 1.105 2000/08/07 22:41:37 perev 02223 // remove redundant prInt_t in case of error 02224 // 02225 // Revision 1.104 2000/08/04 21:03:38 perev 02226 // Leaks + Clear() cleanup 02227 // 02228 // Revision 1.103 2000/07/30 01:39:04 perev 02229 // StMem::Printadded 02230 // 02231 // Revision 1.102 2000/07/27 19:05:34 perev 02232 // Small memleak in StMakerIter fixed, thanx Akio 02233 // 02234 // Revision 1.101 2000/07/21 21:54:43 fisyak 02235 // Respore lost ps after memory leak correction 02236 // 02237 // Revision 1.100 2000/07/14 01:52:19 perev 02238 // SetIvent called in SetNumber 02239 // 02240 // Revision 1.99 2000/07/04 02:36:01 perev 02241 // AddMaker method added & gStChain removed 02242 // 02243 // Revision 1.98 2000/07/01 00:17:37 fisyak 02244 // Remove memory leak 02245 // 02246 // Revision 1.97 2000/06/21 23:59:24 perev 02247 // getDataBase loop over makers added 02248 // 02249 // Revision 1.96 2000/06/21 21:12:39 perev 02250 // StMakerIter class added 02251 // 02252 // Revision 1.95 2000/06/09 22:12:29 fisyak 02253 // Reduce level of noise 02254 // 02255 // Revision 1.94 2000/05/30 21:04:41 fine 02256 // Fix typo in the ReAllocate message 02257 // 02258 // Revision 1.93 2000/05/20 01:17:54 perev 02259 // NaN added 02260 // 02261 // Revision 1.92 2000/05/20 01:11:07 perev 02262 // IventNumber and BfcStatus added 02263 // 02264 // Revision 1.91 2000/04/20 14:25:17 perev 02265 // Minor simplification 02266 // 02267 // Revision 1.90 2000/04/13 02:53:35 perev 02268 // StMaker::GetValidity added 02269 // 02270 // Revision 1.89 2000/04/07 15:41:42 perev 02271 // Printout error codes improved 02272 // 02273 // Revision 1.88 2000/04/05 02:45:13 fine 02274 // call-counter has been added 02275 // 02276 // Revision 1.87 2000/04/03 23:46:48 perev 02277 // Increased error check 02278 // 02279 // Revision 1.86 2000/03/23 00:15:22 fine 02280 // Adjusted to libSTAR for ROOT 2.24 02281 // 02282 // Revision 1.85 2000/03/01 22:56:25 fisyak 02283 // Adjust ps for RedHat 6.1 02284 // 02285 // Revision 1.84 2000/01/07 22:31:43 perev 02286 // one more argument for SetOutputAll 02287 // 02288 // Revision 1.83 2000/01/04 17:27:06 perev 02289 // Use timestamp instead of current one 02290 // 02291 // Revision 1.82 1999/12/28 21:23:22 fine 02292 // StChain::MakeDoc corrections 02293 // 02294 // Revision 1.81 1999/12/22 16:22:45 fine 02295 // MakeIndex for html doc introduced. Thankls Art 02296 // 02297 // Revision 1.80 1999/12/06 01:57:30 fine 02298 // Time statistic fixed 02299 // 02300 // Revision 1.77 1999/12/01 22:56:30 perev 02301 // .runco directory & AddRunco method introduced 02302 // 02303 // Revision 1.76 1999/11/19 21:02:11 didenko 02304 // valeri's changes 02305 // 02306 // Revision 1.75 1999/10/19 03:23:55 fine 02307 // Some new comments 02308 // 02309 // Revision 1.74 1999/09/24 16:32:40 fisyak 02310 // add return for Init/Finish Run 02311 // 02312 // Revision 1.73 1999/09/24 14:51:51 fisyak 02313 // Add implementation for InitRun/FinishRun 02314 // 02315 // Revision 1.72 1999/09/23 21:24:57 perev 02316 // recovered debug level init(lost) 02317 // 02318 // Revision 1.71 1999/09/21 15:05:17 perev 02319 // InitRun & FinishRun added 02320 // 02321 // Revision 1.70 1999/09/14 17:30:37 fine 02322 // some clean ups 02323 // 02324 // Revision 1.69 1999/09/13 23:22:53 fine 02325 // improved version of MakeDoc with MakeAssociatedClassList function 02326 // 02327 // Revision 1.68 1999/09/13 16:39:24 fine 02328 // MakeDoc ExpandPath removed to keep path short 02329 // 02330 // Revision 1.67 1999/09/13 13:30:46 fine 02331 // non-active new method MakeAssociatedClassList to be introduced new release 02332 // 02333 // Revision 1.66 1999/09/12 16:54:50 fine 02334 // StMaker::MakeDoc() adjusted to multi-level makers. Some bug fix also 02335 // 02336 // Revision 1.65 1999/09/12 15:02:53 fine 02337 // Multi-level maker source dirs introduced for MakeDoc method 02338 // 02339 // Revision 1.64 1999/09/12 01:42:14 fine 02340 // StMAker::MakeDoc has been adjusted to the new source tree 02341 // 02342 // Revision 1.63 1999/09/08 00:13:35 fisyak 02343 // Add static *GetChain() 02344 // 02345 // Revision 1.62 1999/09/03 23:11:48 perev 02346 // Add .runcont directory 02347 // 02348 // Revision 1.61 1999/09/02 22:27:11 fisyak 02349 // Add SetDEBUG 02350 // 02351 // Revision 1.60 1999/08/06 13:01:37 fisyak 02352 // Add Active flag 02353 // 02354 // Revision 1.59 1999/07/29 01:05:23 fisyak 02355 // move bfc to StBFChain 02356 // 02357 // Revision 1.58 1999/07/17 23:29:22 fisyak 02358 // Add Peter Jacobs QAInfo tag in printout 02359 // 02360 // Revision 1.57 1999/07/17 19:08:45 perev 02361 // StMemoryInfo added 02362 // 02363 // Revision 1.55 1999/07/15 13:56:47 perev 02364 // cleanup 02365 // 02366 // Revision 1.54 1999/07/13 02:19:34 perev 02367 // GetCVS,StEvtHddr,etc... 02368 // 02369 // Revision 1.53 1999/07/12 02:33:09 perev 02370 // Add SetMode 02371 // 02372 // Revision 1.52 1999/07/11 21:04:06 fisyak 02373 // Clash resolion 02374 // 02375 // Revision 1.51 1999/07/11 20:40:35 perev 02376 // Move Clear from StChain to StMaker 02377 // 02378 // Revision 1.50 1999/07/11 01:59:04 perev 02379 // add GetCVSTag again 02380 // 02381 // Revision 1.49 1999/07/11 01:33:33 fine 02382 // makedoc some corrections for MakeDoc 02383 // 02384 // Revision 1.48 1999/07/09 22:00:22 perev 02385 // GetCVS into StMaker 02386 // 02387 // Revision 1.47 1999/06/11 23:45:31 perev 02388 // cleanup 02389 // 02390 // Revision 1.46 1999/06/11 22:56:03 perev 02391 // Merge 2 updates 02392 // 02393 // Revision 1.45 1999/06/11 21:50:47 perev 02394 // garb->Delete() 02395 // 02396 // Revision 1.44 1999/06/11 17:45:57 perev 02397 // assert StMaker::Streamer to forbid to write it 02398 // 02399 // Revision 1.43 1999/05/23 04:05:02 fine 02400 // The lost since 1.35 Wed Mar 10 20:23:58 timer functions have been re-introduced 02401 // 02402 // Revision 1.42 1999/05/23 03:25:07 perev 02403 // Start & Stop Timer instead of benchmark 02404 // 02405 // Revision 1.41 1999/05/22 17:50:18 perev 02406 // StMaker::EndMaker ps added 02407 // 02408 // Revision 1.40 1999/05/13 20:56:50 perev 02409 // Supress too much warnings 02410 // 02411 // Revision 1.39 1999/05/10 17:16:44 perev 02412 // AddHist typo 02413 // 02414 // Revision 1.38 1999/05/10 15:37:51 perev 02415 // Save of hisogramm in StMaker::Init 02416 // 02417 // Revision 1.37 1999/05/07 20:51:31 perev 02418 // AddData bug fix 02419 // 02420 // Revision 1.36 1999/05/07 15:46:10 perev 02421 // Added test for the same object into AddObj 02422 // 02423 // Revision 1.35 1999/05/06 22:15:32 perev 02424 // fix objLast should not be included in StMaker::Init 02425 // 02426 // Revision 1.34 1999/05/06 21:27:10 perev 02427 // StMaker remove his from hdirectory 02428 // 02429 // Revision 1.33 1999/05/06 00:47:43 fine 02430 // maker's histogram is removed from the ROOT system gDirectory 02431 // 02432 // Revision 1.32 1999/05/06 00:23:45 fine 02433 // StMaker::MakeDoc some extra comments have been introduced 02434 // 02435 // Revision 1.31 1999/05/06 00:19:04 fine 02436 // StMaker::MakeDoc method has been re-introduced for the 3d time 02437 // 02438 // Revision 1.30 1999/05/05 16:23:07 perev 02439 // add recreation of m_DataSet to keep old codes 02440 // 02441 // Revision 1.29 1999/05/03 22:29:28 perev 02442 // Bug in GetDataSet fix. Thanks to Bill Love 02443 // 02444 // Revision 1.28 1999/05/01 00:53:38 perev 02445 // GetDataSet bug fix NAME == NAME/.data 02446 // 02447 // Revision 1.26 1999/04/30 14:58:41 perev 02448 // cd() added to StMaker class 02449 // 02450 // Revision 1.25 1999/04/16 14:22:00 fisyak 02451 // replace break in Makers loop from ==kStErr to >kStWarn to account EOF 02452 // 02453 // Revision 1.24 1999/03/28 02:57:51 perev 02454 // Add .const in searching path in GetDataSet 02455 // 02456 // Revision 1.23 1999/03/20 20:57:35 perev 02457 // add StEvtHddr.h and fix Get/SetNumber in maker 02458 // 02459 // Revision 1.22 1999/03/19 20:30:49 perev 02460 // GetCVSTag introduced 02461 // 02462 // Revision 1.21 1999/03/11 01:23:59 perev 02463 // new schema StChain 02464 // 02465 // Revision 1.14 1998/12/21 19:42:51 fisyak 02466 // Move ROOT includes to non system 02467 // 02468 // Revision 1.13 1998/11/19 01:23:57 fine 02469 // StChain::MakeDoc has been introduced, StChain::MakeDoc has been fixed (see macros/bfc_doc.C macro 02470 // 02471 // Revision 1.12 1998/11/18 22:46:09 fine 02472 // The lost MakeDoc method has been re-introduced 02473 // 02474 // Revision 1.9 1998/09/23 20:22:52 fisyak 02475 // Prerelease SL98h 02476 // 02477 // Revision 1.10 1998/10/06 18:00:27 perev 02478 // cleanup 02479 // Revision 1.8 1998/09/22 01:39:07 fine 02480 // Some make up 02481 // 02482 // Revision 1.6 1998/08/18 14:05:02 fisyak 02483 // Add to bfc dst 02484 // 02485 // Revision 1.5 1998/07/20 15:08:09 fisyak 02486 // Add tcl and tpt

Generated on Sun Feb 8 05:13:00 2009 for StRoot by doxygen 1.3.7