Changeset 2414 for trunk/MagicSoft/Mars/mraw
- Timestamp:
- 10/20/03 18:33:11 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mraw
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
r2372 r2414 215 215 // <index> The pixel with the given index is drawn 216 216 // 217 void MRawEvtData::Draw(Option_t *opt) 217 // Rem: DrawTS is the thread-safe version of Draw. In most cases 218 // you can use Draw instead 219 // 220 void MRawEvtData::DrawTS(TVirtualPad *pad=NULL, Option_t *opt="") 218 221 { 219 222 if (GetNumPixels()==0) 220 223 { 221 224 *fLog << warn << "Sorry, no pixel to draw!" << endl; 225 return; 226 } 227 if (!pad) 228 { 229 *fLog << warn << "MRawEvtData::DrawTS - No pad available..." << endl; 222 230 return; 223 231 } … … 238 246 if (!pix.Jump(id)) 239 247 { 240 *fLog << warn << "Pixel Idx #" << id << " doesn't exist!" << endl;248 *fLog << warn << "Pixel Idx #" << dec << id << " doesn't exist!" << endl; 241 249 return; 242 250 } … … 255 263 if (str.BeginsWith("graph")) 256 264 { 257 *fLog << inf << "Drawing Graph: Pixel Idx #" << pix.GetPixelId();265 *fLog << inf << "Drawing Graph: Pixel Idx #" << dec << pix.GetPixelId(); 258 266 *fLog << " of " << (int)GetNumPixels() << "Pixels" << endl; 259 267 … … 267 275 268 276 graphhi->SetBit(kCanDelete); 269 graphhi->Draw(same ? "C*" : "AC*");277 MParContainer::DrawTS(graphhi, pad, same ? "C*" : "AC*"); 270 278 271 279 TH1F *histhi = graphhi->GetHistogram(); … … 286 294 287 295 graphlo->SetBit(kCanDelete); 288 graphlo->Draw("C*");296 MParContainer::DrawTS(graphlo, pad, "C*"); 289 297 290 298 TH1F *histlo = graphlo->GetHistogram(); … … 300 308 { 301 309 // FIXME: Add Legend 302 *fLog << inf << "Drawing Histogram of Pixel with Idx #" << pix.GetPixelId() << endl; 310 *fLog << inf << "Drawing Histogram of Pixel with Idx #"; 311 *fLog << dec << pix.GetPixelId() << endl; 303 312 304 313 TH1F *histh = new TH1F(name, "FADC Samples", nh, -0.5, nh-.5); … … 309 318 histh->Fill(i, higains[i]); 310 319 histh->SetBit(kCanDelete); 311 histh->Draw(same ? "same" : "");320 MParContainer::DrawTS(histh, pad, same ? "same" : ""); 312 321 313 322 if (nl>0) … … 319 328 histl->Fill(i, logains[i]); 320 329 histl->SetBit(kCanDelete); 321 histl->Draw("same");330 MParContainer::DrawTS(histl, pad, "same"); 322 331 } 323 332 return; … … 516 525 return kTRUE; 517 526 } 527 528 void MRawEvtData::Copy(TObject &named) 529 #if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01) 530 const 531 #endif 532 { 533 MRawEvtData &evt = (MRawEvtData &)named; 534 535 *evt.fHiGainPixId = *fHiGainPixId; 536 *evt.fLoGainPixId = *fLoGainPixId; 537 538 *evt.fHiGainFadcSamples = *fHiGainFadcSamples; 539 *evt.fLoGainFadcSamples = *fLoGainFadcSamples; 540 541 evt.fPosInArray = fPosInArray; 542 evt.fConnectedPixels = fConnectedPixels; 543 evt.fArraySize = fArraySize; 544 } 545 -
trunk/MagicSoft/Mars/mraw/MRawEvtData.h
r2207 r2414 24 24 // FIXME: COMMENT ABOUT ORDERING 25 25 26 MArrayS *fHiGainPixId; // list of pixel IDs of hi gain channel27 MArrayB *fHiGainFadcSamples; // list of hi gain samples of all pixels (ordering: see fHiGainPixId)26 MArrayS *fHiGainPixId; //-> list of pixel IDs of hi gain channel 27 MArrayB *fHiGainFadcSamples; //-> list of hi gain samples of all pixels (ordering: see fHiGainPixId) 28 28 29 MArrayS *fLoGainPixId; // list of pixel IDs of lo gain channel30 MArrayB *fLoGainFadcSamples; // list of lo gain samples of all pixels (ordering: see fLoGainPixId)29 MArrayS *fLoGainPixId; //-> list of pixel IDs of lo gain channel 30 MArrayB *fLoGainFadcSamples; //-> list of lo gain samples of all pixels (ordering: see fLoGainPixId) 31 31 32 32 Int_t fPosInArray; //! … … 52 52 void Clear(Option_t * = NULL); 53 53 void Print(Option_t * = NULL) const; 54 void Draw (Option_t * = NULL); 54 void DrawTS(TVirtualPad *pad=NULL, Option_t *option=""); 55 void Copy(TObject &named) 56 #if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01) 57 const 58 #endif 59 ; 55 60 56 61 void DeletePixels(Bool_t flag=kFALSE); … … 65 70 66 71 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; 67 void DrawPixelContent(Int_t num ) const72 void DrawPixelContent(Int_t num, TVirtualPad *pad=NULL) const 68 73 { 69 74 TString s("HIST"); 70 75 s += num; 71 const_cast<MRawEvtData*>(this)->Draw(s); 76 const_cast<MRawEvtData*>(this)->DrawTS(pad, s); 77 //const_cast<MRawEvtData*>(this)->Draw(s); 72 78 } 73 79
Note:
See TracChangeset
for help on using the changeset viewer.