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 
2 #ifndef OnlineDB_SiStripConfigDb_SiStripDbParams_h
3 #define OnlineDB_SiStripConfigDb_SiStripDbParams_h
4 
8 #include "boost/cstdint.hpp"
9 #include "boost/range/iterator_range.hpp"
10 #include <ostream>
11 #include <sstream>
12 #include <string>
13 #include <vector>
14 #include <map>
15 
16 class SiStripDbParams;
17 
19 std::ostream& operator<< ( std::ostream&, const SiStripDbParams& );
20 
27 
28  public:
29 
30  // ---------- cons(de)structors ----------
31 
33 
35 
37 
38  bool operator== ( const SiStripDbParams& ) const;
39 
40  bool operator!= ( const SiStripDbParams& ) const;
41 
43 
44  // ---------- typedefs ----------
45 
46  typedef std::map< std::string, SiStripPartition > SiStripPartitions;
47 
49 
50  typedef boost::iterator_range<SiStripPartitions::const_iterator> const_iterator_range;
51 
52  typedef boost::iterator_range<SiStripPartitions::iterator> iterator_range;
53 
54  // ---------- database-related ----------
55 
56  bool usingDb() const;
57 
58  std::string confdb() const;
59 
60  std::string user() const;
61 
62  std::string passwd() const;
63 
64  std::string path() const;
65 
66  bool usingDbCache() const;
67 
68  std::string sharedMemory() const;
69 
70  std::string tnsAdmin() const;
71 
72  // ---------- partition-related ----------
73 
76 
79 
81  SiStripPartitions::const_iterator partition( std::string partition_name ) const;
82 
84  SiStripPartitions::iterator partition( std::string partition_name );
85 
87  void clearPartitions();
88 
90  void addPartition( const SiStripPartition& );
91 
93  std::vector<std::string> partitionNames() const;
94 
96  std::vector<std::string> partitionNames( std::string ) const;
97 
99  std::string partitionNames( const std::vector<std::string>& ) const;
100 
102  size_type partitionsSize() const;
103 
104  // ---------- setters ----------
105 
106  void usingDb( bool );
107 
108  void usingDbCache( bool );
109 
110  void sharedMemory( std::string );
111 
112  void pset( const edm::ParameterSet& );
113 
114  void confdb( const std::string& );
115 
116  void confdb( const std::string& user,
117  const std::string& passwd,
118  const std::string& path );
119 
120  void reset();
121 
122  // ---------- xml file names ----------
123 
124  std::vector<std::string> inputModuleXmlFiles() const;
125 
126  std::vector<std::string> inputDcuInfoXmlFiles() const;
127 
128  std::vector<std::string> inputFecXmlFiles() const;
129 
130  std::vector<std::string> inputFedXmlFiles() const;
131 
133 
135 
136  std::string outputFecXml() const;
137 
138  std::string outputFedXml() const;
139 
140  void print( std::stringstream& ) const;
141 
142  // ---------- private member data ----------
143 
144  private:
145 
146  bool usingDb_;
147 
149 
151 
153 
155 
157 
159 
161 
163 
165 
167 
169 
171 
172 };
173 
174 // ---------- inline methods ----------
175 
176 inline bool SiStripDbParams::usingDb() const { return usingDb_; }
177 inline std::string SiStripDbParams::confdb() const { return confdb_; }
178 inline std::string SiStripDbParams::user() const { return user_; }
179 inline std::string SiStripDbParams::passwd() const { return passwd_; }
180 inline std::string SiStripDbParams::path() const { return path_; }
181 inline bool SiStripDbParams::usingDbCache() const { return usingDbCache_; }
184 
186  partitions_.end() ); }
188  partitions_.end() ); }
189 
191 
196 
198 inline void SiStripDbParams::usingDb( bool using_db ) { usingDb_ = using_db; }
199 inline void SiStripDbParams::usingDbCache( bool using_cache ) { usingDbCache_ = using_cache; }
201 
202 #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