CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/DQM/SiStripCommissioningClients/interface/SiStripTFile.h

Go to the documentation of this file.
00001 // Last commit: $Id: SiStripTFile.h,v 1.2 2008/02/21 14:19:03 bainbrid Exp $
00002 
00003 #ifndef DQM_SiStripCommissioningClients_SiStripTFile_H
00004 #define DQM_SiStripCommissioningClients_SiStripTFile_H
00005 
00006 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h" 
00007 #include "TFile.h"
00008 #include <vector>
00009 #include <string>
00010 #include <map>
00011 
00012 class TDirectory;
00013 class TH1;
00014 
00022 class SiStripTFile : public TFile {
00023 
00024  public:
00025 
00026   // -------------------- Constructors, destructors, typedefs --------------------
00027   
00029   SiStripTFile( const char* fname, 
00030                 Option_t* option = "UPDATE", 
00031                 const char* ftitle = "", 
00032                 Int_t compress = 1 );
00033   
00035   virtual ~SiStripTFile();
00036   
00038   typedef std::vector<TH1*> Histos;
00039 
00041   typedef std::map< std::string, Histos > HistosMap;
00042   
00043   // -------------------- Public interface --------------------
00044   
00048   TDirectory* setDQMFormat( sistrip::RunType, sistrip::View );
00049   
00053   TDirectory* readDQMFormat();
00054   
00057   bool queryDQMFormat();
00058   
00060   TDirectory* top();
00061   
00063   TDirectory* dqmTop();
00064   
00066   TDirectory* sistripTop();
00067 
00069   sistrip::RunType& runType();
00070 
00072   sistrip::View& View();
00073 
00075   void addDevice(unsigned int key);
00076 
00078   TDirectory* addPath( const std::string& );
00079 
00081   void findHistos(TDirectory*, std::map< std::string, std::vector<TH1*> >*);
00082 
00085   void dirContent(TDirectory*, std::vector<TDirectory*>*, std::map< std::string, std::vector<TH1*> >*);
00086 
00087  private:
00088 
00090   sistrip::RunType runType_;
00091 
00093   sistrip::View view_;
00094 
00096   TDirectory* top_;
00097 
00099   TDirectory* dqmTop_;
00100 
00102   TDirectory* sistripTop_;
00103 
00105   bool dqmFormat_;
00106 
00107 };
00108 
00109 #endif // DQM_SiStripCommissioningClients_SiStripTFile_H