1 #ifndef PixelAliasList_h 2 #define PixelAliasList_h 37 std::ofstream
out(filename.c_str());
39 out <<
"ConfigurationAliases" << std::endl;
42 out << theAlias.
name() <<
" " << theAlias.
key() <<
" ";
45 for (
unsigned int j = 0;
j <
n;
j++) {
50 out <<
";" << std::endl;
53 out <<
"VersionAliases" << std::endl;
57 out << theAlias.
path() <<
" " << theAlias.
version() <<
" " << theAlias.
alias() <<
" ;" << std::endl;
62 std::ifstream
in(filename.c_str());
64 std::cout <<
"[PixelAliasList::readfile()]\t\tCould not open file:" << filename << std::endl;
78 while (tag.substr(0, 1) ==
"#") {
79 in.ignore(4096,
'\n');
83 assert(tag ==
"ConfigurationAliases");
87 while (tag !=
"VersionAliases") {
101 pathAliasPair tmpPAPair;
128 assert(tag ==
"VersionAliases");
143 versionAliasPair tmpVAPair;
152 tmpVAPair.second =
alias;
168 std::cout <<
"[PixelAliasList::insertAlias()]\t\t\tReplacing existing alias:" << anAlias.
name() << std::endl;
188 std::cout <<
"[PixelAliasList::insertVersionAlias()]\t\tReplacing existing version alias:" << anAlias.
path()
189 <<
" " << anAlias.
alias() << std::endl;
214 std::vector<std::string>
tmp;
239 pathVersionAliasMmap
result;
241 if ((*it).first.find(koc) != std::string::npos) {
242 result[(*it).first] = (*it).second;
249 std::vector<pathAliasPair> configAliasVector;
251 if ((*it).first == path) {
252 configAliasVector.push_back((*it).second);
255 return configAliasVector;
unsigned int getVersion(std::string path, std::string alias)
void readfile(std::string filename)
std::string alias(unsigned int i)
unsigned int version(unsigned int i)
pathVersionAliasMmap getVersionData()
void updateConfigAlias(std::string path, unsigned int version, std::string alias, PixelConfigList &config)
std::string versionAliasesAlias(unsigned int i)
std::string versionAliasesPath(unsigned int i)
std::vector< pathAliasPair > getConfigAliases(std::string path)
unsigned int key(unsigned int i)
std::string path(unsigned int i)
std::pair< unsigned int, std::string > versionAliasPair
PixelConfigAlias operator[](unsigned int i)
std::map< std::string, vectorVAPairs > pathVersionAliasMmap
This class implements the configuration key which actually just is an integer.
std::map< std::string, std::string > pathAliasPair
std::string name(unsigned int i)
void insertVersionAlias(PixelVersionAlias &anAlias)
unsigned int nVersionAliases()
void addVersionAlias(std::string path, std::string alias)
void insertAlias(PixelConfigAlias &anAlias)
std::vector< std::string > getVersionAliases(std::string path)
pathVersionAliasMmap versionMmap
PixelConfigAlias * versionAliases(std::string aliasName)
std::map< std::string, pathAliasPair > pathAliasMmap
pathVersionAliasMmap getVersionData(std::string koc)
std::vector< PixelVersionAlias > pixelVersionAliases_
std::vector< PixelConfigAlias > pixelConfigAliases_
This class implements the steps that are used in a scan over Threshold and CalDelay.
std::vector< versionAliasPair > vectorVAPairs
unsigned int clone(unsigned int oldkey, std::string path, unsigned int version)
unsigned int nVersionAliases()