CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
popcon::EcalTPGWeightIdMapHandler Class Reference

#include <EcalTPGWeightIdMapHandler.h>

Inheritance diagram for popcon::EcalTPGWeightIdMapHandler:
popcon::PopConSourceHandler< EcalTPGWeightIdMap >

Public Member Functions

 EcalTPGWeightIdMapHandler (edm::ParameterSet const &)
 
void getNewObjects () override
 
std::string id () const override
 
void readFromFile (const char *inputFile)
 
void readtxtFile ()
 
void readxmlFile ()
 
void writeFile (const char *inputFile)
 
 ~EcalTPGWeightIdMapHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< EcalTPGWeightIdMap >
void convertFromOld ()
 
SummarydummySummary (typename OldContainer::value_type const &) const
 
void initialize (const cond::persistency::Session &dbSession, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry)
 
Ref lastPayload () const
 
cond::LogDBEntry_t const & logDBEntry () const
 
std::pair< Container const *, std::string const > operator() (const cond::persistency::Session &session, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry) const
 
 PopConSourceHandler ()
 
Container const & returnData ()
 
void sort ()
 
cond::TagInfo_t const & tagInfo () const
 
std::string const & userTextLog () const
 
virtual ~PopConSourceHandler ()
 

Public Attributes

EcalCondDBInterfaceeconn
 

Private Member Functions

std::string to_string (char value[])
 

Private Attributes

std::string m_file_name
 
std::string m_file_type
 
unsigned int m_firstRun
 
std::string m_gentag
 
unsigned int m_i_run_number
 
std::string m_i_tag
 
int m_i_version
 
int m_i_weightIdMap
 
unsigned int m_lastRun
 
std::string m_location
 
std::string m_locationsource
 
std::string m_name
 
std::string m_pass
 
unsigned int m_runnr
 
std::string m_runtype
 
std::string m_sid
 
std::string m_user
 
const EcalTPGWeightIdMapmyweightIdMap
 

Additional Inherited Members

- Public Types inherited from popcon::PopConSourceHandler< EcalTPGWeightIdMap >
typedef std::vector< Triplet > Container
 
typedef std::vector< std::pair< EcalTPGWeightIdMap *, cond::Time_t > > OldContainer
 
typedef PopConSourceHandler< EcalTPGWeightIdMapself
 
typedef cond::Summary Summary
 
typedef cond::Time_t Time_t
 
typedef EcalTPGWeightIdMap value_type
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< EcalTPGWeightIdMap >
int add (value_type *payload, Summary *summary, Time_t time)
 
cond::persistency::SessiondbSession () const
 
- Protected Attributes inherited from popcon::PopConSourceHandler< EcalTPGWeightIdMap >
OldContainer m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 44 of file EcalTPGWeightIdMapHandler.h.

Constructor & Destructor Documentation

popcon::EcalTPGWeightIdMapHandler::EcalTPGWeightIdMapHandler ( edm::ParameterSet const &  )

Definition at line 22 of file EcalTPGWeightIdMapHandler.cc.

References edm::ParameterSet::getParameter(), m_file_name, m_file_type, m_firstRun, m_gentag, m_lastRun, m_location, m_locationsource, m_pass, m_runtype, m_sid, m_user, and AlCaHLTBitMon_QueryRunRegistry::string.

23  : m_name(ps.getUntrackedParameter<std::string>("name", "EcalTPGWeightIdMapHandler")) {
24  edm::LogInfo("EcalTPGWeightIdMapHandler") << "EcalTPGWeightIdMap Source handler constructor";
25  m_firstRun = static_cast<unsigned int>(atoi(ps.getParameter<std::string>("firstRun").c_str()));
26  m_lastRun = static_cast<unsigned int>(atoi(ps.getParameter<std::string>("lastRun").c_str()));
27  m_sid = ps.getParameter<std::string>("OnlineDBSID");
28  m_user = ps.getParameter<std::string>("OnlineDBUser");
29  m_pass = ps.getParameter<std::string>("OnlineDBPassword");
30  m_locationsource = ps.getParameter<std::string>("LocationSource");
31  m_location = ps.getParameter<std::string>("Location");
32  m_gentag = ps.getParameter<std::string>("GenTag");
33  m_runtype = ps.getParameter<std::string>("RunType");
34  m_file_type = ps.getParameter<std::string>("fileType"); // xml/txt
35  m_file_name = ps.getParameter<std::string>("fileName");
36 
37  edm::LogInfo("EcalTPGWeightIdMapHandler") << m_sid << "/" << m_user << "/" << m_location << "/" << m_gentag;
38 }
popcon::EcalTPGWeightIdMapHandler::~EcalTPGWeightIdMapHandler ( )
override

