CMS 3D CMS Logo

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

#include <EcalTPGOddWeightGroupHandler.h>

Inheritance diagram for popcon::EcalTPGOddWeightGroupHandler:
popcon::PopConSourceHandler< EcalTPGOddWeightGroup >

Public Member Functions

 EcalTPGOddWeightGroupHandler (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)
 
 ~EcalTPGOddWeightGroupHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< EcalTPGOddWeightGroup >
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
 
int m_i_oddweightGroup
 
unsigned int m_i_run_number
 
std::string m_i_tag
 
int m_i_version
 
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< EcalTPGOddWeightGroup >
typedef std::map< Time_t, std::shared_ptr< EcalTPGOddWeightGroup > > Container
 
typedef std::unique_ptr< EcalTPGOddWeightGroupRef
 
typedef PopConSourceHandler< EcalTPGOddWeightGroupself
 
typedef cond::Time_t Time_t
 
typedef EcalTPGOddWeightGroup value_type
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< EcalTPGOddWeightGroup >
cond::persistency::SessiondbSession () const
 
- Protected Attributes inherited from popcon::PopConSourceHandler< EcalTPGOddWeightGroup >
Container m_iovs
 
std::vector< std::pair< EcalTPGOddWeightGroup *, Time_t > > m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 46 of file EcalTPGOddWeightGroupHandler.h.

Constructor & Destructor Documentation

◆ EcalTPGOddWeightGroupHandler()

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

Definition at line 30 of file EcalTPGOddWeightGroupHandler.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", "EcalTPGOddWeightGroupHandler")) {
32  edm::LogInfo("EcalTPGOddWeightGroupHandler") << "EcalTPGOddWeightGroup 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("EcalTPGOddWeightGroupHandler") << m_sid << "/" << m_user << "/" << m_location << "/" << m_gentag;
46 }
Log< level::Info, false > LogInfo

◆ ~EcalTPGOddWeightGroupHandler()

popcon::EcalTPGOddWeightGroupHandler::~EcalTPGOddWeightGroupHandler ( )
override

Definition at line 48 of file EcalTPGOddWeightGroupHandler.cc.

48 {}

Member Function Documentation

◆ getNewObjects()

void popcon::EcalTPGOddWeightGroupHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< EcalTPGOddWeightGroup >.

Definition at line 50 of file EcalTPGOddWeightGroupHandler.cc.

