CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripDbParams.h
Go to the documentation of this file.
1 // Last commit: $Id: SiStripDbParams.h,v 1.13 2009/02/20 10:01:15 alinn Exp $
2 
3 #ifndef OnlineDB_SiStripConfigDb_SiStripDbParams_h
4 #define OnlineDB_SiStripConfigDb_SiStripDbParams_h
5 
9 #include "boost/cstdint.hpp"
10 #include "boost/range/iterator_range.hpp"
11 #include <ostream>
12 #include <sstream>
13 #include <string>
14 #include <vector>
15 #include <map>
16 
17 class SiStripDbParams;
18 
20 std::ostream& operator<< ( std::ostream&, const SiStripDbParams& );
21 
28 
29  public:
30 
31  // ---------- cons(de)structors ----------
32 
34 
36 
38 
39  bool operator== ( const SiStripDbParams& ) const;
40 
41  bool operator!= ( const SiStripDbParams& ) const;
42 
44 
45  // ---------- typedefs ----------
46 
47  typedef std::map< std::string, SiStripPartition > SiStripPartitions;
48 
50 
51  typedef boost::iterator_range<SiStripPartitions::const_iterator> const_iterator_range;
52 
53  typedef boost::iterator_range<SiStripPartitions::iterator> iterator_range;
54 
55  // ---------- database-related ----------
56 
57  bool usingDb() const;
58 
59  std::string confdb() const;
60 
61  std::string user() const;
62 
63  std::string passwd() const;
64 
65  std::string path() const;
66 
67  bool usingDbCache() const;
68 
69  std::string sharedMemory() const;
70 
71  std::string tnsAdmin() const;
72 
73  // ---------- partition-related ----------
74 
77 
80 
82  SiStripPartitions::const_iterator partition( std::string partition_name ) const;
83 
85  SiStripPartitions::iterator partition( std::string partition_name );
86 
88  void clearPartitions();
89 
91  void addPartition( const SiStripPartition& );
92 
94  std::vector<std::string> partitionNames() const;
95 
97  std::vector<std::string> partitionNames( std::string ) const;
98 
100  std::string partitionNames( const std::vector<std::string>& ) const;
101 
103  size_type partitionsSize() const;
104 
105  // ---------- setters ----------
106 
107  void usingDb( bool );
108 
109  void usingDbCache( bool );
110 
111  void sharedMemory( std::string );
112 
113  void pset( const edm::ParameterSet& );
114 
115  void confdb( const std::string& );
116 
117  void confdb( const std::string& user,
118  const std::string& passwd,
119  const std::string& path );
120 
121  void reset();
122 
123  // ---------- xml file names ----------
124 
125  std::vector<std::string> inputModuleXmlFiles() const;
126 
127  std::vector<std::string> inputDcuInfoXmlFiles() const;
128 
129  std::vector<std::string> inputFecXmlFiles() const;
130 
131  std::vector<std::string> inputFedXmlFiles() const;
132 
134 
136 
137  std::string outputFecXml() const;
138 
139  std::string outputFedXml() const;
140 
141  void print( std::stringstream& ) const;
142 
143  // ---------- private member data ----------
144 
145  private:
146 
147  bool usingDb_;
148 
150 
152 
154 
156 
158 
160 
162 
164 
166 
168 
170 
172 
173 };
174 
175 // ---------- inline methods ----------
176 
177 inline bool SiStripDbParams::usingDb() const { return usingDb_; }
178 inline std::string SiStripDbParams::confdb() const { return confdb_; }
179 inline std::string SiStripDbParams::user() const { return user_; }
180 inline std::string SiStripDbParams::passwd() const { return passwd_; }
181 inline std::string SiStripDbParams::path() const { return path_; }
182 inline bool SiStripDbParams::usingDbCache() const { return usingDbCache_; }
185 
187  partitions_.end() ); }
189  partitions_.end() ); }
190 
192 
197 
199 inline void SiStripDbParams::usingDb( bool using_db ) { usingDb_ = using_db; }
200 inline void SiStripDbParams::usingDbCache( bool using_cache ) { usingDbCache_ = using_cache; }
202 
203 #endif // OnlineDB_SiStripConfigDb_SiStripDbParams_h
bool operator==(const SiStripDbParams &) const
void print(std::stringstream &) const
std::string passwd() const
std::vector< std::string > inputFedXmlFiles() const
std::string tnsAdmin_
std::vector< std::string > inputDcuInfoXmlFiles() const
boost::iterator_range< SiStripPartitions::iterator > iterator_range
bool operator!=(const SiStripDbParams &) const
std::map< std::string, SiStripPartition > SiStripPartitions
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
bool usingDb() const
uint16_t size_type
SiStripDbParams & operator=(const SiStripDbParams &)
std::string outputDcuInfoXml_
const_iterator_range partitions() const
std::vector< std::string > partitionNames() const
std::string outputModuleXml() const
std::string outputFecXml_
size_type partitionsSize() const
SiStripPartitions::size_type size_type
std::string outputModuleXml_
std::string user_
std::string tnsAdmin() const
std::string sharedMemory() const
std::string outputFedXml_
std::string passwd_
Container class for database partition parameters.
std::string sharedMemory_
std::vector< std::string > inputModuleXmlFiles() const
std::string user() const
std::string path_
std::string confdb() const
Container class for database connection parameters.
std::string outputFedXml() const
SiStripPartitions::const_iterator partition(std::string partition_name) const
boost::iterator_range< SiStripPartitions::const_iterator > const_iterator_range
std::string path() const
std::vector< std::string > inputFecXmlFiles() const
void pset(const edm::ParameterSet &)
std::string confdb_
bool usingDbCache() const
void addPartition(const SiStripPartition &)
std::string outputFecXml() const
SiStripPartitions partitions_
std::string outputDcuInfoXml() const