CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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/range/iterator_range.hpp"
9 #include <ostream>
10 #include <sstream>
11 #include <string>
12 #include <vector>
13 #include <map>
14 
15 class SiStripDbParams;
16 
18 std::ostream& operator<<(std::ostream&, const SiStripDbParams&);
19 
26 public:
27  // ---------- cons(de)structors ----------
28 
30 
32 
34 
35  bool operator==(const SiStripDbParams&) const;
36 
37  bool operator!=(const SiStripDbParams&) const;
38 
40 
41  // ---------- typedefs ----------
42 
43  typedef std::map<std::string, SiStripPartition> SiStripPartitions;
44 
46 
47  typedef boost::iterator_range<SiStripPartitions::const_iterator> const_iterator_range;
48 
49  typedef boost::iterator_range<SiStripPartitions::iterator> iterator_range;
50 
51  // ---------- database-related ----------
52 
53  bool usingDb() const;
54 
55  std::string confdb() const;
56 
57  std::string user() const;
58 
59  std::string passwd() const;
60 
61  std::string path() const;
62 
63  bool usingDbCache() const;
64 
65  std::string sharedMemory() const;
66 
67  std::string tnsAdmin() const;
68 
69  // ---------- partition-related ----------
70 
73 
76 
78  SiStripPartitions::const_iterator partition(std::string partition_name) const;
79 
81  SiStripPartitions::iterator partition(std::string partition_name);
82 
84  void clearPartitions();
85 
87  void addPartition(const SiStripPartition&);
88 
90  std::vector<std::string> partitionNames() const;
91 
93  std::vector<std::string> partitionNames(std::string) const;
94 
96  std::string partitionNames(const std::vector<std::string>&) const;
97 
99  size_type partitionsSize() const;
100 
101  // ---------- setters ----------
102 
103  void usingDb(bool);
104 
105  void usingDbCache(bool);
106 
108 
109  void pset(const edm::ParameterSet&);
110 
111  void confdb(const std::string&);
112 
113  void confdb(const std::string& user, const std::string& passwd, const std::string& path);
114 
115  void reset();
116 
117  // ---------- xml file names ----------
118 
119  std::vector<std::string> inputModuleXmlFiles() const;
120 
121  std::vector<std::string> inputDcuInfoXmlFiles() const;
122 
123  std::vector<std::string> inputFecXmlFiles() const;
124 
125  std::vector<std::string> inputFedXmlFiles() const;
126 
128 
130 
131  std::string outputFecXml() const;
132 
133  std::string outputFedXml() const;
134 
135  void print(std::stringstream&) const;
136 
137  // ---------- private member data ----------
138 
139 private:
140  bool usingDb_;
141 
143 
145 
147 
149 
151 
153 
155 
157 
159 
161 
163 
165 };
166 
167 // ---------- inline methods ----------
168 
169 inline bool SiStripDbParams::usingDb() const { return usingDb_; }
170 inline std::string SiStripDbParams::confdb() const { return confdb_; }
171 inline std::string SiStripDbParams::user() const { return user_; }
172 inline std::string SiStripDbParams::passwd() const { return passwd_; }
173 inline std::string SiStripDbParams::path() const { return path_; }
174 inline bool SiStripDbParams::usingDbCache() const { return usingDbCache_; }
177 
179  return const_iterator_range(partitions_.begin(), partitions_.end());
180 }
182  return iterator_range(partitions_.begin(), partitions_.end());
183 }
184 
186 
191 
193 inline void SiStripDbParams::usingDb(bool using_db) { usingDb_ = using_db; }
194 inline void SiStripDbParams::usingDbCache(bool using_cache) { usingDbCache_ = using_cache; }
196 
197 #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::map< std::string, SiStripPartition > SiStripPartitions
std::vector< std::string > inputDcuInfoXmlFiles() const
boost::iterator_range< SiStripPartitions::iterator > iterator_range
bool operator!=(const SiStripDbParams &) const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
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