CMS 3D CMS Logo

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

#include <EcalTPGTPModeHandler.h>

Inheritance diagram for popcon::EcalTPGTPModeHandler:
popcon::PopConSourceHandler< EcalTPGTPMode >

Public Member Functions

 EcalTPGTPModeHandler (edm::ParameterSet const &)
 
void getNewObjects () override
 
std::string id () const override
 
void readFromFile (const char *inputFile)
 
void readtxtFile ()
 
void writeFile (const char *inputFile)
 
 ~EcalTPGTPModeHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< EcalTPGTPMode >
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_TPMode
 
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< EcalTPGTPMode >
typedef std::vector< Triplet > Container
 
typedef std::vector< std::pair< EcalTPGTPMode *, cond::Time_t > > OldContainer
 
typedef PopConSourceHandler< EcalTPGTPModeself
 
typedef cond::Summary Summary
 
typedef cond::Time_t Time_t
 
typedef EcalTPGTPMode value_type
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< EcalTPGTPMode >
int add (value_type *payload, Summary *summary, Time_t time)
 
cond::persistency::SessiondbSession () const
 
- Protected Attributes inherited from popcon::PopConSourceHandler< EcalTPGTPMode >
OldContainer m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 44 of file EcalTPGTPModeHandler.h.

Constructor & Destructor Documentation

◆ EcalTPGTPModeHandler()

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

Definition at line 26 of file EcalTPGTPModeHandler.cc.

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

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.

◆ ~EcalTPGTPModeHandler()

popcon::EcalTPGTPModeHandler::~EcalTPGTPModeHandler ( )
override

Definition at line 44 of file EcalTPGTPModeHandler.cc.

44 {}

Member Function Documentation

◆ getNewObjects()

void popcon::EcalTPGTPModeHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< EcalTPGTPMode >.

Definition at line 46 of file EcalTPGTPModeHandler.cc.

