CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PixelDetectorConfig.cc
Go to the documentation of this file.
1 //
2 // Implementation of the detector configuration
3 //
4 //
5 //
6 //
7 
10 #include <fstream>
11 #include <iostream>
12 #include <sstream>
13 #include <ios>
14 #include <stdexcept>
15 #include <assert.h>
16 #include <stdio.h>
17 
18 using namespace std;
19 using namespace pos;
20 
21 
22 PixelDetectorConfig::PixelDetectorConfig(std::vector< std::vector < std::string> > &tableMat):PixelConfigBase("","",""){
23 
24  std::string mthn = "]\t[PixelDetectorConfig::PixelDetectorConfig()]\t\t " ;
25  std::vector< std::string > ins = tableMat[0];
26  std::map<std::string , int > colM;
27  std::vector<std::string > colNames;
28  /*
29  EXTENSION_TABLE_NAME: PIXEL_DETECTOR_CONFIG (VIEW: CONF_KEY_DET_CONFIG_V)
30 
31  CONFIG_KEY NOT NULL VARCHAR2(80)
32  KEY_TYPE NOT NULL VARCHAR2(80)
33  KEY_ALIAS NOT NULL VARCHAR2(80)
34  VERSION VARCHAR2(40)
35  KIND_OF_COND NOT NULL VARCHAR2(40)
36  ROC_NAME NOT NULL VARCHAR2(200)
37  ROC_STATUS NOT NULL VARCHAR2(200)
38  */
39  colNames.push_back("CONFIG_KEY" );
40  colNames.push_back("KEY_TYPE" );
41  colNames.push_back("KEY_ALIAS" );
42  colNames.push_back("VERSION" );
43  colNames.push_back("KIND_OF_COND");
44  colNames.push_back("ROC_NAME" );
45  colNames.push_back("ROC_STATUS" );
46 
47  for(unsigned int c = 0 ; c < ins.size() ; c++){
48  for(unsigned int n=0; n<colNames.size(); n++){
49  if(tableMat[0][c] == colNames[n]){
50  colM[colNames[n]] = c;
51  break;
52  }
53  }
54  }//end for
55 
56  /*
57  for(unsigned int n=0; n<colNames.size(); n++){
58  if(colM.find(colNames[n]) == colM.end()){
59  std::cerr << __LINE__ << mthn << "Couldn't find in the database the column with name " << colNames[n] << std::endl;
60  assert(0);
61  }
62  }
63  */
64 
65  modules_.clear();
66  rocs_.clear() ;
67  std::string module= "";
68  for(unsigned int r = 1 ; r < tableMat.size() ; r++)
69  { //Goes to every row of the Matrix
70  PixelROCName roc(tableMat[r][colM["ROC_NAME"]]) ; // see DACSettings!!!!
71  PixelROCStatus rocstatus;
72  std::string status = tableMat[r][colM["ROC_STATUS"]];
73  // The following is due to the fact that enabled ROCs are
74  // labelled as ON in the DataBase, but have NO label in
75  // configuration files!!!
76  if(status.find("on") != string::npos)
77  {
78  status = "" ;
79  }
80  if (status!=""){
81  rocstatus.set(status);
82  }
83  rocs_[roc]=rocstatus;
84  if (!rocstatus.get(PixelROCStatus::noInit)){
85  PixelModuleName module(tableMat[r][colM["ROC_NAME"]]);
86  if (!containsModule(module)) {
87  modules_.push_back(module);
88  }
89  }
90  }//end for r
91 
92 // std::cout << __LINE__ << mthn << "Number of Modules in Detector Configuration Class: " << getNModules() << std::endl;
93 
94 }//end constructor
95 
96 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
97 
99  PixelConfigBase("","",""){
100 
101  std::string mthn = "[PixelDetectorConfig::PixelDetectorConfig()]\t\t " ;
102 
103  if (filename[filename.size()-1]=='t'){
104 
105  std::ifstream in(filename.c_str());
106 
107  if (!in.good()){
108  std::cout << __LINE__ << "]\t" << mthn << "Could not open: " << filename << std::endl;
109  throw std::runtime_error("Failed to open file "+filename);
110  }
111  else {
112  std::cout << __LINE__ << "]\t" << mthn << "Opened: " << filename << std::endl;
113  }
114 
115  if (in.eof()){
116  std::cout << __LINE__ << "]\t" << mthn << "EOF before reading anything!" << std::endl;
117  throw std::runtime_error("File seems to be empty "+filename);
118  }
119 
120 
121  modules_.clear();
122  rocs_.clear() ;
123 
124  std::string module;
125 
126  in >> module;
127 
128  if (module=="Rocs:") {
129  std::cout << __LINE__ << "]\t" << mthn << "New format of detconfig"<<std::endl;
130  //new format with list of ROCs.
131  std::string rocname;
132  in >> rocname;
133  while (!in.eof()){
134  //cout << __LINE__ << "]\t" << mthn << "Read rocname:"<<rocname<<endl;
135  PixelROCName roc(rocname);
136  std::string line;
137  getline(in,line);
138  //cout << __LINE__ << "]\t" << mthn << "Read line:'"<<line<<"'"<<endl;
139  istringstream instring(line);
140  PixelROCStatus rocstatus;
141  std::string status;
142  while (!instring.eof()) {
143  instring >> status;
144 // cout << __LINE__ << "]\t" << mthn << "Read status:"<<status<<endl;
145  if (status!=""){
146  rocstatus.set(status);
147  }
148  }
149  rocs_[roc]=rocstatus;
150  if (!rocstatus.get(PixelROCStatus::noInit)){
151  PixelModuleName module(rocname);
152  if (!containsModule(module)) {
153  modules_.push_back(module);
154  }
155  }
156  in >> rocname;
157  }
158  return;
159  }
160 
161 
162  //std::cout << __LINE__ << "]\t" << mthn << "Read module:"<<module<<std::endl;
163 
164  if (in.eof()) std::cout << mthn << "EOF after reading first module name" << std::endl;
165 
166  std::cout << __LINE__ << "]\t" << mthn << "Old format of detconfig"<<std::endl;
167  while (!in.eof()){
168 
169  //std::cout << __LINE__ << "]\t" << mthn << "Read module:"<<module<<std::endl;
170 
171  PixelModuleName moduleName(module);
172 
173  modules_.push_back(moduleName);
174 
175  in >> module;
176 
177  assert(modules_.size()<10000);
178 
179  }
180 
181  in.close();
182 
183  }
184  else{
185 
186  assert(0);
187 
188  /*
189  std::ifstream in(filename.c_str(),std::ios::binary);
190 
191  if (!in.good()){
192  std::cout << __LINE__ << "]\t" << mthn << "Could not open:"<<filename<<std::endl;
193  assert(0);
194  }
195  else {
196  std::cout << __LINE__ << "]\t" << mthn << "Opened:"<<filename<<std::endl;
197  }
198 
199  char nchar;
200 
201  in.read(&nchar,1);
202 
203  std::string s1;
204 
205  //wrote these lines of code without ref. needs to be fixed
206  for(int i=0;i< nchar; i++){
207  char c;
208  in >>c;
209  s1.push_back(c);
210  }
211 
212  //std::cout << __LINE__ << "]\t" << mthn << "READ ROC name:"<<s1<<std::endl;
213 
214  dacsettings_.clear();
215 
216 
217  while (!in.eof()){
218 
219  //std::cout << __LINE__ << "]\t" << mthn << "read s1:"<<s1<<std::endl;
220 
221  PixelROCName rocid(s1);
222 
223  //std::cout << __LINE__ << "]\t" << mthn << "read rocid:"<<rocid<<std::endl;
224 
225  PixelROCDetectorConfig tmp;
226 
227  tmp.readBinary(in, rocid);
228 
229  dacsettings_.push_back(tmp);
230 
231 
232  in.read(&nchar,1);
233 
234  s1.clear();
235 
236  if (in.eof()) continue;
237 
238  //wrote these lines of code without ref. needs to be fixed
239  for(int i=0;i< nchar; i++){
240  char c;
241  in >>c;
242  s1.push_back(c);
243  }
244 
245 
246  }
247 
248  in.close();
249 
250  */
251 
252  }
253 
254 
255  //std::cout << __LINE__ << "]\t" << mthn << "Read dac settings for "<<dacsettings_.size()<<" ROCs"<<std::endl;
256 
257 
258 }
259 
260 unsigned int PixelDetectorConfig::getNModules() const {
261 
262  return modules_.size();
263 
264 }
265 
267 
268  return modules_[i];
269 
270 }
271 
272 std::set <unsigned int> PixelDetectorConfig::getFEDs(PixelNameTranslation* translation) const
273 {
274 
275  std::set <unsigned int> feds;
276  assert(modules_.size()!=0);
277  std::vector<PixelModuleName>::const_iterator imodule=modules_.begin();
278 
279  for (;imodule!=modules_.end();++imodule) {
280 
281  std::set<PixelChannel> channelsOnThisModule = translation->getChannelsOnModule(*imodule);
282  for ( std::set<PixelChannel>::const_iterator channelsOnThisModule_itr = channelsOnThisModule.begin(); channelsOnThisModule_itr != channelsOnThisModule.end(); channelsOnThisModule_itr++ )
283  {
284  const PixelHdwAddress& channel_hdwaddress = translation->getHdwAddress(*channelsOnThisModule_itr);
285  unsigned int fednumber=channel_hdwaddress.fednumber();
286  feds.insert(fednumber);
287  }
288 
289  }
290 
291  return feds;
292 }
293 
294 
295 // Returns the FED numbers and channels within each FED that are used
296 std::map <unsigned int, std::set<unsigned int> > PixelDetectorConfig::getFEDsAndChannels(PixelNameTranslation* translation) const
297 {
298  // FED Number channels
299 
300  std::map <unsigned int, std::set<unsigned int> > fedsChannels;
301  assert(modules_.size()!=0);
302  std::vector<PixelModuleName>::const_iterator imodule=modules_.begin();
303 
304  for (;imodule!=modules_.end();++imodule) {
305 
306  std::set<PixelChannel> channelsOnThisModule = translation->getChannelsOnModule(*imodule);
307  for ( std::set<PixelChannel>::const_iterator channelsOnThisModule_itr = channelsOnThisModule.begin(); channelsOnThisModule_itr != channelsOnThisModule.end(); channelsOnThisModule_itr++ )
308  {
309  const PixelHdwAddress& channel_hdwaddress = translation->getHdwAddress(*channelsOnThisModule_itr);
310  unsigned int fednumber=channel_hdwaddress.fednumber();
311  unsigned int fedchannel=channel_hdwaddress.fedchannel();
312  fedsChannels[fednumber].insert(fedchannel);
313  }
314 
315  }
316 
317  return fedsChannels;
318 }
319 
321 {
322  for ( std::vector<PixelModuleName>::const_iterator modules_itr = modules_.begin(); modules_itr != modules_.end(); modules_itr++ )
323  {
324  if ( *modules_itr == moduleToFind ) return true;
325  }
326  return false;
327 }
328 
329 // modified by MR on 11-01-2008 15:06:51
330 void PixelDetectorConfig::writeASCII(std::string dir) const {
331 
332  std::stringstream s ; s << __LINE__ << "]\t[PixelDetectorConfig::writeASCII()]\t\t " ;
333  std::string mthn = s.str() ;
334 
335  if (dir!="") dir+="/";
336  std::string filename=dir+"detectconfig.dat";
337 
338  std::ofstream out(filename.c_str(), std::ios_base::out) ;
339  if(!out) {
340  std::cout << __LINE__ << "]\t" << mthn << "Could not open file " << filename << " for write" << std::endl ;
341  exit(1);
342  }
343 
344 
345  if(rocs_.size() == 0)
346  {
347  std::vector<PixelModuleName>::const_iterator imodule=modules_.begin();
348 
349  for (;imodule!=modules_.end();++imodule)
350  {
351  out << *imodule << std::endl;
352  }
353  }
354  else
355  {
356  out << "Rocs:" << endl ;
357  std::map<PixelROCName, PixelROCStatus>::const_iterator irocs = rocs_.begin();
358  for(; irocs != rocs_.end() ; irocs++)
359  {
360  out << (irocs->first).rocname() << " " << (irocs->second).statusName() << endl ;
361  }
362  }
363 
364  out.close();
365 
366 }
367 
368 //=============================================================================================
370  int version,
371  std::string path,
372  std::ofstream *outstream,
373  std::ofstream *out1stream,
374  std::ofstream *out2stream) const
375 {
376  std::string mthn = "]\t[PixelDetectorConfig::writeXMLHeader()]\t\t\t " ;
377  std::stringstream fullPath ;
378  fullPath << path << "/Pixel_DetectorConfig_" << PixelTimeFormatter::getmSecTime() << ".xml" ;
379  cout << __LINE__ << mthn << "Writing to: " << fullPath.str() << endl ;
380 
381  outstream->open(fullPath.str().c_str()) ;
382 
383  if( !outstream->good() )
384  {
385  cout << __LINE__ << mthn << "FATAL: could not open file " << fullPath.str() << endl ;
386  assert(0) ;
387  }
388 
389  *outstream << "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>" << std::endl ;
390  *outstream << "<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" << std::endl ;
391  *outstream << "" << std::endl ;
392  *outstream << " <!-- " << mthn << "-->" << std::endl ;
393  *outstream << "" << std::endl ;
394  *outstream << " <HEADER>" << std::endl ;
395  *outstream << " <TYPE>" << std::endl ;
396  *outstream << " <EXTENSION_TABLE_NAME>PIXEL_DETECTOR_CONFIG</EXTENSION_TABLE_NAME>" << std::endl ;
397  *outstream << " <NAME>Pixel Detector Configuration</NAME>" << std::endl ;
398  *outstream << " </TYPE>" << std::endl ;
399  *outstream << " <RUN>" << std::endl ;
400  *outstream << " <RUN_TYPE>Pixel Detector Configuration test</RUN_TYPE>" << std::endl ;
401  *outstream << " <RUN_NUMBER>1</RUN_NUMBER>" << std::endl ;
402  *outstream << " <RUN_BEGIN_TIMESTAMP>" << pos::PixelTimeFormatter::getTime() << "</RUN_BEGIN_TIMESTAMP>" << std::endl ;
403  *outstream << " <LOCATION>CERN P5</LOCATION>" << std::endl ;
404  *outstream << " </RUN>" << std::endl ;
405  *outstream << " </HEADER>" << std::endl ;
406  *outstream << "" << std::endl ;
407  *outstream << " <DATA_SET>" << std::endl ;
408  *outstream << " " << std::endl ;
409  *outstream << " <VERSION>" << version << "</VERSION>" << std::endl ;
410  *outstream << " <COMMENT_DESCRIPTION>" << getComment() << "</COMMENT_DESCRIPTION>" << std::endl ;
411  *outstream << " <CREATED_BY_USER>" << getAuthor() << "</CREATED_BY_USER>" << std::endl ;
412  *outstream << " " << std::endl ;
413  *outstream << " <PART>" << std::endl ;
414  *outstream << " <NAME_LABEL>CMS-PIXEL-ROOT</NAME_LABEL>" << std::endl ;
415  *outstream << " <KIND_OF_PART>Detector ROOT</KIND_OF_PART>" << std::endl ;
416  *outstream << " </PART>" << std::endl ;
417 
418 }
419 
420 //=============================================================================================
421 void PixelDetectorConfig::writeXML( std::ofstream *outstream,
422  std::ofstream *out1stream,
423  std::ofstream *out2stream) const
424 {
425  std::stringstream s ; s << __LINE__ << "]\t[PixelDetectorConfig::writeXML()]\t\t\t " ;
426  std::string mthn = s.str() ;
427  if(rocs_.size() == 0)
428  {
429  std::vector<PixelModuleName>::const_iterator imodule=modules_.begin();
430 
431  // This needs to be fixed: given a module name, actually loop over ROCs to write the XML data
432  for (;imodule!=modules_.end();++imodule)
433  {
434  *outstream << " <DATA>" << std::endl ;
435 //----> out << " <ROC_NAME>" << (irocs->first).rocname() << "</ROC_NAME>" << std::endl ;
436  *outstream << " <ROC_STATUS>on</ROC_STATUS>" << std::endl ;
437  *outstream << " </DATA>" << std::endl ;
438  *outstream << " " << std::endl ;
439  }
440  }
441  else
442  {
443  std::map<PixelROCName, PixelROCStatus>::const_iterator irocs = rocs_.begin();
444  for(; irocs != rocs_.end() ; irocs++)
445  {
446  std::string sts = (irocs->second).statusName() ;
447  if( sts == "" ) {sts = "on" ;}
448  *outstream << " " << std::endl ;
449  *outstream << " <DATA>" << std::endl ;
450  *outstream << " <ROC_NAME>" << (irocs->first).rocname() << "</ROC_NAME>" << std::endl ;
451  *outstream << " <ROC_STATUS>" << sts << "</ROC_STATUS>" << std::endl ;
452  *outstream << " </DATA>" << std::endl ;
453  }
454  }
455 }
456 
457 //=============================================================================================
458 void PixelDetectorConfig::writeXMLTrailer(std::ofstream *outstream,
459  std::ofstream *out1stream,
460  std::ofstream *out2stream) const
461 {
462  std::stringstream s ; s << __LINE__ << "]\t[PixelDetectorConfig::writeXMLTrailer()]\t\t\t " ;
463  std::string mthn = s.str() ;
464 
465  *outstream << " " << std::endl ;
466  *outstream << " </DATA_SET>" << std::endl ;
467  *outstream << "</ROOT> " << std::endl ;
468 
469  outstream->close() ;
470 }
471 //=============================================================================================
473 {
474  std::stringstream s ; s << __LINE__ << "]\t[PixelDetectorConfig::writeXML()]\t\t\t " ;
475  std::string mthn = s.str() ;
476 
477  std::stringstream fullPath ;
478 
479  fullPath << path << "/Pixel_DetectorConfig.xml" ;
480  cout << __LINE__ << "]\t" << mthn << "Writing to: " << fullPath.str() << std::endl ;
481 
482  std::ofstream out(fullPath.str().c_str()) ;
483 
484  out << "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>" << std::endl ;
485  out << "<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" << std::endl ;
486  out << " <HEADER>" << std::endl ;
487  out << " <TYPE>" << std::endl ;
488  out << " <EXTENSION_TABLE_NAME>PIXEL_DETECTOR_CONFIG</EXTENSION_TABLE_NAME>" << std::endl ;
489  out << " <NAME>Pixel Detector Configuration</NAME>" << std::endl ;
490  out << " </TYPE>" << std::endl ;
491  out << " <RUN>" << std::endl ;
492  out << " <RUN_TYPE>Pixel Detector Configuration test</RUN_TYPE>" << std::endl ;
493  out << " <RUN_NUMBER>1</RUN_NUMBER>" << std::endl ;
494  out << " <RUN_BEGIN_TIMESTAMP>" << pos::PixelTimeFormatter::getTime() << "</RUN_BEGIN_TIMESTAMP>" << std::endl ;
495  out << " <COMMENT_DESCRIPTION>Test of DetectorConfig xml</COMMENT_DESCRIPTION>" << std::endl ;
496  out << " <LOCATION>CERN TAC</LOCATION>" << std::endl ;
497  out << " <CREATED_BY_USER>Dario Menasce</CREATED_BY_USER>" << std::endl ;
498  out << " </RUN>" << std::endl ;
499  out << " </HEADER>" << std::endl ;
500  out << "" << std::endl ;
501  out << "" << std::endl ;
502 
503  if(rocs_.size() == 0)
504  {
505  std::vector<PixelModuleName>::const_iterator imodule=modules_.begin();
506 
507  // This needs to be fixed: given a module name, actually loop over ROCs to write the XML data
508  for (;imodule!=modules_.end();++imodule)
509  {
510  out << " <DATA>" << std::endl ;
511 //----> out << " <ROC_NAME>" << (irocs->first).rocname() << "</ROC_NAME>" << std::endl ;
512  out << " <ROC_STATUS>on</ROC_STATUS>" << std::endl ;
513  out << " </DATA>" << std::endl ;
514  out << " " << std::endl ;
515  }
516  }
517  else
518  {
519  std::map<PixelROCName, PixelROCStatus>::const_iterator irocs = rocs_.begin();
520  for(; irocs != rocs_.end() ; irocs++)
521  {
522  std::string sts = (irocs->second).statusName() ;
523  if( sts == "" ) {sts = "on" ;}
524  out << " <DATA_SET>" << std::endl ;
525  out << " <VERSION>" << version << "</VERSION>" << std::endl ;
526  out << " <PART>" << std::endl ;
527  out << " <NAME_LABEL>" << (irocs->first).rocname() << "</NAME_LABEL>" << std::endl ;
528  out << " <KIND_OF_PART>ROC</KIND_OF_PART>" << std::endl ;
529  out << " </PART>" << std::endl ;
530  out << " <DATA>" << std::endl ;
531  out << " <ROC_NAME>" << (irocs->first).rocname() << "</ROC_NAME>" << std::endl ;
532  out << " <ROC_STATUS>" << sts << "</ROC_STATUS>" << std::endl ;
533  out << " </DATA>" << std::endl ;
534  out << " </DATA_SET>" << std::endl ;
535  out << " " << std::endl ;
536  }
537  }
538  out << " </DATA_SET>" << std::endl ;
539  out << "</ROOT> " << std::endl ;
540  out.close() ;
541  assert(0) ;
542 }
543 
544 //=============================================================================================
545 void PixelDetectorConfig::addROC( PixelROCName &theROC) // Added by Dario (March 3, 2008)
546 {
547  std::stringstream s ; s << __LINE__ << "]\t[PixelDetectorConfig::addROC()]\t\t\t\t " ;
548  std::string mthn = s.str() ;
549 
550  std::map<PixelROCName, PixelROCStatus>::iterator theROCIt = rocs_.find(theROC) ;
551  if( theROCIt == rocs_.end() ) // if theROC was not there, add it and turn it on
552  {
553  PixelROCStatus theStatus ;
554  theStatus.reset() ;
555  rocs_[theROC] = theStatus ;
556 // cout << __LINE__ << "]\t" << mthn << "Non existing ROC (" << theROC.rocname() << "): adding it" << endl ;
557  } else {
558  theROCIt->second.reset() ; // otherwise just turn it on by resetting it to zero
559 // cout << __LINE__ << "]\t" << mthn << "Already existing ROC (" << theROC.rocname() << "): switching it on" << endl ;
560  }
561 }
562 
563 //=============================================================================================
564 void PixelDetectorConfig::addROC( PixelROCName &theROC, string statusLabel) // modified by MR on 14-05-2008 11:29:51
565 {
566  std::stringstream s ; s << __LINE__ << "]\t[PixelDetectorConfig::addROC()]\t\t\t\t " ;
567  std::string mthn = s.str() ;
568 
569  std::map<PixelROCName, PixelROCStatus>::iterator theROCIt = rocs_.find(theROC) ;
570  if( theROCIt == rocs_.end() ) // if theROC was not there, add it and turn it on
571  {
572  PixelROCStatus theStatus ;
573  theStatus.set(statusLabel) ;
574  theStatus.reset() ;
575  rocs_[theROC] = theStatus ;
576 // cout << __LINE__ << "]\t" << mthn << "Non existing ROC (" << theROC.rocname() << "): adding it" << endl ;
577  } else {
578  theROCIt->second.set(statusLabel) ; // otherwise just turn it on by resetting it to zero
579 // cout << __LINE__ << "]\t" << mthn << "Already existing ROC (" << theROC.rocname() << "): switching it on" << endl ;
580  }
581 }
582 
583 //=============================================================================================
584 void PixelDetectorConfig::removeROC(PixelROCName &theROC) // Added by Dario (March 3, 2008)
585 {
586  std::string mthn = "[PixelDetectorConfig::removeROC()]\t\t\t\t " ;
587 
588  std::map<PixelROCName, PixelROCStatus>::iterator theROCIt = rocs_.find(theROC) ;
589  if( theROCIt != rocs_.end() ) // if theROC was there remove it, otherwise ignore
590  {
591  theROCIt->second.set("noInit") ;
592 // cout << __LINE__ << "]\t" << mthn << "Already existing ROC (" << theROC.rocname() << "): switching it off" << endl ;
593  } else {
594  PixelROCStatus theStatus ;
595  theStatus.set("noInit") ;
596  rocs_[theROC] = theStatus ;
597 // cout << __LINE__ << "]\t" << mthn << "ROC " << theROC.rocname() << " was not individually declared in the file: declare and switch off" << endl ;
598  }
599 }
600 
601 //std::ostream& operator<<(std::ostream& s, const PixelDetectorConfig& dacs){
602 //
603 // s << dacs.getDetectorConfig(0) <<std::endl;
604 //
605 // return s;
606 //
607 //}
608 
const PixelHdwAddress * getHdwAddress(const PixelROCName &aROC) const
This class specifies which detector components are used in the configuration (and eventually should s...
int i
Definition: DBlmapReader.cc:9
This file contains the base class for &quot;pixel configuration data&quot; management.
void writeXML(pos::PixelConfigKey key, int version, std::string path) const
std::set< unsigned int > getFEDs(PixelNameTranslation *translation) const
std::map< unsigned int, std::set< unsigned int > > getFEDsAndChannels(PixelNameTranslation *translation) const
virtual void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out, std::ofstream *out1=NULL, std::ofstream *out2=NULL) const
unsigned int fednumber() const
unsigned int getNModules() const
bool get(ROCstatus stat) const
static std::string getmSecTime(void)
virtual void writeXMLTrailer(std::ofstream *out, std::ofstream *out1=NULL, std::ofstream *out2=NULL) const
list path
Definition: scaleCards.py:51
static std::string getTime(void)
PixelDetectorConfig(std::vector< std::vector< std::string > > &tableMat)
std::string getComment() const
unsigned int fedchannel() const
std::map< PixelROCName, PixelROCStatus > rocs_
PixelModuleName getModule(unsigned int i) const
This class provides utility methods to manipulate ASCII formatted timestamps.
Store mfec, mfecchannel etc.
void writeASCII(std::string dir="") const
std::string getAuthor() const
std::vector< PixelModuleName > modules_
This class implements..
tuple out
Definition: dbtoconf.py:99
void addROC(PixelROCName &, std::string statusLabel)
std::set< PixelChannel > getChannelsOnModule(const PixelModuleName &aModule) const
This is the documentation about PixelNameTranslation...
void set(ROCstatus stat)
This class implements..
This class implements..
Definition: PixelROCName.h:23
This class implements..
list key
Definition: combine.py:13
bool containsModule(const PixelModuleName &moduleToFind) const
tuple filename
Definition: lut2db_cfg.py:20
tuple cout
Definition: gather_cfg.py:121
dbl *** dir
Definition: mlp_gen.cc:35
tuple status
Definition: ntuplemaker.py:245
void removeROC(PixelROCName &)
Definition: vlib.h:209