File indexing completed on 2024-04-06 11:57:55
0001 #ifndef MERun_hh
0002 #define MERun_hh
0003
0004 #include <iostream>
0005 #include <map>
0006 #include <vector>
0007
0008 #include <TString.h>
0009 #include <TFile.h>
0010 #include <TH2.h>
0011 #include <TTree.h>
0012
0013 #include "../../interface/ME.h"
0014 #include "../../interface/MEEBGeom.h"
0015 #include "../../interface/MEEEGeom.h"
0016
0017 class MERun
0018 {
0019
0020 friend class MERunManager;
0021 MERun( ME::Header header, ME::Settings settings, TString fname );
0022
0023 public:
0024
0025 virtual ~MERun();
0026
0027 bool operator==( const MERun& o ) const;
0028
0029 unsigned int run() const { return _header.run; }
0030 unsigned int lb() const { return _header.lb; }
0031 ME::Time time() const;
0032 ME::TimeStamp timestamp() const { return _header.ts_beg; }
0033 TString rundir() const { return _header.rundir; }
0034
0035 TFile* laserPrimFile( bool refresh=false );
0036 void closeLaserPrimFile();
0037
0038 float getVal( int table, int var, int ix=0, int iy=0 );
0039
0040 const ME::Header header() const { return _header; }
0041 const ME::Settings settings() const { return _settings; }
0042
0043 void print( std::ostream& o ) const;
0044
0045 private :
0046
0047 ME::Header _header;
0048 ME::Settings _settings;
0049 int _type;
0050 int _color;
0051
0052 TString _fname;
0053 TFile* _file;
0054
0055
0056 TH2* APDHist( int var );
0057 std::map< TString, TH2* > _h;
0058
0059 TTree* PNTable();
0060 TTree* pn_t;
0061 std::map< TString, unsigned int > pn_i;
0062 std::map< TString, float > pn_d;
0063
0064 TTree* MTQTable();
0065 TTree* mtq_t;
0066 std::map< TString, unsigned int > mtq_i;
0067 std::map< TString, float > mtq_d;
0068
0069 ClassDef( MERun, 0 )
0070 };
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103 #endif