33 std::cout <<
"InttCombinedRawDataConverter::SetOputputFile(std:: string const& filename)" << std::endl;
34 std::cout <<
"Argument \"filename\" is empty string" << std::endl;
35 std::cout <<
"No output was written" << std::endl;
40 std::cout <<
"Will write to file:" << std::endl;
41 std::cout <<
"\t" << filename << std::endl;
43 file = TFile::Open(filename.c_str(),
"RECREATE");
56 std::cout <<
"InttCombinedRawDataConverter::WriteOputputFile()" << std::endl;
57 std::cout <<
"Member \"file\" is uninitialized" << std::endl;
58 std::cout <<
"Did you call SetOutputFile()?" << std::endl;
59 std::cout <<
"No output was written" << std::endl;
65 std::cout <<
"InttCombinedRawDataConverter::WriteOputputFile()" << std::endl;
66 std::cout <<
"Member \"tree\" is uninitialized" << std::endl;
67 std::cout <<
"Did you call SetOutputFile()?" << std::endl;
68 std::cout <<
"No output was written" << std::endl;
82 tree =
new TTree(
"prdf_tree",
"prdf_tree");
93 {
"flx_svr",
new std::vector<Int_t>()},
94 {
"flx_chn",
new std::vector<Int_t>()},
95 {
"lyr",
new std::vector<Int_t>()},
96 {
"ldr",
new std::vector<Int_t>()},
97 {
"arm",
new std::vector<Int_t>()},
98 {
"chp",
new std::vector<Int_t>()},
99 {
"chn",
new std::vector<Int_t>()},
101 {
"flx_bco",
new std::vector<Int_t>()},
102 {
"adc",
new std::vector<Int_t>()},
103 {
"amp",
new std::vector<Int_t>()},
108 {
"gtm_bco",
new std::vector<Long64_t>()},
120 tree->Branch(itr.first.c_str(), &(itr.second));
122 for (
auto& itr : branches_l)
124 tree->Branch(itr.first.c_str(), &(itr.second));
126 for (
auto& itr : branches_d)
128 tree->Branch(itr.first.c_str(), &(itr.second));
133 std::cout <<
"int InttCombinedRawDataConverter::Init(PHCompositeNode* /*topNode*/)" << std::endl;
137 std::cout <<
"\tDone";
150 for (
auto& itr : branches_l)
161 std::cout <<
"int InttCombinedRawDataConverter::InitRun(PHCompositeNode* /*topNode*/)" << std::endl;
165 std::cout <<
"\tDone";
180 std::cout <<
"int InttCombinedRawDataConverter::process_event(PHCompositeNode* topNode)" << std::endl;
184 std::cout <<
"\t" <<
n_evt << std::endl;
190 std::cout <<
"int InttCombinedRawDataConverter::process_event(PHCompositeNode* topNode)" << std::endl;
192 std::cout <<
"\tExiting" << std::endl;
202 for (
auto& itr : branches_l)
213 std::map<std::tuple<int, int, int, int, int>,
char> hits;
214 for (
unsigned int i = 0;
i < inttcont->
get_nhits();
i++)
225 std::tuple<int, int, int, int, int> tpl;
226 std::get<0>(tpl) = onl.
lyr;
227 std::get<1>(tpl) = onl.
ldr;
228 std::get<2>(tpl) = onl.
arm;
229 std::get<3>(tpl) = onl.
chp;
230 std::get<4>(tpl) = onl.
chn;
232 if (hits.find(tpl) != hits.end())
241 branches_i[
"lyr"]->push_back(onl.
lyr);
242 branches_i[
"ldr"]->push_back(onl.
ldr);
243 branches_i[
"arm"]->push_back(onl.
arm);
244 branches_i[
"chp"]->push_back(onl.
chp);
245 branches_i[
"chn"]->push_back(onl.
chn);
247 branches_i[
"flx_bco"]->push_back(intthit->
get_FPHX_BCO());
248 branches_i[
"adc"]->push_back(intthit->
get_adc());
251 branches_l[
"gtm_bco"]->push_back(intthit->
get_bco());
254 num_hits = branches_l.begin()->second->size();