3 #include "StjVertexWriter.h"
7 #include <TDirectory.h>
15 _tree =
new TTree(_treeName.c_str(), _treeTitle.c_str());
16 _tree->Branch(
"runNumber" , &_runNumber ,
"runNumber/I" );
17 _tree->Branch(
"eventId" , &_eventId ,
"eventId/I" );
18 _tree->Branch(
"vertexZ" , &_vertexZ ,
"vertexZ/D" );
19 _tree->Branch(
"vertexY" , &_vertexY ,
"vertexY/D" );
20 _tree->Branch(
"vertexX" , &_vertexX ,
"vertexX/D" );
23 void StjVertexWriter::Make()
25 _runNumber = _vertex->runNumber();
27 _eventId = _vertex->eventId();
29 _vertexZ = _vertex->vertexZ();
31 _vertexY = _vertex->vertexY();
33 _vertexX = _vertex->vertexX();
38 void StjVertexWriter::Finish()
40 _tree->BuildIndex(
"runNumber",
"eventId");