CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Static Public Member Functions | Static Private Member Functions
pos::PixelConfigFile Class Reference

#include "interface/PixelConfigFile.h"

Static Public Member Functions

static void addAlias (std::string alias, unsigned int key)
 
static void addAlias (std::string alias, unsigned int key, std::vector< std::pair< std::string, std::string > > versionaliases)
 
static void addVersionAlias (std::string path, unsigned int version, std::string alias)
 
static PixelConfigListconfigList ()
 
template<class T >
static bool configurationDataExists (T *&data, std::string path, PixelConfigKey key)
 
static void forceAliasesReload (bool m)
 
static void forceConfigReload (bool m)
 
template<class T >
static void get (T *&data, std::string path, PixelConfigKey key)
 
template<class T >
static void get (T *&data, std::string path, unsigned int version)
 
template<class T >
static void get (std::map< std::string, T * > &pixelObjects, PixelConfigKey key)
 
static PixelAliasListgetAlias ()
 
static std::vector< std::pair
< std::string, unsigned int > > 
getAliases ()
 
static std::map< std::string,
unsigned int > 
getAliases_map ()
 
static PixelConfigListgetConfig ()
 
static std::vector< pathAliasPairgetConfigAliases (std::string path)
 
static std::string getPath (std::string path, PixelConfigKey key)
 
static unsigned int getVersion (std::string path, std::string alias)
 
static std::vector< std::string > getVersionAliases (std::string path)
 
static bool getVersionAliases (std::string configAlias, unsigned int &key, std::vector< std::pair< std::string, std::string > > &versionAliases)
 
static pos::pathVersionAliasMmap getVersionData ()
 
static pos::pathVersionAliasMmap getVersionData (std::string koc)
 
static std::vector< std::pair
< std::string, unsigned int > > 
getVersions (pos::PixelConfigKey key)
 
static unsigned int makeKey (std::vector< std::pair< std::string, unsigned int > > versions)
 
static int makeNewVersion (std::string path, std::string &dir)
 
template<class T >
static int put (const T *object, std::string path)
 
template<class T >
static int put (std::vector< T * > objects, std::string path)
 

Static Private Member Functions

static bool & getForceAliasesReload ()
 
static bool & getForceConfigReload ()
 

Detailed Description

OK, first this is not a DB; this class will try to define an interface to accessing the configuration data.

Definition at line 59 of file PixelConfigFile.h.

Member Function Documentation

static void pos::PixelConfigFile::addAlias ( std::string  alias,
unsigned int  key 
)
inlinestatic

Definition at line 123 of file PixelConfigFile.h.

References getAlias(), pos::PixelAliasList::insertAlias(), and pos::PixelAliasList::writefile().

123  {
124  PixelConfigAlias anAlias(alias,key);
125  getAlias().insertAlias(anAlias);
126  getAlias().writefile();
127  }
static PixelAliasList & getAlias()
void insertAlias(PixelConfigAlias &anAlias)
list key
Definition: combine.py:13
static void pos::PixelConfigFile::addAlias ( std::string  alias,
unsigned int  key,
std::vector< std::pair< std::string, std::string > >  versionaliases 
)
inlinestatic

Definition at line 130 of file PixelConfigFile.h.

References pos::PixelConfigAlias::addVersionAlias(), first, getAlias(), i, pos::PixelAliasList::insertAlias(), edm::second(), and pos::PixelAliasList::writefile().

131  {
132  PixelConfigAlias anAlias(alias,key);
133  for(unsigned int i=0;i<versionaliases.size();i++){
134  anAlias.addVersionAlias(versionaliases[i].first,versionaliases[i].second);
135  }
136  getAlias().insertAlias(anAlias);
137  getAlias().writefile();
138  }
int i
Definition: DBlmapReader.cc:9
static PixelAliasList & getAlias()
U second(std::pair< T, U > const &p)
bool first
Definition: L1TdeRCT.cc:79
void insertAlias(PixelConfigAlias &anAlias)
list key
Definition: combine.py:13
static void pos::PixelConfigFile::addVersionAlias ( std::string  path,
unsigned int  version,
std::string  alias 
)
inlinestatic

Definition at line 148 of file PixelConfigFile.h.

References electronStore::configs, getAlias(), getConfig(), pos::PixelAliasList::insertVersionAlias(), pos::PixelAliasList::updateConfigAlias(), pos::PixelConfigList::writefile(), and pos::PixelAliasList::writefile().

148  {
149 
150  PixelConfigList& configs=getConfig();
151 
152  PixelVersionAlias anAlias(path, version, alias);
153  getAlias().insertVersionAlias(anAlias);
154  getAlias().updateConfigAlias(path,version,alias,configs);
155  getAlias().writefile();
156  configs.writefile();
157  }
static PixelAliasList & getAlias()
void updateConfigAlias(std::string path, unsigned int version, std::string alias, PixelConfigList &config)
void insertVersionAlias(PixelVersionAlias &anAlias)
static PixelConfigList & getConfig()
static PixelConfigList& pos::PixelConfigFile::configList ( )
inlinestatic

Definition at line 100 of file PixelConfigFile.h.

References getConfig().

Referenced by configurationDataExists(), and get().

100  {
101  static PixelConfigList theConfigList=getConfig();
102  return theConfigList;
103  }
static PixelConfigList & getConfig()
template<class T >
static bool pos::PixelConfigFile::configurationDataExists ( T *&  data,
std::string  path,
PixelConfigKey  key 
)
inlinestatic

Definition at line 500 of file PixelConfigFile.h.

References newFWLiteAna::base, configList(), gather_cfg::cout, data, DEBUG_CF_, dir, createBeamHaloJobs::directory, edm::false, convertXMLtoSQLite_cfg::fileName, recoMuon::in, pos::PixelConfigKey::key(), prof2calltree::last, mergeVDriftHistosByStation::name, findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, funct::true, and BeamSplash_cfg::version.

