|
CommandCoder.hGo to the documentation of this file.00001 // -*- mode: C++ -*- 00002 // 00003 // Copyright (C) 2006 Christian Holm Christensen <cholm@nbi.dk> 00004 // 00005 // This library is free software; you can redistribute it and/or 00006 // modify it under the terms of the GNU Lesser General Public License 00007 // as published by the Free Software Foundation; either version 2.1 00008 // of the License, or (at your option) any later version. 00009 // 00010 // This library is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 // Lesser General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public 00016 // License along with this library; if not, write to the Free 00017 // Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 00018 // 02111-1307 USA 00019 // 00020 // Note, some of this code is based on the ROOT CommandCoder interface 00021 // 00027 #ifndef RCUCONF_COMMANDCODER_H 00028 #define RCUCONF_COMMANDCODER_H 00029 #ifndef RCUCONF_COMMANDCODERBASE_H 00030 # include <rcuconf/CommandCoderBase.h> 00031 #endif 00032 #ifndef RCUCONF_CONFIGURATOR_H 00033 # include <rcuconf/Configurator.h> 00034 #endif 00035 #ifndef __STRING__ 00036 # include <string> 00037 #endif 00038 #ifndef __VECTOR__ 00039 # include <vector> 00040 #endif 00041 00042 namespace Rcuxx 00043 { 00044 class Rcu; 00045 class Bc; 00046 class Altro; 00047 } 00048 00049 namespace RcuDb 00050 { 00051 class Server; 00052 } 00053 00054 namespace RcuConf 00055 { 00056 // Forward declarations 00057 class Rcu; 00058 class Bc; 00059 class Altro; 00060 class Configurator; 00061 00077 class CommandCoder : public CommandCoderBase 00078 { 00079 public: 00081 CommandCoder(); 00083 virtual ~CommandCoder() {} 00090 virtual int createDataBlock(char *target, int tag); 00095 virtual long int * getDataBlock(); 00100 virtual std::vector<std::string> getError() { return fErrors; } 00101 protected: 00103 void init(); 00106 bool readConfig(); 00108 RcuDb::Server* fServer; 00110 Rcuxx::Rcu* fRcuxx; 00112 Rcuxx::Bc* fBcxx; 00114 Rcuxx::Altro* fAltroxx; 00116 Rcu* fRcu; 00118 Bc* fBc; 00120 Altro* fAltro; 00122 Configurator* fConfigurator; 00124 int fRet; 00126 std::vector<std::string> fErrors; 00128 std::string fDbUrl; 00130 std::string fRcuUrl; 00132 bool fVerbose; 00134 bool fDebug; 00136 bool fInit; 00138 std::string fDetector; 00139 }; 00140 00146 void setConfigFile(const std::string& file); 00147 } 00148 00149 #endif 00150 // 00151 // EOF 00152 // 00153 00154
|