CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/L1TriggerConfig/DTTPGConfigProducers/src/DTConfigTester.cc

Go to the documentation of this file.
00001 #include "L1TriggerConfig/DTTPGConfigProducers/src/DTConfigTester.h"
00002 
00003 #include "FWCore/Framework/interface/EventSetup.h"
00004 #include "FWCore/Framework/interface/ESHandle.h"
00005 
00006 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigManager.h"
00007 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigManagerRcd.h"
00008 
00009 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
00010 #include "DataFormats/MuonDetId/interface/DTBtiId.h"
00011 #include "DataFormats/MuonDetId/interface/DTTracoId.h"
00012 #include "DataFormats/MuonDetId/interface/DTSectCollId.h"
00013 
00014 using std::cout;
00015 using std::endl;
00016 
00017 DTConfigTester::DTConfigTester(const edm::ParameterSet& ps) {
00018 
00019   cout << "DTConfigTester::DTConfigTester()" << endl;
00020 
00021   my_wh    = ps.getUntrackedParameter<int>("wheel");
00022   my_sec   = ps.getUntrackedParameter<int>("sector");
00023   my_st    = ps.getUntrackedParameter<int>("station");
00024   my_traco = ps.getUntrackedParameter<int>("traco");
00025   my_bti   = ps.getUntrackedParameter<int>("bti");
00026   my_sl   = ps.getUntrackedParameter<int>("sl");
00027 }
00028 
00029 DTConfigTester::~DTConfigTester() {
00030 
00031   //cout << "DTConfigTester::~DTConfigTester()" << endl;
00032 
00033 }
00034 
00035 void DTConfigTester::analyze(const edm::Event& e, const edm::EventSetup& es) {
00036 
00037    cout << "DTConfigTester::analyze()" << endl;
00038    cout << "\tRun number :" << e.id().run() << endl;
00039    cout << "\tEvent number :" << e.id().event() << endl;
00040 
00041    using namespace edm;
00042 
00043    ESHandle< DTConfigManager > dtConfig ;
00044    es.get< DTConfigManagerRcd >().get( dtConfig ) ;
00045 
00046    cout << "\tPrint configuration :" << endl;
00047 
00048    DTBtiId btiid(my_wh,my_st,my_sec,my_sl,my_bti);
00049    DTTracoId tracoid(my_wh,my_st,my_sec,my_traco);
00050    DTChamberId chid(my_wh,my_st,my_sec);
00051    DTSectCollId scid(my_wh,my_sec);
00052 
00053    dtConfig->getDTConfigBti(btiid)->print();
00054    dtConfig->getDTConfigTraco(tracoid)->print();
00055    dtConfig->getDTConfigTSTheta(chid)->print();
00056    dtConfig->getDTConfigTSPhi(chid)->print();
00057    dtConfig->getDTConfigTrigUnit(chid)->print();
00058 
00059    if(dtConfig->lutFromDB())
00060      dtConfig->getDTConfigLUTs(chid)->print();
00061    else {
00062      cout << "*******************************************************************************" << endl;
00063      cout << "*              DTTrigger configuration : LUT parameters from GEOMETRY         *" << endl;
00064      cout << "*******************************************************************************" << endl;
00065    }
00066 
00067    dtConfig->getDTConfigSectColl(scid)->print();
00068    dtConfig->getDTConfigPedestals()->print();
00069 
00070 /*
00071    // 100209 SV testing luts for each chamber type: keep in case lut from DB debug is necessary
00072    DTChamberId chid1(-2,3,1);
00073    cout << "\n CHAMBER -2 3 1" << endl;
00074    dtConfig->getDTConfigLUTs(chid1)->print();
00075 
00076    DTChamberId chid2(0,2,2);
00077    cout << "\n CHAMBER 0 2 2" << endl;
00078    dtConfig->getDTConfigLUTs(chid2)->print();
00079 
00080    DTChamberId chid3(-2,4,8);
00081    cout << "\n CHAMBER -2 4 8" << endl;
00082    dtConfig->getDTConfigLUTs(chid3)->print();
00083 
00084    DTChamberId chid4(1,4,12);
00085    cout << "\n CHAMBER 1 4 12" << endl;
00086    dtConfig->getDTConfigLUTs(chid4)->print();
00087 
00088    DTChamberId chid5(-2,4,5);
00089    cout << "\n CHAMBER -2 4 5 " << endl;
00090    dtConfig->getDTConfigLUTs(chid5)->print();
00091 
00092    DTChamberId chid6(0,4,2);
00093    cout << "\n CHAMBER 0 4 2" << endl;
00094    dtConfig->getDTConfigLUTs(chid6)->print();
00095 
00096    DTChamberId chid7(-2,4,9);
00097    cout << "\n CHAMBER -2 4 9" << endl;
00098    dtConfig->getDTConfigLUTs(chid7)->print();
00099 
00100    DTChamberId chid8(0,4,11);
00101    cout << "\n CHAMBER 0 4 11" << endl;
00102    dtConfig->getDTConfigLUTs(chid8)->print();
00103 
00104    DTChamberId chid9(-2,1,1);
00105    cout << "\n CHAMBER -2 1 1" << endl;
00106    dtConfig->getDTConfigLUTs(chid9)->print();
00107 
00108    DTChamberId chid10(-2,4,13);
00109    cout << "\n CHAMBER -2 4 13" << endl;
00110    dtConfig->getDTConfigLUTs(chid10)->print();
00111 
00112    DTChamberId chid11(1,4,4);
00113    cout << "\n CHAMBER 1 4 4 " << endl;
00114    dtConfig->getDTConfigLUTs(chid11)->print();
00115 
00116    DTChamberId chid12(-2,4,14);
00117    cout << "\n CHAMBER -2 4 14" << endl;
00118    dtConfig->getDTConfigLUTs(chid12)->print();
00119 
00120    DTChamberId chid13(0,4,10);
00121    cout << "\n CHAMBER 0 4 10" << endl;
00122    dtConfig->getDTConfigLUTs(chid13)->print();
00123 
00124    DTChamberId chid14(-2,4,11);
00125    cout << "\n CHAMBER -2 4 11" << endl;
00126    dtConfig->getDTConfigLUTs(chid14)->print();
00127 
00128    DTChamberId chid15(1,4,9);
00129    cout << "\n CHAMBER 1 4 9" << endl;
00130    dtConfig->getDTConfigLUTs(chid15)->print();
00131 
00132    DTChamberId chid16(0,1,2);
00133    cout << "\n CHAMBER 0 1 2 " << endl;
00134    dtConfig->getDTConfigLUTs(chid16)->print();
00135 
00136    DTChamberId chid17(-2,2,1);
00137    cout << "\n CHAMBER -2 2 1" << endl;
00138    dtConfig->getDTConfigLUTs(chid17)->print();
00139 
00140    DTChamberId chid18(0,3,2);
00141    cout << "\n CHAMBER 0 3 2 " << endl;
00142    dtConfig->getDTConfigLUTs(chid18)->print();
00143 
00144    DTChamberId chid19(-2,4,10);
00145    cout << "\n CHAMBER 0 2 2" << endl;
00146    dtConfig->getDTConfigLUTs(chid19)->print();
00147 
00148    DTChamberId chid20(0,4,14);
00149    cout << "\n CHAMBER 0 4 14" << endl;
00150    dtConfig->getDTConfigLUTs(chid20)->print();
00151 
00152    DTChamberId chid21(-2,4,12);
00153    cout << "\n CHAMBER -2 4 12" << endl;
00154    dtConfig->getDTConfigLUTs(chid21)->print();
00155 
00156    DTChamberId chid22(1,4,8);
00157    cout << "\n CHAMBER 1 4 8" << endl;
00158    dtConfig->getDTConfigLUTs(chid22)->print();
00159 
00160    DTChamberId chid23(-2,4,1);
00161    cout << "\n CHAMBER -2 4 1" << endl;
00162    dtConfig->getDTConfigLUTs(chid23)->print();
00163 
00164    DTChamberId chid24(0,4,6);
00165    cout << "\n CHAMBER 0 4 6" << endl;
00166    dtConfig->getDTConfigLUTs(chid24)->print();
00167 
00168    DTChamberId chid25(-2,4,4);
00169    cout << "\n CHAMBER -2 4 4" << endl;
00170    dtConfig->getDTConfigLUTs(chid25)->print();
00171 
00172    DTChamberId chid26(1,4,13);
00173    cout << "\n CHAMBER 1 4 13 " << endl;
00174    dtConfig->getDTConfigLUTs(chid26)->print();
00175    
00176 */
00177    return;
00178  
00179 }