500  {
501 
502  std::string mthn = "]\t[pos::PixelConfigFile::configurationDataExists()]\t " ;
503 /* pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigFile::ConfigurationDataExists") ; */
504  unsigned int theKey=key.key();
505 
506 
507  assert(theKey<=configList().size());
508 
509 
510  unsigned int last=path.find_last_of("/");
511  assert(last!=std::string::npos);
512 
513  std::string base=path.substr(0,last);
514  std::string ext=path.substr(last+1);
515 
516  unsigned int slashpos=base.find_last_of("/");
517  if (slashpos==std::string::npos) {
518  std::cout << __LINE__ << mthn << "Asking for data of type:" << typeid(data).name() <<std::endl;
519  std::cout << __LINE__ << mthn << "On path:" << path <<std::endl;
520  std::cout << __LINE__ << mthn << "Recall that you need a trailing /" <<std::endl;
521  ::abort();
522  }
523 
524  std::string dir=base.substr(slashpos+1);
525 /* timer->stopTimer() ; */
526 // std::cout << __LINE__ << mthn << "Extracted dir:" << dir <<std::endl;
527 // std::cout << __LINE__ << mthn << "Extracted base:" << base <<std::endl;
528 // std::cout << __LINE__ << mthn << "Extracted ext :" << ext <<std::endl;
529 
530  unsigned int version;
531  int err=configList()[theKey].find(dir,version);
532  // assert(err==0);
533  if(0!=err)
534  {
535  data= 0;
536  return false ;
537  }
538 /* timer->stopTimer() ; */
539 /* delete timer ; */
540 
541  std::ostringstream s1;
542  s1 << version;
543  std::string strversion=s1.str();
544 
545  static std::string directory;
546  directory=getenv("PIXELCONFIGURATIONBASE");
547 
548  std::string fullpath=directory+"/"+dir+"/"+strversion+"/";
549 
550  //std::cout << __LINE__ << mthn << "Directory for configuration data:"<<fullpath<<std::endl;
551 
553  if (typeid(data)==typeid(PixelTrimBase*)){
554  fileName = fullpath+"ROC_Trims_module_"+ext+".dat" ;
555  }else if (typeid(data)==typeid(PixelMaskBase*)){
556  fileName = fullpath+"ROC_Masks_module_"+ext+".dat";
557  }else if (typeid(data)==typeid(PixelDACSettings*)){
558  fileName = fullpath+"ROC_DAC_module_"+ext+".dat";
559  }else if (typeid(data)==typeid(PixelTBMSettings*)){
560  fileName = fullpath+"TBM_module_"+ext+".dat";
561  }else if (typeid(data)==typeid(PixelDetectorConfig*)){
562  fileName = fullpath+"detectconfig.dat";
563  }else if (typeid(data)==typeid(PixelLowVoltageMap*)){
564  fileName = fullpath+"lowvoltagemap.dat";
565  }else if (typeid(data)==typeid(PixelMaxVsf*)){
566  fileName = fullpath+"maxvsf.dat";
567  }else if (typeid(data)==typeid(PixelNameTranslation*)){
568  fileName = fullpath+"translation.dat";
569  }else if (typeid(data)==typeid(PixelFEDCard*)){
570  fileName = fullpath+"params_fed_"+ext+".dat";
571  }else if (typeid(data)==typeid(PixelTKFECConfig*)){
572  fileName = fullpath+"tkfecconfig.dat";
573  }else if (typeid(data)==typeid(PixelFECConfig*)){
574  fileName = fullpath+"fecconfig.dat";
575  }else if (typeid(data)==typeid(PixelFEDConfig*)){
576  fileName = fullpath+"fedconfig.dat";
577  }else if (typeid(data)==typeid(PixelPortCardConfig*)){
578  fileName = fullpath+"portcard_"+ext+".dat";
579  }else if (typeid(data)==typeid(PixelPortcardMap*)){
580  fileName = fullpath+"portcardmap.dat";
581  }else if (typeid(data)==typeid(PixelDelay25Calib*)){
582  fileName = fullpath+"delay25.dat";
583  }else if (typeid(data)==typeid(PixelTTCciConfig*)){
584  fileName = fullpath+"TTCciConfiguration.txt";
585  }else if (typeid(data)==typeid(PixelLTCConfig*)){
586  fileName = fullpath+"LTCConfiguration.txt";
587  }else if (typeid(data)==typeid(PixelGlobalDelay25*)){
588  fileName = fullpath+"globaldelay25.dat";
589  }else if (typeid(data)==typeid(PixelCalibBase*)){
590  assert(dir=="calib");
591  std::string calibfile=fullpath+"calib.dat";
592  std::ifstream calibin(calibfile.c_str());
593  if(calibin.good())
594  {
595  std::cout << __LINE__ << mthn << "Found " << calibfile << std::endl ;
596  return true ;
597  }else{
598  calibfile=fullpath+"delay25.dat";
599  std::ifstream delayin(calibfile.c_str());
600  if(delayin.good())
601  {
602  std::cout << __LINE__ << mthn << "Found " << calibfile << std::endl ;
603  return true ;
604  }else{
605  calibfile=fullpath+"fedtestdac.dat";
606  std::ifstream delayin(calibfile.c_str());
607  if(delayin.good())
608  {
609  std::cout << __LINE__ << mthn << "Found " << calibfile << std::endl ;
610  return true ;
611  }else{
612  std::cout << mthn << "Can't find calibration file calib.dat or delay25.dat or fedtestdac.dat" << std::endl;
613  return false ;
614  }
615  }
616  }
617  }else{
618  std::cout << __LINE__ << mthn << "No match of class type" << std::endl;
619  return false ;
620  }
621  /*
622  struct stat * tmp = NULL ;
623  if(stat(fileName.c_str(), tmp)==0)
624  {
625  std::cout << mthn << "Found(stat) " << fileName << std::endl ;
626  return true ;
627  }
628  else
629  {
630  std::cout << mthn << "Not found(stat) " << fileName << std::endl ;
631  return false ;
632  }
633  */
634  std::ifstream in(fileName.c_str());
635  if (!in.good())
636  {
637  std::cout << __LINE__ << mthn << "Not found " << fileName << std::endl ;
638  return false ;
639  }
640  in.close() ;
641  if( DEBUG_CF_ ) std::cout << __LINE__ << mthn << "Found " << fileName << std::endl ;
642  return true ;
643 
644  }
tuple base
Main Program
Definition: newFWLiteAna.py:92
static PixelConfigList & configList()
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
list key
Definition: combine.py:13
#define DEBUG_CF_
tuple cout
Definition: gather_cfg.py:121
dbl *** dir
Definition: mlp_gen.cc:35
volatile std::atomic< bool > shutdown_flag false
tuple size
Write out results.
static void pos::PixelConfigFile::forceAliasesReload ( bool  m)
inlinestatic

