CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
SiPixelHDQMInspector.cc File Reference
#include "DQMServices/Diagnostic/interface/HDQMInspector.h"
#include "DQM/SiPixelHistoricInfoClient/interface/HDQMInspectorConfigSiPixel.h"
#include "DQMServices/Diagnostic/interface/DQMHistoryTrendsConfig.h"
#include "DQMServices/Diagnostic/interface/DQMHistoryCreateTrend.h"
#include <string>
#include <vector>
#include <memory>
#include <algorithm>
#include "FWCore/FWLite/interface/AutoLibraryLoader.h"
#include <TSystem.h>

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 
void runSiPixelInspector (const string &dbName, const string &tagName, const string &Password, const string &whiteListFile, const int Start, const int End, const int nRuns)
 
void SiPixelHDQMInspector (const string &dbName, const string &tagName, const string &password, const std::string &whiteListFile, const int start, const int end)
 Simple method to create the trends. The actual operations are performed in runSiPixelInspector. More...
 
void SiPixelHDQMInspector (const string &dbName, const string &tagName, const string &password, const std::string &whiteListFile, const int nRuns)
 Simple method to create the trends. The actual operations are performed in runSiPixelInspector. More...
 

Variables

string const BlackList = ""
 
string const Condition = "0@SUMOFF_nclusters_OffTrack@yMean > 0"
 

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 81 of file SiPixelHDQMInspector.cc.

References dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, AutoLibraryLoader::enable(), and SiPixelHDQMInspector().

82 {
83  gSystem->Load( "libFWCoreFWLite" );
85 
86  if (argc != 6 && argc != 7) {
87  cerr << "Usage: " << argv[0] << " [Database] [TagName] [Password] [WhiteListFile] [NRuns] " << endl;
88  cerr << "Or: " << argv[0] << " [Database] [TagName] [Password] [WhiteListFile] [FirstRun] [LastRun] " << endl;
89  return 1;
90  }
91 
92  if (argc == 6) {
93  cout << "Creating trends for NRuns = " << argv[5] << " for tag: " << argv[2] << endl;
94  SiPixelHDQMInspector( argv[1], argv[2], argv[3], argv[4], atoi(argv[5]) );
95  } else if(argc == 7) {
96  cout << "Creating trends for range: " << argv[5] << " " << argv[6] << " for tag: " << argv[2] << endl;
97  SiPixelHDQMInspector( argv[1], argv[2], argv[3], argv[4], atoi(argv[5]), atoi(argv[6]) );
98  }
99 
100  return 0;
101 }
void SiPixelHDQMInspector(const string &dbName, const string &tagName, const string &password, const std::string &whiteListFile, const int start, const int end)
Simple method to create the trends. The actual operations are performed in runSiPixelInspector.
tuple argc
Definition: dir2webdir.py:38
static void enable()
enable automatic library loading
tuple cout
Definition: gather_cfg.py:121
void runSiPixelInspector ( const string &  dbName,
const string &  tagName,
const string &  Password,
const string &  whiteListFile,
const int  Start,
const int  End,
const int  nRuns 
)

Extraction of the summary information using DQMServices/Diagnostic/test/HDQMInspector.
The sqlite database should have been filled using the new SiPixelHistoryDQMService.

Definition at line 23 of file SiPixelHDQMInspector.cc.

References BlackList, DQMHistoryCreateTrend::closeFile(), Condition, HDQMDatabaseProducer::config, DQMHistoryCreateTrend::setBlackList(), DQMHistoryCreateTrend::setDB(), DQMHistoryCreateTrend::setDebug(), DQMHistoryCreateTrend::setDoStat(), DQMHistoryCreateTrend::setSkip99s(), and DQMHistoryCreateTrend::setWhiteListFromFile().

Referenced by SiPixelHDQMInspector().