Definition at line 40 of file EcalTPGWeightIdMapHandler.cc.

40 {}

Member Function Documentation

void popcon::EcalTPGWeightIdMapHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< EcalTPGWeightIdMap >.

Definition at line 42 of file EcalTPGWeightIdMapHandler.cc.

References writedatasetfile::dataset, MillePedeFileConverter_cfg::e, econn, cppFunctionSkipper::exception, Exception, EcalCondDBInterface::fetchConfigSet(), EcalCondDBInterface::fetchDataSet(), EcalCondDBInterface::fetchGlobalRunListByLocation(), RunTPGConfigDat::getConfigTag(), RunList::getRuns(), RunTPGConfigDat::getVersion(), FEConfigWeightGroupDat::getWeight0(), FEConfigWeightGroupDat::getWeight1(), FEConfigWeightGroupDat::getWeight2(), FEConfigWeightGroupDat::getWeight3(), FEConfigWeightGroupDat::getWeight4(), FEConfigWeightGroupDat::getWeightGroupId(), FEConfigMainInfo::getWeiId(), cond::TagInfo_t::lastInterval, popcon::PopConSourceHandler< EcalTPGWeightIdMap >::lastPayload(), m_file_type, m_firstRun, m_gentag, m_i_run_number, m_i_tag, m_i_version, m_i_weightIdMap, m_lastRun, m_location, m_pass, m_runtype, m_sid, popcon::PopConSourceHandler< EcalTPGWeightIdMap >::m_to_transfer, m_user, cond::TagInfo_t::name, EgHLTOffHistBins_cfi::nr, AlCaHLTBitMon_ParallelJobs::p, readFromFile(), readtxtFile(), readxmlFile(), IODConfig::setConfigTag(), RunTag::setGeneralTag(), FEConfigWeightInfo::setId(), LocationDef::setLocation(), RunTag::setLocationDef(), RunTypeDef::setRunType(), RunTag::setRunTypeDef(), EcalTPGWeightIdMap::setValue(), EcalTPGWeights::setValues(), FEConfigMainInfo::setVersion(), cond::TagInfo_t::size, findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, popcon::PopConSourceHandler< EcalTPGWeightIdMap >::tagInfo(), w, and writeFile().

