CMS 3D CMS Logo

SiPixelUtility Class Reference

* Class that handles the SiPixel Quality Tests More...

#include <DQM/SiPixelMonitorClient/interface/SiPixelUtility.h>

List of all members.

Static Public Member Functions

static bool checkME (std::string element, std::string name, std::string &full_path)
static int computeErrorCode (int status)
static int computeErrorCode (DQMStore *bei, std::string &module_path)
static int computeHistoBin (std::string &module_path)
static void createStatusLegendMessages (std::map< std::string, std::pair< int, double > > &messages)
static void fillPaveText (TPaveText *pave, std::map< std::string, std::pair< int, double > > messages)
static int getMEList (std::string name, std::string &dir_path, std::vector< std::string > &me_names)
static int getMEList (std::string name, std::vector< std::string > &values)
static std::vector< std::string > getQTestNameList (MonitorElement *me)
static int getStatus (MonitorElement *me)
static void getStatusColor (double status, int &rval, int &gval, int &bval)
static void getStatusColor (int status, int &icol, std::string &tag)
static void getStatusColor (int status, int &rval, int &gval, int &bval)
static void setDrawingOption (TH1 *hist, float xlow=-1., float xhigh=-1.)
static std::map< std::string,
std::string > 
sourceCodeMap ()
static void split (const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters=" ")


Detailed Description

* Class that handles the SiPixel Quality Tests

Date
2008/03/01 20:19:46
Revision
1.5
Author:
Petra Merkel

Definition at line 22 of file SiPixelUtility.h.


Member Function Documentation

static bool SiPixelUtility::checkME ( std::string  element,
std::string  name,
std::string &  full_path 
) [static]

int SiPixelUtility::computeErrorCode ( int  status  )  [static]

Definition at line 141 of file SiPixelUtility.cc.

References code, dqm::qstatus::ERROR, dqm::qstatus::INSUF_STAT, and dqm::qstatus::WARNING.

00141                                               {
00142   int code = 0;
00143   switch(status){
00144   case dqm::qstatus::INSUF_STAT:
00145     code = 1;
00146     break;
00147   case dqm::qstatus::WARNING:
00148     code = 2;
00149     break;
00150   case dqm::qstatus::ERROR:
00151     code = 3;
00152     break;
00153   } // end switch
00154 
00155   return code;
00156 
00157 }

static int SiPixelUtility::computeErrorCode ( DQMStore bei,
std::string &  module_path 
) [static]

static int SiPixelUtility::computeHistoBin ( std::string &  module_path  )  [static]

static void SiPixelUtility::createStatusLegendMessages ( std::map< std::string, std::pair< int, double > > &  messages  )  [static]

static void SiPixelUtility::fillPaveText ( TPaveText *  pave,
std::map< std::string, std::pair< int, double > >  messages 
) [static]

static int SiPixelUtility::getMEList ( std::string  name,
std::string &  dir_path,
std::vector< std::string > &  me_names 
) [static]

static int SiPixelUtility::getMEList ( std::string  name,
std::vector< std::string > &  values 
) [static]

Referenced by SiPixelActionExecutor::checkQTestResults().

vector< string > SiPixelUtility::getQTestNameList ( MonitorElement me  )  [static]

Definition at line 136 of file SiPixelUtility.cc.

00136                                                                  {
00137   vector<string> qtestNameList;
00138   return qtestNameList;
00139 }

int SiPixelUtility::getStatus ( MonitorElement me  )  [static]

Definition at line 119 of file SiPixelUtility.cc.

References dqm::qstatus::ERROR, MonitorElement::getQReports(), MonitorElement::hasError(), MonitorElement::hasOtherReport(), MonitorElement::hasWarning(), dqm::qstatus::OTHER, dqm::qstatus::STATUS_OK, and dqm::qstatus::WARNING.

Referenced by SiPixelHistoPlotter::makePlot(), and SiPixelInformationExtractor::sendTkUpdatedStatus().

