3 #include <Event/Event.h>
4 #include <Event/packet.h>
29 std::cout <<
"InttRawDataConverter::SetOputputFile(std:: string const& filename)" << std::endl;
30 std::cout <<
"Argument \"filename\" is empty string" << std::endl;
31 std::cout <<
"No output was written" << std::endl;
36 std::cout <<
"Will write to file:" << std::endl;
37 std::cout <<
"\t" << filename << std::endl;
39 file = TFile::Open(filename.c_str(),
"RECREATE");
52 std::cout <<
"InttRawDataConverter::WriteOputputFile()" << std::endl;
53 std::cout <<
"Member \"file\" is uninitialized" << std::endl;
54 std::cout <<
"Did you call SetOutputFile()?" << std::endl;
55 std::cout <<
"No output was written" << std::endl;
61 std::cout <<
"InttRawDataConverter::WriteOputputFile()" << std::endl;
62 std::cout <<
"Member \"tree\" is uninitialized" << std::endl;
63 std::cout <<
"Did you call SetOutputFile()?" << std::endl;
64 std::cout <<
"No output was written" << std::endl;
83 tree =
new TTree(
"prdf_tree",
"prdf_tree");
103 {
"flx_bco",
nullptr},
108 for (Branches_t::const_iterator itr =
branches.begin(); itr !=
branches.end(); ++itr)
110 tree->Branch(itr->first.c_str(), itr->second, (itr->first +
std::string(
"[num_hits]/I")).c_str());
131 Event* evt = findNode::getClass<Event>(topNode,
"PRDF");
158 branche.second =
new Int_t[
num_hits];
159 tree->GetBranch(branche.first.c_str())->SetAddress(branche.second);
174 branches[
"flx_bco"][
n] = pkt->
iValue(
n,
"FPHX_BCO");
175 branches[
"adc"][
n] = pkt->
iValue(
n,
"ADC");
176 branches[
"amp"][
n] = pkt->
iValue(
n,
"AMPLITUDE");
180 for (
auto& branche : branches)
182 delete[] branche.second;