00001
00002
00003 #ifndef TRIGGER_DECISION_TOOL_ClassTraits_H
00004 #define TRIGGER_DECISION_TOOL_ClassTraits_H
00005
00006 namespace TrigDec {
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 struct DirectAttached {};
00026 struct AncestorAttached {};
00027
00028
00029 template<typename T>
00030 struct ClassTraits {
00031 typedef T type;
00032 };
00033
00034 }
00035
00036
00037
00038
00039
00040 #define SPECIALIZE_CONTAINER_FOR_CLASS(x,y) \
00041 namespace TrigDec { \
00042 template<> \
00043 struct ClassTraits<x> { \
00044 typedef y type; \
00045 }; \
00046 }
00047
00048
00049
00050 #define DECLARE_ATTACHED_CONTAINER(x,y) \
00051 class x; \
00052 class y; \
00053 SPECIALIZE_CONTAINER_FOR_CLASS(x,y)
00054
00055
00056
00057
00058 #define DECLARE_ATTACHED_CONTAINER_NAMESPACE(a,x,y) \
00059 namespace a { \
00060 class x; \
00061 class y; \
00062 } \
00063 SPECIALIZE_CONTAINER_FOR_CLASS(a::x,a::y)
00064
00065
00066
00067
00068 #define DECLARE_ATTACHED_CONTAINER_OBJECT_NAMESPACE(a,x,y) \
00069 namespace a { \
00070 class x; \
00071 } \
00072 class y; \
00073 SPECIALIZE_CONTAINER_FOR_CLASS(a::x,y)
00074
00075
00076
00077
00078 #define DECLARE_ATTACHED_CONTAINER_TYPEDEF(a, x, y) \
00079 namespace a { \
00080 class x; \
00081 } \
00082 SPECIALZE_CONTAINER_FOR_CLASS(a::x, y)
00083
00084 DECLARE_ATTACHED_CONTAINER(CaloCell, CaloCellContainer)
00085 DECLARE_ATTACHED_CONTAINER(TrigPhoton, TrigPhotonContainer)
00086 DECLARE_ATTACHED_CONTAINER(TrigElectron, TrigElectronContainer)
00087 DECLARE_ATTACHED_CONTAINER(TrigL2Bjet, TrigL2BjetContainer)
00088 DECLARE_ATTACHED_CONTAINER(CosmicMuon, CosmicMuonCollection)
00089 DECLARE_ATTACHED_CONTAINER(MdtTrackSegment, MdtTrackSegmentCollection)
00090 DECLARE_ATTACHED_CONTAINER(TrigL2Bphys, TrigL2BphysContainer)
00091 DECLARE_ATTACHED_CONTAINER(TrigInDetTrack, TrigInDetTrackCollection)
00092 DECLARE_ATTACHED_CONTAINER(TrigVertex, TrigVertexCollection)
00093 DECLARE_ATTACHED_CONTAINER(CaloCluster, CaloClusterContainer)
00094 DECLARE_ATTACHED_CONTAINER(TrigMuonEF, TrigMuonEFContainer)
00095 DECLARE_ATTACHED_CONTAINER(TrigMuonEFInfo, TrigMuonEFInfoContainer)
00096 DECLARE_ATTACHED_CONTAINER(CaloShower, CaloShowerContainer)
00097 DECLARE_ATTACHED_CONTAINER(egamma, egammaContainer)
00098 DECLARE_ATTACHED_CONTAINER_NAMESPACE(Rec, TrackParticle, TrackParticleContainer)
00099 DECLARE_ATTACHED_CONTAINER_NAMESPACE(Analysis, TauDetails, TauDetailsContainer)
00100 DECLARE_ATTACHED_CONTAINER(TrigEFBjet, TrigEFBjetContainer)
00101 DECLARE_ATTACHED_CONTAINER(TrigEFBphys, TrigEFBphysContainer)
00102 DECLARE_ATTACHED_CONTAINER_NAMESPACE(Analysis, TauJet, TauJetContainer)
00103 DECLARE_ATTACHED_CONTAINER(Jet, JetCollection)
00104 DECLARE_ATTACHED_CONTAINER(CaloTower, CaloTowerContainer)
00105 DECLARE_ATTACHED_CONTAINER(egDetail, egDetailContainer)
00106 DECLARE_ATTACHED_CONTAINER_OBJECT_NAMESPACE(Trk, VxCandidate, VxContainer)
00107
00108 #undef SPECIALIZE_CONTAINER_FOR_CLASS
00109 #undef DECLARE_ATTACHED_CONTAINER
00110 #undef DECLARE_ATTACHED_CONTAINER_NAMESPACE
00111 #undef DECLARE_ATTACHED_CONTAINER_TYPEDEF
00112 #undef DECLARE_ATTACHED_CONTAINER_OBJECT_NAMESPACE
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132 #undef DECLARE_L1_TRIGGER_OBJECT
00133
00134 #endif