00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #ifndef PLEXHANDLE_H
00013 #define PLEXHANDLE_H
00014
00015 #include "TObject.h"
00016
00017 #include "Plex/PlexusABC.h"
00018 #include "Plex/Plexus.h"
00019
00020 class Plexus;
00021
00022 class PlexHandle : public PlexusABC {
00023
00024 public:
00025
00026 PlexHandle(const VldContext& vldc, Bool_t shared = kTRUE );
00027 PlexHandle(const PlexHandle& ph);
00028 virtual ~PlexHandle();
00029
00030 PlexHandle& operator=(const PlexHandle& ph);
00031
00032
00033 virtual RawChannelId GetRawChannelId(const PlexStripEndId& seid) const;
00034 virtual RawChannelId GetRawChannelId(const PlexPixelSpotId& psid) const;
00035 virtual RawChannelId GetRawChannelId(const PlexPinDiodeId& diodeid) const;
00036
00037 virtual PlexSEIdAltL GetSEIdAltL(const RawChannelId& rcid,
00038 const PlexCalib* calib=0,
00039 Int_t adc=0, Double_t time=0) const;
00040 virtual PlexStripEndId GetStripEndId(const PlexPixelSpotId& psid) const;
00041
00042 virtual std::vector<PlexPixelSpotId>
00043 GetPixelSpotIdVector(const RawChannelId& rcid,
00044 bool uniquePixels=false) const;
00045 virtual PlexPixelSpotId GetPixelSpotId(const PlexStripEndId& seid) const;
00046
00047 virtual PlexPinDiodeId GetPinDiodeId(const RawChannelId& rcid) const;
00048
00049 virtual ReadoutType::Readout_t
00050 GetReadoutType(const RawChannelId& rcid) const;
00051 virtual std::string GetSpecialDescript(const RawChannelId& rcid) const;
00052 virtual RawChannelId GetSpecialChannelContains(const std::string& key) const;
00053 virtual const std::map<RawChannelId,std::string>&
00054 GetSpecialDescriptMap() const;
00055
00056 virtual std::vector<PlexStripEndId>
00057 GetStripEndIdVector(const PlexLedId& ledid) const;
00058 virtual std::pair<PlexPinDiodeId,PlexPinDiodeId>
00059 GetPinDiodeIds(const PlexLedId& ledid) const;
00060 virtual PlexLedId GetLedId(const PlexStripEndId& seid) const;
00061 virtual PlexLedId GetLedId(const PlexPinDiodeId& diodeid) const;
00062
00063 virtual RawChannelId GetTpmtFromLedPulserBox(Int_t ipb) const;
00064 virtual Int_t GetLedPulserBoxFromTpmt(const RawChannelId& rcid) const;
00065
00066
00067
00068 virtual const std::vector<PlexStripEndId>& GetAllStrips() const;
00069 virtual const std::vector<PlexStripEndId>&
00070 GetAllStripEnds(StripEnd::StripEnd_t restrictEnd =
00071 StripEnd::kUnknown) const;
00072
00073 virtual const std::vector<PlexPixelSpotId>& GetAllPixelSpots() const;
00074 virtual const std::vector<PlexPixelSpotId>& GetAllPixels() const;
00075 virtual const std::vector<PlexPixelSpotId>& GetAllTubes() const;
00076
00077 virtual const std::vector<RawChannelId>& GetAllRawChannelIds() const;
00078
00079 virtual const std::vector<PlexPinDiodeId>& GetAllPinDiodes() const;
00080 virtual const std::vector<PlexLedId>& GetAllLeds() const;
00081
00082 virtual const VldRange& GetVldRange() const;
00083
00084 void Print(Option_t *option="s") const;
00085
00086
00087 virtual void ValidateConsistency() const;
00088
00089 #ifdef PLEX_EXPOSE_STRUCTURES
00090
00091
00092
00093 const std::multimap<RawChannelId,PlexPixelSpotId>& GetRawChannelIdToPixelSpotId() const;
00094 const std::multimap<PlexPixelSpotId,PlexStripEndId>& GetPixelSpotIdToStripEndId() const;
00095 const std::map<PlexStripEndId,PlexPixelSpotId>& GetStripEndIdToPixelSpotId() const;
00096 const std::map<PlexPixelSpotId,RawChannelId>& GetPixelSpotIdToRawChannelId() const;
00097 #endif
00098
00099 protected:
00100
00101 private:
00102
00103 PlexHandle();
00104
00105 void Copy(PlexHandle& ph) const;
00106 void Copy(TObject& object) const;
00107
00108
00109 Plexus *fPlexus;
00110
00111 ClassDef(PlexHandle,1)
00112 };
00113
00114 #ifndef __CINT__
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125 inline
00126 RawChannelId
00127 PlexHandle::GetRawChannelId(const PlexStripEndId& seid) const
00128 { return fPlexus->GetRawChannelId(seid); }
00129
00130 inline
00131 RawChannelId
00132 PlexHandle::GetRawChannelId(const PlexPixelSpotId& psid) const
00133 { return fPlexus->GetRawChannelId(psid); }
00134
00135 inline
00136 RawChannelId
00137 PlexHandle::GetRawChannelId(const PlexPinDiodeId& diodeid) const
00138 { return fPlexus->GetRawChannelId(diodeid); }
00139
00140 inline
00141 PlexSEIdAltL
00142 PlexHandle::GetSEIdAltL(const RawChannelId& rcid,
00143 const PlexCalib* calib,
00144 Int_t adc, Double_t time) const
00145 { return fPlexus->GetSEIdAltL(rcid,calib,adc,time); }
00146
00147 inline
00148 PlexStripEndId
00149 PlexHandle::GetStripEndId(const PlexPixelSpotId& psid) const
00150 { return fPlexus->GetStripEndId(psid); }
00151
00152 inline
00153 std::vector<PlexPixelSpotId>
00154 PlexHandle::GetPixelSpotIdVector(const RawChannelId& rcid, bool uniquePixels) const
00155 { return fPlexus->GetPixelSpotIdVector(rcid,uniquePixels); }
00156
00157 inline
00158 PlexPixelSpotId
00159 PlexHandle::GetPixelSpotId(const PlexStripEndId& seid) const
00160 { return fPlexus->GetPixelSpotId(seid); }
00161
00162 inline
00163 PlexPinDiodeId
00164 PlexHandle::GetPinDiodeId(const RawChannelId& rcid) const
00165 { return fPlexus->GetPinDiodeId(rcid); }
00166
00167 inline
00168 ReadoutType::Readout_t
00169 PlexHandle::GetReadoutType(const RawChannelId& rcid) const
00170 { return fPlexus->GetReadoutType(rcid); }
00171
00172 inline
00173 std::string
00174 PlexHandle::GetSpecialDescript(const RawChannelId& rcid) const
00175 { return fPlexus->GetSpecialDescript(rcid); }
00176
00177 inline
00178 RawChannelId
00179 PlexHandle::GetSpecialChannelContains(const std::string& key) const
00180 { return fPlexus->GetSpecialChannelContains(key); }
00181
00182 inline
00183 const std::map<RawChannelId,std::string>&
00184 PlexHandle::GetSpecialDescriptMap() const
00185 { return fPlexus->GetSpecialDescriptMap(); }
00186
00187 inline
00188 std::vector<PlexStripEndId>
00189 PlexHandle::GetStripEndIdVector(const PlexLedId& ledid) const
00190 { return fPlexus->GetStripEndIdVector(ledid); }
00191
00192 inline
00193 std::pair<PlexPinDiodeId,PlexPinDiodeId>
00194 PlexHandle::GetPinDiodeIds(const PlexLedId& ledid) const
00195 { return fPlexus->GetPinDiodeIds(ledid); }
00196
00197 inline
00198 PlexLedId
00199 PlexHandle::GetLedId(const PlexStripEndId& seid) const
00200 { return fPlexus->GetLedId(seid); }
00201
00202 inline
00203 PlexLedId
00204 PlexHandle::GetLedId(const PlexPinDiodeId& diodeid) const
00205 { return fPlexus->GetLedId(diodeid); }
00206
00207 inline
00208 const std::vector<PlexStripEndId>&
00209 PlexHandle::GetAllStrips() const
00210 { return fPlexus->GetAllStripEnds(StripEnd::kWhole); }
00211
00212 inline
00213 const std::vector<PlexStripEndId>&
00214 PlexHandle::GetAllStripEnds(StripEnd::StripEnd_t restrictEnd) const
00215 { return fPlexus->GetAllStripEnds(restrictEnd); }
00216
00217 inline
00218 const std::vector<PlexPixelSpotId>&
00219 PlexHandle::GetAllPixelSpots() const
00220 { return fPlexus->GetAllPixelSpots(); }
00221
00222 inline
00223 const std::vector<PlexPixelSpotId>&
00224 PlexHandle::GetAllPixels() const
00225 { return fPlexus->GetAllPixels(); }
00226
00227 inline
00228 const std::vector<PlexPixelSpotId>&
00229 PlexHandle::GetAllTubes() const
00230 { return fPlexus->GetAllTubes(); }
00231
00232 inline
00233 const std::vector<RawChannelId>&
00234 PlexHandle::GetAllRawChannelIds() const
00235 { return fPlexus->GetAllRawChannelIds(); }
00236
00237 inline
00238 const std::vector<PlexPinDiodeId>&
00239 PlexHandle::GetAllPinDiodes() const
00240 { return fPlexus->GetAllPinDiodes(); }
00241
00242 inline
00243 const std::vector<PlexLedId>&
00244 PlexHandle::GetAllLeds() const
00245 { return fPlexus->GetAllLeds(); }
00246
00247 inline
00248 const VldRange&
00249 PlexHandle::GetVldRange() const
00250 { return fPlexus->GetVldRange(); }
00251
00252 inline
00253 void
00254 PlexHandle::Print(Option_t *option) const
00255 { fPlexus->Print(option); }
00256
00257 inline
00258 void
00259 PlexHandle::ValidateConsistency() const
00260 { fPlexus->ValidateConsistency(); }
00261
00262 #endif
00263 #endif // PLEXHANDLE_H