CMS 3D CMS Logo

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

#include <EcalTPGWeightGroupHandler.h>

Inheritance diagram for popcon::EcalTPGWeightGroupHandler:
popcon::PopConSourceHandler< EcalTPGWeightGroup >

Public Member Functions

 EcalTPGWeightGroupHandler (edm::ParameterSet const &)
 
void getNewObjects () override
 
std::string id () const override
 
std::map< std::string, int > makeStripId ()
 
void readFromFile (const char *inputFile)
 
void readtxtFile ()
 
void readxmlFile ()
 
void writeFile (const char *inputFile)
 
 ~EcalTPGWeightGroupHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< EcalTPGWeightGroup >
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 ()
 
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::map< std::string, int > correspId
 
const EcalElectronicsMappingecalMapping_
 
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_weightGroup
 
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
 

Additional Inherited Members

- Public Types inherited from popcon::PopConSourceHandler< EcalTPGWeightGroup >
typedef std::map< Time_t, std::shared_ptr< EcalTPGWeightGroup > > Container
 
typedef std::unique_ptr< EcalTPGWeightGroupRef
 
typedef PopConSourceHandler< EcalTPGWeightGroupself
 
typedef cond::Time_t Time_t
 
typedef EcalTPGWeightGroup value_type
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< EcalTPGWeightGroup >
cond::persistency::SessiondbSession () const
 
- Protected Attributes inherited from popcon::PopConSourceHandler< EcalTPGWeightGroup >
Container m_iovs
 
std::vector< std::pair< EcalTPGWeightGroup *, Time_t > > m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 46 of file EcalTPGWeightGroupHandler.h.

Constructor & Destructor Documentation

◆ EcalTPGWeightGroupHandler()

popcon::EcalTPGWeightGroupHandler::EcalTPGWeightGroupHandler ( edm::ParameterSet const &  ps)

Definition at line 30 of file EcalTPGWeightGroupHandler.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.

31  : m_name(ps.getUntrackedParameter<std::string>("name", "EcalTPGWeightGroupHandler")) {
32  edm::LogInfo("EcalTPGWeightGroupHandler") << "EcalTPGWeightGroup Source handler constructor.";
33  m_firstRun = static_cast<unsigned int>(atoi(ps.getParameter<std::string>("firstRun").c_str()));
34  m_lastRun = static_cast<unsigned int>(atoi(ps.getParameter<std::string>("lastRun").c_str()));
35  m_sid = ps.getParameter<std::string>("OnlineDBSID");
36  m_user = ps.getParameter<std::string>("OnlineDBUser");
37  m_pass = ps.getParameter<std::string>("OnlineDBPassword");
38  m_locationsource = ps.getParameter<std::string>("LocationSource");
39  m_location = ps.getParameter<std::string>("Location");
40  m_gentag = ps.getParameter<std::string>("GenTag");
41  m_runtype = ps.getParameter<std::string>("RunType");
42  m_file_type = ps.getParameter<std::string>("fileType"); // xml/txt
43  m_file_name = ps.getParameter<std::string>("fileName");
44 
45  edm::LogInfo("EcalTPGWeightGroupHandler") << m_sid << "/" << m_user << "/" << m_location << "/" << m_gentag;
46 }
Log< level::Info, false > LogInfo

◆ ~EcalTPGWeightGroupHandler()

popcon::EcalTPGWeightGroupHandler::~EcalTPGWeightGroupHandler ( )
override

Definition at line 48 of file EcalTPGWeightGroupHandler.cc.

48 {}

Member Function Documentation

◆ getNewObjects()

void popcon::EcalTPGWeightGroupHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< EcalTPGWeightGroup >.

Definition at line 50 of file EcalTPGWeightGroupHandler.cc.

