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