Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_Stream_Combiner.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_Stream_Combiner.C
11 
12 #include <phool/recoConsts.h>
13 
16 #include <ffarawmodules/TpcCheck.h>
17 
18 R__LOAD_LIBRARY(libfun4all.so)
19 R__LOAD_LIBRARY(libfun4allraw.so)
20 R__LOAD_LIBRARY(libffarawmodules.so)
21 
23  const string &input_gl1file = "gl1.list",
24  const string &input_inttfile00 = "intt0.list",
25  const string &input_inttfile01 = "intt1.list",
26  const string &input_inttfile02 = "intt2.list",
27  const string &input_inttfile03 = "intt3.list",
28  const string &input_inttfile04 = "intt4.list",
29  const string &input_inttfile05 = "intt5.list",
30  const string &input_inttfile06 = "intt6.list",
31  const string &input_inttfile07 = "intt7.list",
32  const string &input_mvtxfile00 = "mvtx-flx0.list",
33  const string &input_mvtxfile01 = "mvtx-flx1.list",
34  const string &input_mvtxfile02 = "mvtx-flx2.list",
35  const string &input_mvtxfile03 = "mvtx-flx3.list",
36  const string &input_mvtxfile04 = "mvtx-flx4.list",
37  const string &input_mvtxfile05 = "mvtx-flx5.list",
38  const string &input_tpcfile00 = "tpc00.list",
39  const string &input_tpcfile01 = "tpc01.list",
40  const string &input_tpcfile02 = "tpc02.list",
41  const string &input_tpcfile03 = "tpc03.list",
42  const string &input_tpcfile04 = "tpc04.list",
43  const string &input_tpcfile05 = "tpc05.list",
44  const string &input_tpcfile06 = "tpc06.list",
45  const string &input_tpcfile07 = "tpc07.list",
46  const string &input_tpcfile08 = "tpc08.list",
47  const string &input_tpcfile09 = "tpc09.list",
48  const string &input_tpcfile10 = "tpc10.list",
49  const string &input_tpcfile11 = "tpc11.list",
50  const string &input_tpcfile12 = "tpc12.list",
51  const string &input_tpcfile13 = "tpc13.list",
52  const string &input_tpcfile14 = "tpc14.list",
53  const string &input_tpcfile15 = "tpc15.list",
54  const string &input_tpcfile16 = "tpc16.list",
55  const string &input_tpcfile17 = "tpc17.list",
56  const string &input_tpcfile18 = "tpc18.list",
57  const string &input_tpcfile19 = "tpc19.list",
58  const string &input_tpcfile20 = "tpc20.list",
59  const string &input_tpcfile21 = "tpc21.list",
60  const string &input_tpcfile22 = "tpc22.list",
61  const string &input_tpcfile23 = "tpc23.list",
62  const string &input_tpotfile = "tpot.list")
63 {
64  vector<string> tpc_infile;
65  tpc_infile.push_back(input_tpcfile00);
66  tpc_infile.push_back(input_tpcfile01);
67  tpc_infile.push_back(input_tpcfile02);
68  tpc_infile.push_back(input_tpcfile03);
69  tpc_infile.push_back(input_tpcfile04);
70  tpc_infile.push_back(input_tpcfile05);
71  tpc_infile.push_back(input_tpcfile06);
72  tpc_infile.push_back(input_tpcfile07);
73  tpc_infile.push_back(input_tpcfile08);
74  tpc_infile.push_back(input_tpcfile09);
75  tpc_infile.push_back(input_tpcfile10);
76  tpc_infile.push_back(input_tpcfile11);
77  tpc_infile.push_back(input_tpcfile12);
78  tpc_infile.push_back(input_tpcfile13);
79  tpc_infile.push_back(input_tpcfile14);
80  tpc_infile.push_back(input_tpcfile15);
81  tpc_infile.push_back(input_tpcfile16);
82  tpc_infile.push_back(input_tpcfile17);
83  tpc_infile.push_back(input_tpcfile18);
84  tpc_infile.push_back(input_tpcfile19);
85  tpc_infile.push_back(input_tpcfile20);
86  tpc_infile.push_back(input_tpcfile21);
87  tpc_infile.push_back(input_tpcfile22);
88  tpc_infile.push_back(input_tpcfile23);
89 
90  vector<string> intt_infile;
91  intt_infile.push_back(input_inttfile00);
92  intt_infile.push_back(input_inttfile01);
93  intt_infile.push_back(input_inttfile02);
94  intt_infile.push_back(input_inttfile03);
95  intt_infile.push_back(input_inttfile04);
96  intt_infile.push_back(input_inttfile05);
97  intt_infile.push_back(input_inttfile06);
98  intt_infile.push_back(input_inttfile07);
99 
100  vector<string> mvtx_infile;
101  mvtx_infile.push_back(input_mvtxfile00);
102  mvtx_infile.push_back(input_mvtxfile01);
103  mvtx_infile.push_back(input_mvtxfile02);
104  mvtx_infile.push_back(input_mvtxfile03);
105  mvtx_infile.push_back(input_mvtxfile04);
106  mvtx_infile.push_back(input_mvtxfile05);
107 
108  vector<string> gl1_infile;
109  gl1_infile.push_back(input_gl1file);
110 
111  vector<string> tpot_infile;
112  tpot_infile.push_back(input_tpotfile);
113 
115  se->Verbosity(1);
118  // in->Verbosity(2);
119  int i = 0;
120  for (auto iter : tpc_infile)
121  {
122  SingleTpcPoolInput *tpc_sngl = new SingleTpcPoolInput("TPC_" + to_string(i));
123  // tpc_sngl->Verbosity(3);
124  tpc_sngl->SetBcoRange(130);
125  tpc_sngl->AddListFile(iter);
127  i++;
128  }
129  i = 0;
130  for (auto iter : intt_infile)
131  {
132  SingleInttPoolInput *intt_sngl = new SingleInttPoolInput("INTT_" + to_string(i));
133  // intt_sngl->Verbosity(3);
134  intt_sngl->SetNegativeBco(1);
135  intt_sngl->SetBcoRange(2);
136  intt_sngl->AddListFile(iter);
138  i++;
139  }
140  i = 0;
141  for (auto iter : mvtx_infile)
142  {
143  SingleMvtxPoolInput *mvtx_sngl = new SingleMvtxPoolInput("MVTX_" + to_string(i));
144  // mvtx_sngl->Verbosity(3);
145  mvtx_sngl->SetBcoRange(1000);
146  mvtx_sngl->SetNegativeBco(1000);
147  mvtx_sngl->AddListFile(iter);
149  i++;
150  }
151  i = 0;
152  for (auto iter : gl1_infile)
153  {
154  SingleGl1PoolInput *gl1_sngl = new SingleGl1PoolInput("GL1_" + to_string(i));
155  // gl1_sngl->Verbosity(3);
156  gl1_sngl->AddListFile(iter);
158  i++;
159  }
160  i = 0;
161  for (auto iter : tpot_infile)
162  {
163  SingleMicromegasPoolInput *mm_sngl = new SingleMicromegasPoolInput("MICROMEGAS_" + to_string(i));
164  // sngl->Verbosity(3);
165  mm_sngl->SetBcoRange(100);
166  mm_sngl->SetNegativeBco(2);
167  mm_sngl->AddListFile(iter);
169  i++;
170  }
171 
172  se->registerInputManager(in);
173  // StreamingCheck *scheck = new StreamingCheck();
174  // scheck->SetTpcBcoRange(130);
175  // se->registerSubsystem(scheck);
176  // TpcCheck *tpccheck = new TpcCheck();
177  // tpccheck->Verbosity(3);
178  // tpccheck->SetBcoRange(130);
179  // se->registerSubsystem(tpccheck);
180 
181  Fun4AllOutputManager *out = new Fun4AllDstOutputManager("out", "streaming.root");
182  se->registerOutputManager(out);
183 
184  if (nEvents < 0)
185  {
186  return;
187  }
188  se->run(nEvents);
189 
190  se->End();
191  delete se;
192  cout << "all done" << endl;
193  gSystem->Exit(0);
194 }