References writedatasetfile::dataset, MillePedeFileConverter_cfg::e, test_db_connect::econn, cppFunctionSkipper::exception, Exception, RunTPGConfigDat::getConfigTag(), EcalLogicID::getID1(), EcalLogicID::getID2(), EcalLogicID::getID3(), EcalLogicID::getName(), RunList::getRuns(), RunTPGConfigDat::getVersion(), FEConfigMainInfo::getWeiId(), globals_cff::id1, globals_cff::id2, genParticles_cff::map, test_db_connect::my_locdef, test_db_connect::my_rundef, EgHLTOffHistBins_cfi::nr, AlCaHLTBitMon_ParallelJobs::p, IODConfig::setConfigTag(), RunTag::setGeneralTag(), FEConfigWeightInfo::setId(), RunTag::setLocationDef(), RunTag::setRunTypeDef(), EcalTPGGroups::setValue(), FEConfigMainInfo::setVersion(), findQualityFiles::size, str, AlCaHLTBitMon_QueryRunRegistry::string, nano_mu_digi_cff::strip, and dumpRecoGeometry_cfg::tagInfo.

50  {
51  if (m_file_type == "txt") {
52  readtxtFile();
53  } else if (m_file_type == "xml") {
54  readxmlFile();
55  } else {
56  edm::LogInfo("EcalTPGWeightGroupHandler") << "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.since);
70  edm::LogInfo("EcalTPGWeightGroupHandler") << "max_since : " << max_since;
71 
72  edm::LogInfo("EcalTPGWeightGroupHandler") << "retrieved last payload ";
73 
74  // here we retrieve all the runs after the last from online DB
75 
76  edm::LogInfo("EcalTPGWeightGroupHandler") << "Retrieving run list from ONLINE DB ... ";
77 
78  edm::LogInfo("EcalTPGWeightGroupHandler") << "Making connection...";
80  edm::LogInfo("EcalTPGWeightGroupHandler") << "Done.";
81 
82  if (!econn) {
83  edm::LogInfo(" connection parameters ") << m_sid << "/" << m_user;
84  // cerr << e.what();
85  throw cms::Exception("OMDS not available");
86  }
87 
89  my_locdef.setLocation(m_location);
90 
92  my_rundef.setRunType(m_runtype);
93 
94  RunTag my_runtag;
95  my_runtag.setLocationDef(my_locdef);
96  my_runtag.setRunTypeDef(my_rundef);
97  my_runtag.setGeneralTag(m_gentag);
98 
99  readFromFile("last_tpg_weightGroup_settings.txt");
100 
101  unsigned int min_run;
102 
103  if (m_firstRun < m_i_run_number) {
104  min_run = m_i_run_number + 1;
105  } else {
106  min_run = m_firstRun;
107  }
108 
109  if (min_run < max_since) {
110  min_run = max_since + 1; // we have to add 1 to the last transferred one
111  }
112 
113  edm::LogInfo("m_i_run_number") << m_i_run_number << "m_firstRun " << m_firstRun << "max_since " << max_since;
114 
115  unsigned int max_run = m_lastRun;
116  edm::LogInfo("EcalTPGWeightGroupHandler") << "min_run= " << min_run << " max_run= " << max_run;
117 
118  RunList my_list;
119  my_list = econn->fetchGlobalRunListByLocation(my_runtag, min_run, max_run, my_locdef);
120  // my_list=econn->fetchRunListByLocation(my_runtag,min_run,max_run,my_locdef);
121 
122  std::vector<RunIOV> run_vec = my_list.getRuns();
123  size_t num_runs = run_vec.size();
124 
125  edm::LogInfo("number of runs is : ") << num_runs;
126 
127  unsigned int irun = 0;
128  if (num_runs > 0) {
129  // going to query the ecal logic id
130  std::vector<EcalLogicID> my_StripEcalLogicId_EE;
131  my_StripEcalLogicId_EE =
132  econn->getEcalLogicIDSetOrdered("ECAL_readout_strip", 1, 2000, 1, 70, 0, 5, "EE_offline_stripid", 123);
133 
134  edm::LogInfo(" GOT the logic ID for the EE trigger strips ");
135 
136  for (size_t kr = 0; kr < run_vec.size(); kr++) {
137  irun = static_cast<unsigned int>(run_vec[kr].getRunNumber());
138 
139  edm::LogInfo(" **************** ");
140  edm::LogInfo(" **************** ");
141  edm::LogInfo(" run= ") << irun;
142 
143  // retrieve the data :
144  std::map<EcalLogicID, RunTPGConfigDat> dataset;
145  econn->fetchDataSet(&dataset, &run_vec[kr]);
146 
147  std::string the_config_tag = "";
148  int the_config_version = 0;
149 
150  std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
151 
152  int nr = 0;
153  for (it = dataset.begin(); it != dataset.end(); it++) {
154  ++nr;
155  //EcalLogicID ecalid = it->first;
156 
157  RunTPGConfigDat dat = it->second;
158  the_config_tag = dat.getConfigTag();
159  the_config_version = dat.getVersion();
160  }
161 
162  // it is all the same for all SM... get the last one
163 
164  edm::LogInfo(" run= ") << irun << " tag " << the_config_tag << " version=" << the_config_version;
165 
166  // here we should check if it is the same as previous run.
167 
168  if ((the_config_tag != m_i_tag || the_config_version != m_i_version) && nr > 0) {
169  edm::LogInfo("the tag is different from last transferred run ... retrieving last config set from DB");
170 
171  FEConfigMainInfo fe_main_info;
172  fe_main_info.setConfigTag(the_config_tag);
173  fe_main_info.setVersion(the_config_version);
174 
175  try {
176  edm::LogInfo(" before fetch config set");
177  econn->fetchConfigSet(&fe_main_info);
178  edm::LogInfo(" after fetch config set");
179 
180  // now get TPGWeightGroup
181  int wId = fe_main_info.getWeiId();
182 
183  if (wId != m_i_weightGroup) {
184  FEConfigWeightInfo fe_w_info;
185  fe_w_info.setId(wId);
186  econn->fetchConfigSet(&fe_w_info);
187  std::map<EcalLogicID, FEConfigWeightDat> dataset_TpgW;
188  econn->fetchDataSet(&dataset_TpgW, &fe_w_info);
189 
190  EcalTPGWeightGroup* weightG = new EcalTPGWeightGroup;
191  typedef std::map<EcalLogicID, FEConfigWeightDat>::const_iterator CIfesli;
192  EcalLogicID ecid_xt;
193  int weightGroup;
194 
195  std::map<std::string, int> map;
197 
198  for (CIfesli p = dataset_TpgW.begin(); p != dataset_TpgW.end(); p++) {
199  ecid_xt = p->first;
200  weightGroup = p->second.getWeightGroupId();
201 
202  std::string ecid_name = ecid_xt.getName();
203 
204  // EB data
205  if (ecid_name == "EB_VFE") {
206  int sm = ecid_xt.getID1();
207  int tt = ecid_xt.getID2();
208  int strip = ecid_xt.getID3();
209  int tcc = sm + 54;
210  if (sm > 18)
211  tcc = sm + 18;
212 
213  // simple formula to calculate the Srip EB identifier
214 
215  unsigned int stripEBId = 303176 + (tt - 1) * 64 + (strip - 1) * 8 + (tcc - 37) * 8192;
216 
217  weightG->setValue(stripEBId, weightGroup);
218  } else if (ecid_name == "ECAL_readout_strip") {
219  // EE data to add
220  int id1 = ecid_xt.getID1();
221  int id2 = ecid_xt.getID2();
222  int id3 = ecid_xt.getID3();
223 
224  bool set_the_strip = false;
225  int stripEEId;
226  for (size_t istrip = 0; istrip < my_StripEcalLogicId_EE.size(); istrip++) {
227  if (!set_the_strip) {
228  if (my_StripEcalLogicId_EE[istrip].getID1() == id1 &&
229  my_StripEcalLogicId_EE[istrip].getID2() == id2 &&
230  my_StripEcalLogicId_EE[istrip].getID3() == id3) {
231  stripEEId = my_StripEcalLogicId_EE[istrip].getLogicID();
232  set_the_strip = true;
233  break;
234  }
235  }
236  }
237 
238  if (set_the_strip) {
239  weightG->setValue(stripEEId, weightGroup);
240 
241  } else {
242  edm::LogInfo(" these may be the additional towers TCC/TT ") << id1 << "/" << id2;
243  }
244  }
245  }
246 
247  Time_t snc = (Time_t)irun;
248 
249  m_to_transfer.push_back(std::make_pair((EcalTPGWeightGroup*)weightG, snc));
250 
251  m_i_run_number = irun;
252  m_i_tag = the_config_tag;
253  m_i_version = the_config_version;
254  m_i_weightGroup = wId;
255 
256  writeFile("last_tpg_weightGroup_settings.txt");
257 
258  } else {
259  m_i_run_number = irun;
260  m_i_tag = the_config_tag;
261  m_i_version = the_config_version;
262 
263  writeFile("last_tpg_weightGroup_settings.txt");
264 
265  edm::LogInfo(
266  " even if the tag/version is not the same, the weight group id is the same -> no transfer needed ");
267  }
268 
269  }
270 
271  catch (std::exception& e) {
272  edm::LogInfo("ERROR: THIS CONFIG DOES NOT EXIST: tag=")
273  << the_config_tag << " version=" << the_config_version;
274  edm::LogInfo("Exception") << e.what();
275  m_i_run_number = irun;
276  }
277  edm::LogInfo(" **************** ");
278 
279  } else if (nr == 0) {
280  m_i_run_number = irun;
281  edm::LogInfo(" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed ");
282  edm::LogInfo(" **************** ");
283  } else {
284  m_i_run_number = irun;
285  m_i_tag = the_config_tag;
286  m_i_version = the_config_version;
287  edm::LogInfo(" the tag/version is the same -> no transfer needed ");
288  edm::LogInfo(" **************** ");
289  writeFile("last_tpg_weightGroup_settings.txt");
290  }
291  }
292  }
293 
294  delete econn;
295  } // usual way
296  edm::LogInfo("EcalTPGWeightGroupHandler") << "Ecal - > end of getNewObjects -----------";
297 }
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)
int getID1() const
Definition: EcalLogicID.cc:30
Iov_t lastInterval
Definition: Types.h:73
std::string getName() const
Definition: EcalLogicID.cc:26
Definition: RunTag.h:13
int getID2() const
Definition: EcalLogicID.cc:32
Time_t since
Definition: Types.h:53
size_t size
Definition: Types.h:74
int getVersion() const
int getWeiId() const
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
Definition: TTTypes.h:54
std::vector< EcalLogicID > getEcalLogicIDSetOrdered(std::string name, int fromId1, int toId1, int fromId2=EcalLogicID::NULLID, int toId2=EcalLogicID::NULLID, int fromId3=EcalLogicID::NULLID, int toId3=EcalLogicID::NULLID, std::string mapsTo="", int orderedBy=EcalLogicID::NULLID) noexcept(false)
std::vector< std::pair< EcalTPGWeightGroup *, Time_t > > m_to_transfer
void setValue(const uint32_t &rawId, const uint32_t &ObjectId)
Definition: EcalTPGGroups.cc:7
void setLocationDef(const LocationDef &locDef)
Definition: RunTag.cc:33
Log< level::Info, false > LogInfo
std::string getConfigTag() const
int getID3() const
Definition: EcalLogicID.cc:34
void setConfigTag(std::string x)
Definition: IODConfig.h:29
void setGeneralTag(std::string tag)
Definition: RunTag.cc:24
#define str(s)

