CGEM BOSS
6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
Manager.h
Go to the documentation of this file.
1
// $Header: /bes/bes/BossCvs/Calibration/rdbModel/rdbModel/Management/Manager.h,v 1.1.1.1 2005/10/17 06:10:53 maqm Exp $
2
#ifndef RDBMODEL_MANAGER_H
3
#define RDBMODEL_MANAGER_H
4
// #include <map>
5
6
#include "
rdbModel/Management/Visitor.h
"
7
#include "
rdbModel/Rdb.h
"
8
9
namespace
rdbModel
{
10
11
class
Builder
;
12
13
/**
14
* This class implement the manager for the sections part of the XML file.
15
* It is a singleton.
16
* @author D.Favretto & R.Giannitrapani
17
*/
18
class
Manager
{
19
public
:
20
// enum buildType{all,constants,sections,materials,idDictionary};
21
22
23
/** The destructor must be invoched by the client before leaving the
24
application. It will destroy explicitely the Rdb object and this
25
will start the deallocation of all the objects hierarchy */
26
~Manager
();
27
28
/** This method is used to access the pointer to the singleton */
29
static
Manager
*
getManager
();
30
31
/** This method is used to specify a builder to be used by the manager. */
32
void
setBuilder
(
Builder
* b);
33
34
/** This method start the parse of the xml file by the builder.
35
* It returns an error code (0 if all ok)
36
*/
37
int
build
();
38
39
40
/// This method starts the visit of a hierarchy with a specified visitor
41
void
startVisitor
(
Visitor
*);
42
43
void
cleanRdb
();
44
45
/** This method gives back the pointer to the Rdb object. It coule be
46
used by expert clients to access information without the need of
47
a visitor */
48
Rdb
*
getRdb
(){
return
m_rdb;};
49
50
51
void
setInputSource
(std::string pname){m_filename = pname;};
52
std::string
getInputSourceString
(){
return
m_filename;};
53
54
// There will probably be some collection of get and set services...
55
56
57
protected
:
58
/** The constructor is protected; in such a way it is forbidden to *
59
build directely a manager. Here the new Rdb object is explicitely
60
built */
61
Manager
():m_builder(0) {m_rdb =
new
Rdb
;};
62
63
private
:
64
65
/**
66
This is a private pointer to the Rdb object that
67
provide the entry point to all information about all tables. */
68
Rdb
* m_rdb;
69
/**
70
This is the pointer to the only manager that can be instanciated */
71
static
Manager
* s_pMyself;
72
/** This is a private pointer to the builder used by the manager to
73
build the hierarchy from the XML file */
74
Builder
* m_builder;
75
76
std::string m_filename;
77
};
78
79
}
80
#endif
//RDBMODEL_MANAGER_H
81
Rdb.h
Visitor.h
Builder
Definition
Event/RawDataCnv/RawDataCnv-00-04-29-tag/RawDataCnv/EventManagement/Builder.h:15
rdbModel::Builder
Definition
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Management/Builder.h:18
rdbModel::Manager
Definition
Manager.h:18
rdbModel::Manager::~Manager
~Manager()
Definition
Manager.cxx:18
rdbModel::Manager::startVisitor
void startVisitor(Visitor *)
This method starts the visit of a hierarchy with a specified visitor.
Definition
Manager.cxx:53
rdbModel::Manager::getInputSourceString
std::string getInputSourceString()
Definition
Manager.h:52
rdbModel::Manager::getRdb
Rdb * getRdb()
Definition
Manager.h:48
rdbModel::Manager::setInputSource
void setInputSource(std::string pname)
Definition
Manager.h:51
rdbModel::Manager::Manager
Manager()
Definition
Manager.h:61
rdbModel::Manager::cleanRdb
void cleanRdb()
Definition
Manager.cxx:31
rdbModel::Manager::setBuilder
void setBuilder(Builder *b)
Definition
Manager.cxx:37
rdbModel::Manager::getManager
static Manager * getManager()
Definition
Manager.cxx:24
rdbModel::Manager::build
int build()
Definition
Manager.cxx:43
rdbModel::Rdb
Definition
Rdb.h:41
rdbModel::Visitor
Definition
Visitor.h:32
rdbModel
Definition
Metadata.h:11
6.6.5.h
Calibration
rdbModel
rdbModel-00-01-01
rdbModel
Management
Manager.h
Generated by
1.12.0