StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjTrgDisableTower.cxx
1 // $Id: StjTrgDisableTower.cxx,v 1.1 2008/09/21 19:11:45 tai Exp $
2 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
3 #include "StjTrgDisableTower.h"
4 
5 ClassImp(StjTrgDisableTower)
6 
7 using namespace std;
8 
9 void StjTrgDisableTower::readIfNewEvent() const
10 {
11  if(isNewEvent()) readNewEvent();
12 }
13 
14 bool StjTrgDisableTower::isNewEvent() const
15 {
16  if(_runNumber != _src->runNumber()) return true;
17  if(_eventId != _src->eventId()) return true;
18  return false;
19 }
20 
21 void StjTrgDisableTower::readNewEvent() const
22 {
23  _runNumber = _src->runNumber();
24  _eventId = _src->eventId();
25 
26  read();
27 }
28 
29