00119                                                 {
00120   int status = 0; 
00121   if (me->getQReports().size() == 0) {
00122     status = 0;
00123   } else if (me->hasError()) {
00124     status = dqm::qstatus::ERROR;
00125   } else if (me->hasWarning()) {
00126     status = dqm::qstatus::WARNING;
00127   } else if (me->hasOtherReport()) {
00128     status = dqm::qstatus::OTHER;
00129   } else {  
00130     status = dqm::qstatus::STATUS_OK;
00131   }
00132   return status;
00133 }

void SiPixelUtility::getStatusColor ( double  status,
int rval,
int gval,
int bval 
) [static]

Definition at line 111 of file SiPixelUtility.cc.

References SiPixelContinuousPalette::b, SiPixelContinuousPalette::g, int, and SiPixelContinuousPalette::r.

00111                                                                                  {
00112   rval = SiPixelContinuousPalette::r[(int)(status * 100)] ;
00113   gval = SiPixelContinuousPalette::g[(int)(status * 100)] ;
00114   bval = SiPixelContinuousPalette::b[(int)(status * 100)] ; 
00115 }

static void SiPixelUtility::getStatusColor ( int  status,
int icol,
std::string &  tag 
) [static]

void SiPixelUtility::getStatusColor ( int  status,
int rval,
int gval,
int bval 
) [static]

Definition at line 74 of file SiPixelUtility.cc.

References dqm::qstatus::ERROR, dqm::qstatus::OTHER, dqm::qstatus::STATUS_OK, and dqm::qstatus::WARNING.

Referenced by SiPixelHistoPlotter::makePlot(), and SiPixelInformationExtractor::sendTkUpdatedStatus().

00074                                                                               {
00075   if (status == dqm::qstatus::STATUS_OK) { 
00076     rval = 0;   gval = 255;   bval = 0; 
00077   } else if (status == dqm::qstatus::WARNING) { 
00078     rval = 255; gval = 255; bval = 0;
00079   } else if (status == dqm::qstatus::ERROR) { 
00080     rval = 255; gval = 0;  bval = 0;
00081   } else if (status == dqm::qstatus::OTHER) { 
00082     rval = 255; gval = 150;  bval = 0;
00083   } else {
00084     rval = 0; gval = 0;  bval = 255;
00085   }        
00086 }

void SiPixelUtility::setDrawingOption ( TH1 *  hist,
float  xlow = -1.,
float  xhigh = -1. 
) [static]

Definition at line 352 of file SiPixelUtility.cc.

Referenced by SiPixelHistoPlotter::makePlot().

00354                                                      {
00355   if (!hist) return;
00356 
00357   TAxis* xa = hist->GetXaxis();
00358   TAxis* ya = hist->GetYaxis();
00359 
00360   xa->SetTitleOffset(0.7);
00361   xa->SetTitleSize(0.06);
00362   xa->SetLabelSize(0.04);
00363   //  xa->SetLabelColor(0);
00364 
00365   ya->SetTitleOffset(0.7);
00366   ya->SetTitleSize(0.06);
00367 
00368 
00369   if (xlow != -1 &&  xhigh != -1.0) {
00370     xa->SetRangeUser(xlow, xhigh);
00371   }
00372 }

map< string, string > SiPixelUtility::sourceCodeMap (  )  [static]

Definition at line 300 of file SiPixelUtility.cc.

00300                                                 {
00301 
00302   map<string,string> sourceCode;
00303   for(int iSource=0; iSource<5;iSource++){
00304     string type;
00305     string    code;
00306     switch(iSource){
00307     case 0: type = "RAW"; code = "1    ";
00308       break;
00309     case 1: type = "DIG"; code = "10   ";
00310       break;
00311     case 2: type = "CLU"; code = "100  ";
00312       break;
00313     case 3: type = "TRK"; code = "1000 ";
00314       break;
00315     case 4: type = "REC"; code = "10000";
00316       break;
00317     } // end of switch
00318     sourceCode[type]=code;
00319   }
00320   return sourceCode;
00321   
00322 }

static void SiPixelUtility::split ( const std::string &  str,
std::vector< std::string > &  tokens,
const std::string &  delimiters = " " 
) [static]


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:32:10 2009 for CMSSW by  doxygen 1.5.4