42  {
43  if (m_file_type == "txt") {
44  readtxtFile();
45  } else if (m_file_type == "xml") {
46  readxmlFile();
47  } else {
48  edm::LogInfo("EcalTPGWeightIdMapHandler") << "Started GetNewObjects!!!";
49 
50  //check whats already inside of database
51  if (tagInfo().size) {
52  //check whats already inside of database
53  edm::LogInfo("got offlineInfo = ");
54  edm::LogInfo("tag name = ") << tagInfo().name;
55  edm::LogInfo("size = ") << tagInfo().size;
56  } else {
57  edm::LogInfo(" First object for this tag ");
58  }
59 
60  unsigned int max_since = 0;
61  max_since = static_cast<unsigned int>(tagInfo().lastInterval.first);
62  edm::LogInfo("EcalTPGWeightIdMapHandler") << "max_since : " << max_since;
63  Ref weightIdMap_db = lastPayload();
64 
65  edm::LogInfo("EcalTPGWeightIdMapHandler") << "retrieved last payload ";
66 
67  // here we retrieve all the runs after the last from online DB
68  edm::LogInfo("EcalTPGWeightIdMapHandler") << "Retrieving run list from ONLINE DB ... ";
69 
70  edm::LogInfo("EcalTPGWeightIdMapHandler") << "Making connection...";
72  edm::LogInfo("EcalTPGWeightIdMapHandler") << "Done.";
73 
74  if (!econn) {
75  edm::LogInfo(" connection parameters ") << m_sid << "/" << m_user;
76  // cerr << e.what() << std::endl;
77  throw cms::Exception("OMDS not available");
78  }
79 
80  LocationDef my_locdef;
81  my_locdef.setLocation(m_location);
82 
83  RunTypeDef my_rundef;
84  my_rundef.setRunType(m_runtype);
85 
86  RunTag my_runtag;
87  my_runtag.setLocationDef(my_locdef);
88  my_runtag.setRunTypeDef(my_rundef);
89  my_runtag.setGeneralTag(m_gentag);
90 
91  readFromFile("last_tpg_weightIdMap_settings.txt");
92 
93  unsigned int min_run = m_i_run_number + 1;
94 
95  if (m_firstRun < m_i_run_number) {
96  min_run = m_i_run_number + 1;
97  } else {
98  min_run = m_firstRun;
99  }
100 
101  if (min_run < max_since) {
102  min_run = max_since + 1; // we have to add 1 to the last transferred one
103  }
104 
105  edm::LogInfo("m_i_run_number") << m_i_run_number << "m_firstRun " << m_firstRun << "max_since " << max_since;
106 
107  unsigned int max_run = m_lastRun;
108  edm::LogInfo("EcalTPGWeightIdMapHandler") << "min_run= " << min_run << "max_run= " << max_run;
109 
110  RunList my_list;
111  my_list = econn->fetchGlobalRunListByLocation(my_runtag, min_run, max_run, my_locdef);
112  // my_list=econn->fetchRunListByLocation(my_runtag,min_run,max_run,my_locdef);
113 
114  std::vector<RunIOV> run_vec = my_list.getRuns();
115  size_t num_runs = run_vec.size();
116  edm::LogInfo("EcalTPGWeightIdMapHandler") << "number of Mon runs is : " << num_runs;
117 
118  unsigned int irun;
119  if (num_runs > 0) {
120  for (size_t kr = 0; kr < run_vec.size(); kr++) {
121  irun = static_cast<unsigned int>(run_vec[kr].getRunNumber());
122 
123  edm::LogInfo(" run= ") << irun;
124 
125  // retrieve the data :
126  std::map<EcalLogicID, RunTPGConfigDat> dataset;
127  econn->fetchDataSet(&dataset, &run_vec[kr]);
128 
129  std::string the_config_tag = "";
130  int the_config_version = 0;
131 
132  std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
133 
134  int nr = 0;
135  for (it = dataset.begin(); it != dataset.end(); it++) {
136  ++nr;
137  //EcalLogicID ecalid = it->first;
138  RunTPGConfigDat dat = it->second;
139  the_config_tag = dat.getConfigTag();
140  the_config_version = dat.getVersion();
141  }
142 
143  // it is all the same for all SM... get the last one
144 
145  edm::LogInfo(" run= ") << irun << " tag " << the_config_tag << " version=" << the_config_version;
146 
147  // here we should check if it is the same as previous run.
148 
149  if ((the_config_tag != m_i_tag || the_config_version != m_i_version) && nr > 0) {
150  edm::LogInfo("the tag is different from last transferred run ... retrieving last config set from DB");
151 
152  FEConfigMainInfo fe_main_info;
153  fe_main_info.setConfigTag(the_config_tag);
154  fe_main_info.setVersion(the_config_version);
155 
156  try {
157  econn->fetchConfigSet(&fe_main_info);
158 
159  // now get TPGWeightIdMap
160  int weightId = fe_main_info.getWeiId();
161 
162  if (weightId != m_i_weightIdMap) {
163  FEConfigWeightInfo fe_weight_info;
164  fe_weight_info.setId(weightId);
165  econn->fetchConfigSet(&fe_weight_info);
166  std::map<EcalLogicID, FEConfigWeightGroupDat> dataset_TpgWeight;
167  econn->fetchDataSet(&dataset_TpgWeight, &fe_weight_info);
168  edm::LogInfo("EcalTPGWeightIdMapHandler") << "Got object!";
169  EcalTPGWeightIdMap* weightMap = new EcalTPGWeightIdMap;
170  typedef std::map<EcalLogicID, FEConfigWeightGroupDat>::const_iterator CIfeweight;
171  EcalLogicID ecid_xt;
173 
174  int igroups = 0;
175  for (CIfeweight p = dataset_TpgWeight.begin(); p != dataset_TpgWeight.end(); p++) {
176  rd_w = p->second;
177  // EB and EE data
179  unsigned int weight0 = static_cast<unsigned int>(rd_w.getWeight4());
180  unsigned int weight1 = static_cast<unsigned int>(rd_w.getWeight3());
181  unsigned int weight2 = static_cast<unsigned int>(rd_w.getWeight2());
182  unsigned int weight3 = static_cast<unsigned int>(rd_w.getWeight1() - 0x80);
183  unsigned int weight4 = static_cast<unsigned int>(rd_w.getWeight0());
184 
185  w.setValues(weight0, weight1, weight2, weight3, weight4);
186  weightMap->setValue(rd_w.getWeightGroupId(), w);
187 
188  ++igroups;
189  }
190 
191  edm::LogInfo("EcalTPGWeightIdMapHandler") << "found " << igroups << "Weight groups";
192 
193  Time_t snc = (Time_t)irun;
194  m_to_transfer.push_back(std::make_pair((EcalTPGWeightIdMap*)weightMap, snc));
195 
196  m_i_run_number = irun;
197  m_i_tag = the_config_tag;
198  m_i_version = the_config_version;
199  m_i_weightIdMap = weightId;
200 
201  writeFile("last_tpg_weightIdMap_settings.txt");
202 
203  } else {
204  m_i_run_number = irun;
205  m_i_tag = the_config_tag;
206  m_i_version = the_config_version;
207 
208  writeFile("last_tpg_weightIdMap_settings.txt");
209 
210  edm::LogInfo(
211  " even if the tag/version is not the same, the weightIdMap id is the same -> no transfer needed ");
212  }
213 
214  } catch (std::exception& e) {
215  edm::LogInfo("ERROR: THIS CONFIG DOES NOT EXIST: tag=")
216  << the_config_tag << " version=" << the_config_version;
217  edm::LogInfo("error") << e.what();
218  m_i_run_number = irun;
219  }
220 
221  } else if (nr == 0) {
222  m_i_run_number = irun;
223  edm::LogInfo(" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor, no transfer needed ");
224  } else {
225  m_i_run_number = irun;
226  m_i_tag = the_config_tag;
227  m_i_version = the_config_version;
228  edm::LogInfo(" the tag/version is the same, no transfer needed ");
229  writeFile("last_tpg_weightIdMap_settings.txt");
230  }
231  }
232  }
233 
234  delete econn;
235  } // usual way
236  edm::LogInfo("EcalTPGWeightIdMapHandler") << "Ecal - > end of getNewObjects -----------";
237 }
size
Write out results.
void setRunTypeDef(const RunTypeDef &runTypeDef)
Definition: RunTag.cc:42
std::vector< RunIOV > getRuns()
Definition: RunList.cc:25
RunList fetchGlobalRunListByLocation(const RunTag &tag, int min_run, int max_run, const LocationDef &locDef) noexcept(false)
std::string getConfigTag() const
const double w
Definition: UKUtility.cc:23
int getVersion() const
Definition: RunTag.h:13
size_t size
Definition: Types.h:76
void fetchConfigSet(ICONF *iconf) noexcept(false)
void setVersion(int id)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
std::string name
Definition: Types.h:72
cond::ValidityInterval lastInterval
Definition: Types.h:74
int getWeiId() const
void setLocationDef(const LocationDef &locDef)
Definition: RunTag.cc:33
void setValue(const uint32_t &id, const EcalTPGWeights &value)
void setRunType(std::string runtype)
Definition: RunTypeDef.cc:21
void setConfigTag(std::string x)
Definition: IODConfig.h:29
void setLocation(std::string loc)
Definition: LocationDef.cc:20
void setGeneralTag(std::string tag)
Definition: RunTag.cc:24
void setValues(const uint32_t &w0, const uint32_t &w1, const uint32_t &w2, const uint32_t &w3, const uint32_t &w4)
std::string popcon::EcalTPGWeightIdMapHandler::id ( ) const
inlineoverridevirtual
void popcon::EcalTPGWeightIdMapHandler::readFromFile ( const char *  inputFile)

