CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/OnlineDB/CSCCondDB/src/CSCMap1Read.cc

Go to the documentation of this file.
00001 #include "OnlineDB/CSCCondDB/interface/CSCMap1Read.h"
00002 #include "string"
00003 
00004 CSCMap1Read::CSCMap1Read(const edm::ParameterSet&){}
00005 CSCMap1Read::~CSCMap1Read(){}
00006 
00007 void CSCMap1Read::analyze (const edm::Event&, const edm::EventSetup&)
00008 {
00009 
00010   CSCMapItem::MapItem item;
00011   cscmap1 *map = new cscmap1 ();
00012   std::cout << " Connected cscmap ... " << std::endl;
00013 
00014   // Get information by chamber ID.
00015    int chamberid = 122090;
00016    std::cout<<std::endl;
00017    std::cout<<std::endl;
00018    std::cout<<"Method chamberid, input: chamberID  "<<chamberid<<std::endl;
00019    std::cout<<std::endl;
00020    map->chamber(chamberid,&item);
00021 
00022      std::cout<<"cscLabel  "<<"  "<<item.chamberLabel<<std::endl;
00023      std::cout<<"cscId  "<<"  "<<item.chamberId<<std::endl;
00024      std::cout<<"endcap  "<<"  "<<item.endcap<<std::endl;
00025      std::cout<<"station  "<<"  "<<item.station<<std::endl;
00026      std::cout<<"ring  "<<"  "<<item.ring<<std::endl;
00027      std::cout<<"chamber  "<<"  "<<item.chamber<<std::endl;
00028      std::cout<<"cscIndex  "<<"  "<<item.cscIndex<<std::endl;
00029      std::cout<<"layerIndex  "<<"  "<<item.layerIndex<<std::endl;
00030      std::cout<<"stripIndex  "<<"  "<<item.stripIndex<<std::endl;
00031      std::cout<<"anodeIndex  "<<"  "<<item.anodeIndex<<std::endl;
00032      std::cout<<"strips  "<<"  "<<item.strips<<std::endl;
00033      std::cout<<"anodes  "<<"  "<<item.anodes<<std::endl;
00034      std::cout<<"crateLabel  "<<"  "<<item.crateLabel<<std::endl;
00035      std::cout<<"crateid  "<<"  "<<item.crateid<<std::endl;
00036      std::cout<<"sector  "<<"  "<<item.sector<<std::endl;
00037      std::cout<<"trig_sector  "<<"  "<<item.trig_sector<<std::endl;
00038      std::cout<<"dmb  "<<"  "<<item.dmb<<std::endl;
00039      std::cout<<"cscid  "<<"  "<<item.cscid<<std::endl;
00040      std::cout<<"ddu  "<<"  "<<item.ddu<<std::endl;
00041      std::cout<<"ddu_input  "<<"  "<<item.ddu_input<<std::endl;
00042      std::cout<<"slink  "<<"  "<<item.slink<<std::endl;
00043      std::cout<<"fed_crate  "<<"  "<<item.fed_crate<<std::endl;
00044      std::cout<<"ddu_slot  "<<"  "<<item.ddu_slot<<std::endl;
00045      std::cout<<"dcc_fifo  "<<"  "<<item.dcc_fifo<<std::endl;
00046      std::cout<<"fiber_crate  "<<"  "<<item.fiber_crate<<std::endl;
00047      std::cout<<"fiber_pos  "<<"  "<<item.fiber_pos<<std::endl;
00048      std::cout<<"fiber_socket  "<<"  "<<item.fiber_socket<<std::endl;
00049 
00050 
00051   // Get information by crateid and dmb.
00052    int crateid = 33;
00053    int dmb = 7;
00054    std::cout<<std::endl;
00055    std::cout<<std::endl;
00056    std::cout<<"Method cratedmb, input: crateid "<<crateid<<", dmb "<<dmb<<std::endl;
00057    std::cout<<std::endl;
00058    map->cratedmb(crateid,dmb,&item);
00059 
00060      std::cout<<"cscLabel  "<<"  "<<item.chamberLabel<<std::endl;
00061      std::cout<<"cscId  "<<"  "<<item.chamberId<<std::endl;
00062      std::cout<<"endcap  "<<"  "<<item.endcap<<std::endl;
00063      std::cout<<"station  "<<"  "<<item.station<<std::endl;
00064      std::cout<<"ring  "<<"  "<<item.ring<<std::endl;
00065      std::cout<<"chamber  "<<"  "<<item.chamber<<std::endl;
00066      std::cout<<"cscIndex  "<<"  "<<item.cscIndex<<std::endl;
00067      std::cout<<"layerIndex  "<<"  "<<item.layerIndex<<std::endl;
00068      std::cout<<"stripIndex  "<<"  "<<item.stripIndex<<std::endl;
00069      std::cout<<"anodeIndex  "<<"  "<<item.anodeIndex<<std::endl;
00070      std::cout<<"strips  "<<"  "<<item.strips<<std::endl;
00071      std::cout<<"anodes  "<<"  "<<item.anodes<<std::endl;
00072      std::cout<<"crateLabel  "<<"  "<<item.crateLabel<<std::endl;
00073      std::cout<<"crateid  "<<"  "<<item.crateid<<std::endl;
00074      std::cout<<"sector  "<<"  "<<item.sector<<std::endl;
00075      std::cout<<"trig_sector  "<<"  "<<item.trig_sector<<std::endl;
00076      std::cout<<"dmb  "<<"  "<<item.dmb<<std::endl;
00077      std::cout<<"cscid  "<<"  "<<item.cscid<<std::endl;
00078      std::cout<<"ddu  "<<"  "<<item.ddu<<std::endl;
00079      std::cout<<"ddu_input  "<<"  "<<item.ddu_input<<std::endl;
00080      std::cout<<"slink  "<<"  "<<item.slink<<std::endl;
00081      std::cout<<"fed_crate  "<<"  "<<item.fed_crate<<std::endl;
00082      std::cout<<"ddu_slot  "<<"  "<<item.ddu_slot<<std::endl;
00083      std::cout<<"dcc_fifo  "<<"  "<<item.dcc_fifo<<std::endl;
00084      std::cout<<"fiber_crate  "<<"  "<<item.fiber_crate<<std::endl;
00085      std::cout<<"fiber_pos  "<<"  "<<item.fiber_pos<<std::endl;
00086      std::cout<<"fiber_socket  "<<"  "<<item.fiber_socket<<std::endl;
00087 
00088 
00089   // Get information by rui and ddu_input.
00090    int rui = 2;
00091    int ddu_input = 2;
00092    std::cout<<std::endl;
00093    std::cout<<std::endl;
00094    std::cout<<"Method ruiddu, input: rui "<<rui<<", ddu_input "<<ddu_input<<std::endl;
00095    std::cout<<std::endl;
00096    map->ruiddu(rui,ddu_input,&item);
00097 
00098      std::cout<<"cscLabel  "<<"  "<<item.chamberLabel<<std::endl;
00099      std::cout<<"cscId  "<<"  "<<item.chamberId<<std::endl;
00100      std::cout<<"endcap  "<<"  "<<item.endcap<<std::endl;
00101      std::cout<<"station  "<<"  "<<item.station<<std::endl;
00102      std::cout<<"ring  "<<"  "<<item.ring<<std::endl;
00103      std::cout<<"chamber  "<<"  "<<item.chamber<<std::endl;
00104      std::cout<<"cscIndex  "<<"  "<<item.cscIndex<<std::endl;
00105      std::cout<<"layerIndex  "<<"  "<<item.layerIndex<<std::endl;
00106      std::cout<<"stripIndex  "<<"  "<<item.stripIndex<<std::endl;
00107      std::cout<<"anodeIndex  "<<"  "<<item.anodeIndex<<std::endl;
00108      std::cout<<"strips  "<<"  "<<item.strips<<std::endl;
00109      std::cout<<"anodes  "<<"  "<<item.anodes<<std::endl;
00110      std::cout<<"crateLabel  "<<"  "<<item.crateLabel<<std::endl;
00111      std::cout<<"crateid  "<<"  "<<item.crateid<<std::endl;
00112      std::cout<<"sector  "<<"  "<<item.sector<<std::endl;
00113      std::cout<<"trig_sector  "<<"  "<<item.trig_sector<<std::endl;
00114      std::cout<<"dmb  "<<"  "<<item.dmb<<std::endl;
00115      std::cout<<"cscid  "<<"  "<<item.cscid<<std::endl;
00116      std::cout<<"ddu  "<<"  "<<item.ddu<<std::endl;
00117      std::cout<<"ddu_input  "<<"  "<<item.ddu_input<<std::endl;
00118      std::cout<<"slink  "<<"  "<<item.slink<<std::endl;
00119      std::cout<<"fed_crate  "<<"  "<<item.fed_crate<<std::endl;
00120      std::cout<<"ddu_slot  "<<"  "<<item.ddu_slot<<std::endl;
00121      std::cout<<"dcc_fifo  "<<"  "<<item.dcc_fifo<<std::endl;
00122      std::cout<<"fiber_crate  "<<"  "<<item.fiber_crate<<std::endl;
00123      std::cout<<"fiber_pos  "<<"  "<<item.fiber_pos<<std::endl;
00124      std::cout<<"fiber_socket  "<<"  "<<item.fiber_socket<<std::endl;
00125 }
00126 void CSCMap1Read::beginJob(){
00127   std::cout << "Here is the start" << std::endl;
00128   std::cout << "-----------------" << std::endl;
00129 }
00130 void CSCMap1Read::endJob() {
00131   std::cout << "---------------" << std::endl;
00132   std::cout << "Here is the end" << std::endl;
00133 }