StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
gammaFilterBfc.C
1 // Michael Betancourt
2 // Massachussets Institute of Technology
3 //
4 // Original implementation by Pibero Djawotho, TAMU
5 
6 class StBFChain;
7 StBFChain* chain = 0;
8 
9 void gammaFilterBfc
10 (
11  int nEvents,
12  const char *chainOpt,
13  const char *fzdFile
14 )
15 {
16 
17  // Load the BFC macro and any necessary shared libraries
18  gROOT->LoadMacro("bfc.C");
19  gSystem->Load("StJetSkimEvent");
20 
21  // Create the BFC
22  bfc(-1, chainOpt, fzdFile);
23 
24  // Manipulate the maker order in the BFC
25  chain->AddAfter("StMcEventMaker", chain->GetMaker("TpcRS") );
26  chain->AddAfter("StMcEventMaker", chain->GetMaker("gammaFilterMaker") );
27  chain->AddAfter("StMcEventMaker", chain->GetMaker("emcY2") );
28 
29  // Display the makers in the BFC
30  StMaker::lsMakers(chain);
31 
32  // Initialize the BFC
33  int iStat = chain->Init();
34 
35  if(iStat)
36  {
37  cout << "BFC initialization failed!" << endl;
38  chain->Fatal(istat, "Init()");
39  }
40 
41  // Run the BFC
42  chain->EventLoop(nEvents);
43 
44 }