Definition at line 331 of file EcalTPGWeightIdMapHandler.cc.

References dtResolutionTest_cfi::inputFile, mps_splice::line, m_i_run_number, m_i_tag, m_i_version, m_i_weightIdMap, str, and to_string().

Referenced by getNewObjects().

331  {
332  //-------------------------------------------------------------
333 
334  m_i_tag = "";
335  m_i_version = 0;
336  m_i_run_number = 0;
337  m_i_weightIdMap = 0;
338 
339  FILE* inpFile; // input file
340  inpFile = fopen(inputFile, "r");
341  if (!inpFile) {
342  edm::LogError("EcalTPGWeightIdMapHandler") << "*** Can not open file: " << inputFile;
343  return;
344  }
345 
346  char line[256];
347 
348  std::ostringstream str;
349 
350  fgets(line, 255, inpFile);
351  m_i_tag = to_string(line);
352  str << "gen tag " << m_i_tag << std::endl; // should I use this?
353 
354  fgets(line, 255, inpFile);
355  m_i_version = atoi(line);
356  str << "version= " << m_i_version << std::endl;
357 
358  fgets(line, 255, inpFile);
359  m_i_run_number = atoi(line);
360  str << "run_number= " << m_i_run_number << std::endl;
361 
362  fgets(line, 255, inpFile);
363  m_i_weightIdMap = atoi(line);
364  str << "weightIdMap_config= " << m_i_weightIdMap << std::endl;
365 
366  fclose(inpFile); // close inp. file
367 }
#define str(s)
void popcon::EcalTPGWeightIdMapHandler::readtxtFile ( )

