CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
TUpdater Class Reference

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

#include <TUpdater.h>

+ Inheritance diagram for TUpdater:

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.
 

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::TUpdater ( )

Constructor.

Definition at line 19 of file TUpdater.cxx.

19 : _expN(0), _runN(0), _evtN(0), _init(false) {
20}

◆ ~TUpdater()

TUpdater::~TUpdater ( )
virtual

Destructor.

Definition at line 22 of file TUpdater.cxx.

22 {
23}

Member Function Documentation

◆ clear()

void TUpdater::clear ( void  )
inlinevirtual

clears an object.

Reimplemented in TMDC, and TTrackManager.

Definition at line 88 of file TUpdater.h.

88 {
89 _expN = -1;
90}

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

◆ dump()

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

dumps debug information.

Definition at line 26 of file TUpdater.cxx.

26 {
27 std::cout << pre;
28
29 std::cout << "updated:" << updated();
30 std::cout << ",exp=" << _expN;
31 std::cout << ",run=" << _runN;
32 std::cout << ",evt=" << _evtN;
33 std::cout << std::endl;
34}
virtual bool updated(void) const
returns true if an object is updated.
Definition: TUpdater.cxx:57

Referenced by main().

◆ initialize()

void TUpdater::initialize ( void  )
inlinevirtual

initializes an object.

Definition at line 82 of file TUpdater.h.

82 {
83 _init = true;
84}

◆ initialized()

bool TUpdater::initialized ( void  ) const
inlinevirtual

returns true if an object is initialized.

Definition at line 76 of file TUpdater.h.

76 {
77 return _init;
78}

◆ update()

void TUpdater::update ( void  )
virtual

updates an object.

Definition at line 37 of file TUpdater.cxx.

37 {
38 if (updated()) return;
39
40 /*
41 struct belle_event * ev =
42 (struct belle_event *) BsGetEnt(BELLE_EVENT, 1, BBS_No_Index);
43
44 //...No BELLE_EVENT ???...
45 if (! ev) return;
46
47 _expN = ev->m_ExpNo;
48 _runN = ev->m_RunNo;
49 _evtN = ev->m_EvtNo;
50 */
51 _expN = 1;
52 _runN = 1;
53 _evtN = 1;
54}

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

◆ updated()

bool TUpdater::updated ( void  ) const
virtual

returns true if an object is updated.

Definition at line 57 of file TUpdater.cxx.

57 {
58 /*
59 struct belle_event * ev =
60 (struct belle_event *) BsGetEnt(BELLE_EVENT, 1, BBS_No_Index);
61
62 //...No BELLE_EVENT ???...
63 if (! ev) return false;
64
65 //...Same event?...
66 if (_expN == ev->m_ExpNo &&
67 _runN == ev->m_RunNo &&
68 _evtN == ev->m_EvtNo) return true;
69 */
70
71 if (_expN == 1 &&
72 _runN == 1 &&
73 _evtN == 1) return true;
74
75 return false;
76}

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


The documentation for this class was generated from the following files: