00001
00002
00003 #ifndef DBlmapReader_h
00004 #define DBlmapReader_h
00005
00006 #include <iostream>
00007 #include <sstream>
00008 #include <string>
00009 #include <vector>
00010 #include <stdio.h>
00011 #include <algorithm>
00012
00013 #include "occi.h"
00014
00015 #include "CaloOnlineTools/HcalOnlineDb/interface/HCALConfigDB.h"
00016 #include "CaloOnlineTools/HcalOnlineDb/interface/XMLProcessor.h"
00017 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabase.hh"
00018 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabaseImplOracle.hh"
00019 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabaseImplXMLFile.hh"
00020 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationItemNotFoundException.hh"
00021 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00022
00023 using namespace std;
00024
00025 struct VectorLMAP{
00026
00027 vector<int> sideC;
00028 vector<int> etaC;
00029 vector<int> phiC;
00030
00031 vector<int> dphiC;
00032 vector<int> depthC;
00033 vector<string> detC;
00034 vector<string> rbxC;
00035 vector<int> wedgeC;
00036
00037 vector<int> sectorC;
00038 vector<int> rmC;
00039 vector<int> pixelC;
00040 vector<int> qieC;
00041 vector<int> adcC;
00042
00043 vector<int> rm_fiC;
00044 vector<int> fi_chC;
00045 vector<string> let_codeC;
00046 vector<int> crateC;
00047 vector<int> htrC;
00048
00049 vector<string> fpgaC;
00050 vector<int> htr_fiC;
00051 vector<int> dcc_slC;
00052 vector<int> spigoC;
00053 vector<int> dccC;
00054
00055 vector<int> slbC;
00056 vector<string> slbinC;
00057 vector<string> slbin2C;
00058 vector<string> slnamC;
00059 vector<int> rctcraC;
00060
00061 vector<int> rctcarC;
00062 vector<int> rctconC;
00063 vector<string> rctnamC;
00064 vector<int> fedidC;
00065 vector<int> geoC;
00066
00067 vector<int> blockC;
00068 vector<int> lcC;
00069
00070 vector<int> orderC;
00071 vector<int> versionC;
00072 };
00073
00074 bool SortComp(int x, int y);
00075 VectorLMAP* SortByHardware(VectorLMAP* lmapHBEFO);
00076 VectorLMAP* SortByGeometry(VectorLMAP* lmapHBEFO);
00077
00078 void printHBHEHF(int channel, FILE * HBEFmap, VectorLMAP * lmap);
00079 void printHO(int channel, FILE * HOmap, VectorLMAP * lmap);
00080 void printEMAProw(int channel, FILE * emap, VectorLMAP * lmap);
00081
00082 class DBlmapReader{
00083 public:
00084 DBlmapReader(){ };
00085 void lrTestFunction(void);
00086 VectorLMAP* GetLMAP(int version);
00087 void PrintLMAP(FILE* HBEFmap, FILE* HOmap, VectorLMAP* lmapHBEFO);
00088 void PrintEMAPfromLMAP(FILE* emap, VectorLMAP* lmapHBEFO);
00089 };
00090
00091 #endif