Definition at line 238 of file EcalTPGWeightIdMapHandler.cc.

References MillePedeFileConverter_cfg::e, cppFunctionSkipper::exception, beamvalidation::exit(), mps_splice::line, m_file_name, m_firstRun, popcon::PopConSourceHandler< EcalTPGWeightIdMap >::m_to_transfer, EcalTPGWeightIdMap::setValue(), EcalTPGWeights::setValues(), contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, and w.

Referenced by getNewObjects().

238  {
239  edm::LogInfo(" reading the input file ") << m_file_name;
240  std::ifstream fInput;
241  fInput.open(m_file_name);
242  if (!fInput.is_open()) {
243  edm::LogInfo("ERROR : cannot open file ") << m_file_name;
244  exit(1);
245  }
246  unsigned int wloc[5];
248  EcalTPGWeightIdMap* weightMap = new EcalTPGWeightIdMap;
249  int igroups = 0;
251  while (!fInput.eof()) {
252  getline(fInput, line);
253  if (!line.empty()) {
254  std::stringstream ss;
255  ss << line;
256  ss >> wloc[0] >> wloc[1] >> wloc[2] >> wloc[3] >> wloc[4];
257  // edm::LogInfo(" Weights: ") << wloc[0] << " " << wloc[1] << " " << wloc[2] << " " << wloc[3] << " " << wloc[4];
258  w.setValues(wloc[0], wloc[1], wloc[2], wloc[3], wloc[4]);
259  weightMap->setValue(igroups, w);
260  igroups++;
261  }
262  }
263  edm::LogInfo("EcalTPGWeightIdMapHandler") << "found " << igroups << " Weight groups";
264  try {
265  Time_t snc = (Time_t)m_firstRun;
266  m_to_transfer.push_back(std::make_pair((EcalTPGWeightIdMap*)weightMap, snc));
267  } catch (std::exception& e) {
268  edm::LogInfo("EcalTPGWeightIdMapHandler::readtxtFile error : ") << e.what();
269  }
270 }
const double w
Definition: UKUtility.cc:23
void setValue(const uint32_t &id, const EcalTPGWeights &value)
void setValues(const uint32_t &w0, const uint32_t &w1, const uint32_t &w2, const uint32_t &w3, const uint32_t &w4)
def exit(msg="")
void popcon::EcalTPGWeightIdMapHandler::readxmlFile ( )

