28 auto branch =
tree->GetBranch(brname.c_str());
32 auto labelClass = branch->GetClassName();
33 bool oldlabelformat =
false;
36 if (TString(labelClass).Contains(
"IOMCTruthContainer")) {
37 branch->SetAddress(&labelROOTbuffer);
38 branch->GetEntry(
entry);
39 if (labelROOTbuffer) {
41 delete labelROOTbuffer;
46 std::string serializedtype(
"o2::dataformats::MCTruthContainer<o2::MCCompLabel>");
47 if (!TString(labelClass).EqualTo(serializedtype.c_str())) {
48 std::cerr <<
"Error: expected serialized type " << serializedtype <<
" but found " << labelClass;
51 branch->SetAddress(&labels);
52 branch->GetEntry(
entry);
A const (ready only) version of MCTruthContainer.
A special IO container - splitting a given vector to enable ROOT IO.
Definition of a container to keep Monte Carlo truth external to simulation objects.
std::unique_ptr< TTree > tree((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str()))