3 #include "StjSpinWriter.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(
"bx7" , &_bx7 ,
"bx7/I" );
19 _tree->Branch(
"bx48" , &_bx48 ,
"bx48/I" );
20 _tree->Branch(
"spin4" , &_spin4 ,
"spin4/I" );
21 _tree->Branch(
"bbcTimebin" , &_bbcTimebin ,
"bbcTimebin/I" );
22 _tree->Branch(
"vertexZ" , &_vertexZ ,
"vertexZ/D" );
25 void StjSpinWriter::Make()
27 _runNumber = _spin->runNumber();
28 _eventId = _spin->eventId();
30 _bx48 = _spin->bx48();
31 _spin4 = _spin->spin4();
32 _bbcTimebin = _spin->bbcTimebin();
33 _vertexZ = _spin->vertexZ();
37 void StjSpinWriter::Finish()
39 _tree->BuildIndex(
"runNumber",
"eventId");