References gather_cfg::cout, 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::getWei2Id(), 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(), FEConfigOddWeightInfo::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("EcalTPGOddWeightGroupHandler") << "Started GetNewObjects!!!";
57 
58  //check whats already inside of database
59  if (tagInfo().size) {
60  //check whats already inside of database
61  std::cout << "got offlineInfo = " << std::endl;
62  std::cout << "tag name = " << tagInfo().name << std::endl;
63  std::cout << "size = " << tagInfo().size << std::endl;
64  } else {
65  std::cout << " First object for this tag " << std::endl;
66  }
67 
68  unsigned int max_since = 0;
69  max_since = static_cast<unsigned int>(tagInfo().lastInterval.since);
70  edm::LogInfo("EcalTPGOddWeightGroupHandler") << "max_since : " << max_since;
71 
72  edm::LogInfo("EcalTPGOddWeightGroupHandler") << "retrieved last payload ";
73 
74  // here we retrieve all the runs after the last from online DB
75 
76  edm::LogInfo("EcalTPGOddWeightGroupHandler") << "Retrieving run list from ONLINE DB ... ";
77 
78  edm::LogInfo("EcalTPGOddWeightGroupHandler") << "Making connection...";
80  edm::LogInfo("EcalTPGOddWeightGroupHandler") << "Done.";
81 
82  if (!econn) {
83  std::cout << " connection parameters " << m_sid << "/" << m_user << std::endl;
84  // cerr << e.what() << std::endl;
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_OddweightGroup_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  std::cout << "m_i_run_number" << m_i_run_number << "m_firstRun " << m_firstRun << "max_since " << max_since
114  << std::endl;
115 
116  unsigned int max_run = m_lastRun;
117  edm::LogInfo("EcalTPGOddWeightGroupHandler") << "min_run= " << min_run << " max_run= " << max_run;
118 
119  RunList my_list;
120  my_list = econn->fetchGlobalRunListByLocation(my_runtag, min_run, max_run, my_locdef);
121  // my_list=econn->fetchRunListByLocation(my_runtag,min_run,max_run,my_locdef);
122 
123  std::vector<RunIOV> run_vec = my_list.getRuns();
124  size_t num_runs = run_vec.size();
125 
126  std::cout << "number of runs is : " << num_runs << std::endl;
127 
128  unsigned int irun = 0;
129  if (num_runs > 0) {
130  // going to query the ecal logic id
131  std::vector<EcalLogicID> my_StripEcalLogicId_EE;
132  my_StripEcalLogicId_EE =
133  econn->getEcalLogicIDSetOrdered("ECAL_readout_strip", 1, 2000, 1, 70, 0, 5, "EE_offline_stripid", 123);
134 
135  std::cout << " GOT the logic ID for the EE trigger strips " << std::endl;
136 
137  for (size_t kr = 0; kr < run_vec.size(); kr++) {
138  irun = static_cast<unsigned int>(run_vec[kr].getRunNumber());
139 
140  std::cout << " **************** " << std::endl;
141  std::cout << " **************** " << std::endl;
142  std::cout << " run= " << irun << std::endl;
143 
144  // retrieve the data :
145  std::map<EcalLogicID, RunTPGConfigDat> dataset;
146  econn->fetchDataSet(&dataset, &run_vec[kr]);
147 
148  std::string the_config_tag = "";
149  int the_config_version = 0;
150 
151  std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
152 
153  int nr = 0;
154  for (it = dataset.begin(); it != dataset.end(); it++) {
155  ++nr;
156  //EcalLogicID ecalid = it->first;
157 
158  RunTPGConfigDat dat = it->second;
159  the_config_tag = dat.getConfigTag();
160  the_config_version = dat.getVersion();
161  }
162 
163  // it is all the same for all SM... get the last one
164 
165  std::cout << " run= " << irun << " tag " << the_config_tag << " version=" << the_config_version << std::endl;
166 
167  // here we should check if it is the same as previous run.
168 
169  if ((the_config_tag != m_i_tag || the_config_version != m_i_version) && nr > 0) {
170  std::cout << "the tag is different from last transferred run ... retrieving last config set from DB"
171  << std::endl;
172 
173  FEConfigMainInfo fe_main_info;
174  fe_main_info.setConfigTag(the_config_tag);
175  fe_main_info.setVersion(the_config_version);
176 
177  try {
178  std::cout << " before fetch config set" << std::endl;
179  econn->fetchConfigSet(&fe_main_info);
180  std::cout << " after fetch config set" << std::endl;
181 
182  // now get TPGOddWeightGroup
183  int wId = fe_main_info.getWei2Id();
184 
185  if (wId != m_i_oddweightGroup) {
186  FEConfigOddWeightInfo fe_oddw_info;
187  fe_oddw_info.setId(wId);
188  econn->fetchConfigSet(&fe_oddw_info);
189  std::map<EcalLogicID, FEConfigOddWeightDat> dataset_TpgW;
190  econn->fetchDataSet(&dataset_TpgW, &fe_oddw_info);
191 
193  typedef std::map<EcalLogicID, FEConfigOddWeightDat>::const_iterator CIfesli;
194  EcalLogicID ecid_xt;
195  int weightGroup;
196 
197  std::map<std::string, int> map;
199 
200  for (CIfesli p = dataset_TpgW.begin(); p != dataset_TpgW.end(); p++) {
201  ecid_xt = p->first;
202  weightGroup = p->second.getWeightGroupId();
203 
204  std::string ecid_name = ecid_xt.getName();
205 
206  // EB data
207  if (ecid_name == "EB_VFE") {
208  int sm = ecid_xt.getID1();
209  int tt = ecid_xt.getID2();
210  int strip = ecid_xt.getID3();
211  int tcc = sm + 54;
212  if (sm > 18)
213  tcc = sm + 18;
214 
215  // simple formula to calculate the Srip EB identifier
216 
217  unsigned int stripEBId = 303176 + (tt - 1) * 64 + (strip - 1) * 8 + (tcc - 37) * 8192;
218 
219  weightG->setValue(stripEBId, weightGroup);
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  std::cout << " these may be the additional towers TCC/TT " << id1 << "/" << id2 << std::endl;
245  }
246  }
247  }
248 
249  Time_t snc = (Time_t)irun;
250 
251  m_to_transfer.push_back(std::make_pair((EcalTPGOddWeightGroup*)weightG, snc));
252 
253  m_i_run_number = irun;
254  m_i_tag = the_config_tag;
255  m_i_version = the_config_version;
256  m_i_oddweightGroup = wId;
257 
258  writeFile("last_tpg_OddweightGroup_settings.txt");
259 
260  } else {
261  m_i_run_number = irun;
262  m_i_tag = the_config_tag;
263  m_i_version = the_config_version;
264 
265  writeFile("last_tpg_OddweightGroup_settings.txt");
266 
267  std::cout
268  << " even if the tag/version is not the same, the weight group id is the same -> no transfer needed "
269  << std::endl;
270  }
271 
272  }
273 
274  catch (std::exception& e) {
275  std::cout << "ERROR: THIS CONFIG DOES NOT EXIST: tag=" << the_config_tag
276  << " version=" << the_config_version << std::endl;
277  std::cout << e.what() << std::endl;
278  m_i_run_number = irun;
279  }
280  std::cout << " **************** " << std::endl;
281 
282  } else if (nr == 0) {
283  m_i_run_number = irun;
284  std::cout << " no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed " << std::endl;
285  std::cout << " **************** " << std::endl;
286  } else {
287  m_i_run_number = irun;
288  m_i_tag = the_config_tag;
289  m_i_version = the_config_version;
290  std::cout << " the tag/version is the same -> no transfer needed " << std::endl;
291  std::cout << " **************** " << std::endl;
292  writeFile("last_tpg_OddweightGroup_settings.txt");
293  }
294  }
295  }
296 
297  delete econn;
298  } // usual way
299  edm::LogInfo("EcalTPGOddWeightGroupHandler") << "Ecal - > end of getNewObjects -----------";
300 }
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
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< EcalTPGOddWeightGroup *, 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)
int getWei2Id() const

