CMS 3D CMS Logo

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 60 of file PixelConfigFile.h.

Member Function Documentation

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

Definition at line 124 of file PixelConfigFile.h.

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

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

Definition at line 131 of file PixelConfigFile.h.

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

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

Definition at line 149 of file PixelConfigFile.h.

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

149  {
150 
151  PixelConfigList& configs=getConfig();
152 
153  PixelVersionAlias anAlias(path, version, alias);
154  getAlias().insertVersionAlias(anAlias);
156  getAlias().writefile();
157  configs.writefile();
158  }
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 101 of file PixelConfigFile.h.

References getConfig().

Referenced by configurationDataExists(), and get().

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

Definition at line 501 of file PixelConfigFile.h.

References runEdmFileComparison::base, configList(), gather_cfg::cout, data, DEBUG_CF_, dir, createBeamHaloJobs::directory, funct::false, MillePedeFileConverter_cfg::fileName, recoMuon::in, pos::PixelConfigKey::key(), plotBeamSpotDB::last, dataset::name, findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, funct::true, and jets_cff::version.

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

Definition at line 255 of file PixelConfigFile.h.

References getForceAliasesReload(), and funct::m.

Referenced by getAlias(), and getForceAliasesReload().

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

Definition at line 261 of file PixelConfigFile.h.

References getForceConfigReload(), and funct::m.

Referenced by getConfig(), and getForceConfigReload().

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

Definition at line 318 of file PixelConfigFile.h.

References runEdmFileComparison::base, configList(), gather_cfg::cout, data, dir, createBeamHaloJobs::directory, MillePedeFileConverter_cfg::e, cppFunctionSkipper::exception, getConfig(), crabWrapper::key, plotBeamSpotDB::last, dataset::name, findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, and jets_cff::version.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), data_sources.json_list::as_dicts(), data_sources.json_list::as_table(), rrapi.RRApi::columns(), util.rrapi.RRApi::columns(), util.rrapi.RRApi::count(), rrapi.RRApi::count(), util.rrapi.RRApi::data(), rrapi.RRApi::data(), data_sources.json_list::first(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), data_sources.json_list::indices(), data_sources.json_list::last(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

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

Definition at line 651 of file PixelConfigFile.h.

References runEdmFileComparison::base, gather_cfg::cout, dir, createBeamHaloJobs::directory, plotBeamSpotDB::last, AlCaHLTBitMon_QueryRunRegistry::string, and jets_cff::version.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), data_sources.json_list::as_dicts(), data_sources.json_list::as_table(), rrapi.RRApi::columns(), util.rrapi.RRApi::columns(), util.rrapi.RRApi::count(), rrapi.RRApi::count(), util.rrapi.RRApi::data(), rrapi.RRApi::data(), data_sources.json_list::first(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), data_sources.json_list::indices(), data_sources.json_list::last(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

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

Definition at line 229 of file PixelConfigFile.h.

References createBeamHaloJobs::directory, corrVsCorr::filename, plotBeamSpotDB::first, forceAliasesReload(), getForceAliasesReload(), pos::PixelAliasList::readfile(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

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

Definition at line 64 of file PixelConfigFile.h.

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

64  {
65  PixelAliasList& aliases=getAlias();
66  std::vector<std::pair<std::string, unsigned int> > tmp;
67  for(unsigned int i=0;i<aliases.nAliases();i++){
68  std::pair<std::string, unsigned int> apair(aliases.name(i),aliases.key(i));
69  tmp.push_back(apair);
70  }
71  return tmp;
72  }
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 91 of file PixelConfigFile.h.

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

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

Definition at line 178 of file PixelConfigFile.h.

References cmsPerfCommons::configs, gather_cfg::cout, createBeamHaloJobs::directory, corrVsCorr::filename, plotBeamSpotDB::first, forceConfigReload(), pos::PixelConfigList::readfile(), pos::PixelConfigList::reload(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

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

Definition at line 119 of file PixelConfigFile.h.

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

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

Definition at line 876 of file PixelConfigFile.h.

References forceAliasesReload().

Referenced by forceAliasesReload(), and getAlias().

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

Definition at line 880 of file PixelConfigFile.h.

References forceConfigReload().

Referenced by forceConfigReload().

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

Definition at line 268 of file PixelConfigFile.h.

References runEdmFileComparison::base, gather_cfg::cout, dir, createBeamHaloJobs::directory, getConfig(), pos::PixelConfigKey::key(), plotBeamSpotDB::last, findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, and jets_cff::version.

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

Definition at line 107 of file PixelConfigFile.h.

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

107  {
108  return getAlias().getVersion(path,alias);
109  }
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 74 of file PixelConfigFile.h.

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

74  {
76  }
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 78 of file PixelConfigFile.h.

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

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

Definition at line 112 of file PixelConfigFile.h.

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

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

Definition at line 115 of file PixelConfigFile.h.

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

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

Definition at line 141 of file PixelConfigFile.h.

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

141  {
142 
143  static PixelConfigList& configs=getConfig();
144  PixelConfig& theConfig=configs[key.key()];
145  return theConfig.versions();
146 
147  }
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 160 of file PixelConfigFile.h.

References pos::PixelConfig::add(), pos::PixelConfigList::add(), looper::config, cmsPerfCommons::configs, plotBeamSpotDB::first, getConfig(), mps_fire::i, edm::second(), and pos::PixelConfigList::writefile().

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

Definition at line 827 of file PixelConfigFile.h.

References gather_cfg::cout, createBeamHaloJobs::directory, eostools::mkdir(), callgraph::path, trackingPlots::stat, AlCaHLTBitMon_QueryRunRegistry::string, and jets_cff::version.

Referenced by put().

827  {
828  //std::cout << "[pos::PixelConfigFile::makeNewVersion()]\t\tInserting data on path:"<<path<<std::endl;
829  struct stat stbuf;
830  std::string directory=getenv("PIXELCONFIGURATIONBASE");
831  directory+="/";
832  directory+=path;
833  if (stat(directory.c_str(),&stbuf)!=0){
834 
835  std::cout << "[pos::PixelConfigFile::makeNewVersion()]\t\tThe path:"<<path<<" does not exist."<<std::endl;
836  std::cout << "[pos::PixelConfigFile::makeNewVersion()]\t\tFull path:"<<directory<<std::endl;
837  return -1;
838  }
839  directory+="/";
840  int version=-1;
841  do{
842  version++;
843  std::ostringstream s1;
844  s1 << version ;
845  std::string strversion=s1.str();
846  dir=directory+strversion;
847  //std::cout << "[pos::PixelConfigFile::makeNewVersion()]\t\tWill check for version:"<<dir<<std::endl;
848  }while(stat(dir.c_str(),&stbuf)==0);
849  //std::cout << "[pos::PixelConfigFile::makeNewVersion()]\t\tThe new version is:"<<version<<std::endl;
850  mkdir(dir.c_str(),0777);
851  return version;
852  }
def mkdir(path)
Definition: eostools.py:250
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 856 of file PixelConfigFile.h.

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

856  {
858  int version=makeNewVersion(path,dir);
859  object->writeASCII(dir);
860  return version;
861  }
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 864 of file PixelConfigFile.h.

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

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