StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fiterrSti.C
1 int runsti(const char *daqFile,int nEvents,const char *flg="")
2 {
3 int ians=0;
4 gROOT->ProcessLine(".L bfc.C");
5 
6 //if(!daqFile) daqFile = "/star/data03/daq/2005/073/st_physics_6073023_raw_1040005.daq";
7 TString opt(flg);
8 printf("\n============= runsti: file=%s\n",daqFile);
9 printf("============= runsti: Opt =%s\n",opt.Data());
10 
11 ians = bfc(-1,opt, daqFile,0,"pulls.root");
12 if (ians) {printf("ERROR: bfc(-1,...) == %d\n",ians); return iAns;}
13 
14 chain->SetAttr("dbSnapshot","dbSnapshot.root","db");
15 chain->SetAttr(".call","SetActive(0)","MuDst"); //NO MuDst
16 chain->SetAttr(".call","SetActive(0)","outputStream"); //NO Out
17 chain->SetAttr(".call","SetActive(0)","kink2");
18 chain->SetAttr(".call","SetActive(0)","StTagsMaker::");
19 chain->SetAttr("makePulls",1,"Sti");
20 chain->SetAttr("maxTotPrims",100000,"Sti");
21 //if (tpcOnly) chain->SetAttr("useSvt",0,"Sti" );
22 //if (tpcOnly) chain->SetAttr("useSsd",0,"Sti" );
23 
24 chain->SetAttr(".Privilege",1,"Sti" );
25 ians = chain->Init();
26 if (ians) {printf("ERROR: Init() == %d\n",ians); return iAns;}
27 
28 ians = chain->EventLoop(1);
29 {
30 // Print time stamp of first event as info for fiterr.C
31  int idat = chain->GetMaker("db")->GetDateTime().GetDate();
32  int itim = chain->GetMaker("db")->GetDateTime().GetTime();
33  printf("1stEventTimeStamp %8d.%06d\n",idat,itim);
34 }
35 ians = chain->EventLoop(nEvents-1); /*>> 0.log*/
36 if ((ians%10)== 2) ians=0;
37 if (ians) {printf("ERROR: EventLoop() == %d\n",ians); return iAns;}
38 return 99;
39 }