◆ id()

std::string popcon::EcalTPGWeightGroupHandler::id ( ) const
inlineoverridevirtual

◆ makeStripId()

std::map<std::string, int> popcon::EcalTPGWeightGroupHandler::makeStripId ( )

◆ readFromFile()

void popcon::EcalTPGWeightGroupHandler::readFromFile ( const char *  inputFile)

Definition at line 387 of file EcalTPGWeightGroupHandler.cc.

References makeListRunsInFiles::inputFile, mps_splice::line, str, and to_string().

387  {
388  //-------------------------------------------------------------
389 
390  m_i_tag = "";
391  m_i_version = 0;
392  m_i_run_number = 0;
393  m_i_weightGroup = 0;
394 
395  FILE* inpFile; // input file
396  inpFile = fopen(inputFile, "r");
397  if (!inpFile) {
398  edm::LogError("EcalTPGWeightGroupHandler") << "*** Can not open file: " << inputFile;
399  return;
400  }
401 
402  char line[256];
403 
404  std::ostringstream str;
405 
406  fgets(line, 255, inpFile);
408  str << "gen tag " << m_i_tag << std::endl; // should I use this?
409 
410  fgets(line, 255, inpFile);
411  m_i_version = atoi(line);
412  str << "version= " << m_i_version << std::endl;
413 
414  fgets(line, 255, inpFile);
415  m_i_run_number = atoi(line);
416  str << "run_number= " << m_i_run_number << std::endl;
417 
418  fgets(line, 255, inpFile);
419  m_i_weightGroup = atoi(line);
420  str << "weightGroup_config= " << m_i_weightGroup << std::endl;
421 
422  fclose(inpFile); // close inp. file
423 }
Log< level::Error, false > LogError
#define str(s)

