Changeset 2550
- Timestamp:
- 11/21/03 17:01:15 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/status.C
r2405 r2550 58 58 59 59 // ------------- user change ----------------- 60 MDirIter files(" ~MAGIC/online_data/rootdata", "*Mkn501-I*.root", -1);60 MDirIter files(".", "G*.root", -1); 61 61 //files.Print("all"); 62 62 … … 94 94 trighi.SetType(1); 95 95 96 MHCamEvent maxhi("MaxIdxHi", "Index of maximum hi-gain slice"); 97 MHCamEvent maxlo("MaxIdxLo", "Index of maximum lo-gain slice"); 98 maxhi.SetType(3); 99 maxlo.SetType(4); 100 plist.AddToList(&maxhi); 101 plist.AddToList(&maxlo); 102 103 96 104 MFillH fillhi(&trighi, "MRawEvtData"); 105 MFillH hfilhi("MaxIdxHi", "MRawEvtData"); 106 MFillH hfillo("MaxIdxLo", "MRawEvtData"); 97 107 MFillH hfill0("Uncleaned [MHCamEvent]", "MCerPhotEvt"); 98 108 MFillH hfill1("Pedestals [MHCamEvent]", "MPedestalCam"); … … 110 120 tlist.AddToList(&read); 111 121 tlist.AddToList(&geomapl); 122 tlist.AddToList(&hfilhi); 123 tlist.AddToList(&hfillo); 112 124 tlist.AddToList(&fillhi); 113 125 tlist.AddToList(&pcopy); -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r2519 r2550 560 560 // 561 561 MStatusDisplay::MStatusDisplay(Long_t t) 562 : TGMainFrame(gClient ? gClient->GetRoot() : NULL, 1, 1), fTab(NULL), fTimer(this, t, kTRUE), fStatus(kLoopNone), fLog(&gLog), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL), fIsLocked(0) 563 { 562 : TGMainFrame(NULL, 1, 1), fTab(NULL), fTimer(this, t, kTRUE), fStatus(kLoopNone), fLog(&gLog), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL), fIsLocked(0) 563 { 564 // p==NULL means: Take gClient->GetRoot() if not in batch mode 565 // see TGWindow::TGWindow() 566 564 567 // 565 568 // This is a possibility for the user to check whether this … … 1383 1386 1384 1387 gLog << dbg << "MStatusDisplay is on heap: " << (int)IsOnHeap() << endl; 1388 1389 if (TestBit(kExitLoopOnExit)) 1390 gSystem->ExitLoop(); 1391 if (TestBit(kExitLoopOnClose)) 1392 gSystem->ExitLoop(); 1385 1393 1386 1394 if (fIsLocked<=0 && IsOnHeap()) -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.h
r2493 r2550 53 53 kSearch 54 54 } Status_t; 55 56 enum 57 { 58 kExitLoopOnExit = BIT(14), 59 kExitLoopOnClose = BIT(15) 60 }; 55 61 56 62 protected: -
trunk/MagicSoft/Mars/mcamera/CameraLinkDef.h
r2535 r2550 6 6 7 7 #pragma link C++ class MCameraCooling+; 8 #pragma link C++ class MCameraAUX+; 9 #pragma link C++ class MCameraLid+; 8 10 #pragma link C++ class MCameraLids+; 9 11 #pragma link C++ class MCameraHV+; -
trunk/MagicSoft/Mars/mhist/MHCamEvent.cc
r2490 r2550 54 54 // 55 55 MHCamEvent::MHCamEvent(const char *name, const char *title) 56 : fSum(NULL), f Evt(NULL), fType(0)56 : fSum(NULL), fRms(NULL), fEvt(NULL), fType(0) 57 57 { 58 58 // … … 71 71 if (fSum) 72 72 delete fSum; 73 if (fRms) 74 delete fRms; 73 75 } 74 76 … … 99 101 if (fSum) 100 102 delete (fSum); 103 if (fRms) 104 delete (fRms); 101 105 102 106 const TString name = fNameEvt.IsNull() ? fName : fNameEvt; … … 105 109 fSum->SetYTitle("a.u."); 106 110 fSum->SetBit(MHCamera::kProfile); 111 112 fRms = new MHCamera(*cam, name+";rms", fTitle); 113 fRms->SetYTitle("a.u."); 107 114 return kTRUE; 108 115 } … … 131 138 Bool_t MHCamEvent::Finalize() 132 139 { 133 fSum->ResetBit(MHCamera::kProfile); 134 if (fSum->GetEntries()>0) 135 fSum->Scale(1./fSum->GetEntries()); 140 fRms->AddCamContent(*fSum, 1); 136 141 return kTRUE; 137 142 } 138 143 144 // -------------------------------------------------------------------------- 145 // 146 // Take the mean of the sum histogram and print all pixel indices 147 // which are above sum+s*rms 148 // 139 149 void MHCamEvent::PrintOutliers(Float_t s) const 140 150 { … … 156 166 // -------------------------------------------------------------------------- 157 167 // 158 // Return fSum .168 // Return fSum for "sum" and fRms for "rms" 159 169 // 160 170 TH1 *MHCamEvent::GetHistByName(const TString name) 161 171 { 162 return fSum; 172 // name.ToLower(); 173 174 if (name=="sum") 175 return fSum; 176 if (name=="rms") 177 return fRms; 178 179 return NULL; 163 180 } 164 181 … … 171 188 172 189 pad->cd(1); 190 gPad->SetBorderMode(0); 191 fSum->Draw("EPhist"); 192 193 pad->cd(2); 194 gPad->SetBorderMode(0); 195 gPad->Divide(2, 1); 196 pad = gPad; 197 198 pad->cd(1); 199 gPad->SetBorderMode(0); 173 200 fSum->Draw(); 174 201 175 202 pad->cd(2); 176 203 gPad->SetBorderMode(0); 177 f Sum->Draw("EPhist");178 } 204 fRms->Draw(); 205 } -
trunk/MagicSoft/Mars/mhist/MHCamEvent.h
r2416 r2550 13 13 private: 14 14 MHCamera *fSum; // storing the sum 15 MHCamera *fRms; // storing the rms 15 16 MCamEvent *fEvt; //! the current event 16 17 -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r2490 r2550 1131 1131 cout << "Software Pixel Index: " << idx << endl; 1132 1132 cout << "Hardware Pixel Id: " << idx+1 << endl; 1133 cout << "Contents: " << GetBinContent(idx+1) << " <"; 1134 cout << (IsUsed(idx)?"on":"off"); 1135 cout << ">" << endl; 1133 cout << "Contents: " << GetBinContent(idx+1); 1134 if (GetBinError(idx+1)>0) 1135 cout << " +/- " << GetBinError(idx+1); 1136 cout << " <" << (IsUsed(idx)?"on":"off") << ">" << endl; 1136 1137 1137 1138 if (fNotify && fNotify->GetSize()>0) -
trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc
r2490 r2550 111 111 112 112 fSum = new MHCamera(*cam, name+";avg", fTitle); 113 fSum->SetYTitle("%"); 113 fSum->SetBit(MHCamera::kProfile); 114 fSum->SetYTitle("% [1]"); 114 115 115 116 return kTRUE; … … 140 141 Bool_t MHTriggerLvl0::Finalize() 141 142 { 142 if (fSum->GetEntries()>0)143 fSum->Scale(100./fSum->GetEntries());143 // if (fSum->GetEntries()>0) 144 // fSum->Scale(100); 144 145 return kTRUE; 145 146 } 146 147 147 void MHTriggerLvl0::PrintOutl ayers(Float_t s) const148 void MHTriggerLvl0::PrintOutliers(Float_t s) const 148 149 { 149 150 const Double_t mean = fSum->GetMean(); -
trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.h
r2416 r2550 36 36 void Draw(Option_t * =""); 37 37 38 void PrintOutl ayers(Float_t s) const;38 void PrintOutliers(Float_t s) const; 39 39 40 40 ClassDef(MHTriggerLvl0, 1) // Histogram to count how often a pixel is above threshold -
trunk/MagicSoft/Mars/mmain/MEventDisplay.cc
r2521 r2550 470 470 471 471 // 472 // Set name for 'FADC canvas'. The name is the anchor for MHCamera.473 // and clear the canvas474 //475 MHEvent *o = (MHEvent*)plist->FindObject("Signal");476 fCanvas->SetName(Form("%p;%p;PixelContent", o->GetHist(),477 GetCanvas(1)->GetPad(1)));478 479 //480 472 // Draw ellipse on top of all pads 481 473 // … … 520 512 // The other two are parm1 and parm2. 521 513 // 522 Bool_t MEventDisplay::ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)514 Bool_t MEventDisplay::ProcessMessage(Long_t msg, Long_t mp1, Long_t mp2) 523 515 { 524 516 switch (GET_MSG(msg)) … … 545 537 switch (GET_SUBMSG(msg)) 546 538 { 539 case kCM_TAB: 540 { 541 // 542 // Set name for 'FADC canvas'. The name is the anchor for MHCamera. 543 // and clear the canvas 544 // 545 MHEvent *o = (MHEvent*)fEvtLoop->GetParList()->FindObject(GetCanvas(mp1)->GetName()); 546 if (o) 547 fCanvas->SetName(Form("%p;%p;PixelContent", o->GetHist(), 548 GetCanvas(mp1)->GetPad(1))); 549 } 550 break; 551 547 552 case kCM_BUTTON: 548 switch ( parm1)553 switch (mp1) 549 554 { 550 555 case kEvtPrev: … … 560 565 break; 561 566 } 562 return MStatusDisplay::ProcessMessage(msg, parm1, parm2); 563 } 567 568 return MStatusDisplay::ProcessMessage(msg, mp1, mp2); 569 }
Note:
See TracChangeset
for help on using the changeset viewer.