Commit 7930a372 authored by Chad Lantz's avatar Chad Lantz
Browse files

Modified SetBranches to use Channel member pointer

parent 6a9ef23b
......@@ -68,12 +68,8 @@ Channel* Detector::GetElement(std::string _name){
*/
void Detector::SetBranches( TTree *_dataTree ){
std::vector< std::vector< float >* > pvWF;
pvWF.resize(m_Element.size());
for( uint ch = 0; ch < m_Element.size(); ch++ ){
pvWF[ ch ] = &m_Element[ch]->WF;
_dataTree->SetBranchAddress( ("Raw" + m_Element.at(ch)->name).c_str(), &pvWF[ ch ] );
_dataTree->SetBranchAddress( ("Raw" + m_Element.at(ch)->name).c_str(), &m_Element.at(ch)->pWF );
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment