1 #ifndef PixelConfigList_h 2 #define PixelConfigList_h 29 std::ofstream
out(filename.c_str());
34 out <<
"key "<<
i<<std::endl;
46 std::ifstream
in(filename.c_str());
51 while(tag.substr(0,1) ==
"#") {
52 in.ignore(4096,
'\n');
60 std::cout <<
"PixelConfigDB: tag="<<tag<<std::endl;
63 unsigned int tmp_version;
65 if (version!=tmp_version){
66 std::cout <<
"PixelConfigDB: read version: "<<tmp_version<<
" while expected " 67 << version << std::endl;
72 while(tag.substr(0,1) ==
"#") {
73 in.ignore(4096,
'\n');
78 while (tag!=
"key"&&
in.good()){
84 while(tag.substr(0,1) ==
"#") {
85 in.ignore(4096,
'\n');
103 unsigned int oldversion;
105 if (-1==aConfig.
update(path,oldversion,version)){
106 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)