CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
check_runcomplete.cc File Reference
#include <Riostream.h>
#include <TDirectory.h>
#include <TFile.h>
#include <TROOT.h>
#include <TStyle.h>
#include <TKey.h>
#include <TH1.h>
#include <TH2.h>
#include <TH2D.h>
#include <TCanvas.h>
#include <TGraph.h>
#include <TPaveStats.h>
#include <TText.h>
#include <TLegend.h>
#include <string>
#include <utility>
#include <vector>
#include <sstream>
#include <algorithm>
#include <TString.h>
#include <TColor.h>
#include <dirent.h>
#include "check_runcomplete.h"

Go to the source code of this file.

Functions

int check_runcomplete (std::string filename)
 
int main (int argc, char *argv[])
 
int read_runflag (std::string filename)
 

Function Documentation

int check_runcomplete ( std::string  filename)

Definition at line 48 of file check_runcomplete.cc.

References gpuVertexFinder::printf(), and read_runflag().

Referenced by main().

48  {
49  int runflag = read_runflag(filename);
50  if (runflag == 1) {
51  printf("************************************\n");
52  printf("**\n");
53  printf("** W A R N I N G: the DQM file %s does not exist", filename.c_str());
54  printf("**\n");
55  printf("************************************\n");
56  } else if (runflag == 2) {
57  printf("************************************\n");
58  printf("**\n");
59  printf("** W A R N I N G: the DQM file %s is incomplete", filename.c_str());
60  printf("**\n");
61  printf("************************************\n");
62  } else if (runflag != 0) {
63  printf("************************************\n");
64  printf("**\n");
65  printf("** W A R N I N G: problems found in the DQM file %s", filename.c_str());
66  printf("**\n");
67  printf("************************************\n");
68  }
69  return runflag;
70 }
int read_runflag(std::string filename)
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
tuple filename
Definition: lut2db_cfg.py:20
int main ( int  argc,
char *  argv[] 
)

===============================================================================================================================================================================================


variant2: for each run define phi-averaged A for normalization channel (Dref,16) and then, divide Rijk on it, i.e. get RRijk

eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=29 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=28

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Definition at line 28 of file check_runcomplete.cc.

References check_runcomplete(), and gather_cfg::cout.

28  {
29  if (argc == 2) {
30  char *cfile = argv[1];
31 
32  std::cout << "ready to check file " << cfile << std::endl;
33 
34  int returncode = check_runcomplete(cfile);
35  if (returncode == 0)
36  std::cout << "DQM file is ok" << std::endl;
37 
38  return returncode;
39 
40  } else {
41  std::cout << "Too few arguments: " << argc << std::endl;
42  return -1;
43  }
44 
45  return -9;
46 }
int check_runcomplete(std::string filename)
tuple argc
Definition: dir2webdir.py:39
tuple cout
Definition: gather_cfg.py:144
int read_runflag ( std::string  filename)

Definition at line 72 of file check_runcomplete.cc.

References fileCollector::dqmfile, submitPVResolutionJobs::key, GetRecoTauVFromDQM_MC_cff::next, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by check_runcomplete().

72  {
73  std::string nrun = filename.substr(filename.find("_R000") + 5, 6);
74 
75  TFile *dqmfile = TFile::Open(filename.c_str(), "READ");
76 
77  if (dqmfile == nullptr)
78  return 1;
79 
80  std::string infodir = "DQMData/Run " + nrun + "/Info/Run summary/ProvInfo";
81  gDirectory->cd(infodir.c_str());
82 
83  TIter next(gDirectory->GetListOfKeys());
84  TKey *key;
85 
86  int isruncomplete = -1;
87 
88  while ((key = dynamic_cast<TKey *>(next()))) {
89  std::string svar = key->GetName();
90  if (svar.empty())
91  continue;
92 
93  if (svar.find("runIsComplete") != std::string::npos) {
94  std::string statusflag = svar.substr(svar.rfind('<') - 1, 1);
95  isruncomplete = atoi(statusflag.c_str());
96  }
97  }
98 
99  dqmfile->Close();
100 
101  if (isruncomplete == -1)
102  return 3;
103  if (isruncomplete == 0)
104  return 2;
105  if (isruncomplete == 1)
106  return 0;
107 
108  return -8;
109 }
tuple key
prepare the HTCondor submission files and eventually submit them
tuple filename
Definition: lut2db_cfg.py:20