BOSS 8.0.0
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 : yoshihito.iwasaki@kek.jp
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
22
23void TUpdater::dump( const std::string& msg, const std::string& pre ) const {
24 std::cout << pre;
25
26 std::cout << "updated:" << updated();
27 std::cout << ",exp=" << _expN;
28 std::cout << ",run=" << _runN;
29 std::cout << ",evt=" << _evtN;
30 std::cout << std::endl;
31}
32
33void TUpdater::update( void ) {
34 if ( updated() ) return;
35
36 /*
37 struct belle_event * ev =
38 (struct belle_event *) BsGetEnt(BELLE_EVENT, 1, BBS_No_Index);
39
40 //...No BELLE_EVENT ???...
41 if (! ev) return;
42
43 _expN = ev->m_ExpNo;
44 _runN = ev->m_RunNo;
45 _evtN = ev->m_EvtNo;
46 */
47 _expN = 1;
48 _runN = 1;
49 _evtN = 1;
50}
51
52bool TUpdater::updated( void ) const {
53 /*
54 struct belle_event * ev =
55 (struct belle_event *) BsGetEnt(BELLE_EVENT, 1, BBS_No_Index);
56
57 //...No BELLE_EVENT ???...
58 if (! ev) return false;
59
60 //...Same event?...
61 if (_expN == ev->m_ExpNo &&
62 _runN == ev->m_RunNo &&
63 _evtN == ev->m_EvtNo) return true;
64 */
65
66 if ( _expN == 1 && _runN == 1 && _evtN == 1 ) return true;
67
68 return false;
69}
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
Definition TUpdater.cxx:23
TUpdater()
Constructor.
Definition TUpdater.cxx:19
virtual void update(void)
updates an object.
Definition TUpdater.cxx:33
virtual ~TUpdater()
Destructor.
Definition TUpdater.cxx:21
virtual bool updated(void) const
returns true if an object is updated.
Definition TUpdater.cxx:52