1 #ifndef PixelConfigList_h
2 #define PixelConfigList_h
27 std::ofstream
out(filename.c_str());
32 out <<
"key "<<
i<<std::endl;
44 std::ifstream
in(filename.c_str());
49 while(tag.substr(0,1) ==
"#") {
50 in.ignore(4096,
'\n');
58 std::cout <<
"PixelConfigDB: tag="<<tag<<std::endl;
61 unsigned int tmp_version;
63 if (version!=tmp_version){
64 std::cout <<
"PixelConfigDB: read version: "<<tmp_version<<
" while expected "
65 << version << std::endl;
70 while(tag.substr(0,1) ==
"#") {
71 in.ignore(4096,
'\n');
76 while (tag!=
"key"&&
in.good()){
82 while(tag.substr(0,1) ==
"#") {
83 in.ignore(4096,
'\n');
101 unsigned int oldversion;
103 if (-1==aConfig.
update(path,oldversion,version)){
104 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)
tuple path
else: Piece not in the list, fine.
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)