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, l1tpf_impl::readFromFile(), IODConfig::setConfigTag(), RunTag::setGeneralTag(), FEConfigWeightInfo::setId(), RunTag::setLocationDef(), RunTag::setRunTypeDef(), EcalTPGGroups::setValue(), FEConfigMainInfo::setVersion(), findQualityFiles::size, str, AlCaHLTBitMon_QueryRunRegistry::string, digitizers_cfi::strip, dumpRecoGeometry_cfg::tagInfo, and groupFilesInBlocks::tt.

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  int icells = 0;
195 
196  std::map<std::string, int> map;
198 
199  for (CIfesli p = dataset_TpgW.begin(); p != dataset_TpgW.end(); p++) {
200  ecid_xt = p->first;
201  weightGroup = p->second.getWeightGroupId();
202 
203  std::string ecid_name = ecid_xt.getName();
204 
205  // EB data
206  if (ecid_name == "EB_VFE") {
207  int sm = ecid_xt.getID1();
208  int tt = ecid_xt.getID2();
209  int strip = ecid_xt.getID3();
210  int tcc = sm + 54;
211  if (sm > 18)
212  tcc = sm + 18;
213 
214  // simple formula to calculate the Srip EB identifier
215 
216  unsigned int stripEBId = 303176 + (tt - 1) * 64 + (strip - 1) * 8 + (tcc - 37) * 8192;
217 
218  weightG->setValue(stripEBId, weightGroup);
219  ++icells;
220  } else if (ecid_name == "ECAL_readout_strip") {
221  // EE data to add
222  int id1 = ecid_xt.getID1();
223  int id2 = ecid_xt.getID2();
224  int id3 = ecid_xt.getID3();
225 
226  bool set_the_strip = false;
227  int stripEEId;
228  for (size_t istrip = 0; istrip < my_StripEcalLogicId_EE.size(); istrip++) {
229  if (!set_the_strip) {
230  if (my_StripEcalLogicId_EE[istrip].getID1() == id1 &&
231  my_StripEcalLogicId_EE[istrip].getID2() == id2 &&
232  my_StripEcalLogicId_EE[istrip].getID3() == id3) {
233  stripEEId = my_StripEcalLogicId_EE[istrip].getLogicID();
234  set_the_strip = true;
235  break;
236  }
237  }
238  }
239 
240  if (set_the_strip) {
241  weightG->setValue(stripEEId, weightGroup);
242 
243  } else {
244  edm::LogInfo(" these may be the additional towers TCC/TT ") << id1 << "/" << id2;
245  }
246 
247  ++icells;
248  }
249  }
250 
251  Time_t snc = (Time_t)irun;
252 
253  m_to_transfer.push_back(std::make_pair((EcalTPGWeightGroup*)weightG, snc));
254 
255  m_i_run_number = irun;
256  m_i_tag = the_config_tag;
257  m_i_version = the_config_version;
258  m_i_weightGroup = wId;
259 
260  writeFile("last_tpg_weightGroup_settings.txt");
261 
262  } else {
263  m_i_run_number = irun;
264  m_i_tag = the_config_tag;
265  m_i_version = the_config_version;
266 
267  writeFile("last_tpg_weightGroup_settings.txt");
268 
269  edm::LogInfo(
270  " even if the tag/version is not the same, the weight group id is the same -> no transfer needed ");
271  }
272 
273  }
274 
275  catch (std::exception& e) {
276  edm::LogInfo("ERROR: THIS CONFIG DOES NOT EXIST: tag=")
277  << the_config_tag << " version=" << the_config_version;
278  edm::LogInfo("Exception") << e.what();
279  m_i_run_number = irun;
280  }
281  edm::LogInfo(" **************** ");
282 
283  } else if (nr == 0) {
284  m_i_run_number = irun;
285  edm::LogInfo(" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed ");
286  edm::LogInfo(" **************** ");
287  } else {
288  m_i_run_number = irun;
289  m_i_tag = the_config_tag;
290  m_i_version = the_config_version;
291  edm::LogInfo(" the tag/version is the same -> no transfer needed ");
292  edm::LogInfo(" **************** ");
293  writeFile("last_tpg_weightGroup_settings.txt");
294  }
295  }
296  }
297 
298  delete econn;
299  } // usual way
300  edm::LogInfo("EcalTPGWeightGroupHandler") << "Ecal - > end of getNewObjects -----------";
301 }
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)
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
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 391 of file EcalTPGWeightGroupHandler.cc.

References dtResolutionTest_cfi::inputFile, mps_splice::line, str, and cond::impl::to_string().

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

◆ readtxtFile()

void popcon::EcalTPGWeightGroupHandler::readtxtFile ( )

Definition at line 303 of file EcalTPGWeightGroupHandler.cc.

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

303  {
304  edm::LogInfo(" reading the input file ") << m_file_name;
305  std::ifstream fInput;
306  fInput.open(m_file_name);
307  if (!fInput.is_open()) {
308  edm::LogInfo("ERROR : cannot open file ") << m_file_name;
309  exit(1);
310  }
311  int weightGroup, stripEBId, stripEEId;
312  EcalTPGWeightGroup* weightG = new EcalTPGWeightGroup;
313  for (int strip = 0; strip < kEBStrips; strip++) {
314  fInput >> stripEBId >> weightGroup;
315  weightG->setValue(stripEBId, weightGroup);
316  }
317  for (int strip = 0; strip < kEEStrips; strip++) {
318  fInput >> stripEEId >> weightGroup;
319  weightG->setValue(stripEEId, weightGroup);
320  }
321  try {
322  Time_t snc = (Time_t)m_firstRun;
323  m_to_transfer.push_back(std::make_pair((EcalTPGWeightGroup*)weightG, snc));
324  } catch (std::exception& e) {
325  edm::LogInfo("EcalTPGWeightGroupHandler::readtxtFile error : ") << e.what();
326  }
327  edm::LogInfo(" **************** ");
328 }
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 330 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 digitizers_cfi::strip.

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

References dtResolutionTest_cfi::inputFile.

429  {
430  //-------------------------------------------------------------
431 
432  std::ofstream myfile;
433  myfile.open(inputFile);
434  myfile << m_i_tag << std::endl;
435  myfile << m_i_version << std::endl;
436  myfile << m_i_run_number << std::endl;
437  myfile << m_i_weightGroup << std::endl;
438 
439  myfile.close();
440 }

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().