25 {
26  HDQMInspectorConfigSiPixel PixelConfig;
27  DQMHistoryCreateTrend makeTrend(&PixelConfig);
28 
29  // Database and output configuration
30  makeTrend.setDB(dbName,tagName,"/afs/cern.ch/cms/DB/conddb");
31  makeTrend.setDebug(0);
32  makeTrend.setDoStat(1);
33  makeTrend.setSkip99s(true);
34  makeTrend.setBlackList(BlackList);
35  // makeTrend.setWhiteList(WhiteList);
36  //makeTrend.setSeparator("@@#@@"); // TO change the seperator
37  makeTrend.setWhiteListFromFile(whiteListFile);
38 
39  // Definition of trends
40  typedef DQMHistoryTrendsConfig Trend;
41  vector<Trend> config;
42  config.push_back(Trend( "1@SUMOFF_adc@yMean", "adc_yMean_Barrel.gif", 0, Condition, "", Start, End, nRuns ));
43  config.push_back(Trend( "6@SUMOFF_adc@yMean", "adc_yMean_Endcap.gif", 0, Condition, "", Start, End, nRuns ));
44  config.push_back(Trend( "0@SUMOFF_charge_OffTrack@yMean", "charge_OffTrack_yMean.gif", 0, Condition, "", Start, End, nRuns ));
45  config.push_back(Trend( "1@SUMOFF_charge_OnTrack@yMean", "charge_OnTrack_yMean_Barrel.gif", 0, Condition, "", Start, End, nRuns ));
46  config.push_back(Trend( "6@SUMOFF_charge_OnTrack@yMean", "charge_OnTrack_yMean_Endcap.gif", 0, Condition, "", Start, End, nRuns ));
47  config.push_back(Trend( "0@SUMOFF_nRecHits@yMean", "nRecHits_yMean.gif", 0, Condition, "", Start, End, nRuns ));
48  config.push_back(Trend( "0@SUMOFF_nclusters_OffTrack@yMean", "nclusters_OffTrack_yMean.gif", 0, Condition, "", Start, End, nRuns ));
49  config.push_back(Trend( "0@SUMOFF_nclusters_OnTrack@yMean", "nclusters_OnTrack_yMean.gif", 0, Condition, "", Start, End, nRuns ));
50  config.push_back(Trend( "0@SUMOFF_ndigis@yMean", "ndigis_yMean.gif", 0, Condition, "", Start, End, nRuns ));
51  config.push_back(Trend( "0@SUMOFF_size_OffTrack@yMean", "size_OffTrack_yMean.gif", 0, Condition, "", Start, End, nRuns ));
52  config.push_back(Trend( "0@SUMOFF_size_OnTrack@yMean", "size_OnTrack_yMean.gif", 0, Condition, "", Start, End, nRuns ));
53  config.push_back(Trend( "0@ntracks_generalTracks@NTracksPixOverAll", "NTracksPixOverAll.gif", 0, Condition, "", Start, End, nRuns ));
54  config.push_back(Trend( "0@ntracks_generalTracks@NTracksFPixOverBPix", "NTracksFPixOverBPix.gif", 0, Condition, "", Start, End, nRuns ));
55 
56  config.push_back(Trend( "0@bigEventRate@yMean", "bigEventRate_yMean.gif", 0, Condition, "", Start, End, nRuns ));
57  config.push_back(Trend( "0@bigFpixClusterEventRate@yMean", "bigFpixClusterEventRate_yMean.gif", 0, Condition, "", Start, End, nRuns ));
58  config.push_back(Trend( "0@pixEventRate@yMean", "pixEventRate_yMean.gif", 0, Condition, "", Start, End, nRuns ));
59 
60  // Creation of trends
61  for_each(config.begin(), config.end(), makeTrend);
62 
63  // Close the output file
64  makeTrend.closeFile();
65 }
string dbName
Definition: EcalCondDB.py:76
string const Condition
string const BlackList
void SiPixelHDQMInspector ( const string &  dbName,
const string &  tagName,
const string &  password,
const std::string &  whiteListFile,
const int  start,
const int  end 
)

Simple method to create the trends. The actual operations are performed in runSiPixelInspector.

Definition at line 68 of file SiPixelHDQMInspector.cc.

References runSiPixelInspector().

Referenced by main().

70 {
71  runSiPixelInspector( dbName, tagName, password, whiteListFile, start, end, 0 );
72 }
void runSiPixelInspector(const string &dbName, const string &tagName, const string &Password, const string &whiteListFile, const int Start, const int End, const int nRuns)
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
string dbName
Definition: EcalCondDB.py:76
#define end
Definition: vmac.h:37
void SiPixelHDQMInspector ( const string &  dbName,
const string &  tagName,
const string &  password,
const std::string &  whiteListFile,
const int  nRuns 
)

Simple method to create the trends. The actual operations are performed in runSiPixelInspector.

Definition at line 75 of file SiPixelHDQMInspector.cc.

References runSiPixelInspector().

77 {
78  runSiPixelInspector( dbName, tagName, password, whiteListFile, 0, 0, nRuns );
79 }
void runSiPixelInspector(const string &dbName, const string &tagName, const string &Password, const string &whiteListFile, const int Start, const int End, const int nRuns)
string dbName
Definition: EcalCondDB.py:76

Variable Documentation

string const BlackList = ""

Definition at line 16 of file SiPixelHDQMInspector.cc.

Referenced by runSiPixelInspector().

string const Condition = "0@SUMOFF_nclusters_OffTrack@yMean > 0"

Definition at line 15 of file SiPixelHDQMInspector.cc.

Referenced by runSiPixelInspector().