Definition at line 254 of file PixelConfigFile.h.

References getForceAliasesReload(), and m.

Referenced by getAlias(), and getForceAliasesReload().

254  {
255  if(getForceAliasesReload() != m){
257  }
258  }
static bool & getForceAliasesReload()
static void pos::PixelConfigFile::forceConfigReload ( bool  m)
inlinestatic

Definition at line 260 of file PixelConfigFile.h.

References getForceConfigReload(), and m.

Referenced by getConfig(), and getForceConfigReload().

260  {
261  if(getForceConfigReload() != m){
263  }
264  }
static bool & getForceConfigReload()
template<class T >
static void pos::PixelConfigFile::get ( T *&  data,
std::string  path,
PixelConfigKey  key 
)
inlinestatic

Definition at line 317 of file PixelConfigFile.h.

References newFWLiteAna::base, configList(), gather_cfg::cout, data, dir, createBeamHaloJobs::directory, alignCSCRings::e, cppFunctionSkipper::exception, getConfig(), combine::key, prof2calltree::last, mergeVDriftHistosByStation::name, getHLTPrescaleColumns::path, findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, and BeamSplash_cfg::version.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

317  {
318  unsigned int theKey=key.key();
319 
320  if (theKey>=configList().size()){
321  configList()=getConfig();
322  }
323 
324  assert(theKey<=configList().size());
325 
326  unsigned int last=path.find_last_of("/");
327  assert(last!=std::string::npos);
328 
329  std::string base=path.substr(0,last);
330  std::string ext=path.substr(last+1);
331 
332  unsigned int slashpos=base.find_last_of("/");
333  if (slashpos==std::string::npos) {
334  std::cout << "[pos::PixelConfigFile::get()]\t\t\tAsking for data of type:"<<typeid(data).name()<<std::endl;
335  std::cout << "[pos::PixelConfigFile::get()]\t\t\tOn path:" <<path <<std::endl;
336  std::cout << "[pos::PixelConfigFile::get()]\t\t\tRecall that you need a trailing /" <<std::endl;
337  ::abort();
338  }
339 
340  std::string dir=base.substr(slashpos+1);
341 
342 // std::cout << "[pos::PixelConfigFile::get()]\t\t\tExtracted dir:" <<dir <<std::endl;
343 // std::cout << "[pos::PixelConfigFile::get()]\t\t\tExtracted base:"<<base<<std::endl;
344 // std::cout << "[pos::PixelConfigFile::get()]\t\t\tExtracted ext :"<<ext <<std::endl;
345 
346  unsigned int version;
347  int err=configList()[theKey].find(dir,version);
348  // assert(err==0);
349  if(0!=err)
350  {
351  std::cout<<"[PixelConfigFile.h::get] error loading config list. "<<theKey<<" "<<dir<<" "<<version<<std::endl;
352  data= 0;
353  return;
354  }
355 
356  std::ostringstream s1;
357  s1 << version;
358  std::string strversion=s1.str();
359 
360  static std::string directory;
361  directory=getenv("PIXELCONFIGURATIONBASE");
362 
363  std::string fullpath=directory+"/"+dir+"/"+strversion+"/";
364 
365  //std::cout << "Directory for configuration data:"<<fullpath<<std::endl;
366 
367  try {
368 
369  if (typeid(data)==typeid(PixelTrimBase*)){
370  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelTrimBase" << std::endl;
371  assert(dir=="trim");
372  data = (T*) new PixelTrimAllPixels(fullpath+"ROC_Trims_module_"+ext+".dat");
373  return;
374  }else if (typeid(data)==typeid(PixelMaskBase*)){
375  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelMaskBase" << std::endl;
376  assert(dir=="mask");
377  data = (T*) new PixelMaskAllPixels(fullpath+"ROC_Masks_module_"+ext+".dat");
378  return;
379  }else if (typeid(data)==typeid(PixelDACSettings*)){
380  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelDACSettings" << std::endl;
381  assert(dir=="dac");
382  data = (T*) new PixelDACSettings(fullpath+"ROC_DAC_module_"+ext+".dat");
383  return;
384  }else if (typeid(data)==typeid(PixelTBMSettings*)){
385  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelTBMSettings" << std::endl;
386  assert(dir=="tbm");
387  data = (T*) new PixelTBMSettings(fullpath+"TBM_module_"+ext+".dat");
388  return;
389  }else if (typeid(data)==typeid(PixelDetectorConfig*)){
390  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelDetectorConfig" << std::endl;
391  assert(dir=="detconfig");
392  data = (T*) new PixelDetectorConfig(fullpath+"detectconfig.dat");
393  return;
394  }else if (typeid(data)==typeid(PixelLowVoltageMap*)){
395  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill fetch PixelLowVoltageMap" << std::endl;
396  assert(dir=="lowvoltagemap");
397  data = (T*) new PixelLowVoltageMap(fullpath+"lowvoltagemap.dat");
398  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill return the PixelLowVoltageMap" << std::endl;
399  return;
400  }else if (typeid(data)==typeid(PixelMaxVsf*)){
401  //std::cout << "Will fetch PixelMaxVsf" << std::endl;
402  assert(dir=="maxvsf");
403  data = (T*) new PixelMaxVsf(fullpath+"maxvsf.dat");
404  //std::cout << "Will return the PixelMaxVsf" << std::endl;
405  return;
406  }else if (typeid(data)==typeid(PixelNameTranslation*)){
407  //std::cout << __LINE__ << "]\t[pos::PixelConfigFile::get()]\t\t\t Will return PixelNameTranslation*" << std::endl;
408  assert(dir=="nametranslation");
409  data = (T*) new PixelNameTranslation(fullpath+"translation.dat");
410  return;
411  }else if (typeid(data)==typeid(PixelFEDCard*)){
412  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelFEDCard" << std::endl;
413  assert(dir=="fedcard");
414  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill open:"<<fullpath+"params_fed_"+ext+".dat"<< std::endl;
415  data = (T*) new PixelFEDCard(fullpath+"params_fed_"+ext+".dat");
416  return;
417  }else if (typeid(data)==typeid(PixelCalibBase*)){
418  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelCalibBase" << std::endl;
419  assert(dir=="calib");
420  std::string calibfile=fullpath+"calib.dat";
421  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tLooking for file " << calibfile << std::endl;
422  std::ifstream calibin(calibfile.c_str());
423  if(calibin.good()){
424  data = (T*) new PixelCalibConfiguration(calibfile);
425  }else{
426  calibfile=fullpath+"delay25.dat";
427  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tNow looking for file " << calibfile << std::endl;
428  std::ifstream delayin(calibfile.c_str());
429  if(delayin.good()){
430  data = (T*) new PixelDelay25Calib(calibfile);
431  }else{
432  calibfile=fullpath+"fedtestdac.dat";
433  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tNow looking for file " << calibfile << std::endl;
434  std::ifstream delayin(calibfile.c_str());
435  if(delayin.good()){
436  data = (T*) new PixelFEDTestDAC(calibfile);
437  }else{
438  throw std::runtime_error("[pos::PixelConfigFile::get()]\t\t\tCan't find calibration file calib.dat or delay25.dat or fedtestdac.dat");
439  }
440  }
441  }
442  return;
443  }else if (typeid(data)==typeid(PixelTKFECConfig*)){
444  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelTKFECConfig" << std::endl;
445  assert(dir=="tkfecconfig");
446  data = (T*) new PixelTKFECConfig(fullpath+"tkfecconfig.dat");
447  return;
448  }else if (typeid(data)==typeid(PixelFECConfig*)){
449  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelFECConfig" << std::endl;
450  assert(dir=="fecconfig");
451  data = (T*) new PixelFECConfig(fullpath+"fecconfig.dat");
452  return;
453  }else if (typeid(data)==typeid(PixelFEDConfig*)){
454  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelFEDConfig" << std::endl;
455  assert(dir=="fedconfig");
456  data = (T*) new PixelFEDConfig(fullpath+"fedconfig.dat");
457  return;
458  }else if (typeid(data)==typeid(PixelPortCardConfig*)){
459  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelPortCardConfig" << std::endl;
460  assert(dir=="portcard");
461  data = (T*) new PixelPortCardConfig(fullpath+"portcard_"+ext+".dat");
462  return;
463  }else if (typeid(data)==typeid(PixelPortcardMap*)){
464  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelPortcardMap" << std::endl;
465  assert(dir=="portcardmap");
466  data = (T*) new PixelPortcardMap(fullpath+"portcardmap.dat");
467  return;
468  }else if (typeid(data)==typeid(PixelDelay25Calib*)){
469  //cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelDelay25Calib" << std::endl;
470  assert(dir=="portcard");
471  data = (T*) new PixelDelay25Calib(fullpath+"delay25.dat");
472  return;
473  }else if (typeid(data)==typeid(PixelTTCciConfig*)){
474  //cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelTTCciConfig" << std::endl;
475  assert(dir=="ttcciconfig");
476  data = (T*) new PixelTTCciConfig(fullpath+"TTCciConfiguration.txt");
477  return;
478  }else if (typeid(data)==typeid(PixelLTCConfig*)){
479  //cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelLTCConfig" << std::endl;
480  assert(dir=="ltcconfig");
481  data = (T*) new PixelLTCConfig(fullpath+"LTCConfiguration.txt");
482  return;
483  }else if (typeid(data)==typeid(PixelGlobalDelay25*)){
484  //std::cout << "[pos::PixelConfigFile::get()]\t\t\tWill return PixelGlobalDelay25" << std::endl;
485  assert(dir=="globaldelay25");
486  data = (T*) new PixelGlobalDelay25(fullpath+"globaldelay25.dat");
487  return;
488  }else{
489  std::cout << "[pos::PixelConfigFile::get()]\t\t\tNo match" << std::endl;
490  assert(0);
491  }
492  } catch (std::exception & e) {
493  std::cout<<"[PixelConfigFile::get] Caught exception while constructing configuration object. Will rethrow."<<std::endl;
494  throw;
495  }
496  }
tuple base
Main Program
Definition: newFWLiteAna.py:92
static PixelConfigList & configList()
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
list key
Definition: combine.py:13
tuple cout
Definition: gather_cfg.py:121
dbl *** dir
Definition: mlp_gen.cc:35
long double T
tuple size
Write out results.
static PixelConfigList & getConfig()
template<class T >
static void pos::PixelConfigFile::get ( T *&  data,
std::string  path,
unsigned int  version 
)
inlinestatic