46  {
47  if (m_file_type == "txt") {
48  readtxtFile();
49  }
50  // else if(m_file_type == "xml") {
51  // readxmlFile();
52  // }
53  else {
54  edm::LogInfo("EcalTPGTPModeHandler") << "Started GetNewObjects!!!";
55 
56  //check whats already inside of database
57  if (tagInfo().size) {
58  //check whats already inside of database
59  std::cout << "got offlineInfo = " << std::endl;
60  std::cout << "tag name = " << tagInfo().name << std::endl;
61  std::cout << "size = " << tagInfo().size << std::endl;
62  } else {
63  std::cout << " First object for this tag " << std::endl;
64  }
65 
66  unsigned int max_since = 0;
67  max_since = static_cast<unsigned int>(tagInfo().lastInterval.since);
68  edm::LogInfo("EcalTPGTPModeHandler") << "max_since : " << max_since;
69 
70  edm::LogInfo("EcalTPGTPModeHandler") << "retrieved last payload ";
71 
72  // here we retrieve all the runs after the last from online DB
73 
74  edm::LogInfo("EcalTPGTPModeHandler") << "Retrieving run list from ONLINE DB ... ";
75 
76  edm::LogInfo("EcalTPGTPModeHandler") << "Making connection...";
78  edm::LogInfo("EcalTPGTPModeHandler") << "Done.";
79 
80  if (!econn) {
81  std::cout << " connection parameters " << m_sid << "/" << m_user << std::endl;
82  // cerr << e.what() << std::endl;
83  throw cms::Exception("OMDS not available");
84  }
85 
87  my_locdef.setLocation(m_location);
88 
90  my_rundef.setRunType(m_runtype);
91 
92  RunTag my_runtag;
93  my_runtag.setLocationDef(my_locdef);
94  my_runtag.setRunTypeDef(my_rundef);
95  my_runtag.setGeneralTag(m_gentag);
96 
97  readFromFile("last_tpg_TPMode_settings.txt");
98 
99  unsigned int min_run = m_i_run_number + 1;
100 
101  if (m_firstRun < m_i_run_number) {
102  min_run = m_i_run_number + 1;
103  } else {
104  min_run = m_firstRun;
105  }
106 
107  if (min_run < max_since) {
108  min_run = max_since + 1; // we have to add 1 to the last transferred one
109  }
110 
111  std::cout << "m_i_run_number" << m_i_run_number << "m_firstRun " << m_firstRun << "max_since " << max_since
112  << std::endl;
113 
114  unsigned int max_run = m_lastRun;
115  edm::LogInfo("EcalTPGTPModeHandler") << "min_run= " << min_run << " max_run= " << max_run;
116 
117  RunList my_list;
118  my_list = econn->fetchGlobalRunListByLocation(my_runtag, min_run, max_run, my_locdef);
119  // my_list=econn->fetchRunListByLocation(my_runtag,min_run,max_run,my_locdef);
120 
121  std::vector<RunIOV> run_vec = my_list.getRuns();
122  size_t num_runs = run_vec.size();
123 
124  std::cout << "number of runs is : " << num_runs << std::endl;
125 
126  unsigned int irun = 0;
127  if (num_runs > 0) {
128  for (size_t kr = 0; kr < run_vec.size(); kr++) {
129  irun = static_cast<unsigned int>(run_vec[kr].getRunNumber());
130 
131  std::cout << " **************** " << std::endl;
132  std::cout << " **************** " << std::endl;
133  std::cout << " run= " << irun << std::endl;
134 
135  // retrieve the data :
136  std::map<EcalLogicID, RunTPGConfigDat> dataset;
137  econn->fetchDataSet(&dataset, &run_vec[kr]);
138 
139  std::string the_config_tag = "";
140  int the_config_version = 0;
141 
142  std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
143 
144  int nr = 0;
145  for (it = dataset.begin(); it != dataset.end(); it++) {
146  ++nr;
147  EcalLogicID ecalid = it->first;
148  RunTPGConfigDat dat = it->second;
149  the_config_tag = dat.getConfigTag();
150  the_config_version = dat.getVersion();
151  }
152 
153  // it is all the same for all SM... get the last one
154 
155  std::cout << " run= " << irun << " tag " << the_config_tag << " version=" << the_config_version << std::endl;
156 
157  // here we should check if it is the same as previous run.
158 
159  if ((the_config_tag != m_i_tag || the_config_version != m_i_version) && nr > 0) {
160  std::cout << "the tag is different from last transferred run ... retrieving last config set from DB"
161  << std::endl;
162 
163  FEConfigMainInfo fe_main_info;
164  fe_main_info.setConfigTag(the_config_tag);
165  fe_main_info.setVersion(the_config_version);
166 
167  try {
168  std::cout << " before fetch config set" << std::endl;
169  econn->fetchConfigSet(&fe_main_info);
170  std::cout << " after fetch config set" << std::endl;
171 
172  // now get TPGTPMode
173  int wId = fe_main_info.getWei2Id();
174  if (wId != m_i_TPMode) {
175  FEConfigOddWeightInfo fe_odd_weight_info;
176  fe_odd_weight_info.setId(wId);
177  econn->fetchConfigSet(&fe_odd_weight_info);
178  std::map<EcalLogicID, FEConfigOddWeightModeDat> dataset_mode;
179  econn->fetchDataSet(&dataset_mode, &fe_odd_weight_info);
180 
181  typedef std::map<EcalLogicID, FEConfigOddWeightModeDat>::const_iterator CIfem;
182  FEConfigOddWeightModeDat rd_mode;
183 
184  int rd_modev[19] = {0};
185  int k = 0;
186  for (CIfem p = dataset_mode.begin(); p != dataset_mode.end(); p++) {
187  rd_mode = p->second;
188  rd_modev[0] = rd_mode.getEnableEBOddFilter();
189  rd_modev[1] = rd_mode.getEnableEEOddFilter();
190  rd_modev[2] = rd_mode.getEnableEBOddPeakFinder();
191  rd_modev[3] = rd_mode.getEnableEEOddPeakFinder();
192  rd_modev[4] = rd_mode.getDisableEBEvenPeakFinder();
193  rd_modev[5] = rd_mode.getDisableEEEvenPeakFinder();
194  rd_modev[6] = rd_mode.getFenixEBStripOutput();
195  rd_modev[7] = rd_mode.getFenixEEStripOutput();
196  rd_modev[8] = rd_mode.getFenixEBStripInfobit2();
197  rd_modev[9] = rd_mode.getFenixEEStripInfobit2();
198  rd_modev[10] = rd_mode.getFenixEBTcpOutput();
199  rd_modev[11] = rd_mode.getFenixEBTcpInfobit1();
200  rd_modev[12] = rd_mode.getFenixEETcpOutput();
201  rd_modev[13] = rd_mode.getFenixEETcpInfobit1();
202  // ...
203  std::cout << "here is the value for the weight mode: " << std::endl
204  << " EnableEBOddFilter:" << rd_modev[0] << std::endl
205  << " EnableEEOddFilter:" << rd_modev[1] << std::endl
206  << " EnableEBOddPeakFinder:" << rd_modev[2] << std::endl
207  << " EnableEEOddPeakFinder:" << rd_modev[3] << std::endl
208  << " DisableEBEvenPeakFinder:" << rd_modev[4] << std::endl
209  << " DisableEEEvenPeakFinder:" << rd_modev[5] << std::endl
210  << " FenixEBStripOutput:" << rd_modev[6] << std::endl
211  << " FenixEEStripOutput:" << rd_modev[7] << std::endl
212  << " FenixEBStripInfobit2:" << rd_modev[8] << std::endl
213  << " FenixEEStripInfobit2:" << rd_modev[9] << std::endl
214  << " FenixEBTcpOutput:" << rd_modev[10] << std::endl
215  << " FenixEBTcpinfobit1:" << rd_modev[11] << std::endl
216  << " FenixEETcpOutput:" << rd_modev[12] << std::endl
217  << " FenixEETcpinfobit1:" << rd_modev[13] << std::endl;
218  k = k + 1;
219  }
220 
221  std::cout << "*****************************************" << std::endl;
222  std::cout << "read done " << wId << std::endl;
223  std::cout << "*****************************************" << std::endl;
224 
225  EcalTPGTPMode* tpMode = new EcalTPGTPMode;
226  tpMode->EnableEBOddFilter = rd_modev[0];
227  tpMode->EnableEEOddFilter = rd_modev[1];
228  tpMode->EnableEBOddPeakFinder = rd_modev[2];
229  tpMode->EnableEEOddPeakFinder = rd_modev[3];
230  tpMode->DisableEBEvenPeakFinder = rd_modev[4];
231  tpMode->DisableEEEvenPeakFinder = rd_modev[5];
232  tpMode->FenixEBStripOutput = rd_modev[6];
233  tpMode->FenixEEStripOutput = rd_modev[7];
234  tpMode->FenixEBStripInfobit2 = rd_modev[8];
235  tpMode->FenixEEStripInfobit2 = rd_modev[9];
236  tpMode->EBFenixTcpOutput = rd_modev[10];
237  tpMode->EBFenixTcpInfobit1 = rd_modev[11];
238  tpMode->EEFenixTcpOutput = rd_modev[12];
239  tpMode->EEFenixTcpInfobit1 = rd_modev[13];
240  tpMode->FenixPar15 = 0;
241  tpMode->FenixPar16 = 0;
242  tpMode->FenixPar17 = 0;
243  tpMode->FenixPar18 = 0;
244  Time_t snc = (Time_t)irun;
245  m_to_transfer.push_back(std::make_pair((EcalTPGTPMode*)tpMode, snc));
246 
247  m_i_run_number = irun;
248  m_i_tag = the_config_tag;
249  m_i_version = the_config_version;
250  m_i_TPMode = wId;
251 
252  writeFile("last_tpg_TPMode_settings.txt");
253 
254  } else {
255  m_i_run_number = irun;
256  m_i_tag = the_config_tag;
257  m_i_version = the_config_version;
258 
259  writeFile("last_tpg_TPMode_settings.txt");
260 
261  std::cout
262  << " even if the tag/version is not the same, the weight group id is the same -> no transfer needed "
263  << std::endl;
264  }
265 
266  }
267 
268  catch (std::exception& e) {
269  std::cout << "ERROR: THIS CONFIG DOES NOT EXIST: tag=" << the_config_tag
270  << " version=" << the_config_version << std::endl;
271  std::cout << e.what() << std::endl;
272  m_i_run_number = irun;
273  }
274  std::cout << " **************** " << std::endl;
275 
276  } else if (nr == 0) {
277  m_i_run_number = irun;
278  std::cout << " no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed " << std::endl;
279  std::cout << " **************** " << std::endl;
280  } else {
281  m_i_run_number = irun;
282  m_i_tag = the_config_tag;
283  m_i_version = the_config_version;
284  std::cout << " the tag/version is the same -> no transfer needed " << std::endl;
285  std::cout << " **************** " << std::endl;
286  writeFile("last_tpg_TPMode_settings.txt");
287  }
288  }
289  }
290 
291  delete econn;
292  } // usual way
293  edm::LogInfo("EcalTPGTPModeHandler") << "Ecal - > end of getNewObjects -----------";
294 }