◆ id()

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

◆ makeStripId()

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

◆ readFromFile()

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

Definition at line 391 of file EcalTPGOddWeightGroupHandler.cc.

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

391  {
392  //-------------------------------------------------------------
393 
394  m_i_tag = "";
395  m_i_version = 0;
396  m_i_run_number = 0;
397  m_i_oddweightGroup = 0;
398 
399  FILE* inpFile; // input file
400  inpFile = fopen(inputFile, "r");
401  if (!inpFile) {
402  edm::LogError("EcalTPGOddWeightGroupHandler") << "*** 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_oddweightGroup = atoi(line);
424  str << "weightGroup_config= " << m_i_oddweightGroup << std::endl;
425 
426  fclose(inpFile); // close inp. file
427 }
Log< level::Error, false > LogError
#define str(s)

◆ readtxtFile()

void popcon::EcalTPGOddWeightGroupHandler::readtxtFile ( )

Definition at line 302 of file EcalTPGOddWeightGroupHandler.cc.

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

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

◆ readxmlFile()

void popcon::EcalTPGOddWeightGroupHandler::readxmlFile ( )

Definition at line 329 of file EcalTPGOddWeightGroupHandler.cc.

References gather_cfg::cout, 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.

329  {
330  std::cout << " reading the input file " << m_file_name << std::endl;
331  std::ifstream fxml;
332  fxml.open(m_file_name);
333  if (!fxml.is_open()) {
334  std::cout << "ERROR : cannot open file " << m_file_name << std::endl;
335  exit(1);
336  }
337  std::string dummyLine, bid;
338  int weightGroup, stripEBId, stripEEId;
340  for (int i = 0; i < 6; i++)
341  std::getline(fxml, dummyLine); // skip first lines
342  fxml >> bid;
343  // std::cout << bid << std::endl;
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((EcalTPGOddWeightGroup*)weightG, snc));
385  } catch (std::exception& e) {
386  std::cout << "EcalTPGOddWeightGroupHandler::readtxtFile error : " << e.what() << std::endl;
387  }
388  std::cout << " **************** " << std::endl;
389 }
const Int_t kEBStrips
std::vector< std::pair< EcalTPGOddWeightGroup *, Time_t > > m_to_transfer
void setValue(const uint32_t &rawId, const uint32_t &ObjectId)
Definition: EcalTPGGroups.cc:7
const Int_t kEEStrips
def exit(msg="")

◆ to_string()

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

Definition at line 66 of file EcalTPGOddWeightGroupHandler.h.

References relativeConstraints::value.

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

◆ writeFile()

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

Definition at line 429 of file EcalTPGOddWeightGroupHandler.cc.

