ATLAS Offline Software
MonitoringFile.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef dqutilsMonitoringFile_h
6 #define dqutilsMonitoringFile_h
7 
8 
9 
10 #include <TObject.h>
11 #include <TFile.h>
12 #include <TString.h>
13 #include "RooRealVar.h"
14 #include <TH1.h>
15 
16 #ifndef __CINT__
17 #include <regex>
18 #else
19 // good enough for CINT
20 namespace std {
21  class regex;
22 }
23 #endif
24 
26 
27 #include <map>
28 #include <string>
29 #include <vector>
30 #include <set>
31 
32 class TDirectory;
33 class TGraph;
34 class TH1F;
35 class TH2F;
36 class TH1D;
37 class TH2D;
38 class TH1I;
39 class TH3F;
40 class TH2;
41 class TH3;
42 class TProfile2D;
43 class TObjArray;
44 class TKey;
45 class TTree;
46 class RooPlot;
47 class TEfficiency;
48 
49 
50 namespace dqutils {
51  typedef std::map<std::string, std::vector<int> > keycyclemap;
52  void populateKeyMapping(TDirectory*, keycyclemap&);
53 
54  class ATLAS_NOT_THREAD_SAFE MonitoringFile: public TObject {
55  public:
56  struct MetaData {
57  inline MetaData(const std::string& name_, const std::string& interval_, const std::string& chain_,
58  const std::string& merge_)
59  : name(name_), interval(interval_), chain(chain_), merge(merge_) { }
60  std::string name;
61  std::string interval;
62  std::string chain;
63  std::string merge;
64  };
65 
66 
68  public:
70  virtual ~OutputMetadata() = default;
71 
72  virtual void fill(const std::string& name,
73  const std::string& interval,
74  const std::string& chain,
75  const std::string& merge);
76  protected:
77  void makeBranch(const char* branchName, const char* branchstr);
78  TTree* m_metadata {};
79  };
80 
81 
83 
84  MonitoringFile(const std::string& fileName);
85 
86  virtual ~MonitoringFile();
87 
88  typedef std::map< std::string, TDirectory* > DirMap_t;
89 
90  static void getAllDirs(DirMap_t& dirmap, TDirectory* dir, const std::string& dirName);
91 
92  static TDirectory* createDir(DirMap_t& dirmap, TDirectory* dir, const std::string& parent, const std::string& path);
93 
94  static TKey* getObjKey(TDirectory* dir, const std::string& path);
95 
96  // enum MergeMethod_t { TH1Add = 0, effAsPerCent, weightedAverage, weightedEff, mergeRebinned, weightedAverage2D,
97  // eventSample };
98 
99  void mergeDirectory(TDirectory* outputDir, const std::vector<TFile*>& inputFiles, bool has_multiple_runs = false,
100  std::map< TFile*, std::string >* prefixes = 0);
101 
102  static void fillMetaDataMap(std::map<std::string, dqutils::MonitoringFile::MetaData>& mdMap, TDirectory* dir);
103 
104  void mergeFiles(const std::string& outFileName, const std::vector<std::string>& files);
105 
106  void mergeFiles(const std::string& outFileName, const std::string& listFileName);
107 
108  static void merge_effAsPerCent(TH2& a, const TH2& b);
109 
110  static void merge_perBinEffPerCent(TH1& a, const TH1& b);
111 
112  static void merge_effAsPerCentAlt(TH1& a, const TH1& b);
113 
114  static void merge_weightedAverage(TH1& a, const TH1& b);
115 
116  static void merge_weightedAverage2D(TH2& a, const TH2& b);
117 
118  static void merge_weightedEff(TH1& a, const TH1& b);
119 
120  static void merge_Rebinned(TH1& a, TH1& b);
121 
122  static void merge_eventSample(TH2& a, const TH2& b);
123 
124  static void merge_RMS(TH1& a, const TH1& b);
125 
126  static void merge_RMSpercentDeviation(TH1& a, const TH1& b);
127 
128  static void merge_lowerLB(TH1& a, const TH1& b);
129 
130  static void merge_identical(TH1& a, const TH1& b);
135  //static void MakeBowingFit(TProfile2D* p2d, TH1F* hm, TH1F* hb);
136  static void fitMergedFile_IDPerfMonManager(const std::string& inFileName, bool isIncremental = false);
137  static void fitMergedFile_DiMuMonManager(const std::string& inFileName, bool isIncremental = false);
138  static void fitMergedFile_IDAlignMonManager(const std::string& inFileName, bool isIncremental = false);
139  static bool CheckHistogram(TFile* f, const char* HistoName);
140  static void fitMergedFile_IDAlignMonResiduals(TFile* f, const std::string& run_dir, const std::string& TriggerName);
141  static void fitMergedFile_IDAlignMonTrackSegments(TFile* file, const std::string& run_dir,
142  const std::string& tracksName);
143  static void fitMergedFile_IDAlignMonGenericTracks(TFile* file, const std::string& run_dir,
144  const std::string& tracksName);
145  static void fitMergedFile_IDAlignMonPVbiases(TFile* file, const std::string& run_dir,
146  const std::string& tracksName);
147  static void fitMergedFile_IDPerfMonKshort(TFile* f, const std::string& run_dir, const std::string& TriggerName);
148  static void fitMergedFile_IDPerfMonJpsi(TFile* f, const std::string& run_dir,
149  const std::string& TriggerName);
150  static void fitMergedFile_IDPerfMonUpsilon(TFile* f, const std::string& run_dir,
151  const std::string& TriggerName);
152  static void fitMergedFile_IDPerfMonZee(TFile* f, const std::string& run_dir, const std::string& TriggerName);
153  static void fitMergedFile_IDPerfMonWenu(TFile* f, const std::string& run_dir, const std::string& TriggerName);
154  static void fitMergedFile_IDPerfMonZMM(TFile* f, const std::string& run_dir, const std::string& TriggerName);
155  static void fitJpsiHistograms(TH1F* hmass, TH1F* hwidth, TH1F* h1[], int n);
156  static void fitUpsilonHistograms(TH1F* hmass, TH1F* hwidth, TH1F* h1[], int n);
157  static void fitZmumuMassPlot(TH1F* hmass);
158  static std::pair<RooRealVar, RooRealVar> fitZmumuMass(TH1F* hmass);
159  static void fitZmumuHistograms(TH1F* hmass, TH1F* hwidth, std::vector<TH1F*> hvec);
160  static void processModule(TFile* f, const std::string& run_dir, TKey* key_module, const std::string& moduleName);
161  static void fitMergedFile_DiMuMonAll(TFile* f, const std::string& run_dir, const std::string& resonName,
162  const std::string& triggerName);
163  static void fitHistos(TH2F* hin, const std::vector<TH1F*>& hout, int mode, const std::string& triggerName,
164  const std::string& resonName, TH1F* m_chi2);
165  static void fillGaussianMeanOrWidth(TH2F* h2d, TH1F* h, float fitMin, float fitMax, int iopt);
166  static void fillMeanOrWidth(TH2F* h2d, TH1F* h, int iopt);
167  static void fillDetPaperMeanRMS(TH2F* h2d, TH1F* h, int iopt);
168 
169  static void meanRMSProjections2D(TH2F* h2d, TH1F* h, int iopt);
170  static void meanRMSProjections3D(TH3F* h3d, TH2F* h, int iopt);
171  static void meanRMSProjections3D_DMRPlot(TH3F* h3d, TH1F* h, int iopt);
172  static void meanRMSProjections3D_XY(TH3F* h3d, TH1F* h, int iXY, int iopt);
173  static TH1F* combineHistos(const char* name, const char* title, TObjArray* plots, int gap);
174  static void setMinWindow(TH1* h1, float min, float max);
175  static float getMedian(TH1* h1);
176  static void ProcessAsymHistograms(TH1F* m_neg, TH1F* m_pos, TH1F* m_asym);
177  static void Make1DProfile(TH1* output, TH2* histo);
178  static void MakeMap(TH2* outputhist, TH3* hist);
179  static int IterativeGaussFit(TH1* hist, double& mu, double& mu_err, double& sigma, double& sigma_err);
180 
181  // For MuonTrackMonitoring
182  static void MuonTrackPostProcess(const std::string& inFileName, bool isIncremental = false);
183  static void MuonTrack_Main(const std::string& inFileName, TString dirname);
184 
185  //For RPC
186  static void RPCPostProcess(const std::string& inFilename, bool isIncremental = false);
187  static bool RPCCheckHistogram(TFile* f, const char* HistoName);
188 
189  //For TGC
190  static void TGCPostProcess(const std::string& inFilename, bool isIncremental = false);
191  static void TGCChannelOccupancy(const std::string& inFilename, std::vector< std::pair< std::string, float > >& p);
192  static void TGCChamberOccupancy(const std::string& inFilename, std::vector< std::pair< std::string,
193  float > >& phigh,
194  std::vector< std::pair< std::string, float > >& plow);
195  static void TGCChamberEfficiency(const std::string& inFilename, std::vector< std::pair< std::string, float > >& p);
196  static void TGCChamberTiming(const std::string& inFilename, std::vector< std::pair< std::string, float > >& pro,
197  std::vector< std::pair< std::string, float > >& ptrg);
198  //static void TGCDQResultsToCool();
199  static void TGCsubsectbin2stationeta(int subsect, int bin, int& station, int& eta);
200  static void TGCsubsect2sectorphi(int subsect, int& sector, int& phi4);
201  static void TGCRawHistogramDivision(const std::string& inFilename);
202  static void TGCLV1HistogramDivision(const std::string& inFilename);
203  static int nTGCWireStripMap(int ws, int etac, int phi48);
204  static int getTGCNumberOfWires(const int istationName, const int layer, const int istationEta,
205  const int istationPhi);
206  static void TGCResetContents(TH1* h);
207 
208  //For MDTvsTGC
209  static void MDTvsTGCPostProcess(const std::string& inFilename, bool isIncremental = false);
210  static void MDTvsTGCEfficiency(const std::string& inFilename);
211  static void MDTvsTGCResetContents(TH1* h);
212 
213  class ATLAS_NOT_THREAD_SAFE PostProcessorFileWrapper: public TFile { //class to keep keep track of histograms we
214  // collect
215  public:
216  PostProcessorFileWrapper(const std::string& inFilename, const std::string& name);
217  ~PostProcessorFileWrapper(); //delete all objects accessed from the TFile whose SetDirectory(0)
218 
219  //function to automatically getObject, obj->SetDirectory(target), if target==0 save target for future deletion
220  //option to supply baseDir to get object from subdir of TFile rather than from TFile itself
221  //target if nothing is supplied thatn the object will be set to 0 (protects against f->Write() writing unintended
222  // copies of your histogram
223  template <class T>
224  void get(const char* namecycle, T*& ptr, TDirectory* baseDir = 0, TDirectory* target = 0); //use
225  // TDirectory->GetObject(const
226  // char* namecycle,
227  // void* &ptr);
228  void setDirectory(TH1* h, TDirectory* dir = 0);
229  void setDirectory(TH2* h, TDirectory* dir = 0);
230  void setDirectory(TGraph* g, TDirectory* dir = 0);
231  void setMetaData(TDirectory* targetDir, TH1* h1, TH1* h2 = 0, TH1* h3 = 0);
232  void error();//call this function if you want the underlying TFile not to write i.e. recover error in program
233  private:
234  std::set<TObject*> m_garbage;
235  std::string m_name;
236  bool m_error {};
237  };
238  //
239  //static bool TGCCheckFile(std::string inFilename, std::string& run_dir);
240  static bool TGCCheckHistogram(TFile* f, TString& hname);
241  static void TGCSetMetaData(TDirectory* targetDir, TH1* h1, TH1* h2 = 0, TH1* h3 = 0);
242 
243  //For HLT Muon
244  static void HLTMuonPostProcess(const std::string& inFilename, bool isIncremental = false);
245  static void HLTMuonHistogramDivision(const std::string& inFilename, TString& run_dir);
246  static void HLTMuonTriggerOverlapMatrix(const std::string& inFilename, TString& run_dir);
247  static bool HLTMuonCheckHistogram(TFile* f, TString& hname);
248  static void HLTMuonHDiv(PostProcessorFileWrapper& mf, TString sdir, TString snum, TString sden, TString seff,
249  TString seffg);
250 
251  //HLT Egamma
252  static void HLTEgammaPostProcess(const std::string& inFilename, bool isIncremental = false);
253 
254  static void HLTEgammaEfficiencyOff(TFile* f, TDirectory* trig_dir, TDirectory* off_dir, const TString& pathNum,
255  const TString& pathEff, const std::vector<TString>& varName);
256  static void HLTEgammaEfficiencyRel(TFile* f, TDirectory* trig_dir, const TString& pathPre, const TString& pathRej,
257  const std::vector<TString>& objStage, const std::vector<TString>& varName);
258 
259  //HLT tau
260  static void HLTTauPostProcess(const std::string& inFilename, bool isIncremental = false);
261 
262  static void HLTTauPostProcess(TFile* f, TDirectory* dir,
263  TString pathApp, TString pathAppEff,
264  const std::vector<TString>& lvlN, const std::vector<TString>& varN,
265  const std::vector< std::pair< int, int > >& ratioIndex, int nameStyle,
266  TString nameApp = "");
267 
268  static std::string getPath(TDirectory* dir);
269 
270  // HLT MET
271  static void HLTMETPostProcess(const std::string& inFileName, bool isIncremental = false);
272  static void HLTMETAveragePhivsEtaMaps(TFile* f, TString& run_dir);
273  static size_t HLTMETGetDQLBNRange(TDirectory*& run_dir, std::vector<TString>& lbnDirs);
274  static int HLTMETGetStatusPerBin(TH1I*& hist, int ymin, int ymax, int rmin, int rmax);
275  static void HLTMETDQFlagSummary(TFile* f, TString& run_dir);
276 
277  // HLT Jet
278  static void HLTCaloPostProcess(const std::string& inFileName, bool isIncremental = false);
279  static void HLTCaloAveragePtPhiEtaMaps(TFile* f, TString& run_dir);
280 
281  // HLT Jet
282  static void HLTJetPostProcess(const std::string& inFileName, bool isIncremental = false);
283  static void HLTJetCalcEfficiencyAndRate(TFile* f, TString& run_dir);
284 
285  //JetTagging
286  static void BJetTaggingPostProcess(const std::string& inFileName, bool isIncremental = false);
287  static void BJetTaggingAdjustRanges(TFile* f);
288  static void BJetTaggingNormalise(TFile* f);
289 
290  //HLT MinBiasMon
291  static void HLTMinBiasMonPostProcess(const std::string& inFileName, bool isIncremental = false);
292  static void HLTMinBiasMonGetTargetHistos(TDirectory* source,
293  std::vector< std::pair<TString, TString> >& targetNames);
294 
295  // primary vertex monitoring
296  static void pv_PrimaryVertexMonitoring_calcResoAndEfficiency(const std::string& inFilename,
297  bool isIncremental = false);
298 
299  // primary vertex multiplicity monitoring
300  static void VxMon_move(const std::string& inFilename, bool isIncremental = false);
301 
302  // L1Calo
303  static void L1CaloPostProcess(const std::string& inFileName, bool isIncremental = false);
304  static void L1CaloStabilityRMS(TFile* f, const TString& nameDir, const TString& nameTag);
305  static void L1CaloFillWithError(TFile* f, const TString& nameDir, const TString& nameData,
306  const TString& nameError);
307  static void L1CaloResetEfficiencies(TFile* f, const TString& effDir,
308  const TString& nameDen, const TString& nameEff,
309  int items, double threshold, int binSkip);
310 
311  // Pixel
312  static void PixelPostProcess(const std::string& inFilename, bool isIncremental = false);
313 
314  // Other helper methods
315  // Compute Bin Errors a la Ullrich, Paterno, Xu (see source file for more details)
316  static int ComputeUPXBinErrors(TH1F* hnum, TH1F* hden, std::vector<float>& errors);
317 
323  virtual bool setFile(const std::string& fileName);
324 
325 
326  virtual void printDirectories();
327 
328  virtual void printStatistics();
329 
330 
335  virtual bool copyHistograms(const std::string& outFileName,
336  const std::string& dirName = "all");
337 
338  static std::string getHanResults(const std::string& hanResultsDir, const std::string& input,
339  const std::string& hcfg, const std::string& hcfg_min10,
340  const std::string& hcfg_min30);
341 
342  virtual void printHanConfig();
343 
344  virtual std::string FindCommon(const std::string& name1, const std::string& name2) const;
345  protected:
346  static std::string getIndentation(const std::string& pathName, const std::string& leadingSpace = "");
347 
349  public:
350  virtual ~HistogramOperation() { }
351  virtual bool execute(TH1* hist) = 0;
352  virtual bool execute(TGraph* graph) = 0;
353  virtual bool execute(TEfficiency* efficiency) = 0;
354  virtual bool executeMD(TH1* hist, const MetaData&) {return execute(hist);}
355  virtual bool executeMD(TGraph* graph, const MetaData&) {return execute(graph);}
356  virtual bool executeMD(TEfficiency* efficiency, const MetaData&) {return execute(efficiency);}
357  };
358 
360  public:
361  CopyHistogram(TDirectory* target, const std::string& dirName);
362  CopyHistogram(const CopyHistogram&) = delete;
363  CopyHistogram& operator = (const CopyHistogram&) = delete;
364  virtual ~CopyHistogram();
365  virtual bool execute(TH1* hist);
366  virtual bool execute(TGraph* graph);
367  virtual bool execute(TEfficiency* eff);
368  virtual bool executeMD(TH1* hist, const MetaData& md);
369  virtual bool executeMD(TGraph* graph, const MetaData& md);
370  virtual bool executeMD(TEfficiency* eff, const MetaData& md);
371  protected:
372  void fillMD(const MetaData& md);
373  TDirectory* m_target {};
374  std::string m_dirName;
375  TTree* m_metadata {};
376  };
377 
379  public:
380  GatherStatistics(const std::string& dirName);
381  virtual bool execute(TH1* hist);
382  virtual bool execute(TGraph* graph);
383  virtual bool execute(TEfficiency* eff);
384 
385  std::string m_dirName;
386  int m_nHist1D {};
387  int m_nHist1DBins {};
388  int m_nGraph {};
389  int m_nGraphPoints {};
390  int m_nHist2D {};
391  int m_nHist2DBins {};
392  int m_nEfficiency {};
393  int m_nEfficiencyBins {};
394  };
395 
397  public:
399  virtual bool execute(TH1* hist);
400  virtual bool execute(TGraph* graph);
401  virtual bool execute(TEfficiency* eff);
402 
403  std::vector<std::string> m_names;
404  };
405 
406 
407  virtual void clearData();
408 
409 
410  static bool dirHasHistogramsInMetadata(TDirectory* dir);
411 
412  static void loopOnHistograms(HistogramOperation& fcn, TDirectory* dir);
413 
414  static bool loopOnHistogramsInMetadata(HistogramOperation& fcn, TDirectory* dir);
415 
416  static bool setListFromFile(std::vector<std::string>& filelist,
417  const std::string& listFileName);
418 
419  TFile* m_file {};
420 
421  /* Methods for merging luminosity block intervals
422  */
423  private:
426  };
427  typedef std::map<TDirectory*, std::vector<TDirectory*> > map_dir_vdir;
428 
429  static void mergeObjsMultiCycles(const std::string&,
430  const std::vector<int>&,
431  TDirectory*, const std::string&,
432  std::unique_ptr<TObject>&);
433  static int mergeObjs(TObject*, TObject*, const std::string &, debugLevel_t debugLevel = none, const std::string& path="");
434  static int mergeLB_createListOfHistos(TDirectory*, TDirectory*, std::vector<std::string>&, debugLevel_t&);
435  static int mergeLB_recursiveDirCopy(TDirectory*, TDirectory*, TDirectory*, std::vector<std::string>&,
436  debugLevel_t&);
437  static int mergeLB_processLBinterval(std::vector<TDirectory*>&, TDirectory*, debugLevel_t&);
438  static void buildLBToIntervalMap(std::vector<TDirectory*>&, std::vector<TDirectory*>&, map_dir_vdir&,
439  debugLevel_t&);
440  static int mergeLB_processLB(std::vector<TDirectory*>&, std::vector<TDirectory*>&, debugLevel_t&);
441  static int mergeLB_processRun(TDirectory*, debugLevel_t&);
442 
443  static Int_t getNumBins(const TH1& hist);
444  std::regex* m_mergeMatchHistoRE {};
445  std::regex* m_mergeMatchDirRE {};
448  bool m_useRE {};
449  static std::atomic<int> m_debugLevel;
450  static std::atomic<int> m_fileCompressionLevel;
451  static bool m_doTiming;
452  static std::unordered_map<std::string,std::clock_t> m_cpuPerHistogram;
453 
454  public:
455  static int mergeLBintervals(const std::string&, const std::string& debugLevel = "none");
456  static int getDebugLevel();
457  static void setDebugLevel(int level);
458  static int getCompressionLevel() {return m_fileCompressionLevel;}
459  static void setCompressionLevel(int level) {m_fileCompressionLevel = level;}
460  bool setHistogramRegEx(const std::string& re);
461  bool setDirectoryRegEx(const std::string& re);
462  void doTiming();
463 
464  ClassDef(MonitoringFile, 0) // Provides functions to manipulate and analyze data-quality monitoring files
465  };
466 
467  std::string getInputDirectory(const std::string& outputDirName, TFile* input, bool has_multiple_runs,
468  std::map< TFile*, std::string >* prefixes);
469 
470  std::string getOutputDirectory(const std::string& inputDirName, TFile* input, bool has_multiple_runs,
471  std::map< TFile*, std::string >* prefixes);
472 
473  std::string getOutputDirectory(TKey* key, TFile* input, bool has_multiple_runs, std::map< TFile*,
474  std::string >* prefixes);
475 
476  template <class T>
477  void MonitoringFile::PostProcessorFileWrapper::get(const char* namecycle, T*& ptr, TDirectory* baseDir,
478  TDirectory* target) {
479  if (baseDir) baseDir->GetObject(namecycle, ptr); // suggested root function
480  else this->GetObject(namecycle, ptr); //suggested root function
481  if (!ptr) return;
482 
483  if ((T::Class())->InheritsFrom("TH1")) {
484  TH1* obj = reinterpret_cast<TH1*> (ptr);
485 
486  obj->SetDirectory(target);
487  if (target == 0) m_garbage.insert(obj);
488  } else {
489  TObject* obj = reinterpret_cast<TObject*>(ptr);
490 
491  if (target == 0) m_garbage.insert(obj);
492  }
493  }
494 } // namespace dqutils
495 
496 // #include "DataQualityUtils/MonitoringFile_PPFileWrapper.cxx"
497 #endif
dqutils::MonitoringFile::CopyHistogram::execute
virtual bool execute(TGraph *graph)
dqutils::MonitoringFile::getAllDirs
static void getAllDirs(DirMap_t &dirmap, TDirectory *dir, const std::string &dirName)
dqutils::ATLAS_NOT_THREAD_SAFE
void getImageBuffer ATLAS_NOT_THREAD_SAFE(TImage **img, TCanvas *myC, char **x, int *y)
Definition: HanOutputFile.cxx:1130
ymin
double ymin
Definition: listroot.cxx:63
dqutils::MonitoringFile::copyHistograms
virtual bool copyHistograms(const std::string &outFileName, const std::string &dirName="all")
Copy the indicated set of histograms to an output file.
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
ReadCellNoiseFromCool.name1
name1
Definition: ReadCellNoiseFromCool.py:233
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
dqutils::MonitoringFile::createDir
static TDirectory * createDir(DirMap_t &dirmap, TDirectory *dir, const std::string &parent, const std::string &path)
dqutils::MonitoringFile
Definition: MonitoringFile.h:54
dqutils::MonitoringFile::setDebugLevel
static void setDebugLevel(int level)
dqutils::MonitoringFile::GatherNames::GatherNames
GatherNames()
dqutils::MonitoringFile::CheckHistogram
static bool CheckHistogram(TFile *f, const char *HistoName)
dqutils::MonitoringFile::printHanConfig
virtual void printHanConfig()
dqt_zlumi_pandas.hname
string hname
Definition: dqt_zlumi_pandas.py:279
dqutils::MonitoringFile::CopyHistogram::execute
virtual bool execute(TH1 *hist)
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
dqutils::MonitoringFile::PostProcessorFileWrapper::get
void get(const char *namecycle, T *&ptr, TDirectory *baseDir=0, TDirectory *target=0)
Definition: MonitoringFile.h:477
dqutils::MonitoringFile::GatherStatistics::execute
virtual bool execute(TEfficiency *eff)
plotmaker.hist
hist
Definition: plotmaker.py:148
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
Epos_Base_Fragment.inputFiles
string inputFiles
Definition: Epos_Base_Fragment.py:18
dqutils::MonitoringFile::HistogramOperation::executeMD
virtual bool executeMD(TH1 *hist, const MetaData &)
Definition: MonitoringFile.h:354
dqutils::MonitoringFile::HistogramOperation::~HistogramOperation
virtual ~HistogramOperation()
Definition: MonitoringFile.h:350
dqutils::MonitoringFile::m_mergeMatchDirREString
std::string m_mergeMatchDirREString
Definition: MonitoringFile.h:447
dirname
std::string dirname(std::string name)
Definition: utils.cxx:200
dqutils::MonitoringFile::CopyHistogram::executeMD
virtual bool executeMD(TH1 *hist, const MetaData &md)
dqutils::MonitoringFile::MetaData::MetaData
MetaData(const std::string &name_, const std::string &interval_, const std::string &chain_, const std::string &merge_)
Definition: MonitoringFile.h:57
dqutils::MonitoringFile::CopyHistogram::CopyHistogram
CopyHistogram(TDirectory *target, const std::string &dirName)
bin
Definition: BinsDiffFromStripMedian.h:43
dqutils::MonitoringFile::getDebugLevel
static int getDebugLevel()
dqutils::MonitoringFile::MetaData
Definition: MonitoringFile.h:56
dqutils::MonitoringFile::clearData
virtual void clearData()
python.base_data.hcfg_min10
hcfg_min10
Definition: base_data.py:23
dqutils::MonitoringFile::DirMap_t
std::map< std::string, TDirectory * > DirMap_t
Definition: MonitoringFile.h:88
dqutils::MonitoringFile::mergeLB_processLBinterval
static int mergeLB_processLBinterval(std::vector< TDirectory * > &, TDirectory *, debugLevel_t &)
python.base_data.hcfg
hcfg
Definition: base_data.py:22
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
dqutils::MonitoringFile::getObjKey
static TKey * getObjKey(TDirectory *dir, const std::string &path)
read_hist_ntuple.h1
h1
Definition: read_hist_ntuple.py:21
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
dqutils::MonitoringFile::CopyHistogram::fillMD
void fillMD(const MetaData &md)
CaloSwCorrections.gap
def gap(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:212
dqutils::MonitoringFile::CopyHistogram::execute
virtual bool execute(TEfficiency *eff)
dqutils::MonitoringFile::MonitoringFile
MonitoringFile()
dqutils::MonitoringFile::HistogramOperation::executeMD
virtual bool executeMD(TGraph *graph, const MetaData &)
Definition: MonitoringFile.h:355
dqutils::keycyclemap
std::map< std::string, std::vector< int > > keycyclemap
Definition: MonitoringFile.h:51
dqutils::MonitoringFile::getCompressionLevel
static int getCompressionLevel()
Definition: MonitoringFile.h:458
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
dqutils::MonitoringFile::HistogramOperation::execute
virtual bool execute(TEfficiency *efficiency)=0
dqutils::MonitoringFile::getHanResults
static std::string getHanResults(const std::string &hanResultsDir, const std::string &input, const std::string &hcfg, const std::string &hcfg_min10, const std::string &hcfg_min30)
dqutils::MonitoringFile::~MonitoringFile
virtual ~MonitoringFile()
DQPostProcessTest.mf
mf
Definition: DQPostProcessTest.py:19
m_file
std::unique_ptr< TFile > m_file
description: this is a custom writer for the old-school drivers that don't use an actual writer
Definition: OutputStreamData.cxx:52
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
python.checkMetadata.metadata
metadata
Definition: checkMetadata.py:175
dqutils::MonitoringFile::HistogramOperation::executeMD
virtual bool executeMD(TEfficiency *efficiency, const MetaData &)
Definition: MonitoringFile.h:356
dqutils::MonitoringFile::MonitoringFile
MonitoringFile(const std::string &fileName)
dqutils::MonitoringFile::m_debugLevel
static std::atomic< int > m_debugLevel
Definition: MonitoringFile.h:449
dqutils::MonitoringFile::mergeFiles
void mergeFiles(const std::string &outFileName, const std::string &listFileName)
DumpGeoConfig.outFileName
string outFileName
Definition: DumpGeoConfig.py:252
dqutils::MonitoringFile::fillMetaDataMap
static void fillMetaDataMap(std::map< std::string, dqutils::MonitoringFile::MetaData > &mdMap, TDirectory *dir)
dqutils::MonitoringFile::loopOnHistograms
static void loopOnHistograms(HistogramOperation &fcn, TDirectory *dir)
dqutils::MonitoringFile::m_cpuPerHistogram
static std::unordered_map< std::string, std::clock_t > m_cpuPerHistogram
Definition: MonitoringFile.h:452
dqutils::MonitoringFile::loopOnHistogramsInMetadata
static bool loopOnHistogramsInMetadata(HistogramOperation &fcn, TDirectory *dir)
dqutils::MonitoringFile::CopyHistogram::CopyHistogram
CopyHistogram(const CopyHistogram &)=delete
efficiency
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
Definition: dependence.cxx:128
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
dqutils::MonitoringFile::HistogramOperation
Definition: MonitoringFile.h:348
covarianceTool.pathName
pathName
Definition: covarianceTool.py:704
dqutils::MonitoringFile::OutputMetadata::makeBranch
void makeBranch(const char *branchName, const char *branchstr)
dqutils::MonitoringFile::CopyHistogram::~CopyHistogram
virtual ~CopyHistogram()
dqutils::populateKeyMapping
void populateKeyMapping(TDirectory *, keycyclemap &)
dqutils::MonitoringFile::setCompressionLevel
static void setCompressionLevel(int level)
Definition: MonitoringFile.h:459
dqutils::MonitoringFile::CopyHistogram::executeMD
virtual bool executeMD(TGraph *graph, const MetaData &md)
dqutils::MonitoringFile::MetaData::merge
std::string merge
Definition: MonitoringFile.h:63
dqutils::MonitoringFile::OutputMetadata::fill
virtual void fill(const std::string &name, const std::string &interval, const std::string &chain, const std::string &merge)
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
beamspotman.n
n
Definition: beamspotman.py:731
PixelAthClusterMonAlgCfg.varName
string varName
end cluster ToT and charge
Definition: PixelAthClusterMonAlgCfg.py:125
dqutils::MonitoringFile::map_dir_vdir
std::map< TDirectory *, std::vector< TDirectory * > > map_dir_vdir
Definition: MonitoringFile.h:427
dqutils::MonitoringFile::MetaData::name
std::string name
Definition: MonitoringFile.h:60
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
dqutils::MonitoringFile::setHistogramRegEx
bool setHistogramRegEx(const std::string &re)
covarianceTool.title
title
Definition: covarianceTool.py:542
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
dqutils::MonitoringFile::m_mergeMatchHistoREString
std::string m_mergeMatchHistoREString
Definition: MonitoringFile.h:446
getLatestRuns.interval
interval
Definition: getLatestRuns.py:24
generateReferenceFile.files
files
Definition: generateReferenceFile.py:12
dqutils::getOutputDirectory
std::string getOutputDirectory(const std::string &inputDirName, TFile *input, bool has_multiple_runs, std::map< TFile *, std::string > *prefixes)
file
TFile * file
Definition: tile_monitor.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
IDTPMcnv.inFileName
inFileName
Definition: IDTPMcnv.py:17
dqutils::MonitoringFile::OutputMetadata::~OutputMetadata
virtual ~OutputMetadata()=default
dqutils::MonitoringFile::getPath
static std::string getPath(TDirectory *dir)
dqutils::MonitoringFile::mergeLB_processRun
static int mergeLB_processRun(TDirectory *, debugLevel_t &)
dqutils::MonitoringFile::GatherNames::m_names
std::vector< std::string > m_names
Definition: MonitoringFile.h:403
dqutils::MonitoringFile::PostProcessorFileWrapper
Definition: MonitoringFile.h:213
Preparation.mode
mode
Definition: Preparation.py:94
hist_file_dump.f
f
Definition: hist_file_dump.py:135
InDetDD::none
@ none
Definition: InDetDD_Defs.h:19
dqutils::getInputDirectory
std::string getInputDirectory(const std::string &outputDirName, TFile *input, bool has_multiple_runs, std::map< TFile *, std::string > *prefixes)
DQHistogramMerge.debugLevel
debugLevel
Definition: DQHistogramMerge.py:41
dqutils::MonitoringFile::CopyHistogram::executeMD
virtual bool executeMD(TEfficiency *eff, const MetaData &md)
dqutils
Definition: CoolMdt.h:76
dqutils::MonitoringFile::CopyHistogram::m_dirName
std::string m_dirName
Definition: MonitoringFile.h:374
dqutils::MonitoringFile::MetaData::interval
std::string interval
Definition: MonitoringFile.h:61
CscCalibQuery.outputDir
string outputDir
Definition: CscCalibQuery.py:261
dqutils::MonitoringFile::mergeLB_recursiveDirCopy
static int mergeLB_recursiveDirCopy(TDirectory *, TDirectory *, TDirectory *, std::vector< std::string > &, debugLevel_t &)
beamspotman.dir
string dir
Definition: beamspotman.py:623
dqutils::MonitoringFile::debugLevel_t
debugLevel_t
Definition: MonitoringFile.h:424
mergePhysValFiles.errors
list errors
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:43
merge.output
output
Definition: merge.py:17
dqutils::MonitoringFile::doTiming
void doTiming()
dqutils::MonitoringFile::buildLBToIntervalMap
static void buildLBToIntervalMap(std::vector< TDirectory * > &, std::vector< TDirectory * > &, map_dir_vdir &, debugLevel_t &)
dqutils::MonitoringFile::mergeObjs
static int mergeObjs(TObject *, TObject *, const std::string &, debugLevel_t debugLevel=none, const std::string &path="")
dqutils::MonitoringFile::GatherStatistics::GatherStatistics
GatherStatistics(const std::string &dirName)
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
dqutils::MonitoringFile::mergeLB_processLB
static int mergeLB_processLB(std::vector< TDirectory * > &, std::vector< TDirectory * > &, debugLevel_t &)
threshold
Definition: chainparser.cxx:74
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
dqutils::MonitoringFile::HistogramOperation::execute
virtual bool execute(TGraph *graph)=0
dqutils::MonitoringFile::GatherStatistics
Definition: MonitoringFile.h:378
dqutils::MonitoringFile::mergeObjsMultiCycles
static void mergeObjsMultiCycles(const std::string &, const std::vector< int > &, TDirectory *, const std::string &, std::unique_ptr< TObject > &)
dqutils::MonitoringFile::dirHasHistogramsInMetadata
static bool dirHasHistogramsInMetadata(TDirectory *dir)
dqutils::MonitoringFile::printDirectories
virtual void printDirectories()
dqutils::MonitoringFile::GatherStatistics::execute
virtual bool execute(TGraph *graph)
dqutils::MonitoringFile::GatherNames::execute
virtual bool execute(TH1 *hist)
dqutils::MonitoringFile::OutputMetadata::OutputMetadata
OutputMetadata(TTree *metadata)
dqutils::MonitoringFile::OutputMetadata
Definition: MonitoringFile.h:67
python.base_data.hcfg_min30
hcfg_min30
Definition: base_data.py:24
dqutils::MonitoringFile::setDirectoryRegEx
bool setDirectoryRegEx(const std::string &re)
dqutils::MonitoringFile::mergeLBintervals
static int mergeLBintervals(const std::string &, const std::string &debugLevel="none")
dqutils::MonitoringFile::m_doTiming
static bool m_doTiming
Definition: MonitoringFile.h:451
a
TList * a
Definition: liststreamerinfos.cxx:10
h
dqutils::MonitoringFile::mergeDirectory
void mergeDirectory(TDirectory *outputDir, const std::vector< TFile * > &inputFiles, bool has_multiple_runs=false, std::map< TFile *, std::string > *prefixes=0)
dqutils::MonitoringFile::m_fileCompressionLevel
static std::atomic< int > m_fileCompressionLevel
Definition: MonitoringFile.h:450
copySelective.target
string target
Definition: copySelective.py:37
python.envutil.filelist
filelist
print ("Checking files %s..." % fullfile)
Definition: envutil.py:133
re
const boost::regex re(r_e)
DEBUG
#define DEBUG
Definition: page_access.h:11
dqutils::MonitoringFile::PostProcessorFileWrapper::m_name
std::string m_name
Definition: MonitoringFile.h:235
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
dqutils::MonitoringFile::mergeFiles
void mergeFiles(const std::string &outFileName, const std::vector< std::string > &files)
covarianceTool.plots
plots
Definition: covarianceTool.py:698
python.base_data.hanResultsDir
hanResultsDir
Definition: base_data.py:32
dqutils::MonitoringFile::FindCommon
virtual std::string FindCommon(const std::string &name1, const std::string &name2) const
dqutils::MonitoringFile::HistogramOperation::execute
virtual bool execute(TH1 *hist)=0
dqutils::MonitoringFile::GatherStatistics::execute
virtual bool execute(TH1 *hist)
dqutils::MonitoringFile::GatherNames
Definition: MonitoringFile.h:396
extractSporadic.nameDir
string nameDir
Definition: extractSporadic.py:85
dqutils::MonitoringFile::getIndentation
static std::string getIndentation(const std::string &pathName, const std::string &leadingSpace="")
dqutils::MonitoringFile::GatherStatistics::m_dirName
std::string m_dirName
Definition: MonitoringFile.h:385
dqutils::MonitoringFile::MetaData::chain
std::string chain
Definition: MonitoringFile.h:62
dqt_zlumi_alleff_HIST.eff
int eff
Definition: dqt_zlumi_alleff_HIST.py:113
copySelective.source
string source
Definition: copySelective.py:32
dqutils::MonitoringFile::printStatistics
virtual void printStatistics()
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
dqutils::MonitoringFile::mergeLB_createListOfHistos
static int mergeLB_createListOfHistos(TDirectory *, TDirectory *, std::vector< std::string > &, debugLevel_t &)
dqutils::MonitoringFile::PostProcessorFileWrapper::m_garbage
std::set< TObject * > m_garbage
Definition: MonitoringFile.h:234
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
get_generator_info.error
error
Definition: get_generator_info.py:40
plotBeamSpotCompare.histo
histo
Definition: plotBeamSpotCompare.py:415
checker_macros.h
Define macros for attributes used to control the static checker.
python.PyAthena.obj
obj
Definition: PyAthena.py:132
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
dqutils::MonitoringFile::GatherNames::execute
virtual bool execute(TEfficiency *eff)
DQHistogramMerge.isIncremental
isIncremental
Definition: DQHistogramMerge.py:37
dqutils::MonitoringFile::setFile
virtual bool setFile(const std::string &fileName)
Clears all previous data and opens the file with the given name for analysis, returning a boolean ind...
dqutils::MonitoringFile::CopyHistogram
Definition: MonitoringFile.h:359
dqutils::MonitoringFile::GatherNames::execute
virtual bool execute(TGraph *graph)
merge
Definition: merge.py:1
dqutils::MonitoringFile::setListFromFile
static bool setListFromFile(std::vector< std::string > &filelist, const std::string &listFileName)
ymax
double ymax
Definition: listroot.cxx:64
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37