CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/L1Trigger/HardwareValidation/interface/DEtrait.h

Go to the documentation of this file.
00001 #ifndef DE_TRAIT_H
00002 #define DE_TRAIT_H
00003 
00004 /*\class template DEtrait
00005  *\description data|emulation auxiliary template
00006                type associator trait struct 
00007  *\author Nuno Leonardo (CERN)
00008  *\date 07.03
00009  */
00010 
00011 // L1 dataformats includes
00012 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
00013 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
00014 #include "DataFormats/L1CaloTrigger/interface/L1CaloCollections.h"
00015 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctCollections.h"
00016 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h"
00017 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
00018 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTTrackContainer.h"
00019 #include "DataFormats/CSCDigi/interface/CSCALCTDigiCollection.h"
00020 #include "DataFormats/CSCDigi/interface/CSCCLCTDigiCollection.h"
00021 #include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h"
00022 #include "DataFormats/L1CSCTrackFinder/interface/L1CSCTrackCollection.h"
00023 #include "DataFormats/L1CSCTrackFinder/interface/L1CSCStatusDigiCollection.h"
00024 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTTrackCand.h"
00025 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuRegionalCand.h"
00026 #include "DataFormats/LTCDigi/interface/LTCDigi.h"
00027 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTCand.h"
00028 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTReadoutCollection.h"
00029 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h"
00030 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerEvmReadoutRecord.h"
00031 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerObjectMapRecord.h"
00032 
00033 //d|e record
00034 #include "DataFormats/L1Trigger/interface/L1DataEmulRecord.h"
00035 
00036 namespace dedefs {
00037 
00038   const int DEnsys = 12; 
00039 
00040   enum SysList {
00041     ETP, HTP, RCT, GCT, DTP, DTF, 
00042     CTP, CTF, RPC, LTC, GMT, GLT
00043   };
00044 
00045   const std::string SystLabel[DEnsys] = {
00046     "ETP", "HTP", "RCT", "GCT", "DTP", "DTF", 
00047     "CTP", "CTF", "RPC", "LTC", "GMT", "GLT"
00048   };
00049 
00050   const std::string SystLabelExt[DEnsys] = {
00051     "ECAL", "HCAL", "RCT", "GCT", "DTTPG", "DTTF", 
00052     "CSCTPG", "CSCTF", "RPC", "LTC", "GMT", "GT"
00053   };
00054 
00055   enum ColList {
00056     ECALtp, HCALtp, 
00057     RCTem, RCTrgn, 
00058     GCTem, GCTjet, GCTisolaem, GCTnoisoem, GCTcenjets, GCTforjets, GCTtaujets, 
00059     GCTethad, GCTetmiss, GCTettot, GCThtmiss, GCThfring, GCThfbit, GCTjetcnt, 
00060     DTtpPh, DTtpTh, DTtf, DTtftrk, 
00061     CSCtpa, CSCtpc, CSCtpl, CSCsta, CSCtf, CSCtftrk, CSCtftrc, CSCtfsta, 
00062     MUrtf,     RPCcen, RPCfor, 
00063     LTCi, 
00064     GMTmain, GMTcnd, GMTrdt, 
00065     GTdword
00066   };
00067 
00068 }
00069 
00070 typedef std::vector<L1MuDTChambPhDigi>    L1MuDTChambPhDigiCollection; 
00071 typedef std::vector<L1MuDTChambThDigi>    L1MuDTChambThDigiCollection; 
00072 typedef std::vector<L1MuRegionalCand>     L1MuRegionalCandCollection;
00073 typedef std::vector<CSCALCTDigi>          CSCALCTDigiCollection_;
00074 typedef std::vector<CSCCLCTDigi>          CSCCLCTDigiCollection_;
00075 typedef std::vector<CSCCorrelatedLCTDigi> CSCCorrelatedLCTDigiCollection_;
00076 typedef std::vector<L1CSCSPStatusDigi>    L1CSCSPStatusDigiCollection_;
00077 typedef std::vector<L1MuGMTCand>          L1MuGMTCandCollection;
00078 typedef std::vector<L1MuGMTReadoutRecord> L1MuGMTReadoutRecordCollection;
00079 typedef std::vector<L1DataEmulDigi>       L1DEDigiCollection;
00080 
00081 template <typename T> 
00082 struct DEtrait {};
00083 
00084 template<> 
00085 struct DEtrait<EcalTrigPrimDigiCollection> {
00086   typedef EcalTrigPrimDigiCollection coll_type;
00087   typedef EcalTriggerPrimitiveDigi   cand_type;
00088   static inline int de_type() {return dedefs::ECALtp;}
00089 };
00090 
00091 template<> 
00092 struct DEtrait<HcalTrigPrimDigiCollection> {
00093   typedef HcalTrigPrimDigiCollection coll_type;
00094   typedef HcalTriggerPrimitiveDigi   cand_type;
00095   static inline int de_type() {return dedefs::HCALtp;}
00096 };
00097 
00098 template<> 
00099 struct DEtrait<L1CaloEmCollection> {
00100   typedef L1CaloEmCollection     coll_type;
00101   typedef L1CaloEmCand           cand_type;
00102   static inline int de_type() {return dedefs::RCTem;}
00103 };
00104 
00105 template<> 
00106 struct DEtrait<L1CaloRegionCollection> {
00107   typedef L1CaloRegionCollection coll_type;
00108   typedef L1CaloRegion           cand_type;
00109   static inline int de_type() {return dedefs::RCTrgn;}
00110 };
00111 
00112 template<> 
00113 struct DEtrait<L1GctEmCandCollection> {
00114   typedef L1GctEmCandCollection  coll_type;
00115   typedef L1GctEmCand            cand_type;
00116   static inline int de_type() {return dedefs::GCTem;}
00117 };
00118 
00119 template<> 
00120 struct DEtrait<L1GctJetCandCollection> {
00121   typedef L1GctJetCandCollection coll_type;
00122   typedef L1GctJetCand           cand_type;
00123   static inline int de_type() {return dedefs::GCTjet;}
00124 };
00125 
00126 template<> 
00127 struct DEtrait<L1GctEtHadCollection> {
00128   typedef L1GctEtHadCollection coll_type;
00129   typedef L1GctEtHad           cand_type;
00130   static inline int de_type() {return dedefs::GCTethad;}
00131 };
00132 template<> 
00133 struct DEtrait<L1GctEtMissCollection> {
00134   typedef L1GctEtMissCollection coll_type;
00135   typedef L1GctEtMiss cand_type;
00136   static inline int de_type() {return dedefs::GCTetmiss;}
00137 };
00138 template<> 
00139 struct DEtrait<L1GctEtTotalCollection> {
00140   typedef L1GctEtTotalCollection coll_type;
00141   typedef L1GctEtTotal           cand_type;
00142   static inline int de_type() {return dedefs::GCTettot;}
00143 };
00144 template<> 
00145 struct DEtrait<L1GctHtMissCollection> {
00146   typedef L1GctHtMissCollection coll_type;
00147   typedef L1GctHtMiss           cand_type;
00148   static inline int de_type() {return dedefs::GCThtmiss;}
00149 };
00150 template<> 
00151 struct DEtrait<L1GctHFRingEtSumsCollection> {
00152   typedef L1GctHFRingEtSumsCollection coll_type;
00153   typedef L1GctHFRingEtSums           cand_type;
00154   static inline int de_type() {return dedefs::GCThfring;}
00155 };
00156 template<> 
00157 struct DEtrait<L1GctHFBitCountsCollection> {
00158   typedef L1GctHFBitCountsCollection coll_type;
00159   typedef L1GctHFBitCounts           cand_type;
00160   static inline int de_type() {return dedefs::GCThfbit;}
00161 };
00162 template<> 
00163 struct DEtrait<L1GctJetCountsCollection> {
00164   typedef L1GctJetCountsCollection coll_type;
00165   typedef L1GctJetCounts           cand_type;
00166   static inline int de_type() {return dedefs::GCTjetcnt;}
00167 };
00168 
00169 template<> 
00170 struct DEtrait<L1MuDTChambPhDigiCollection> {
00171   typedef L1MuDTChambPhDigiCollection coll_type;
00172   typedef L1MuDTChambPhDigi           cand_type;
00173   static inline int de_type() {return dedefs::DTtpPh;}
00174 };
00175 template<> 
00176 struct DEtrait<L1MuDTChambThDigiCollection> {
00177   typedef L1MuDTChambThDigiCollection coll_type;
00178   typedef L1MuDTChambThDigi           cand_type;
00179   static inline int de_type() {return dedefs::DTtpTh;}
00180 };
00181 
00182 template<> 
00183 struct DEtrait<L1MuRegionalCandCollection> {
00184   typedef L1MuRegionalCandCollection coll_type;
00185   typedef L1MuRegionalCand           cand_type;
00186   static inline int de_type() {return dedefs::MUrtf;}
00187 };
00188 
00189 template<> 
00190 struct DEtrait<CSCALCTDigiCollection_> {
00191   typedef CSCALCTDigiCollection_ coll_type;
00192   typedef CSCALCTDigi            cand_type;
00193   static inline int de_type() {return dedefs::CSCtpa;}
00194 };
00195 template<> 
00196 struct DEtrait<CSCCLCTDigiCollection_> {
00197   typedef CSCCLCTDigiCollection_ coll_type;
00198   typedef CSCCLCTDigi            cand_type;
00199   static inline int de_type() {return dedefs::CSCtpc;}
00200 };
00201 
00202 template<> 
00203 struct DEtrait<CSCCorrelatedLCTDigiCollection_> {
00204   typedef CSCCorrelatedLCTDigiCollection_ coll_type;
00205   typedef CSCCorrelatedLCTDigi            cand_type;
00206   static inline int de_type() {return dedefs::CSCtpl;}
00207 };
00208 
00209 template<> 
00210 struct DEtrait<L1CSCSPStatusDigiCollection_> {
00211   typedef L1CSCSPStatusDigiCollection_ coll_type;
00212   typedef L1CSCSPStatusDigi            cand_type;
00213   static inline int de_type() {return dedefs::CSCsta;}
00214 };
00215 
00216 template<> 
00217 struct DEtrait<LTCDigiCollection> {
00218   typedef LTCDigiCollection coll_type;
00219   typedef LTCDigi           cand_type;
00220   static inline int de_type() {return dedefs::LTCi;}
00221 };
00222 
00223 template<> 
00224 struct DEtrait<L1MuGMTCandCollection> {
00225   typedef L1MuGMTCandCollection coll_type;
00226   typedef L1MuGMTCand           cand_type;
00227   static inline int de_type() {return dedefs::GMTcnd;}
00228 };
00229 
00230 template<> 
00231 struct DEtrait<L1MuGMTReadoutRecordCollection> {
00232   typedef L1MuGMTReadoutRecordCollection coll_type;
00233   typedef L1MuGMTReadoutRecord           cand_type;
00234   static inline int de_type() {return dedefs::GMTrdt;}
00235 };
00236 
00237 template<> 
00238 struct DEtrait<DecisionWord> {
00239   typedef DecisionWord coll_type;
00240   typedef bool         cand_type;
00241   static inline int de_type() {return dedefs::GTdword;}
00242 };
00243 
00244 #endif