2 #include "StjTrgWriter.h"
6 #include <TDirectory.h>
14 createBranch_general(_tree);
15 createBranch_trgSpecific(_tree);
18 void StjTrgWriter::Make()
20 if( !(*_fillCondition)(_trg) )
return;
22 fillBranch_trgSpecific();
26 void StjTrgWriter::Finish()
28 _tree->BuildIndex(
"runNumber",
"eventId");
31 TTree* StjTrgWriter::createTree()
34 return new TTree(_treeName.c_str(), _treeTitle.c_str());
37 void StjTrgWriter::createBranch_general(TTree* tree)
39 tree->Branch(
"runNumber" , &_runNumber ,
"runNumber/I" );
40 tree->Branch(
"eventId" , &_eventId ,
"eventId/I" );
41 tree->Branch(
"vertexZ" , &_vertexZ ,
"vertexZ/D" );
42 tree->Branch(
"trigID" , &_trigID ,
"trigID/I" );
43 tree->Branch(
"prescale" , &_prescale ,
"prescale/D" );
44 tree->Branch(
"passed" , &_passed ,
"passed/I" );
45 tree->Branch(
"hard" , &_hard ,
"hard/I" );
46 tree->Branch(
"soft" , &_soft ,
"soft/I" );
49 void StjTrgWriter::fillBranch_general()
57 _passed = _trg->passed();
59 _runNumber = _trg->runNumber();
61 _eventId = _trg->eventId();
63 _vertexZ = _trg->vertexZ();
65 _prescale = _trg->prescale();