CMS 3D CMS Logo

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