StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjSpinReader.cxx
1 // $Id: StjSpinReader.cxx,v 1.1 2008/11/05 05:48:29 tai Exp $
2 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
3 #include "StjSpinReader.h"
4 
5 #include <TTree.h>
6 
7 ClassImp(StjSpinReader)
8 
9 void StjSpinReader::SetBranchAddress(TTree *tree)
10 {
11  tree->SetBranchAddress("runNumber" , &_runNumber );
12  tree->SetBranchAddress("eventId" , &_eventId );
13  tree->SetBranchAddress("bx7" , &_bx7 );
14  tree->SetBranchAddress("bx48" , &_bx48 );
15  tree->SetBranchAddress("spin4" , &_spin4 );
16  tree->SetBranchAddress("bbcTimebin" , &_bbcTimebin );
17  tree->SetBranchAddress("vertexZ" , &_vertexZ );
18 }
19 
20 void StjSpinReader::clearEntry()
21 {
22  __runNumber = 0;
23  __eventId = 0;
24  __bx7 = 0;
25  __bx48 = 0;
26  __spin4 = 0;
27  __bbcTimebin = 0;
28  __vertexZ = 0;
29 }
30 
31 void StjSpinReader::readEntry()
32 {
33  __runNumber = _runNumber;
34  __eventId = _eventId;
35  __bx7 = _bx7;
36  __bx48 = _bx48;
37  __spin4 = _spin4;
38  __bbcTimebin = _bbcTimebin;
39  __vertexZ = _vertexZ;
40 }