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 47 of file EcalTPGWeightIdMapHandler.h.

Constructor & Destructor Documentation

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

Definition at line 24 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.

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

Definition at line 44 of file EcalTPGWeightIdMapHandler.cc.

44  {
45 }

Member Function Documentation

void popcon::EcalTPGWeightIdMapHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< EcalTPGWeightIdMap >.

Definition at line 48 of file EcalTPGWeightIdMapHandler.cc.

References writedatasetfile::dataset, MillePedeFileConverter_cfg::e, econn, cppFunctionSkipper::exception, Exception, 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, 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().

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

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

Referenced by getNewObjects().

349  {
350  //-------------------------------------------------------------
351 
352  m_i_tag="";
353  m_i_version=0;
354  m_i_run_number=0;
355  m_i_weightIdMap=0;
356 
357  FILE *inpFile; // input file
358  inpFile = fopen(inputFile,"r");
359  if(!inpFile) {
360  edm::LogError("EcalTPGWeightIdMapHandler")<<"*** Can not open file: "<<inputFile;
361  return;
362  }
363 
364  char line[256];
365 
366  std::ostringstream str;
367 
368  fgets(line,255,inpFile);
369  m_i_tag=to_string(line);
370  str << "gen tag " << m_i_tag << std::endl ; // should I use this?
371 
372  fgets(line,255,inpFile);
373  m_i_version=atoi(line);
374  str << "version= " << m_i_version << std::endl ;
375 
376  fgets(line,255,inpFile);
377  m_i_run_number=atoi(line);
378  str << "run_number= " << m_i_run_number << std::endl ;
379 
380  fgets(line,255,inpFile);
381  m_i_weightIdMap=atoi(line);
382  str << "weightIdMap_config= " << m_i_weightIdMap << std::endl ;
383 
384 
385  fclose(inpFile); // close inp. file
386 
387 }
#define str(s)
void popcon::EcalTPGWeightIdMapHandler::readtxtFile ( )

Definition at line 260 of file EcalTPGWeightIdMapHandler.cc.

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

Referenced by getNewObjects().

260  {
261  edm::LogInfo(" reading the input file ") << m_file_name;
262  std::ifstream fInput;
263  fInput.open(m_file_name);
264  if(!fInput.is_open()) {
265  edm::LogInfo("ERROR : cannot open file ") << m_file_name;
266  exit (1);
267  }
268  unsigned int wloc[5];
269  EcalTPGWeights w;
270  EcalTPGWeightIdMap* weightMap = new EcalTPGWeightIdMap;
271  int igroups = 0;
273  while (!fInput.eof()) {
274  getline (fInput, line);
275  if(!line.empty()) {
276  std::stringstream ss;
277  ss << line;
278  ss >> wloc[0] >> wloc[1] >> wloc[2] >> wloc[3] >> wloc[4];
279  // edm::LogInfo(" Weights: ") << wloc[0] << " " << wloc[1] << " " << wloc[2] << " " << wloc[3] << " " << wloc[4];
280  w.setValues(wloc[0], wloc[1], wloc[2], wloc[3], wloc[4]);
281  weightMap->setValue(igroups, w);
282  igroups++;
283  }
284  }
285  edm::LogInfo("EcalTPGWeightIdMapHandler") << "found " << igroups << " Weight groups";
286  try{
287  Time_t snc= (Time_t) m_firstRun;
288  m_to_transfer.push_back(std::make_pair((EcalTPGWeightIdMap*)weightMap, snc));
289  } catch (std::exception &e) {
290  edm::LogInfo("EcalTPGWeightIdMapHandler::readtxtFile error : ") << e.what();
291  }
292 }
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)
void popcon::EcalTPGWeightIdMapHandler::readxmlFile ( )

Definition at line 294 of file EcalTPGWeightIdMapHandler.cc.

References MillePedeFileConverter_cfg::e, cppFunctionSkipper::exception, cmsRelvalreport::exit, runEdmFileComparison::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().