Definition at line 650 of file PixelConfigFile.h.

References newFWLiteAna::base, gather_cfg::cout, data, dir, createBeamHaloJobs::directory, prof2calltree::last, getHLTPrescaleColumns::path, AlCaHLTBitMon_QueryRunRegistry::string, and BeamSplash_cfg::version.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

650  {
651 
652  std::string mthn = "]\t[pos::PixelConfigFile::get()]\t\t\t\t " ;
653 
654  unsigned int last=path.find_last_of("/");
655  assert(last!=std::string::npos);
656 
657  std::string base=path.substr(0,last);
658  std::string ext=path.substr(last+1);
659 
660  unsigned int slashpos=base.find_last_of("/");
661  //if (slashpos==std::string::npos) {
662  //std::cout << __LINE__ << mthn << "Asking for data of type:" << typeid(data).name() << std::endl;
663  //std::cout << __LINE__ << mthn << "On path:" << path << std::endl;
664  //std::cout << __LINE__ << mthn << "Recall that you need a trailing /" << std::endl;
665  //::abort();
666  //}
667 
668  std::string dir=base.substr(slashpos+1);
669 
670  //std::cout << __LINE__ << mthn << "Extracted dir :" << dir <<std::endl;
671  //std::cout << __LINE__ << mthn << "Extracted base:" << base <<std::endl;
672  //std::cout << __LINE__ << mthn << "Extracted ext :" << ext <<std::endl;
673 
674  std::ostringstream s1;
675  s1 << version;
676  std::string strversion=s1.str();
677 
678  static std::string directory;
679  directory=getenv("PIXELCONFIGURATIONBASE");
680 
681  std::string fullpath=directory+"/"+dir+"/"+strversion+"/";
682 
683  //std::cout << __LINE__ << mthn << "Directory for configuration data:"<<fullpath<<std::endl;
684 
685  if (typeid(data)==typeid(PixelTrimBase*)){
686  //std::cout << __LINE__ << mthn << "Will return PixelTrimBase" << std::endl;
687  assert(dir=="trim");
688  data = (T*) new PixelTrimAllPixels(fullpath+"ROC_Trims_module_"+ext+".dat");
689  return;
690  }else if (typeid(data)==typeid(PixelMaskBase*)){
691  //std::cout << __LINE__ << mthn << "Will return PixelMaskBase" << std::endl;
692  assert(dir=="mask");
693  data = (T*) new PixelMaskAllPixels(fullpath+"ROC_Masks_module_"+ext+".dat");
694  return;
695  }else if (typeid(data)==typeid(PixelDACSettings*)){
696  //std::cout << __LINE__ << mthn << "Will return PixelDACSettings" << std::endl;
697  assert(dir=="dac");
698  data = (T*) new PixelDACSettings(fullpath+"ROC_DAC_module_"+ext+".dat");
699  return;
700  }else if (typeid(data)==typeid(PixelTBMSettings*)){
701  //std::cout << __LINE__ << mthn << "Will return PixelTBMSettings" << std::endl;
702  assert(dir=="tbm");
703  data = (T*) new PixelTBMSettings(fullpath+"TBM_module_"+ext+".dat");
704  return;
705  }else if (typeid(data)==typeid(PixelDetectorConfig*)){
706  //std::cout << __LINE__ << mthn << "Will return PixelDACSettings" << std::endl;
707  assert(dir=="detconfig");
708  data = (T*) new PixelDetectorConfig(fullpath+"detectconfig.dat");
709  return;
710  }else if (typeid(data)==typeid(PixelLowVoltageMap*)){
711  //std::cout << __LINE__ << mthn << "Will fetch1 PixelLowVoltageMap" << std::endl;
712  assert(dir=="lowvoltagemap");
713  data = (T*) new PixelLowVoltageMap(fullpath+"detectconfig.dat");
714  //std::cout << __LINE__ << mthn << "Will return1 the PixelLowVoltageMap" << std::endl;
715  return;
716  }else if (typeid(data)==typeid(PixelMaxVsf*)){
717  //std::cout << __LINE__ << mthn << "Will fetch1 PixelMaxVsf" << std::endl;
718  assert(dir=="maxvsf");
719  data = (T*) new PixelMaxVsf(fullpath+"maxvsf.dat");
720  //std::cout << __LINE__ << mthn << "Will return1 the PixelMaxVsf" << std::endl;
721  return;
722  }else if (typeid(data)==typeid(PixelNameTranslation*)){
723  //std::cout << __LINE__ << mthn << "Will return PixelNameTranslation" << std::endl;
724  assert(dir=="nametranslation");
725  data = (T*) new PixelNameTranslation(fullpath+"translation.dat");
726  return;
727  }else if (typeid(data)==typeid(PixelFEDCard*)){
728  //std::cout << __LINE__ << mthn << "Will return PixelFEDCard" << std::endl;
729  assert(dir=="fedcard");
730  //std::cout << __LINE__ << mthn << "Will open:"<<fullpath+"params_fed_"+ext+".dat"<< std::endl;
731  data = (T*) new PixelFEDCard(fullpath+"params_fed_"+ext+".dat");
732  return;
733  }else if (typeid(data)==typeid(PixelCalibBase*)) {
734  //std::cout << __LINE__ << mthn << "Will return PixelCalibBase" << std::endl;
735  assert(base=="calib");
736  std::string calibfile=fullpath+"calib.dat";
737  //std::cout << mthn << "Looking for file " << calibfile << std::endl;
738  std::ifstream calibin(calibfile.c_str());
739  if(calibin.good()){
740  data = (T*) new PixelCalibConfiguration(calibfile);
741  }else{
742  calibfile=fullpath+"delay25.dat";
743  //std::cout << __LINE__ << mthn << "Now looking for file " << calibfile << std::endl;
744  std::ifstream delayin(calibfile.c_str());
745  if(delayin.good()){
746  data = (T*) new PixelDelay25Calib(calibfile);
747  }else{
748  calibfile=fullpath+"fedtestdac.dat";
749  //std::cout << __LINE__ << mthn << "Now looking for file " << calibfile << std::endl;
750  std::ifstream delayin(calibfile.c_str());
751  if(delayin.good()){
752  data = (T*) new PixelFEDTestDAC(calibfile);
753  }else{
754  std::cout << __LINE__ << mthn << "Can't find calibration file calib.dat or delay25.dat or fedtestdac.dat" << std::endl;
755  data=0;
756  }
757  }
758  }
759  return;
760  }else if (typeid(data)==typeid(PixelTKFECConfig*)){
761  //std::cout << __LINE__ << mthn << "Will return PixelTKFECConfig" << std::endl;
762  assert(dir=="tkfecconfig");
763  data = (T*) new PixelTKFECConfig(fullpath+"tkfecconfig.dat");
764  return;
765  }else if (typeid(data)==typeid(PixelFECConfig*)){
766  //std::cout << __LINE__ << mthn << "Will return PixelFECConfig" << std::endl;
767  assert(dir=="fecconfig");
768  data = (T*) new PixelFECConfig(fullpath+"fecconfig.dat");
769  return;
770  }else if (typeid(data)==typeid(PixelFEDConfig*)){
771  //std::cout << __LINE__ << mthn << "Will return PixelFEDConfig" << std::endl;
772  assert(dir=="fedconfig");
773  data = (T*) new PixelFEDConfig(fullpath+"fedconfig.dat");
774  return;
775  }else if (typeid(data)==typeid(PixelPortCardConfig*)){
776  //std::cout << __LINE__ << mthn << "Will return PixelPortCardConfig" << std::endl;
777  assert(dir=="portcard");
778  data = (T*) new PixelPortCardConfig(fullpath+"portcard_"+ext+".dat");
779  return;
780  }else if (typeid(data)==typeid(PixelPortcardMap*)){
781  //std::cout << __LINE__ << mthn << "Will return PixelPortcardMap" << std::endl;
782  assert(dir=="portcardmap");
783  data = (T*) new PixelPortcardMap(fullpath+"portcardmap.dat");
784  return;
785  }else if (typeid(data)==typeid(PixelDelay25Calib*)){
786  //cout << __LINE__ << mthn << "Will return PixelDelay25Calib" << std::endl;
787  assert(dir=="portcard");
788  data = (T*) new PixelDelay25Calib(fullpath+"delay25.dat");
789  return;
790  }else if (typeid(data)==typeid(PixelTTCciConfig*)){
791  //cout << __LINE__ << mthn << "Will return PixelTTCciConfig" << std::endl;
792  assert(dir=="ttcciconfig");
793  data = (T*) new PixelTTCciConfig(fullpath+"TTCciConfiguration.txt");
794  return;
795  }else if (typeid(data)==typeid(PixelLTCConfig*)){
796  //cout << __LINE__ << mthn << "Will return PixelLTCConfig" << std::endl;
797  assert(dir=="ltcconfig");
798  data = (T*) new PixelLTCConfig(fullpath+"LTCConfiguration.txt");
799  return;
800  }else if (typeid(data)==typeid(PixelGlobalDelay25*)){
801  //std::cout << __LINE__ << mthn << "Will return PixelGlobalDelay25" << std::endl;
802  assert(dir=="globaldelay25");
803  data = (T*) new PixelGlobalDelay25(fullpath+"globaldelay25.dat");
804  return;
805  }else{
806  std::cout << __LINE__ << mthn << "No class match" << std::endl;
807  assert(0);
808  data=0;
809  return;
810  }
811 
812  }
tuple base
Main Program
Definition: newFWLiteAna.py:92
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple cout
Definition: gather_cfg.py:121
dbl *** dir
Definition: mlp_gen.cc:35
long double T
template<class T >
static void pos::PixelConfigFile::get ( std::map< std::string, T * > &  pixelObjects,
PixelConfigKey  key 
)
inlinestatic

