Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:43:09

0001 #ifndef SiPixel_AbstractHistogram_h
0002 #define SiPixel_AbstractHistogram_h
0003 // -*- C++ -*-
0004 //
0005 // Package:    SiPixelPhase1Common
0006 // Class:      AbstractHistogram
0007 //
0008 // This is a spaceholder for a histogram in 0, 1, or 2 Dimensions. May or may
0009 // not be backed by a TH1 or similar. May not be there at all and created on
0010 // demand. Mainly designed as a value in std::map.
0011 //
0012 // Original Author:  Marcel Schneider
0013 //
0014 
0015 #include "DQMServices/Core/interface/DQMStore.h"
0016 #include "DQM/SiPixelPhase1Common/interface/GeometryInterface.h"
0017 #include <vector>
0018 #include <utility>
0019 #include <cassert>
0020 
0021 struct AbstractHistogram {
0022   int count = 0;  // how many things where inserted already. For concat.
0023   dqm::legacy::MonitorElement* me = nullptr;
0024   TH1* th1 = nullptr;
0025   // This is needed for re-grouping, which happens for counters and harvesting
0026   // This is always an iq out of GeometryInterface::allModules
0027   GeometryInterface::InterestingQuantities iq_sample;
0028 
0029   ~AbstractHistogram() {
0030     // if both are set the ME should own the TH1
0031     if (th1 && !me) {
0032       //std::cout << "+++ Deleting " << th1->GetTitle() << "\n";
0033       delete th1;
0034     }
0035   };
0036 };
0037 
0038 #endif