294  {
295  edm::LogInfo(" reading the input file ") << m_file_name;
296  std::ifstream fxml;
297  fxml.open(m_file_name);
298  if(!fxml.is_open()) {
299  edm::LogInfo("ERROR : cannot open file ") << m_file_name;
300  exit (1);
301  }
302  std::string dummyLine, bid;
303  unsigned int wloc[5];
304  EcalTPGWeights w;
305  EcalTPGWeightIdMap* weightMap = new EcalTPGWeightIdMap;
306  int ngroups, igroups;
307  edm::LogInfo("EcalTPGWeightIdMapHandler") << "found " << igroups << "Weight groups";
308  for(int i = 0; i < 5; i++) std::getline(fxml, dummyLine); // skip first lines
309  // get the Weight group number
310  fxml >> bid;
311  std::string stt = bid.substr(7, 1);
312  std::istringstream sc(stt);
313  sc >> ngroups;
314  edm::LogInfo("EcalTPGWeightIdMapHandler") << "found " << ngroups << " Weight groups";
315  for(int i = 0; i < 2; i++) std::getline(fxml, dummyLine); // <item_version>0</item_version>
316  for(int i = 0; i < ngroups; i++) {
317  std::getline(fxml, dummyLine); // <item
318  // edm::LogInfo(" group ") << i << " first line " << dummyLine;
319  fxml >> bid; // <first
320  std::size_t found = bid.find("</");
321  stt = bid.substr(7, found - 7);
322  std::istringstream sg1(stt);
323  sg1 >> igroups;
324  if(igroups != i) {
325  edm::LogInfo(" group ") << i << ": " << bid << " igroups " << igroups;
326  exit(-1);
327  }
328  for(int i = 0; i < 2; i++) std::getline(fxml, dummyLine); // < second
329  for(int i = 0; i < 5; i++) {
330  fxml >> bid;
331  found = bid.find("</");
332  stt = bid.substr(5, found - 5);
333  std::istringstream w(stt);
334  w >> wloc[i];
335  }
336  w.setValues(wloc[0], wloc[1], wloc[2], wloc[3], wloc[4]);
337  weightMap->setValue(igroups, w);
338  for(int i = 0; i < 3; i++) std::getline(fxml, dummyLine); // </item>
339  // edm::LogInfo(" group ") << i << " last line " << dummyLine;
340  }
341  try{
342  Time_t snc= (Time_t) m_firstRun;
343  m_to_transfer.push_back(std::make_pair((EcalTPGWeightIdMap*)weightMap, snc));
344  } catch (std::exception &e) {
345  edm::LogInfo("EcalTPGWeightIdMapHandler::readxmlFile error : ") << e.what();
346  }
347 }
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)
std::string popcon::EcalTPGWeightIdMapHandler::to_string ( char  value[])
inlineprivate

Definition at line 65 of file EcalTPGWeightIdMapHandler.h.

References relativeConstraints::value.

Referenced by readFromFile().

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

Definition at line 389 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().

389  {
390  //-------------------------------------------------------------
391 
392 
393  std::ofstream myfile;
394  myfile.open (inputFile);
395  myfile << m_i_tag <<std::endl;
396  myfile << m_i_version <<std::endl;
397  myfile << m_i_run_number <<std::endl;
398  myfile << m_i_weightIdMap <<std::endl;
399 
400  myfile.close();
401 
402 }

Member Data Documentation

EcalCondDBInterface* popcon::EcalTPGWeightIdMapHandler::econn

Definition at line 62 of file EcalTPGWeightIdMapHandler.h.

Referenced by getNewObjects().

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

Definition at line 87 of file EcalTPGWeightIdMapHandler.h.

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

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

Definition at line 86 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 77 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), and getNewObjects().

unsigned int popcon::EcalTPGWeightIdMapHandler::m_i_run_number
private

Definition at line 89 of file EcalTPGWeightIdMapHandler.h.

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

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

Definition at line 85 of file EcalTPGWeightIdMapHandler.h.

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

int popcon::EcalTPGWeightIdMapHandler::m_i_version
private

Definition at line 88 of file EcalTPGWeightIdMapHandler.h.

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

int popcon::EcalTPGWeightIdMapHandler::m_i_weightIdMap
private

Definition at line 90 of file EcalTPGWeightIdMapHandler.h.

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

unsigned int popcon::EcalTPGWeightIdMapHandler::m_lastRun
private

Definition at line 74 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), and getNewObjects().

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

Definition at line 76 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), and getNewObjects().

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

Definition at line 81 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler().

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

Definition at line 82 of file EcalTPGWeightIdMapHandler.h.

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

Definition at line 80 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), and getNewObjects().

unsigned int popcon::EcalTPGWeightIdMapHandler::m_runnr
private

Definition at line 83 of file EcalTPGWeightIdMapHandler.h.

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

Definition at line 84 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), and getNewObjects().

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

Definition at line 78 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), and getNewObjects().

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

Definition at line 79 of file EcalTPGWeightIdMapHandler.h.

Referenced by EcalTPGWeightIdMapHandler(), and getNewObjects().

const EcalTPGWeightIdMap* popcon::EcalTPGWeightIdMapHandler::myweightIdMap
private

Definition at line 71 of file EcalTPGWeightIdMapHandler.h.