Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:19

0001 #ifndef ApeOverview_h
0002 #define ApeOverview_h
0003 
0004 #include <vector>
0005 #include <map>
0006 
0007 #include "TString.h"
0008 #include "TCanvas.h"
0009 #include "TFile.h"
0010 #include "TH1.h"
0011 #include "TH2.h"
0012 
0013 
0014 
0015 
0016 class ApeOverview{
0017    public:
0018       ApeOverview(const TString inputFileName);
0019       ~ApeOverview();
0020       
0021       void whichModuleInFile(int);  // if several modules were registered in TFileService, give nr. of wanted one (alphabetical order)
0022       
0023       void onlyZoomedHists();  // if wanted, has to be set before getOverview()
0024       
0025       void setSectorsForOverview(const TString& sectors);  // comma separated list; if wanted, has to be set before getOverview()
0026       
0027       void getOverview();
0028       
0029       enum HistLevel{event, track, sector};
0030       void printOverview(const TString& outputFileName = "apeOverview.ps", const HistLevel& histLevel = ApeOverview::event);  //ApeOverview::event, ApeOverview::track, ApeOverview::sector
0031       
0032    private:
0033       
0034       TString setCanvasName()const;
0035       
0036       void eventAndTrackHistos();
0037       
0038       int drawHistToPad(const TString histName, const bool setLogScale = true);
0039       
0040       
0041       enum PlotDimension{dim1,dim2};
0042       int setNewCanvas(const PlotDimension& pDim);
0043       
0044       
0045       
0046       // --------------------------------------------------- member data ---------------------------------------------------
0047       
0048       TFile* inputFile_;
0049       
0050       int moduleNo_;
0051       
0052       bool onlyZoomedHists_;
0053       
0054       std::vector<unsigned int> vSelectedSector_;
0055       
0056       TString firstSelectedSector_;
0057       
0058       TString pluginDir_, histDir_;
0059       
0060       HistLevel histLevel_;
0061       
0062       typedef std::pair<unsigned int, unsigned int> PadCounterPair;
0063       PadCounterPair eventPadCounter_, trackPadCounter_;
0064       std::map<unsigned int, PadCounterPair> mSectorPadCounter_;
0065       
0066       unsigned int sectorCounter_;
0067       
0068       typedef std::pair<std::vector<TCanvas*>, std::vector<TCanvas*> > CanvasPair;  //contain (1DHists, 2DAndProfileHists)
0069       CanvasPair eventPair_, trackPair_;
0070       std::map<unsigned int,CanvasPair> mSectorPair_;
0071       
0072 };
0073 
0074 
0075 #endif