Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Data.h

Go to the documentation of this file.
00001 #ifndef ANP_PLOT_DATA_H
00002 #define ANP_PLOT_DATA_H
00003 
00004 // $Id: Data.h,v 1.7 2007/12/14 02:40:27 rustem Exp $
00005 //
00006 // Plot pairs (key, data)
00007 //
00008 
00009 // C++
00010 #include <map>
00011 
00012 // Local
00013 #include "PhysicsNtuple/DataItem.h"
00014 #include "PhysicsNtuple/Handle.h"
00015 #include "PhysicsNtuple/KeyPair.h"
00016 
00017 // Local
00018 #include "DataCorr.h"
00019 
00020 class TDirectory;
00021 class TH1;
00022 class TH2;
00023 
00024 namespace Anp
00025 {
00026    namespace Plot
00027    {      
00028       typedef KeyPair<short> HistKey;
00029       typedef std::map<short, TH1 *>   Short1Map;
00030       typedef std::map<HistKey, TH2 *> Short2Map;
00031       typedef std::map<HistKey, TH1 *> CorrMap;
00032 
00033       typedef std::map<short, std::vector<Anp::DataItem<float, double> > >  FloatMap;
00034 
00035       class Data: public virtual Base
00036       {
00037       public:
00038 
00039          Data();         
00040          virtual ~Data();
00041 
00042          void Fill(DataIter ibeg, DataIter iend, double weight);
00043 
00044          void Set(const std::string &key, unsigned int value);
00045 
00046          void Set(TDirectory *dir);
00047 
00048       private:
00049 
00050          TH1* Fill(short key, float data, double weight);
00051 
00052          TH2* Get(Short2Map &smap, TDirectory *dir, short xkey, short ykey);
00053          TH1* Get(CorrMap   &cmap, TDirectory *dir, short xkey, short ykey);
00054 
00055       private:
00056 
00057          bool fPlot1d;
00058          bool fPlot2d;
00059          bool fPlotAll;
00060 
00061          unsigned int fCorrSize;
00062          unsigned int fFillFrac;
00063          unsigned int fFillNbin;
00064          unsigned int fFillSize;
00065 
00066          TDirectory *fDir1d;
00067          TDirectory *fDir2d;
00068          TDirectory *fDirCorr;
00069 
00070          Short1Map fMap1d;
00071          Short2Map fMap2d;
00072          CorrMap   fMapCorr;
00073 
00074          FloatMap  fFloat;       
00075 
00076          DataCorr fCorr;
00077       };
00078    }
00079 }
00080    
00081 #endif

Generated on Mon Feb 15 11:06:33 2010 for loon by  doxygen 1.3.9.1