BOSS 7.0.9
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 ()
 

Static Public Member Functions

static ManagergetManager ()
 

Protected Member Functions

 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 Manager.h.

Constructor & Destructor Documentation

◆ ~Manager()

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

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 Manager.h.

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

Referenced by getManager().

Member Function Documentation

◆ build()

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().

◆ cleanRdb()

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 }

◆ getInputSourceString()

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

Definition at line 52 of file Manager.h.

52{return m_filename;};

◆ getManager()

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().

◆ getRdb()

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 Manager.h.

48{return m_rdb;};

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

◆ setBuilder()

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 }
const double b
Definition: slope.cxx:9

Referenced by main().

◆ setInputSource()

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

Definition at line 51 of file Manager.h.

51{m_filename = pname;};

Referenced by main().

◆ startVisitor()

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

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