CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/CalibCalorimetry/HcalTPGAlgos/interface/HcalEmap.h

Go to the documentation of this file.
00001 #ifndef HCALConfigDBTools_XMLTools_LMap_h
00002 #define HCALConfigDBTools_XMLTools_LMap_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     CalibCalorimetry/HcalTPGAlgos
00006 // Class  :     HcalEmap
00007 // 
00008 // Implementation:
00009 //     structure and functionality for HCAL electronic map
00010 //     NOTE!
00011 //     Keep xdaq and Oracle dependencies out of here!
00012 //
00020 //
00021 // Original Author:  Gena Kukartsev, kukarzev@fnal.gov
00022 //         Created:  Tue Oct 14 14:30:20 CDT 2009
00023 // $Id: HcalEmap.h,v 1.2 2010/08/06 20:24:02 wmtan Exp $
00024 //
00025 
00026 // system include files
00027 #include<vector>
00028 #include <string.h>
00029 #include <fstream>
00030 #include <boost/shared_ptr.hpp>
00031 
00032 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
00033 
00034 
00035 class HcalEmap
00036 {
00037  public:
00038   HcalEmap(){}
00039   HcalEmap( std::string filename ){ read_map(filename); }
00040   ~HcalEmap(){}
00041 
00042   class HcalEmapRow
00043   {
00044   public:
00045     int rawId,crate,slot,dcc,spigot,fiber,fiberchan,ieta,iphi,idepth;
00046     std::string topbottom,subdet;
00047     
00048     HcalEmapRow(){
00049       rawId=0;
00050       crate=0;
00051       slot=0;
00052       dcc=0;
00053       spigot=0;
00054       fiber=0;
00055       fiberchan=0;
00056       ieta=0;
00057       iphi=0;
00058       idepth=0;
00059       topbottom="";
00060       subdet="";
00061     }
00062     ~HcalEmapRow(){};  
00063 
00064     bool operator<( const HcalEmapRow & other) const;
00065     
00066   }; // end of class HcalEmapRow
00067 
00068   int read_map( std::string filename );
00069 
00070   std::vector<HcalEmap::HcalEmapRow> & get_map( void );
00071 
00072  protected:
00073   std::vector<HcalEmapRow> map;
00074 }; // end of class HcalEmap
00075 
00076 
00077 
00078 class HcalEmap_test {
00079 public:
00080   HcalEmap_test(){}
00081   ~HcalEmap_test(){}
00082 
00083   int test_read_map( std::string filename );
00084 }; // end of class HcalEmap_test
00085 
00086 #endif