Definition at line 272 of file EcalTPGWeightIdMapHandler.cc.

References MillePedeFileConverter_cfg::e, cppFunctionSkipper::exception, beamvalidation::exit(), newFWLiteAna::found, mps_fire::i, m_file_name, m_firstRun, popcon::PopConSourceHandler< EcalTPGWeightIdMap >::m_to_transfer, SimDataFormats::CaloAnalysis::sc, EcalTPGWeightIdMap::setValue(), EcalTPGWeights::setValues(), AlCaHLTBitMon_QueryRunRegistry::string, and w.

Referenced by getNewObjects().

272  {
273  edm::LogInfo(" reading the input file ") << m_file_name;
274  std::ifstream fxml;
275  fxml.open(m_file_name);
276  if (!fxml.is_open()) {
277  edm::LogInfo("ERROR : cannot open file ") << m_file_name;
278  exit(1);
279  }
280  std::string dummyLine, bid;
281  unsigned int wloc[5];
283  EcalTPGWeightIdMap* weightMap = new EcalTPGWeightIdMap;
284  int ngroups, igroups;
285  edm::LogInfo("EcalTPGWeightIdMapHandler") << "found " << igroups << "Weight groups";
286  for (int i = 0; i < 5; i++)
287  std::getline(fxml, dummyLine); // skip first lines
288  // get the Weight group number
289  fxml >> bid;
290  std::string stt = bid.substr(7, 1);
291  std::istringstream sc(stt);
292  sc >> ngroups;
293  edm::LogInfo("EcalTPGWeightIdMapHandler") << "found " << ngroups << " Weight groups";
294  for (int i = 0; i < 2; i++)
295  std::getline(fxml, dummyLine); // <item_version>0</item_version>
296  for (int i = 0; i < ngroups; i++) {
297  std::getline(fxml, dummyLine); // <item
298  // edm::LogInfo(" group ") << i << " first line " << dummyLine;
299  fxml >> bid; // <first
300  std::size_t found = bid.find("</");
301  stt = bid.substr(7, found - 7);
302  std::istringstream sg1(stt);
303  sg1 >> igroups;
304  if (igroups != i) {
305  edm::LogInfo(" group ") << i << ": " << bid << " igroups " << igroups;
306  exit(-1);
307  }
308  for (int i = 0; i < 2; i++)
309  std::getline(fxml, dummyLine); // < second
310  for (int i = 0; i < 5; i++) {
311  fxml >> bid;
312  found = bid.find("</");
313  stt = bid.substr(5, found - 5);
314  std::istringstream w(stt);
315  w >> wloc[i];
316  }
317  w.setValues(wloc[0], wloc[1], wloc[2], wloc[3], wloc[4]);
318  weightMap->setValue(igroups, w);
319  for (int i = 0; i < 3; i++)
320  std::getline(fxml, dummyLine); // </item>
321  // edm::LogInfo(" group ") << i << " last line " << dummyLine;
322  }
323  try {
324  Time_t snc = (Time_t)m_firstRun;
325  m_to_transfer.push_back(std::make_pair((EcalTPGWeightIdMap*)weightMap, snc));
326  } catch (std::exception& e) {
327  edm::LogInfo("EcalTPGWeightIdMapHandler::readxmlFile error : ") << e.what();
328  }
329 }
const double w
Definition: UKUtility.cc:23
void setValue(const uint32_t &id, const EcalTPGWeights &value)
void setValues(const uint32_t &w0, const uint32_t &w1, const uint32_t &w2, const uint32_t &w3, const uint32_t &w4)
def exit(msg="")
std::string popcon::EcalTPGWeightIdMapHandler::to_string ( char  value[])
inlineprivate