◆ readtxtFile()

void popcon::EcalTPGWeightGroupHandler::readtxtFile ( )

Definition at line 299 of file EcalTPGWeightGroupHandler.cc.

References MillePedeFileConverter_cfg::e, cppFunctionSkipper::exception, beamvalidation::exit(), kEBStrips, kEEStrips, EcalTPGGroups::setValue(), and nano_mu_digi_cff::strip.

299  {
300  edm::LogInfo(" reading the input file ") << m_file_name;
301  std::ifstream fInput;
302  fInput.open(m_file_name);
303  if (!fInput.is_open()) {
304  edm::LogInfo("ERROR : cannot open file ") << m_file_name;
305  exit(1);
306  }
307  int weightGroup, stripEBId, stripEEId;
308  EcalTPGWeightGroup* weightG = new EcalTPGWeightGroup;
309  for (int strip = 0; strip < kEBStrips; strip++) {
310  fInput >> stripEBId >> weightGroup;
311  weightG->setValue(stripEBId, weightGroup);
312  }
313  for (int strip = 0; strip < kEEStrips; strip++) {
314  fInput >> stripEEId >> weightGroup;
315  weightG->setValue(stripEEId, weightGroup);
316  }
317  try {
318  Time_t snc = (Time_t)m_firstRun;
319  m_to_transfer.push_back(std::make_pair((EcalTPGWeightGroup*)weightG, snc));
320  } catch (std::exception& e) {
321  edm::LogInfo("EcalTPGWeightGroupHandler::readtxtFile error : ") << e.what();
322  }
323  edm::LogInfo(" **************** ");
324 }
const Int_t kEBStrips
const Int_t kEEStrips
std::vector< std::pair< EcalTPGWeightGroup *, Time_t > > m_to_transfer
void setValue(const uint32_t &rawId, const uint32_t &ObjectId)
Definition: EcalTPGGroups.cc:7
Log< level::Info, false > LogInfo
def exit(msg="")

