BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
TUpdater.cxx
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: TUpdater.cxx,v 1.4 2010/03/31 09:58:59 liucy Exp $
3//-----------------------------------------------------------------------------
4// Filename : TUpdater.cc
5// Section : Tracking
6// Owner : Yoshi Iwasaki
7// Email : [email protected]
8//-----------------------------------------------------------------------------
9// Description : A class to handle update timing of static objects of tracking.
10// See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
11//-----------------------------------------------------------------------------
12
13//#include "panther/panther.h"
14#include "TrkReco/TUpdater.h"
15//#include BELLETDF_H
16//#include "tables/bestdf.h"
17#include <iostream>
18
19TUpdater::TUpdater() : _expN(0), _runN(0), _evtN(0), _init(false) {
20}
21
23}
24
25void
26TUpdater::dump(const std::string & msg, const std::string & pre) const {
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}
35
36void
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}
55
56bool
57TUpdater::updated(void) const {
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}
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
Definition: TUpdater.cxx:26
TUpdater()
Constructor.
Definition: TUpdater.cxx:19
virtual void update(void)
updates an object.
Definition: TUpdater.cxx:37
virtual ~TUpdater()
Destructor.
Definition: TUpdater.cxx:22
virtual bool updated(void) const
returns true if an object is updated.
Definition: TUpdater.cxx:57