References gather_cfg::cout, writedatasetfile::dataset, EcalTPGTPMode::DisableEBEvenPeakFinder, EcalTPGTPMode::DisableEEEvenPeakFinder, MillePedeFileConverter_cfg::e, EcalTPGTPMode::EBFenixTcpInfobit1, EcalTPGTPMode::EBFenixTcpOutput, test_db_connect::econn, EcalTPGTPMode::EEFenixTcpInfobit1, EcalTPGTPMode::EEFenixTcpOutput, EcalTPGTPMode::EnableEBOddFilter, EcalTPGTPMode::EnableEBOddPeakFinder, EcalTPGTPMode::EnableEEOddFilter, EcalTPGTPMode::EnableEEOddPeakFinder, cppFunctionSkipper::exception, Exception, EcalTPGTPMode::FenixEBStripInfobit2, EcalTPGTPMode::FenixEBStripOutput, EcalTPGTPMode::FenixEEStripInfobit2, EcalTPGTPMode::FenixEEStripOutput, EcalTPGTPMode::FenixPar15, EcalTPGTPMode::FenixPar16, EcalTPGTPMode::FenixPar17, EcalTPGTPMode::FenixPar18, RunTPGConfigDat::getConfigTag(), FEConfigOddWeightModeDat::getDisableEBEvenPeakFinder(), FEConfigOddWeightModeDat::getDisableEEEvenPeakFinder(), FEConfigOddWeightModeDat::getEnableEBOddFilter(), FEConfigOddWeightModeDat::getEnableEBOddPeakFinder(), FEConfigOddWeightModeDat::getEnableEEOddFilter(), FEConfigOddWeightModeDat::getEnableEEOddPeakFinder(), FEConfigOddWeightModeDat::getFenixEBStripInfobit2(), FEConfigOddWeightModeDat::getFenixEBStripOutput(), FEConfigOddWeightModeDat::getFenixEBTcpInfobit1(), FEConfigOddWeightModeDat::getFenixEBTcpOutput(), FEConfigOddWeightModeDat::getFenixEEStripInfobit2(), FEConfigOddWeightModeDat::getFenixEEStripOutput(), FEConfigOddWeightModeDat::getFenixEETcpInfobit1(), FEConfigOddWeightModeDat::getFenixEETcpOutput(), DeadROCCounter::getRunNumber(), RunList::getRuns(), RunTPGConfigDat::getVersion(), FEConfigMainInfo::getWei2Id(), dqmdumpme::k, test_db_connect::my_locdef, test_db_connect::my_rundef, EgHLTOffHistBins_cfi::nr, AlCaHLTBitMon_ParallelJobs::p, l1tpf_impl::readFromFile(), IODConfig::setConfigTag(), RunTag::setGeneralTag(), FEConfigOddWeightInfo::setId(), RunTag::setLocationDef(), RunTag::setRunTypeDef(), FEConfigMainInfo::setVersion(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, and dumpRecoGeometry_cfg::tagInfo.

◆ id()

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

Implements popcon::PopConSourceHandler< EcalTPGTPMode >.

Definition at line 51 of file EcalTPGTPModeHandler.h.

51 { return m_name; }

References m_name.

◆ readFromFile()

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

Definition at line 339 of file EcalTPGTPModeHandler.cc.

339  {
340  //-------------------------------------------------------------
341 
342  m_i_tag = "";
343  m_i_version = 0;
344  m_i_run_number = 0;
345  m_i_TPMode = 0;
346 
347  FILE* inpFile; // input file
348  inpFile = fopen(inputFile, "r");
349  if (!inpFile) {
350  edm::LogError("EcalTPGTPModeHandler") << "*** Can not open file: " << inputFile;
351  return;
352  }
353 
354  char line[256];
355 
356  std::ostringstream str;
357 
358  fgets(line, 255, inpFile);
360  str << "gen tag " << m_i_tag << std::endl; // should I use this?
361 
362  fgets(line, 255, inpFile);
363  m_i_version = atoi(line);
364  str << "version= " << m_i_version << std::endl;
365 
366  fgets(line, 255, inpFile);
367  m_i_run_number = atoi(line);
368  str << "run_number= " << m_i_run_number << std::endl;
369 
370  fgets(line, 255, inpFile);
371  m_i_TPMode = atoi(line);
372  str << "TPMode_config= " << m_i_TPMode << std::endl;
373 
374  fclose(inpFile); // close inp. file
375 }

References dtResolutionTest_cfi::inputFile, mps_splice::line, and str.

◆ readtxtFile()

void popcon::EcalTPGTPModeHandler::readtxtFile ( )

Definition at line 296 of file EcalTPGTPModeHandler.cc.

296  {
297  std::cout << " reading the input file " << m_file_name << std::endl;
298  std::ifstream fInput;
299  fInput.open(m_file_name);
300  if (!fInput.is_open()) {
301  std::cout << "ERROR : cannot open file " << m_file_name << std::endl;
302  exit(1);
303  }
304  std::map<std::string, int> values;
305  EcalTPGTPMode* tpMode = new EcalTPGTPMode;
306 
308  int value;
309  while (fInput.good()) {
310  fInput >> key >> value;
311  values[key] = value;
312  }
313 
314  try {
315  tpMode->EnableEBOddFilter = values["EnableEBOddFilter"];
316  tpMode->EnableEEOddFilter = values["EnableEEOddFilter"];
317  tpMode->EnableEBOddPeakFinder = values["EnableEBOddPeakFinder"];
318  tpMode->EnableEEOddPeakFinder = values["EnableEEOddPeakFinder"];
319  tpMode->DisableEBEvenPeakFinder = values["DisableEBEvenPeakFinder"];
320  tpMode->DisableEEEvenPeakFinder = values["DisableEEEvenPeakFinder"];
321  tpMode->FenixEBStripOutput = values["FenixEBStripOutput"];
322  tpMode->FenixEEStripOutput = values["FenixEEStripOutput"];
323  tpMode->FenixEBStripInfobit2 = values["FenixEBStripInfobit2"];
324  tpMode->FenixEEStripInfobit2 = values["FenixEEStripInfobit2"];
325  tpMode->EBFenixTcpOutput = values["EBFenixTcpOutput"];
326  tpMode->EBFenixTcpInfobit1 = values["EBFenixTcpInfobit1"];
327  tpMode->EEFenixTcpOutput = values["EEFenixTcpOutput"];
328  tpMode->EEFenixTcpInfobit1 = values["EEFenixTcpInfobit1"];
329 
330  Time_t snc = (Time_t)m_firstRun;
331  m_to_transfer.push_back(std::make_pair((EcalTPGTPMode*)tpMode, snc));
332 
333  } catch (std::exception& e) {
334  std::cout << "EcalTPGTPModeHandler::readtxtFile error : " << e.what() << std::endl;
335  }
336  std::cout << " **************** " << std::endl;
337 }

References gather_cfg::cout, EcalTPGTPMode::DisableEBEvenPeakFinder, EcalTPGTPMode::DisableEEEvenPeakFinder, MillePedeFileConverter_cfg::e, EcalTPGTPMode::EBFenixTcpInfobit1, EcalTPGTPMode::EBFenixTcpOutput, EcalTPGTPMode::EEFenixTcpInfobit1, EcalTPGTPMode::EEFenixTcpOutput, EcalTPGTPMode::EnableEBOddFilter, EcalTPGTPMode::EnableEBOddPeakFinder, EcalTPGTPMode::EnableEEOddFilter, EcalTPGTPMode::EnableEEOddPeakFinder, cppFunctionSkipper::exception, beamvalidation::exit(), EcalTPGTPMode::FenixEBStripInfobit2, EcalTPGTPMode::FenixEBStripOutput, EcalTPGTPMode::FenixEEStripInfobit2, EcalTPGTPMode::FenixEEStripOutput, crabWrapper::key, AlCaHLTBitMon_QueryRunRegistry::string, relativeConstraints::value, and contentValuesCheck::values.

◆ to_string()

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

Definition at line 62 of file EcalTPGTPModeHandler.h.

62  {
63  std::ostringstream streamOut;
64  streamOut << value;
65  return streamOut.str();
66  }

References relativeConstraints::value.

◆ writeFile()

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

Definition at line 377 of file EcalTPGTPModeHandler.cc.

377  {
378  //-------------------------------------------------------------
379 
380  std::ofstream myfile;
381  myfile.open(inputFile);
382  myfile << m_i_tag << std::endl;
383  myfile << m_i_version << std::endl;
384  myfile << m_i_run_number << std::endl;
385  myfile << m_i_TPMode << std::endl;
386 
387  myfile.close();
388 }

References dtResolutionTest_cfi::inputFile.

Member Data Documentation

◆ econn

EcalCondDBInterface* popcon::EcalTPGTPModeHandler::econn

Definition at line 59 of file EcalTPGTPModeHandler.h.

◆ m_file_name

std::string popcon::EcalTPGTPModeHandler::m_file_name
private

Definition at line 82 of file EcalTPGTPModeHandler.h.

Referenced by EcalTPGTPModeHandler().

◆ m_file_type

std::string popcon::EcalTPGTPModeHandler::m_file_type
private

Definition at line 81 of file EcalTPGTPModeHandler.h.

Referenced by EcalTPGTPModeHandler().

◆ m_firstRun

unsigned int popcon::EcalTPGTPModeHandler::m_firstRun
private

Definition at line 68 of file EcalTPGTPModeHandler.h.

Referenced by EcalTPGTPModeHandler().

◆ m_gentag

std::string popcon::EcalTPGTPModeHandler::m_gentag
private

Definition at line 72 of file EcalTPGTPModeHandler.h.

Referenced by EcalTPGTPModeHandler().

◆ m_i_run_number

unsigned int popcon::EcalTPGTPModeHandler::m_i_run_number
private

Definition at line 84 of file EcalTPGTPModeHandler.h.

◆ m_i_tag

std::string popcon::EcalTPGTPModeHandler::m_i_tag
private

Definition at line 80 of file EcalTPGTPModeHandler.h.

◆ m_i_TPMode

int popcon::EcalTPGTPModeHandler::m_i_TPMode
private

Definition at line 85 of file EcalTPGTPModeHandler.h.

◆ m_i_version

int popcon::EcalTPGTPModeHandler::m_i_version
private

Definition at line 83 of file EcalTPGTPModeHandler.h.

◆ m_lastRun

unsigned int popcon::EcalTPGTPModeHandler::m_lastRun
private

Definition at line 69 of file EcalTPGTPModeHandler.h.

Referenced by EcalTPGTPModeHandler().

◆ m_location

std::string popcon::EcalTPGTPModeHandler::m_location
private

Definition at line 71 of file EcalTPGTPModeHandler.h.

Referenced by EcalTPGTPModeHandler().

◆ m_locationsource

std::string popcon::EcalTPGTPModeHandler::m_locationsource
private

Definition at line 76 of file EcalTPGTPModeHandler.h.

Referenced by EcalTPGTPModeHandler().

◆ m_name

std::string popcon::EcalTPGTPModeHandler::m_name
private

Definition at line 77 of file EcalTPGTPModeHandler.h.

Referenced by id().

◆ m_pass

std::string popcon::EcalTPGTPModeHandler::m_pass
private

Definition at line 75 of file EcalTPGTPModeHandler.h.

Referenced by EcalTPGTPModeHandler().

◆ m_runnr

unsigned int popcon::EcalTPGTPModeHandler::m_runnr
private

Definition at line 78 of file EcalTPGTPModeHandler.h.

◆ m_runtype

std::string popcon::EcalTPGTPModeHandler::m_runtype
private

Definition at line 79 of file EcalTPGTPModeHandler.h.

Referenced by EcalTPGTPModeHandler().

◆ m_sid

std::string popcon::EcalTPGTPModeHandler::m_sid
private

Definition at line 73 of file EcalTPGTPModeHandler.h.

Referenced by EcalTPGTPModeHandler().

◆ m_user

std::string popcon::EcalTPGTPModeHandler::m_user
private

Definition at line 74 of file EcalTPGTPModeHandler.h.

Referenced by EcalTPGTPModeHandler().

popcon::EcalTPGTPModeHandler::m_i_run_number
unsigned int m_i_run_number
Definition: EcalTPGTPModeHandler.h:84
EcalCondDBInterface
Definition: EcalCondDBInterface.h:37
popcon::EcalTPGTPModeHandler::m_file_name
std::string m_file_name
Definition: EcalTPGTPModeHandler.h:82
popcon::EcalTPGTPModeHandler::m_sid
std::string m_sid
Definition: EcalTPGTPModeHandler.h:73
EcalTPGTPMode
Definition: EcalTPGTPMode.h:12
popcon::PopConSourceHandler< EcalTPGTPMode >::m_to_transfer
OldContainer m_to_transfer
Definition: PopConSourceHandler.h:162
popcon::EcalTPGTPModeHandler::to_string
std::string to_string(char value[])
Definition: EcalTPGTPModeHandler.h:62
RunList
Definition: RunList.h:16
EcalTPGTPMode::DisableEBEvenPeakFinder
bool DisableEBEvenPeakFinder
Definition: EcalTPGTPMode.h:21
FEConfigOddWeightModeDat::getEnableEEOddPeakFinder
float getEnableEEOddPeakFinder() const
Definition: FEConfigOddWeightModeDat.h:28
RunTag
Definition: RunTag.h:13
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
EcalCondDBInterface::fetchConfigSet
void fetchConfigSet(ICONF *iconf) noexcept(false)
Definition: EcalCondDBInterface.h:387
gather_cfg.cout
cout
Definition: gather_cfg.py:144
FEConfigMainInfo
Definition: FEConfigMainInfo.h:14
popcon::PopConSourceHandler< EcalTPGTPMode >::Time_t
cond::Time_t Time_t
Definition: PopConSourceHandler.h:34
LocationDef
Definition: LocationDef.h:12
DeadROCCounter.getRunNumber
def getRunNumber(filename)
Definition: DeadROCCounter.py:7
FEConfigOddWeightInfo
Definition: FEConfigOddWeightInfo.h:11
EcalTPGTPMode::FenixPar18
uint16_t FenixPar18
Definition: EcalTPGTPMode.h:35
FEConfigOddWeightModeDat::getDisableEEEvenPeakFinder
float getDisableEEEvenPeakFinder() const
Definition: FEConfigOddWeightModeDat.h:33
FEConfigOddWeightModeDat::getFenixEEStripInfobit2
float getFenixEEStripInfobit2() const
Definition: FEConfigOddWeightModeDat.h:43
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
popcon::EcalTPGTPModeHandler::readtxtFile
void readtxtFile()
Definition: EcalTPGTPModeHandler.cc:296
FEConfigMainInfo::setVersion
void setVersion(int id)
Definition: FEConfigMainInfo.h:78
EcalTPGTPMode::FenixPar15
uint16_t FenixPar15
Definition: EcalTPGTPMode.h:32
EcalTPGTPMode::EBFenixTcpOutput
uint16_t EBFenixTcpOutput
Definition: EcalTPGTPMode.h:27
EcalTPGTPMode::EBFenixTcpInfobit1
uint16_t EBFenixTcpInfobit1
Definition: EcalTPGTPMode.h:28
popcon::EcalTPGTPModeHandler::m_locationsource
std::string m_locationsource
Definition: EcalTPGTPModeHandler.h:76
EcalTPGTPMode::EnableEEOddFilter
bool EnableEEOddFilter
Definition: EcalTPGTPMode.h:18
cond::TagInfo_t::name
std::string name
Definition: Types.h:72
popcon::EcalTPGTPModeHandler::m_pass
std::string m_pass
Definition: EcalTPGTPModeHandler.h:75
FEConfigOddWeightModeDat::getFenixEBStripInfobit2
float getFenixEBStripInfobit2() const
Definition: FEConfigOddWeightModeDat.h:41
popcon::EcalTPGTPModeHandler::m_user
std::string m_user
Definition: EcalTPGTPModeHandler.h:74
FEConfigOddWeightInfo::setId
void setId(int id)
Definition: FEConfigOddWeightInfo.h:24
RunTag::setGeneralTag
void setGeneralTag(std::string tag)
Definition: RunTag.cc:24
test_db_connect.my_rundef
my_rundef
Definition: test_db_connect.py:13
popcon::EcalTPGTPModeHandler::m_firstRun
unsigned int m_firstRun
Definition: EcalTPGTPModeHandler.h:68
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
str
#define str(s)
Definition: TestProcessor.cc:52
popcon::EcalTPGTPModeHandler::m_i_tag
std::string m_i_tag
Definition: EcalTPGTPModeHandler.h:80
EcalLogicID
Definition: EcalLogicID.h:7
RunTPGConfigDat
Definition: RunTPGConfigDat.h:11
dqmdumpme.k
k
Definition: dqmdumpme.py:60
EcalTPGTPMode::DisableEEEvenPeakFinder
bool DisableEEEvenPeakFinder
Definition: EcalTPGTPMode.h:22
popcon::EcalTPGTPModeHandler::m_lastRun
unsigned int m_lastRun
Definition: EcalTPGTPModeHandler.h:69
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FEConfigOddWeightModeDat::getEnableEBOddPeakFinder
float getEnableEBOddPeakFinder() const
Definition: FEConfigOddWeightModeDat.h:26
RunTypeDef
Definition: RunTypeDef.h:12
test_db_connect.my_locdef
my_locdef
Definition: test_db_connect.py:11
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
popcon::EcalTPGTPModeHandler::econn
EcalCondDBInterface * econn
Definition: EcalTPGTPModeHandler.h:59
FEConfigOddWeightModeDat::getEnableEEOddFilter
float getEnableEEOddFilter() const
Definition: FEConfigOddWeightModeDat.h:23
EgHLTOffHistBins_cfi.nr
nr
Definition: EgHLTOffHistBins_cfi.py:4
popcon::PopConSourceHandler< EcalTPGTPMode >::tagInfo
cond::TagInfo_t const & tagInfo() const
Definition: PopConSourceHandler.h:78
EcalTPGTPMode::FenixEEStripOutput
uint16_t FenixEEStripOutput
Definition: EcalTPGTPMode.h:24
FEConfigOddWeightModeDat::getFenixEBStripOutput
float getFenixEBStripOutput() const
Definition: FEConfigOddWeightModeDat.h:36
EcalCondDBInterface::fetchGlobalRunListByLocation
RunList fetchGlobalRunListByLocation(const RunTag &tag, int min_run, int max_run, const LocationDef &locDef) noexcept(false)
Definition: EcalCondDBInterface.cc:804
FEConfigOddWeightModeDat::getFenixEBTcpInfobit1
float getFenixEBTcpInfobit1() const
Definition: FEConfigOddWeightModeDat.h:48
dtResolutionTest_cfi.inputFile
inputFile
Definition: dtResolutionTest_cfi.py:14
EcalCondDBInterface::fetchDataSet
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
Definition: EcalCondDBInterface.h:495
popcon::EcalTPGTPModeHandler::m_i_version
int m_i_version
Definition: EcalTPGTPModeHandler.h:83
EcalTPGTPMode::EEFenixTcpOutput
uint16_t EEFenixTcpOutput
Definition: EcalTPGTPMode.h:29
EcalTPGTPMode::FenixPar16
uint16_t FenixPar16
Definition: EcalTPGTPMode.h:33
EcalTPGTPMode::FenixEBStripOutput
uint16_t FenixEBStripOutput
Definition: EcalTPGTPMode.h:23
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
EcalTPGTPMode::EEFenixTcpInfobit1
uint16_t EEFenixTcpInfobit1
Definition: EcalTPGTPMode.h:30
EcalTPGTPMode::EnableEBOddFilter
bool EnableEBOddFilter
Definition: EcalTPGTPMode.h:17
FEConfigOddWeightModeDat::getEnableEBOddFilter
float getEnableEBOddFilter() const
Definition: FEConfigOddWeightModeDat.h:21
EcalTPGTPMode::EnableEEOddPeakFinder
bool EnableEEOddPeakFinder
Definition: EcalTPGTPMode.h:20
FEConfigOddWeightModeDat
Definition: FEConfigOddWeightModeDat.h:11
FEConfigOddWeightModeDat::getFenixEBTcpOutput
float getFenixEBTcpOutput() const
Definition: FEConfigOddWeightModeDat.h:46
writedatasetfile.dataset
dataset
Definition: writedatasetfile.py:19
RunTPGConfigDat::getVersion
int getVersion() const
Definition: RunTPGConfigDat.h:22
RunTag::setLocationDef
void setLocationDef(const LocationDef &locDef)
Definition: RunTag.cc:33
FEConfigOddWeightModeDat::getFenixEETcpInfobit1
float getFenixEETcpInfobit1() const
Definition: FEConfigOddWeightModeDat.h:53
relativeConstraints.value
value
Definition: relativeConstraints.py:53
Exception
Definition: hltDiff.cc:245
RunList::getRuns
std::vector< RunIOV > getRuns()
Definition: RunList.cc:25
RunTPGConfigDat::getConfigTag
std::string getConfigTag() const
Definition: RunTPGConfigDat.h:20
EcalTPGTPMode::FenixPar17
uint16_t FenixPar17
Definition: EcalTPGTPMode.h:34
popcon::EcalTPGTPModeHandler::m_file_type
std::string m_file_type
Definition: EcalTPGTPModeHandler.h:81
popcon::EcalTPGTPModeHandler::readFromFile
void readFromFile(const char *inputFile)
Definition: EcalTPGTPModeHandler.cc:339
dataset
Definition: dataset.py:1
EcalTPGTPMode::FenixEEStripInfobit2
uint16_t FenixEEStripInfobit2
Definition: EcalTPGTPMode.h:26
RunTag::setRunTypeDef
void setRunTypeDef(const RunTypeDef &runTypeDef)
Definition: RunTag.cc:42
EcalTPGTPMode::FenixEBStripInfobit2
uint16_t FenixEBStripInfobit2
Definition: EcalTPGTPMode.h:25
FEConfigOddWeightModeDat::getFenixEEStripOutput
float getFenixEEStripOutput() const
Definition: FEConfigOddWeightModeDat.h:38
FEConfigOddWeightModeDat::getDisableEBEvenPeakFinder
float getDisableEBEvenPeakFinder() const
Definition: FEConfigOddWeightModeDat.h:31
beamvalidation.exit
def exit(msg="")
Definition: beamvalidation.py:53
popcon::EcalTPGTPModeHandler::m_i_TPMode
int m_i_TPMode
Definition: EcalTPGTPModeHandler.h:85
popcon::EcalTPGTPModeHandler::writeFile
void writeFile(const char *inputFile)
Definition: EcalTPGTPModeHandler.cc:377
IODConfig::setConfigTag
void setConfigTag(std::string x)
Definition: IODConfig.h:29
popcon::EcalTPGTPModeHandler::m_gentag
std::string m_gentag
Definition: EcalTPGTPModeHandler.h:72
popcon::EcalTPGTPModeHandler::m_location
std::string m_location
Definition: EcalTPGTPModeHandler.h:71
mps_splice.line
line
Definition: mps_splice.py:76
crabWrapper.key
key
Definition: crabWrapper.py:19
FEConfigOddWeightModeDat::getFenixEETcpOutput
float getFenixEETcpOutput() const
Definition: FEConfigOddWeightModeDat.h:51
FEConfigMainInfo::getWei2Id
int getWei2Id() const
Definition: FEConfigMainInfo.h:73
popcon::EcalTPGTPModeHandler::m_runtype
std::string m_runtype
Definition: EcalTPGTPModeHandler.h:79
popcon::EcalTPGTPModeHandler::m_name
std::string m_name
Definition: EcalTPGTPModeHandler.h:77
cond::TagInfo_t::size
size_t size
Definition: Types.h:74
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
EcalTPGTPMode::EnableEBOddPeakFinder
bool EnableEBOddPeakFinder
Definition: EcalTPGTPMode.h:19