CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
pos::PixelConfig Class Reference

This class implements.. More...

#include "interface/PixelConfig.h"

Public Member Functions

void add (std::string dir, unsigned int version)
 
int find (std::string dir, unsigned int &version)
 
int update (std::string dir, unsigned int &version, unsigned int newversion)
 
std::vector< std::pair< std::string, unsigned int > > versions ()
 
void write (std::ofstream &out)
 

Private Attributes

std::vector< std::pair< std::string, unsigned int > > versions_
 

Detailed Description

This class implements..

A longer explanation will be placed here later

Definition at line 20 of file PixelConfig.h.

Member Function Documentation

◆ add()

void pos::PixelConfig::add ( std::string  dir,
unsigned int  version 
)
inline

Definition at line 30 of file PixelConfig.h.

30  {
31  std::pair<std::string,unsigned int> aPair(dir,version);
32  versions_.push_back(aPair);
33  }

References DeadROC_duringRun::dir, BeamSplash_cfg::version, and versions_.

Referenced by pos::PixelConfigList::readfile(), counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

◆ find()

int pos::PixelConfig::find ( std::string  dir,
unsigned int &  version 
)
inline

Definition at line 35 of file PixelConfig.h.

35  {
36 // std::cout << "[pos::PixelConfig::find()] versions_.size() = " << versions_.size() << std::endl ;
37  for(unsigned int i=0;i<versions_.size();i++){
38 // std::cout << "Looking :"<<versions_[i].first
39 // <<" "<<versions_[i].second<<std::endl;
40  if (versions_[i].first==dir) {
41  version=versions_[i].second;
42  return 0;
43  }
44  }
45  return -1;
46  }

References DeadROC_duringRun::dir, first, mps_fire::i, BeamSplash_cfg::version, and versions_.

Referenced by BeautifulSoup.Tag::__getattr__(), and BeautifulSoup.Tag::firstText().

◆ update()

int pos::PixelConfig::update ( std::string  dir,
unsigned int &  version,
unsigned int  newversion 
)
inline

Definition at line 49 of file PixelConfig.h.

49  {
50  for(unsigned int i=0;i<versions_.size();i++){
51  //std::cout << "Looking :"<<versions_[i].first
52  // <<" "<<versions_[i].second<<std::endl;
53  if (versions_[i].first==dir) {
54  version=versions_[i].second;
55  versions_[i].second=newversion;
56  return 0;
57  }
58  }
59  return -1;
60  }

References DeadROC_duringRun::dir, first, mps_fire::i, BeamSplash_cfg::version, and versions_.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), pos::PixelConfigList::clone(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

◆ versions()

std::vector<std::pair<std::string,unsigned int> > pos::PixelConfig::versions ( )
inline

Definition at line 62 of file PixelConfig.h.

62  {
63  return versions_;
64  }

References versions_.

Referenced by pos::PixelConfigFile::getVersions().

◆ write()

void pos::PixelConfig::write ( std::ofstream &  out)
inline

Definition at line 24 of file PixelConfig.h.

24  {
25  for (unsigned int i=0;i<versions_.size();i++){
26  out << versions_[i].first<<" "<<versions_[i].second<<std::endl;
27  }
28  }

References mps_fire::i, MillePedeFileConverter_cfg::out, and versions_.

Referenced by pkg.AbstractPkg::generate(), and querying.connection::write_and_commit().

Member Data Documentation

◆ versions_

std::vector<std::pair<std::string,unsigned int> > pos::PixelConfig::versions_
private

Definition at line 68 of file PixelConfig.h.

Referenced by add(), find(), update(), versions(), and write().

mps_fire.i
i
Definition: mps_fire.py:428
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
pos::PixelConfig::versions_
std::vector< std::pair< std::string, unsigned int > > versions_
Definition: PixelConfig.h:68
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23