1 #ifndef PixelConfigList_h 2 #define PixelConfigList_h 34 std::ofstream
out(filename.c_str());
39 out <<
"key "<<
i<<std::endl;
51 std::ifstream
in(filename.c_str());
56 while(tag.substr(0,1) ==
"#") {
57 in.ignore(4096,
'\n');
65 std::cout <<
"PixelConfigDB: tag="<<tag<<std::endl;
68 unsigned int tmp_version;
70 if (version!=tmp_version){
71 std::cout <<
"PixelConfigDB: read version: "<<tmp_version<<
" while expected " 72 << version << std::endl;
77 while(tag.substr(0,1) ==
"#") {
78 in.ignore(4096,
'\n');
83 while (tag!=
"key"&&
in.good()){
89 while(tag.substr(0,1) ==
"#") {
90 in.ignore(4096,
'\n');
108 unsigned int oldversion;
110 if (-1==aConfig.
update(path,oldversion,version)){
111 std::cout <<
"Old version not found for path="<<path<<
" in config "<<oldkey<<std::endl;
void add(std::string dir, unsigned int version)
std::vector< PixelConfig > configs
void readfile(std::string filename)
int update(std::string dir, unsigned int &version, unsigned int newversion)
unsigned int add(PixelConfig &aConfig)
unsigned int numberOfConfigs()
std::vector< std::vector< double > > tmp
void reload(std::string filename)
PixelConfig & operator[](unsigned int i)
unsigned int clone(unsigned int oldkey, std::string path, unsigned int version)