Definition at line 62 of file EcalTPGWeightIdMapHandler.h.

References relativeConstraints::value.

Referenced by readFromFile().

62  {
63  std::ostringstream streamOut;
64  streamOut << value;
65  return streamOut.str();
66  }
void popcon::EcalTPGWeightIdMapHandler::writeFile ( const char *  inputFile)

Definition at line 369 of file EcalTPGWeightIdMapHandler.cc.

References m_i_run_number, m_i_tag, m_i_version, and m_i_weightIdMap.

Referenced by getNewObjects(), and Vispa.Main.TabController.TabController::save().

369  {
370  //-------------------------------------------------------------
371 
372  std::ofstream myfile;
373  myfile.open(inputFile);
374  myfile << m_i_tag << std::endl;
375  myfile << m_i_version << std::endl;
376  myfile << m_i_run_number << std::endl;
377  myfile << m_i_weightIdMap << std::endl;
378 
379  myfile.close();
380 }

Member Data Documentation

EcalCondDBInterface* popcon::EcalTPGWeightIdMapHandler::econn

Definition at line 59 of file EcalTPGWeightIdMapHandler.h.

Referenced by getNewObjects().

std::string popcon::EcalTPGWeightIdMapHandler::m_file_name
private

Definition at line 84 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), readtxtFile(), and readxmlFile().

std::string popcon::EcalTPGWeightIdMapHandler::m_file_type
private

Definition at line 83 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), and getNewObjects().

unsigned int popcon::EcalTPGWeightIdMapHandler::m_firstRun
private
std::string popcon::EcalTPGWeightIdMapHandler::m_gentag
private

Definition at line 74 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), and getNewObjects().

unsigned int popcon::EcalTPGWeightIdMapHandler::m_i_run_number
private

Definition at line 86 of file EcalTPGWeightIdMapHandler.h.

Referenced by getNewObjects(), readFromFile(), and writeFile().

std::string popcon::EcalTPGWeightIdMapHandler::m_i_tag
private

Definition at line 82 of file EcalTPGWeightIdMapHandler.h.

Referenced by getNewObjects(), readFromFile(), and writeFile().

int popcon::EcalTPGWeightIdMapHandler::m_i_version
private

Definition at line 85 of file EcalTPGWeightIdMapHandler.h.

Referenced by getNewObjects(), readFromFile(), and writeFile().

int popcon::EcalTPGWeightIdMapHandler::m_i_weightIdMap
private

Definition at line 87 of file EcalTPGWeightIdMapHandler.h.

Referenced by getNewObjects(), readFromFile(), and writeFile().

unsigned int popcon::EcalTPGWeightIdMapHandler::m_lastRun
private

Definition at line 71 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), and getNewObjects().

std::string popcon::EcalTPGWeightIdMapHandler::m_location
private

Definition at line 73 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), and getNewObjects().

std::string popcon::EcalTPGWeightIdMapHandler::m_locationsource
private

Definition at line 78 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler().

std::string popcon::EcalTPGWeightIdMapHandler::m_name
private

Definition at line 79 of file EcalTPGWeightIdMapHandler.h.

std::string popcon::EcalTPGWeightIdMapHandler::m_pass
private

Definition at line 77 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), and getNewObjects().

unsigned int popcon::EcalTPGWeightIdMapHandler::m_runnr
private

Definition at line 80 of file EcalTPGWeightIdMapHandler.h.

std::string popcon::EcalTPGWeightIdMapHandler::m_runtype
private

Definition at line 81 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), and getNewObjects().

std::string popcon::EcalTPGWeightIdMapHandler::m_sid
private

Definition at line 75 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), and getNewObjects().

std::string popcon::EcalTPGWeightIdMapHandler::m_user
private

Definition at line 76 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), and getNewObjects().

const EcalTPGWeightIdMap* popcon::EcalTPGWeightIdMapHandler::myweightIdMap
private

Definition at line 68 of file EcalTPGWeightIdMapHandler.h.