Definition at line 815 of file PixelConfigFile.h.

References combine::key.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

815  {
816 
817  typename std::map<std::string, T* >::iterator iObject=pixelObjects.begin();
818 
819  for(;iObject!=pixelObjects.end();++iObject){
820  get(iObject->second,iObject->first,key);
821  }
822 
823  }
list key
Definition: combine.py:13
static PixelAliasList& pos::PixelConfigFile::getAlias ( )
inlinestatic

Definition at line 228 of file PixelConfigFile.h.

References autoCond::aliases, createBeamHaloJobs::directory, lut2db_cfg::filename, first, forceAliasesReload(), getForceAliasesReload(), pos::PixelAliasList::readfile(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by addAlias(), addVersionAlias(), getAliases(), getAliases_map(), getConfigAliases(), getVersion(), getVersionAliases(), and getVersionData().

228  {
229 
230  static std::string directory;
231  static int first=1;
232 
233  static PixelAliasList aliases;
234 
235  directory=getenv("PIXELCONFIGURATIONBASE");
236  std::string filename=directory+"/aliases.txt";
237 
238  if (first) {
239  first=0;
240  aliases.readfile(filename);
241 
242  forceAliasesReload(false) ;
243  } else {
244  if( getForceAliasesReload() ) {
245  aliases.readfile(filename);
246  forceAliasesReload(false) ;
247  }
248  }
249 
250  return aliases;
251 
252  }
dictionary aliases
Definition: autoCond.py:23
static bool & getForceAliasesReload()
static void forceAliasesReload(bool m)
bool first
Definition: L1TdeRCT.cc:79
tuple filename
Definition: lut2db_cfg.py:20
static std::vector<std::pair<std::string, unsigned int> > pos::PixelConfigFile::getAliases ( )
inlinestatic

Definition at line 63 of file PixelConfigFile.h.

References autoCond::aliases, getAlias(), i, pos::PixelAliasList::key(), pos::PixelAliasList::nAliases(), pos::PixelAliasList::name(), and tmp.

63  {
64  PixelAliasList& aliases=getAlias();
65  std::vector<std::pair<std::string, unsigned int> > tmp;
66  for(unsigned int i=0;i<aliases.nAliases();i++){
67  std::pair<std::string, unsigned int> apair(aliases.name(i),aliases.key(i));
68  tmp.push_back(apair);
69  }
70  return tmp;
71  }
dictionary aliases
Definition: autoCond.py:23
int i
Definition: DBlmapReader.cc:9
static PixelAliasList & getAlias()
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
static std::map<std::string, unsigned int> pos::PixelConfigFile::getAliases_map ( )
inlinestatic

Definition at line 90 of file PixelConfigFile.h.

References autoCond::aliases, getAlias(), i, pos::PixelAliasList::key(), pos::PixelAliasList::nAliases(), pos::PixelAliasList::name(), and tmp.

90  {
91  PixelAliasList& aliases=getAlias();
92  std::map<std::string, unsigned int> tmp;
93  for(unsigned int i=0;i<aliases.nAliases();i++){
94  tmp.insert(make_pair(aliases.name(i), aliases.key(i)));
95  }
96  return tmp;
97  }
dictionary aliases
Definition: autoCond.py:23
int i
Definition: DBlmapReader.cc:9
static PixelAliasList & getAlias()
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
static PixelConfigList& pos::PixelConfigFile::getConfig ( )
inlinestatic

Definition at line 177 of file PixelConfigFile.h.

References electronStore::configs, counter, gather_cfg::cout, createBeamHaloJobs::directory, lut2db_cfg::filename, first, forceConfigReload(), pos::PixelConfigList::readfile(), pos::PixelConfigList::reload(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by addVersionAlias(), configList(), get(), getPath(), getVersions(), and makeKey().

177  {
178 
179  static PixelConfigList configs;
180 
181  //FIXME
182 
183  static int counter=0;
184 
185  if(counter!=0)
186  {
187  while(counter!=0)
188  {
189  std::cout << __LINE__ << "]\t[PixelConfigFile::getConfig()]\t\t\t\t Waiting for other thread to complete reading"<<std::endl;
190  ::sleep(1);
191  }
192  return configs;
193  }
194 
195  counter++;
196 
197  static std::string directory;
198  static int first=1;
199 
200  directory=getenv("PIXELCONFIGURATIONBASE");
201  std::string filename=directory+"/configurations.txt";
202 /* Don't know who put this snippet of code here: this case is already contemplated in the 'else' of the 'if' statement below
203  if(!first)
204  {
205  configs.reload(filename)
206  }
207 */
208  if (first)
209  {
210  first=0;
211  configs.readfile(filename);
212  forceConfigReload(false) ;
213  }
214  else
215  {
216  // if( getForceConfigReload() ) {
217  configs.reload(filename);
218  forceConfigReload(false) ;
219  // }
220  }
221 
222  counter--;
223 
224  return configs;
225 
226  }
bool first
Definition: L1TdeRCT.cc:79
static std::atomic< unsigned int > counter
tuple filename
Definition: lut2db_cfg.py:20
tuple cout
Definition: gather_cfg.py:121
static void forceConfigReload(bool m)
static std::vector<pathAliasPair> pos::PixelConfigFile::getConfigAliases ( std::string  path)
inlinestatic

Definition at line 118 of file PixelConfigFile.h.

References getAlias(), and pos::PixelAliasList::getConfigAliases().

118  {
119  return getAlias().getConfigAliases(path) ;
120  }
static PixelAliasList & getAlias()
std::vector< pathAliasPair > getConfigAliases(std::string path)
static bool& pos::PixelConfigFile::getForceAliasesReload ( )
inlinestaticprivate

Definition at line 875 of file PixelConfigFile.h.

References forceAliasesReload().

Referenced by forceAliasesReload(), and getAlias().

875  {
876  static bool forceAliasesReload = false;
877  return forceAliasesReload;
878  }
static void forceAliasesReload(bool m)
static bool& pos::PixelConfigFile::getForceConfigReload ( )
inlinestaticprivate

Definition at line 879 of file PixelConfigFile.h.

References forceConfigReload().

Referenced by forceConfigReload().

879  {
880  static bool forceConfigReload = false;
881  return forceConfigReload;
882  }
static void forceConfigReload(bool m)
static std::string pos::PixelConfigFile::getPath ( std::string  path,
PixelConfigKey  key 
)
inlinestatic

Definition at line 267 of file PixelConfigFile.h.

References newFWLiteAna::base, gather_cfg::cout, dir, createBeamHaloJobs::directory, getConfig(), pos::PixelConfigKey::key(), prof2calltree::last, findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, and BeamSplash_cfg::version.

267  {
268 
269  unsigned int theKey=key.key();
270 
271  assert(theKey<=getConfig().size());
272 
273  unsigned int last=path.find_last_of("/");
274  assert(last!=std::string::npos);
275 
276  std::string base=path.substr(0,last);
277  std::string ext=path.substr(last+1);
278 
279  unsigned int slashpos=base.find_last_of("/");
280  if (slashpos==std::string::npos) {
281  std::cout << "[pos::PixelConfigFile::getPath()]\t\t\tOn path:" <<path <<std::endl;
282  std::cout << "[pos::PixelConfigFile::getPath()]\t\t\tRecall that you need a trailing /" <<std::endl;
283  ::abort();
284  }
285 
286  std::string dir=base.substr(slashpos+1);
287 
288 // std::cout << "[pos::PixelConfigFile::get()]\t\t\tExtracted dir:" <<dir <<std::endl;
289 // std::cout << "[pos::PixelConfigFile::get()]\t\t\tExtracted base:"<<base<<std::endl;
290 // std::cout << "[pos::PixelConfigFile::get()]\t\t\tExtracted ext :"<<ext <<std::endl;
291 
292  unsigned int version;
293  int err=getConfig()[theKey].find(dir,version);
294  // assert(err==0);
295  if(0!=err)
296  {
297  return "";
298  }
299 
300  std::ostringstream s1;
301  s1 << version;
302  std::string strversion=s1.str();
303 
304  static std::string directory;
305  directory=getenv("PIXELCONFIGURATIONBASE");
306 
307  std::string fullpath=directory+"/"+dir+"/"+strversion+"/";
308 
309  return fullpath;
310  }
tuple base
Main Program
Definition: newFWLiteAna.py:92
list key
Definition: combine.py:13
tuple cout
Definition: gather_cfg.py:121
dbl *** dir
Definition: mlp_gen.cc:35
tuple size
Write out results.
static PixelConfigList & getConfig()
static unsigned int pos::PixelConfigFile::getVersion ( std::string  path,
std::string  alias 
)
inlinestatic

Definition at line 106 of file PixelConfigFile.h.

References getAlias(), and pos::PixelAliasList::getVersion().

106  {
107  return getAlias().getVersion(path,alias);
108  }
unsigned int getVersion(std::string path, std::string alias)
static PixelAliasList & getAlias()
static std::vector<std::string> pos::PixelConfigFile::getVersionAliases ( std::string  path)
inlinestatic

Definition at line 73 of file PixelConfigFile.h.

References getAlias(), and pos::PixelAliasList::getVersionAliases().

73  {
75  }
static PixelAliasList & getAlias()
std::vector< std::string > getVersionAliases(std::string path)
static bool pos::PixelConfigFile::getVersionAliases ( std::string  configAlias,
unsigned int &  key,
std::vector< std::pair< std::string, std::string > > &  versionAliases 
)
inlinestatic

Definition at line 77 of file PixelConfigFile.h.

References getAlias(), pos::PixelConfigAlias::key(), pos::PixelConfigAlias::versionAliases(), and pos::PixelAliasList::versionAliases().

79  {
80  PixelConfigAlias* alias=getAlias().versionAliases(configAlias);
81  if (alias==0) {
82  return false;
83  }
84  key=alias->key();
85  versionAliases=alias->versionAliases();
86  return true;
87  }
static PixelAliasList & getAlias()
PixelConfigAlias * versionAliases(std::string aliasName)
list key
Definition: combine.py:13
static pos::pathVersionAliasMmap pos::PixelConfigFile::getVersionData ( )
inlinestatic

Definition at line 111 of file PixelConfigFile.h.

References getAlias(), and pos::PixelAliasList::getVersionData().

111  {
112  return getAlias().getVersionData();
113  }
pathVersionAliasMmap getVersionData()
static PixelAliasList & getAlias()
static pos::pathVersionAliasMmap pos::PixelConfigFile::getVersionData ( std::string  koc)
inlinestatic

Definition at line 114 of file PixelConfigFile.h.

References getAlias(), and pos::PixelAliasList::getVersionData().

114  {
115  return getAlias().getVersionData(koc);
116  }
pathVersionAliasMmap getVersionData()
static PixelAliasList & getAlias()
static std::vector< std::pair< std::string, unsigned int> > pos::PixelConfigFile::getVersions ( pos::PixelConfigKey  key)
inlinestatic

Definition at line 140 of file PixelConfigFile.h.

References electronStore::configs, getConfig(), pos::PixelConfigKey::key(), and pos::PixelConfig::versions().

140  {
141 
142  static PixelConfigList& configs=getConfig();
143  PixelConfig& theConfig=configs[key.key()];
144  return theConfig.versions();
145 
146  }
unsigned int key()
static PixelConfigList & getConfig()
static unsigned int pos::PixelConfigFile::makeKey ( std::vector< std::pair< std::string, unsigned int > >  versions)
inlinestatic

Definition at line 159 of file PixelConfigFile.h.

References pos::PixelConfig::add(), pos::PixelConfigList::add(), HDQMDatabaseProducer::config, electronStore::configs, first, getConfig(), i, edm::second(), and pos::PixelConfigList::writefile().

159  {
160 
161  PixelConfig config;
162 
163  for(unsigned int i=0;i<versions.size();i++){
164  config.add(versions[i].first,versions[i].second);
165  }
166 
167  PixelConfigList& configs=getConfig();
168 
169  unsigned int newkey=configs.add(config);
170 
171  configs.writefile();
172 
173  return newkey;
174 
175  }
int i
Definition: DBlmapReader.cc:9
U second(std::pair< T, U > const &p)
bool first
Definition: L1TdeRCT.cc:79
static PixelConfigList & getConfig()
static int pos::PixelConfigFile::makeNewVersion ( std::string  path,
std::string &  dir 
)
inlinestatic

Definition at line 826 of file PixelConfigFile.h.

References gather_cfg::cout, createBeamHaloJobs::directory, getHLTPrescaleColumns::path, AlCaHLTBitMon_QueryRunRegistry::string, and BeamSplash_cfg::version.

Referenced by put().

826  {
827  //std::cout << "[pos::PixelConfigFile::makeNewVersion()]\t\tInserting data on path:"<<path<<std::endl;
828  struct stat stbuf;
829  std::string directory=getenv("PIXELCONFIGURATIONBASE");
830  directory+="/";
831  directory+=path;
832  if (stat(directory.c_str(),&stbuf)!=0){
833 
834  std::cout << "[pos::PixelConfigFile::makeNewVersion()]\t\tThe path:"<<path<<" does not exist."<<std::endl;
835  std::cout << "[pos::PixelConfigFile::makeNewVersion()]\t\tFull path:"<<directory<<std::endl;
836  return -1;
837  }
838  directory+="/";
839  int version=-1;
840  do{
841  version++;
842  std::ostringstream s1;
843  s1 << version ;
844  std::string strversion=s1.str();
845  dir=directory+strversion;
846  //std::cout << "[pos::PixelConfigFile::makeNewVersion()]\t\tWill check for version:"<<dir<<std::endl;
847  }while(stat(dir.c_str(),&stbuf)==0);
848  //std::cout << "[pos::PixelConfigFile::makeNewVersion()]\t\tThe new version is:"<<version<<std::endl;
849  mkdir(dir.c_str(),0777);
850  return version;
851  }
tuple cout
Definition: gather_cfg.py:121
dbl *** dir
Definition: mlp_gen.cc:35
template<class T >
static int pos::PixelConfigFile::put ( const T object,
std::string  path 
)
inlinestatic

Definition at line 855 of file PixelConfigFile.h.

References dir, makeNewVersion(), AlCaHLTBitMon_QueryRunRegistry::string, and BeamSplash_cfg::version.

855  {
857  int version=makeNewVersion(path,dir);
858  object->writeASCII(dir);
859  return version;
860  }
static int makeNewVersion(std::string path, std::string &dir)
dbl *** dir
Definition: mlp_gen.cc:35
template<class T >
static int pos::PixelConfigFile::put ( std::vector< T * >  objects,
std::string  path 
)
inlinestatic

Definition at line 863 of file PixelConfigFile.h.

References gather_cfg::cout, dir, i, makeNewVersion(), AlCaHLTBitMon_QueryRunRegistry::string, and BeamSplash_cfg::version.

863  {
864  std::cout << "[pos::PixelConfigFile::put()]\t\t# of objects to write: "<< objects.size() << std::endl;
866  int version=makeNewVersion(path,dir);
867  for(unsigned int i=0;i<objects.size();i++){
868  // std::cout << "[pos::PixelConfigFile::put()]\t\t\t\t\tWill write i="<<i<<" ptr: "<<objects[i]<<std::endl;
869  objects[i]->writeASCII(dir);
870  }
871  return version;
872  }
int i
Definition: DBlmapReader.cc:9
static int makeNewVersion(std::string path, std::string &dir)
tuple cout
Definition: gather_cfg.py:121
dbl *** dir
Definition: mlp_gen.cc:35