◆ readxmlFile()

void popcon::EcalTPGWeightGroupHandler::readxmlFile ( )

Definition at line 326 of file EcalTPGWeightGroupHandler.cc.

References MillePedeFileConverter_cfg::e, cppFunctionSkipper::exception, beamvalidation::exit(), newFWLiteAna::found, mps_fire::i, kEBStrips, kEEStrips, EcalTPGGroups::setValue(), AlCaHLTBitMon_QueryRunRegistry::string, and nano_mu_digi_cff::strip.

326  {
327  edm::LogInfo(" reading the input file ") << m_file_name;
328  std::ifstream fxml;
329  fxml.open(m_file_name);
330  if (!fxml.is_open()) {
331  edm::LogInfo("ERROR : cannot open file ") << m_file_name;
332  exit(1);
333  }
334  std::string dummyLine, bid;
335  int weightGroup, stripEBId, stripEEId;
336  EcalTPGWeightGroup* weightG = new EcalTPGWeightGroup;
337  for (int i = 0; i < 6; i++)
338  std::getline(fxml, dummyLine); // skip first lines
339  fxml >> bid;
340  std::size_t found = bid.find("</");
341  std::string stt = bid.substr(7, found - 7);
342  for (int i = 0; i < 2; i++)
343  std::getline(fxml, dummyLine); // <item_version>0</item_version>
344  for (int strip = 0; strip < kEBStrips; strip++) {
345  std::getline(fxml, dummyLine); // <item
346  fxml >> bid; // <first
347  found = bid.find("</");
348  stt = bid.substr(7, found - 7);
349  std::istringstream sg1(stt);
350  sg1 >> stripEBId;
351  std::getline(fxml, dummyLine);
352  fxml >> bid; // <second
353  found = bid.find("</");
354  stt = bid.substr(8, found - 8);
355  std::istringstream sg2(stt);
356  sg2 >> weightGroup;
357  weightG->setValue(stripEBId, weightGroup);
358  for (int i = 0; i < 2; i++)
359  std::getline(fxml, dummyLine); // </item>
360  }
361  for (int strip = 0; strip < kEEStrips; strip++) {
362  std::getline(fxml, dummyLine); // <item
363  fxml >> bid; // <first
364  found = bid.find("</");
365  stt = bid.substr(7, found - 7);
366  std::istringstream sg1(stt);
367  sg1 >> stripEEId;
368  std::getline(fxml, dummyLine);
369  fxml >> bid; // <second
370  found = bid.find("</");
371  stt = bid.substr(8, found - 8);
372  std::istringstream sg2(stt);
373  sg2 >> weightGroup;
374  weightG->setValue(stripEEId, weightGroup);
375  for (int i = 0; i < 2; i++)
376  std::getline(fxml, dummyLine); // </item>
377  }
378  try {
379  Time_t snc = (Time_t)m_firstRun;
380  m_to_transfer.push_back(std::make_pair((EcalTPGWeightGroup*)weightG, snc));
381  } catch (std::exception& e) {
382  edm::LogInfo("EcalTPGWeightGroupHandler::readtxtFile error : ") << e.what();
383  }
384  edm::LogInfo(" **************** ");
385 }
const Int_t kEBStrips
const Int_t kEEStrips
std::vector< std::pair< EcalTPGWeightGroup *, Time_t > > m_to_transfer
void setValue(const uint32_t &rawId, const uint32_t &ObjectId)
Definition: EcalTPGGroups.cc:7
Log< level::Info, false > LogInfo
def exit(msg="")

