24 void bfcMixer_pp2006( Int_t Nevents=10,
25 Char_t *file1=
"star/data03/daq/2006/120/7120049/st_physics_adc_7120049_raw_1050001.daq",
28 Char_t *file2=
"mcpi0_hipt_run140_gid7_1000evts.fzd",
29 Int_t useEndcapSlowSim=1
34 TString path2=
"/star/u/wzhang/links/gc2002/EEmc/embedData/fzd/";
37 if (gClassTable->GetID(
"StBFChain") < 0) Load();
47 saveMk = chain1->cd();
48 chain1->
SetFlags(
"in Physics NoDefault -ittf -trg");
49 chain1->Set_IO_Files(path1+file1);
57 saveMk = chain2->cd();
58 chain2->
SetFlags(
"fzin gen_T geomT sim_T tpc trs -tcl -tpt -PreVtx -tpc_daq -ittf ");
59 chain2->Set_IO_Files(path2+file2);
63 if (geantMk) geantMk->SetMode(1);
70 gSystem->Load(
"StMixerMaker");
71 StMixerMaker *mixer =
new StMixerMaker(
"Mixer",
"daq",
"trs");
72 chain1->SetInput(
"Input1",
"StDAQReader");
73 chain2->SetInput(
"Input2",
"Event");
74 mixer->writeFile(
"mixer.trs",Nevents);
79 saveMk = chain3->cd();
82 chain3->
SetFlags(
"Simu NoDefault NoInput onlraw -onlcl ry2006,tpc_daq,tpcI,svt_daq,SvtD,Physics,Idst,l0,Tree,evout l3onl fcf emcDY2 fpd trgd ZDCvtx useCDV ITTF tofDat -SvtIT MuDST -trg VFPPVnoCTB beamline GeantOut CMuDst dEdxY2 -EventQA");
87 tt1.ReplaceAll(
".daq",
"");
88 tt2.ReplaceAll(
".fzd",
"");
89 TString OutputFileName=tt1+
"_"+tt2+
".root";
90 cout <<
"BFC: Setting file output to: " <<OutputFileName.Data()<<endl;
92 chain3->Set_IO_Files(0,OutputFileName.Data());
102 chain3->AddAfter(
"emcRaw",bemcMixer);
103 chain3->AddAfter(
"emcRaw",bemcSim);
104 chain3->AddAfter(
"emcRaw",mcEventMaker);
105 bemcMixer->SetDebug(0);
115 chain3->AddAfter(
"emcRaw",eemcMixer);
116 chain3->AddAfter(
"emcRaw",eemcFastSim);
119 eemcFastSim->SetEmbeddingMode();
123 if(useEndcapSlowSim) {
125 chain3->AddAfter(
"EEmcFastSim",slowSim);
133 StMaker *tpcdaqMk = chain3->GetMaker(
"tpc_raw");
135 cout <<
" Error: no tpc daq maker. End. "<<endl;
138 tpcdaqMk->SetMode(1);
139 tpcdaqMk->SetInput(
"Event",
"MixerEvent");
143 printf (
"QAInfo:Run is started at Date/Time%i/%i\n",t.GetDate(),t.GetTime());
145 printf (
"QAInfo:Run on %s in %s\n",
147 gSystem->WorkingDirectory());
148 printf (
"QAInfo: with %s\n", chain->GetCVS());
153 Int_t iInit = chain->Init();
159 treeMk = chain->GetMaker(
"tree");
161 Int_t iMake = 0, i = 1, iBad = 0;
165 Int_t ncols, eventnumber, mult, skip=0, oldskip = 0, skiptest=0;
167 cout <<
"BFC - Entering Event Loop"<<endl;
168 EventLoop:
if (i <= Nevents && iMake !=
kStEOF && iMake !=
kStFatal) {
170 evnt.Start(
"QAInfo:");
173 iMake = chain->Make(i);
174 if (treeMk && iMake ==
kStErr) {treeMk->
Make(i); iBad++;}
177 *fEvtHddr = *fEvtHddrDaq;
179 evnt.Stop(
"QAInfo:");
181 printf (
"QAInfo: Done with Event [no. %d/run %d/evt. %d/Date.Time%d.%d/sta %d] Real Time = %10.2f seconds Cpu Time = %10.2f seconds \n", i,chain->
GetRunNumber(),chain->GetEventNumber(),chain->GetDate(), chain->GetTime(),
182 iMake,evnt.GetRealTime(
"QAInfo:"),evnt.GetCpuTime(
"QAInfo:"));
189 printf (
"QAInfo:Run completed ");
190 gSystem->Exec(
"date");
197 gSystem->Load(
"St_base");
198 gSystem->Load(
"StChain");
199 gSystem->Load(
"StUtilities");
200 gSystem->Load(
"StBFChain");
201 gSystem->Load(
"StAnalysisUtilities");
204 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
205 loadSharedLibraries();
206 gSystem->Load(
"StEEmcUtil");
207 gSystem->Load(
"StEEmcSimulatorMaker");
208 gSystem->Load(
"StMcEvent");
209 gSystem->Load(
"StMcEventMaker");
210 gSystem->Load(
"StEmcSimulatorMaker");
211 gSystem->Load(
"StEmcMixerMaker");
214 gROOT->Macro(
"LoadLogger.C");
215 if (chain)
delete chain;
virtual Int_t Instantiate()
Maker-instantiation handler.
virtual void Clear(Option_t *option="")
User defined functions.
void SetFlags(const Char_t *Chain="gstar tfs")
Scan all flags, check if they are correct, manipulate the comment if necessary.
Filling of all StMcEvent classes from g2t tables Transform all the data in the g2t tables into the co...
virtual void ls(Option_t *option="") const
virtual Int_t GetRunNumber() const
Returns the current RunNumber.
virtual Int_t Load()
Routine handling library loading depending on chain options.
void setEmbeddingMode(Bool_t e=true)
Sets all switches required to perform embedding.
virtual void SetActive(Bool_t k=kTRUE)
Setters for flags and switches.