TUpdater Class Reference

A class to handle update timing of static objects of tracking. More...

#include <TUpdater.h>

Inheritance diagram for TUpdater:

TMDC TTrackManager List of all members.

Public Member Functions

 TUpdater ()
 Constructor.
virtual ~TUpdater ()
 Destructor.
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
virtual bool updated (void) const
 returns true if an object is updated.
virtual void update (void)
 updates an object.
virtual bool initialized (void) const
 returns true if an object is initialized.
virtual void initialize (void)
 initializes an object.
virtual void clear (void)
 clears an object.

Private Attributes

int _expN
int _runN
int _evtN
bool _init

Detailed Description

A class to handle update timing of static objects of tracking.

Definition at line 25 of file TUpdater.h.


Constructor & Destructor Documentation

TUpdater::TUpdater (  ) 

Constructor.

Definition at line 19 of file TUpdater.cxx.

00019                    : _expN(0), _runN(0), _evtN(0), _init(false) {
00020 }

TUpdater::~TUpdater (  )  [virtual]

Destructor.

Definition at line 22 of file TUpdater.cxx.

00022                     {
00023 }


Member Function Documentation

void TUpdater::clear ( void   )  [inline, virtual]

clears an object.

Reimplemented in TMDC, and TTrackManager.

Definition at line 88 of file TUpdater.h.

References _expN.

Referenced by TMDC::clear(), and TMDC::fastClear().

00088                     {
00089     _expN = -1;
00090 }

void TUpdater::dump ( const std::string message = std::string(""),
const std::string prefix = std::string("") 
) const

dumps debug information.

Reimplemented in TTrackManager.

Definition at line 26 of file TUpdater.cxx.

References _evtN, _expN, _runN, and updated().

Referenced by main().

00026                                                                  {
00027     std::cout << pre;
00028 
00029     std::cout << "updated:" << updated();
00030     std::cout << ",exp=" << _expN;
00031     std::cout << ",run=" << _runN;
00032     std::cout << ",evt=" << _evtN;
00033     std::cout << std::endl;
00034 }

void TUpdater::initialize ( void   )  [inline, virtual]

initializes an object.

Definition at line 82 of file TUpdater.h.

References _init.

00082                          {
00083     _init = true;
00084 }

bool TUpdater::initialized ( void   )  const [inline, virtual]

returns true if an object is initialized.

Definition at line 76 of file TUpdater.h.

References _init.

00076                                 {
00077     return _init;
00078 }

void TUpdater::update ( void   )  [virtual]

updates an object.

Definition at line 37 of file TUpdater.cxx.

References _evtN, _expN, _runN, and updated().

Referenced by TMDC::badHits(), main(), and TMDC::update().

00037                      {
00038     if (updated()) return;
00039 
00040    /*
00041     struct belle_event * ev = 
00042         (struct belle_event *) BsGetEnt(BELLE_EVENT, 1, BBS_No_Index);
00043 
00044     //...No BELLE_EVENT ???...
00045     if (! ev) return;
00046   
00047     _expN = ev->m_ExpNo;
00048     _runN = ev->m_RunNo;
00049     _evtN = ev->m_EvtNo;
00050    */
00051     _expN = 1;
00052     _runN = 1;
00053     _evtN = 1;
00054 }

bool TUpdater::updated ( void   )  const [virtual]

returns true if an object is updated.

Definition at line 57 of file TUpdater.cxx.

References _evtN, _expN, and _runN.

Referenced by TMDC::badHits(), dump(), and update().

00057                             {
00058     /*
00059     struct belle_event * ev = 
00060         (struct belle_event *) BsGetEnt(BELLE_EVENT, 1, BBS_No_Index);
00061 
00062     //...No BELLE_EVENT ???...
00063     if (! ev) return false;
00064 
00065     //...Same event?...
00066     if (_expN == ev->m_ExpNo &&
00067         _runN == ev->m_RunNo &&
00068         _evtN == ev->m_EvtNo) return true;
00069     */
00070 
00071    if (_expN == 1 &&
00072        _runN == 1 &&
00073        _evtN == 1) return true;
00074 
00075    return false;
00076 }


Member Data Documentation

int TUpdater::_evtN [private]

Definition at line 59 of file TUpdater.h.

Referenced by dump(), update(), and updated().

int TUpdater::_expN [private]

Definition at line 57 of file TUpdater.h.

Referenced by clear(), dump(), update(), and updated().

bool TUpdater::_init [private]

Definition at line 60 of file TUpdater.h.

Referenced by initialize(), and initialized().

int TUpdater::_runN [private]

Definition at line 58 of file TUpdater.h.

Referenced by dump(), update(), and updated().


Generated on Tue Nov 29 23:36:19 2016 for BOSS_7.0.2 by  doxygen 1.4.7