◆ to_string()

std::string popcon::EcalTPGWeightGroupHandler::to_string ( char  value[])
inlineprivate

Definition at line 66 of file EcalTPGWeightGroupHandler.h.

References relativeConstraints::value.

66  {
67  std::ostringstream streamOut;
68  streamOut << value;
69  return streamOut.str();
70  }

◆ writeFile()

void popcon::EcalTPGWeightGroupHandler::writeFile ( const char *  inputFile)

Definition at line 425 of file EcalTPGWeightGroupHandler.cc.

References makeListRunsInFiles::inputFile.

425  {
426  //-------------------------------------------------------------
427 
428  std::ofstream myfile;
429  myfile.open(inputFile);
430  myfile << m_i_tag << std::endl;
431  myfile << m_i_version << std::endl;
432  myfile << m_i_run_number << std::endl;
433  myfile << m_i_weightGroup << std::endl;
434 
435  myfile.close();
436 }

Member Data Documentation

◆ correspId

std::map<std::string, int> popcon::EcalTPGWeightGroupHandler::correspId
private

Definition at line 75 of file EcalTPGWeightGroupHandler.h.

◆ ecalMapping_

const EcalElectronicsMapping* popcon::EcalTPGWeightGroupHandler::ecalMapping_
private

Definition at line 77 of file EcalTPGWeightGroupHandler.h.

