Hello,
my event object has a class member - array of devices, I can write it to the tree and read back via usual receipt:
[code]class Event : TObject {
Device *m_dev[100];
}
// writing…
m_tree->Branch(“EventBranch”,“Event”, &m_event, 32000, 99);
m_tree->Fill();
// reading…
m_tree->SetBranchAddress(“EventBranch”, &m_event);
m_tree->GetEntry(i)
[/code]
Is it possible now, while reading tree, to save time and have filled only selected devices? I tried
m_tree->SetBranchStatus("*",0);
m_tree->SetBranchStatus(“m_dev[1]”,1)
but it can’t find such branch.
I also tried
[code]class ColdEvent : public TObject {
public:
TClonesArray *m_dev;
};
// where
m_dev = new TClonesArray(“Device”,100);
// and tried to read it with
TBranch *b_branch = m_tree->GetBranch(“m_dev[1]”);
b_branch->GetEntry(i);
[/code]
but pointer to branch is zero in that case. Could you please help me with that, i.e. “disabling/enabling” unnecessary devices in array?
Many thanks in advance and cheers.
Gennady.