References makeListRunsInFiles::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_oddweightGroup << std::endl;
438 
439  myfile.close();
440 }

Member Data Documentation

◆ correspId

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

Definition at line 75 of file EcalTPGOddWeightGroupHandler.h.

◆ ecalMapping_

const EcalElectronicsMapping* popcon::EcalTPGOddWeightGroupHandler::ecalMapping_
private

Definition at line 77 of file EcalTPGOddWeightGroupHandler.h.

◆ econn

EcalCondDBInterface* popcon::EcalTPGOddWeightGroupHandler::econn

Definition at line 63 of file EcalTPGOddWeightGroupHandler.h.

◆ m_file_name

std::string popcon::EcalTPGOddWeightGroupHandler::m_file_name
private

Definition at line 89 of file EcalTPGOddWeightGroupHandler.h.

Referenced by EcalTPGOddWeightGroupHandler().

◆ m_file_type

std::string popcon::EcalTPGOddWeightGroupHandler::m_file_type
private

Definition at line 88 of file EcalTPGOddWeightGroupHandler.h.

Referenced by EcalTPGOddWeightGroupHandler().

◆ m_firstRun

unsigned int popcon::EcalTPGOddWeightGroupHandler::m_firstRun
private

Definition at line 72 of file EcalTPGOddWeightGroupHandler.h.

Referenced by EcalTPGOddWeightGroupHandler().

◆ m_gentag

std::string popcon::EcalTPGOddWeightGroupHandler::m_gentag
private

Definition at line 79 of file EcalTPGOddWeightGroupHandler.h.

Referenced by EcalTPGOddWeightGroupHandler().

◆ m_i_oddweightGroup

int popcon::EcalTPGOddWeightGroupHandler::m_i_oddweightGroup
private

Definition at line 92 of file EcalTPGOddWeightGroupHandler.h.

◆ m_i_run_number

unsigned int popcon::EcalTPGOddWeightGroupHandler::m_i_run_number
private

Definition at line 91 of file EcalTPGOddWeightGroupHandler.h.

◆ m_i_tag

std::string popcon::EcalTPGOddWeightGroupHandler::m_i_tag
private

Definition at line 87 of file EcalTPGOddWeightGroupHandler.h.

◆ m_i_version

int popcon::EcalTPGOddWeightGroupHandler::m_i_version
private

Definition at line 90 of file EcalTPGOddWeightGroupHandler.h.

◆ m_lastRun

unsigned int popcon::EcalTPGOddWeightGroupHandler::m_lastRun
private

Definition at line 73 of file EcalTPGOddWeightGroupHandler.h.

Referenced by EcalTPGOddWeightGroupHandler().

◆ m_location

std::string popcon::EcalTPGOddWeightGroupHandler::m_location
private

Definition at line 78 of file EcalTPGOddWeightGroupHandler.h.

Referenced by EcalTPGOddWeightGroupHandler().

◆ m_locationsource

std::string popcon::EcalTPGOddWeightGroupHandler::m_locationsource
private

Definition at line 83 of file EcalTPGOddWeightGroupHandler.h.

Referenced by EcalTPGOddWeightGroupHandler().

◆ m_name

std::string popcon::EcalTPGOddWeightGroupHandler::m_name
private

Definition at line 84 of file EcalTPGOddWeightGroupHandler.h.

Referenced by id().

◆ m_pass

std::string popcon::EcalTPGOddWeightGroupHandler::m_pass
private

Definition at line 82 of file EcalTPGOddWeightGroupHandler.h.

Referenced by EcalTPGOddWeightGroupHandler().

◆ m_runnr

unsigned int popcon::EcalTPGOddWeightGroupHandler::m_runnr
private

Definition at line 85 of file EcalTPGOddWeightGroupHandler.h.

◆ m_runtype

std::string popcon::EcalTPGOddWeightGroupHandler::m_runtype
private

Definition at line 86 of file EcalTPGOddWeightGroupHandler.h.

Referenced by EcalTPGOddWeightGroupHandler().

◆ m_sid

std::string popcon::EcalTPGOddWeightGroupHandler::m_sid
private

Definition at line 80 of file EcalTPGOddWeightGroupHandler.h.

Referenced by EcalTPGOddWeightGroupHandler().

◆ m_user

std::string popcon::EcalTPGOddWeightGroupHandler::m_user
private

Definition at line 81 of file EcalTPGOddWeightGroupHandler.h.

Referenced by EcalTPGOddWeightGroupHandler().