◆ econn

EcalCondDBInterface* popcon::EcalTPGWeightGroupHandler::econn

Definition at line 63 of file EcalTPGWeightGroupHandler.h.

◆ m_file_name

std::string popcon::EcalTPGWeightGroupHandler::m_file_name
private

Definition at line 89 of file EcalTPGWeightGroupHandler.h.

Referenced by EcalTPGWeightGroupHandler().

◆ m_file_type

std::string popcon::EcalTPGWeightGroupHandler::m_file_type
private

Definition at line 88 of file EcalTPGWeightGroupHandler.h.

Referenced by EcalTPGWeightGroupHandler().

◆ m_firstRun

unsigned int popcon::EcalTPGWeightGroupHandler::m_firstRun
private

Definition at line 72 of file EcalTPGWeightGroupHandler.h.

Referenced by EcalTPGWeightGroupHandler().

◆ m_gentag

std::string popcon::EcalTPGWeightGroupHandler::m_gentag
private

Definition at line 79 of file EcalTPGWeightGroupHandler.h.

Referenced by EcalTPGWeightGroupHandler().

◆ m_i_run_number

unsigned int popcon::EcalTPGWeightGroupHandler::m_i_run_number
private

Definition at line 91 of file EcalTPGWeightGroupHandler.h.

◆ m_i_tag

std::string popcon::EcalTPGWeightGroupHandler::m_i_tag
private

Definition at line 87 of file EcalTPGWeightGroupHandler.h.

◆ m_i_version

int popcon::EcalTPGWeightGroupHandler::m_i_version
private

Definition at line 90 of file EcalTPGWeightGroupHandler.h.

◆ m_i_weightGroup

int popcon::EcalTPGWeightGroupHandler::m_i_weightGroup
private

Definition at line 92 of file EcalTPGWeightGroupHandler.h.

◆ m_lastRun

unsigned int popcon::EcalTPGWeightGroupHandler::m_lastRun
private

Definition at line 73 of file EcalTPGWeightGroupHandler.h.

Referenced by EcalTPGWeightGroupHandler().

◆ m_location

std::string popcon::EcalTPGWeightGroupHandler::m_location
private

Definition at line 78 of file EcalTPGWeightGroupHandler.h.

Referenced by EcalTPGWeightGroupHandler().

◆ m_locationsource

std::string popcon::EcalTPGWeightGroupHandler::m_locationsource
private

Definition at line 83 of file EcalTPGWeightGroupHandler.h.

Referenced by EcalTPGWeightGroupHandler().

◆ m_name

std::string popcon::EcalTPGWeightGroupHandler::m_name
private

Definition at line 84 of file EcalTPGWeightGroupHandler.h.

Referenced by id().

◆ m_pass

std::string popcon::EcalTPGWeightGroupHandler::m_pass
private

Definition at line 82 of file EcalTPGWeightGroupHandler.h.

Referenced by EcalTPGWeightGroupHandler().

◆ m_runnr

unsigned int popcon::EcalTPGWeightGroupHandler::m_runnr
private

Definition at line 85 of file EcalTPGWeightGroupHandler.h.

◆ m_runtype

std::string popcon::EcalTPGWeightGroupHandler::m_runtype
private

Definition at line 86 of file EcalTPGWeightGroupHandler.h.

Referenced by EcalTPGWeightGroupHandler().

◆ m_sid

std::string popcon::EcalTPGWeightGroupHandler::m_sid
private

Definition at line 80 of file EcalTPGWeightGroupHandler.h.

Referenced by EcalTPGWeightGroupHandler().

◆ m_user

std::string popcon::EcalTPGWeightGroupHandler::m_user
private

Definition at line 81 of file EcalTPGWeightGroupHandler.h.

Referenced by EcalTPGWeightGroupHandler().