BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
rdbModel::Manager Class Reference

#include <Manager.h>

Public Member Functions

 ~Manager ()
 
void setBuilder (Builder *b)
 
int build ()
 
void startVisitor (Visitor *)
 This method starts the visit of a hierarchy with a specified visitor.
 
void cleanRdb ()
 
RdbgetRdb ()
 
void setInputSource (std::string pname)
 
std::string getInputSourceString ()
 
 ~Manager ()
 
void setBuilder (Builder *b)
 
int build ()
 
void startVisitor (Visitor *)
 This method starts the visit of a hierarchy with a specified visitor.
 
void cleanRdb ()
 
RdbgetRdb ()
 
void setInputSource (std::string pname)
 
std::string getInputSourceString ()
 

Static Public Member Functions

static ManagergetManager ()
 
static ManagergetManager ()
 

Protected Member Functions

 Manager ()
 
 Manager ()
 

Detailed Description

This class implement the manager for the sections part of the XML file. It is a singleton.

Author
D.Favretto & R.Giannitrapani

Definition at line 18 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Management/Manager.h.

Constructor & Destructor Documentation

◆ ~Manager() [1/2]

rdbModel::Manager::~Manager ( )

The destructor must be invoched by the client before leaving the application. It will destroy explicitely the Rdb object and this will start the deallocation of all the objects hierarchy

Definition at line 18 of file Manager.cxx.

18 {
19 delete m_rdb;
20 delete m_builder;
21 s_pMyself = 0;
22 }

◆ Manager() [1/2]

rdbModel::Manager::Manager ( )
inlineprotected

The constructor is protected; in such a way it is forbidden to * build directely a manager. Here the new Rdb object is explicitely built

Definition at line 61 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Management/Manager.h.

61:m_builder(0) {m_rdb = new Rdb;};

Referenced by getManager().

◆ ~Manager() [2/2]

rdbModel::Manager::~Manager ( )

The destructor must be invoched by the client before leaving the application. It will destroy explicitely the Rdb object and this will start the deallocation of all the objects hierarchy

◆ Manager() [2/2]

rdbModel::Manager::Manager ( )
inlineprotected

The constructor is protected; in such a way it is forbidden to * build directely a manager. Here the new Rdb object is explicitely built

Definition at line 61 of file InstallArea/include/rdbModel/rdbModel/Management/Manager.h.

61:m_builder(0) {m_rdb = new Rdb;};

Member Function Documentation

◆ build() [1/2]

int rdbModel::Manager::build ( )

This method start the parse of the xml file by the builder. It returns an error code (0 if all ok)

Definition at line 43 of file Manager.cxx.

43 {
44 int errCode = m_builder->parseInput(m_filename);
45
46 // Unlike geometry description/detModel, there is only one way to
47 // build here: build everything.
48 if (!errCode) {
49 return m_builder->buildRdb();
50 }
51 else return errCode;
52 }
virtual unsigned int parseInput(const std::string &)=0
virtual int buildRdb()=0

Referenced by main().

◆ build() [2/2]

int rdbModel::Manager::build ( )

This method start the parse of the xml file by the builder. It returns an error code (0 if all ok)

◆ cleanRdb() [1/2]

void rdbModel::Manager::cleanRdb ( )

Definition at line 31 of file Manager.cxx.

31 {
32 delete m_rdb;
33 m_rdb = new Rdb;
34 // delete manBuilder;
35 }

◆ cleanRdb() [2/2]

void rdbModel::Manager::cleanRdb ( )

◆ getInputSourceString() [1/2]

std::string rdbModel::Manager::getInputSourceString ( )
inline

Definition at line 52 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Management/Manager.h.

52{return m_filename;};

◆ getInputSourceString() [2/2]

std::string rdbModel::Manager::getInputSourceString ( )
inline

Definition at line 52 of file InstallArea/include/rdbModel/rdbModel/Management/Manager.h.

52{return m_filename;};

◆ getManager() [1/2]

Manager * rdbModel::Manager::getManager ( )
static

This method is used to access the pointer to the singleton

Definition at line 24 of file Manager.cxx.

25 {
26 if (s_pMyself == 0)
27 s_pMyself = new Manager;
28 return s_pMyself;
29 }

Referenced by rdbModel::XercesBuilder::buildRdb(), and main().

◆ getManager() [2/2]

static Manager * rdbModel::Manager::getManager ( )
static

This method is used to access the pointer to the singleton

◆ getRdb() [1/2]

Rdb * rdbModel::Manager::getRdb ( )
inline

This method gives back the pointer to the Rdb object. It coule be used by expert clients to access information without the need of a visitor

Definition at line 48 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Management/Manager.h.

48{return m_rdb;};

Referenced by rdbModel::XercesBuilder::buildRdb(), and main().

◆ getRdb() [2/2]

Rdb * rdbModel::Manager::getRdb ( )
inline

This method gives back the pointer to the Rdb object. It coule be used by expert clients to access information without the need of a visitor

Definition at line 48 of file InstallArea/include/rdbModel/rdbModel/Management/Manager.h.

48{return m_rdb;};

◆ setBuilder() [1/2]

void rdbModel::Manager::setBuilder ( Builder b)

This method is used to specify a builder to be used by the manager.

Definition at line 37 of file Manager.cxx.

38 {
39 m_builder = b;
40
41 }

Referenced by main().

◆ setBuilder() [2/2]

void rdbModel::Manager::setBuilder ( Builder b)

This method is used to specify a builder to be used by the manager.

◆ setInputSource() [1/2]

void rdbModel::Manager::setInputSource ( std::string  pname)
inline

Definition at line 51 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Management/Manager.h.

51{m_filename = pname;};

Referenced by main().

◆ setInputSource() [2/2]

void rdbModel::Manager::setInputSource ( std::string  pname)
inline

Definition at line 51 of file InstallArea/include/rdbModel/rdbModel/Management/Manager.h.

51{m_filename = pname;};

◆ startVisitor() [1/2]

void rdbModel::Manager::startVisitor ( Visitor v)

This method starts the visit of a hierarchy with a specified visitor.

Definition at line 53 of file Manager.cxx.

54 {
55 // if (TablesVisitor* tv = dynamic_cast<TablesVisitor*>(v))
56 // { // the only kind we support, at least for now
57
58 // if (v->getRecursive())
59 m_rdb->accept(v);
60 // else
61 // m_rdb->acceptNotRec(sv);
62 // }
63 }
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35
unsigned int accept(Visitor *v)
This is the recursive accept for the visitor pattern.
Definition: Rdb.cxx:98

◆ startVisitor() [2/2]

void rdbModel::Manager::startVisitor ( Visitor )

This method starts the visit of a hierarchy with a specified visitor.


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