Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

evdb::ScanCat Class Reference

#include <ScanCat.h>

List of all members.

Public Types

enum  scancat_ {
  kVtxAtTgt, kVtxInGas, kVtxUpstream, kSingleBeam,
  kSpray, kPileUp, kHardToTell, kEmpty,
  kMaxCat
}

Public Member Functions

 ScanCat ()
 ~ScanCat ()
void CloseWindow ()
void DoClose ()
void NextEvt ()
void HandleButtons (int id)
void Cat0 ()
void Cat1 ()
void Cat2 ()
void Cat3 ()
void Cat4 ()
void Cat5 ()
void Cat6 ()
void Cat7 ()
void Cat8 ()

Private Member Functions

 RQ_OBJECT ("evdb::ScanCat")

Private Attributes

int fScanCat
TGCompositeFrame * fF1
TGLayoutHints * fL1
TGLabel * fRunEvtLabel
TGRadioButton * fScanCatButton [kMaxCat]
TGTextButton * fNextEvt


Member Enumeration Documentation

enum evdb::ScanCat::scancat_
 

Enumeration values:
kVtxAtTgt 
kVtxInGas 
kVtxUpstream 
kSingleBeam 
kSpray 
kPileUp 
kHardToTell 
kEmpty 
kMaxCat 

Definition at line 25 of file ScanCat.h.

00025                   {
00026       kVtxAtTgt,   // Vertex in target : "good" event
00027       kVtxInGas,   // Vertex in TPC gas
00028       kVtxUpstream,// Vertex somewhere upstream of target
00029       kSingleBeam, // Single beam track
00030       kSpray,      // Many || tracks
00031       kPileUp,     // Pile up of beam tracks
00032       kHardToTell, // So complicated its hard to tell whats going on
00033       kEmpty,      // End-of-spill or other DAQ triggered event
00034       kMaxCat      // Number of scan categories
00035     };


Constructor & Destructor Documentation

ScanCat::ScanCat  ) 
 

Definition at line 39 of file ScanCat.cxx.

References fF1, fL1, fNextEvt, fScanCat, fScanCatButton, kEmpty, kHardToTell, kMaxCat, kPileUp, kSingleBeam, kSpray, kVtxAtTgt, kVtxInGas, kVtxUpstream, and evdb::TopWindow().

00039                  :
00040   TGTransientFrame(evdb::TopWindow(), evdb::TopWindow(), 500, 30, 0)
00041 {
00042 //======================================================================
00043 // Build the GoTo dialog
00044 //======================================================================
00045   fScanCat = 0;
00046   
00047   this->Connect("CloseWindow", "evdb::ScanCat", this, "CloseWindow()");
00048   
00049   fF1 = new TGVerticalFrame(this,60,20);
00050   fL1 = new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2);
00051 
00052   const char* scancat[kMaxCat];
00053   scancat[kVtxAtTgt]    = "Vertex near &target ('good' event)";
00054   scancat[kVtxInGas]    = "Vertex in TPC &gas";
00055   scancat[kVtxUpstream] = "Vertex &upstream of target";
00056   scancat[kSingleBeam]  = "Single &beam track";
00057   scancat[kSpray]       = "Many || tracks ('&spray')";
00058   scancat[kPileUp]      = "&Pile up";
00059   scancat[kHardToTell]  = "&Hard to tell";
00060   scancat[kEmpty]       = "&Empty";
00061   for (int i=0; i<kMaxCat; ++i) {
00062     char meth[64];
00063     sprintf(meth, "Cat%d()", i);
00064     fScanCatButton[i] = new TGRadioButton(fF1, scancat[i], 100+i);
00065     fScanCatButton[i]->Connect("Pressed()", "evdb::ScanCat", this, meth);
00066     fF1->AddFrame(fScanCatButton[i], fL1);
00067   }
00068 
00069   // Next event button
00070   fNextEvt = new TGTextButton(fF1, "Next->", 150);
00071   fNextEvt->SetToolTipText("Go to next event");
00072   fNextEvt->Connect("Clicked()", "evdb::ScanCat", this, "NextEvt()");
00073   fF1->AddFrame(fNextEvt, new TGLayoutHints(kLHintsTop |
00074                                             kLHintsLeft, 2, 0, 2, 2));
00075   
00076   this->AddFrame(fF1);
00077 
00078   this->SetWindowName("Scan Category");
00079   this->MapSubwindows();
00080   this->Resize(210,200);
00081   this->MapWindow();
00082 }

ScanCat::~ScanCat  ) 
 

Definition at line 114 of file ScanCat.cxx.

00115 {
00116 }


Member Function Documentation

void evdb::ScanCat::Cat0  )  [inline]
 

Definition at line 43 of file ScanCat.h.

References HandleButtons().

00043 { this->HandleButtons(0); }

void evdb::ScanCat::Cat1  )  [inline]
 

Definition at line 44 of file ScanCat.h.

References HandleButtons().

00044 { this->HandleButtons(1); }

void evdb::ScanCat::Cat2  )  [inline]
 

Definition at line 45 of file ScanCat.h.

References HandleButtons().

00045 { this->HandleButtons(2); }

void evdb::ScanCat::Cat3  )  [inline]
 

Definition at line 46 of file ScanCat.h.

References HandleButtons().

00046 { this->HandleButtons(3); }

void evdb::ScanCat::Cat4  )  [inline]
 

Definition at line 47 of file ScanCat.h.

References HandleButtons().

00047 { this->HandleButtons(4); }

void evdb::ScanCat::Cat5  )  [inline]
 

Definition at line 48 of file ScanCat.h.

References HandleButtons().

00048 { this->HandleButtons(5); }

void evdb::ScanCat::Cat6  )  [inline]
 

Definition at line 49 of file ScanCat.h.

References HandleButtons().

00049 { this->HandleButtons(6); }

void evdb::ScanCat::Cat7  )  [inline]
 

Definition at line 50 of file ScanCat.h.

References HandleButtons().

00050 { this->HandleButtons(7); }

void evdb::ScanCat::Cat8  )  [inline]
 

Definition at line 51 of file ScanCat.h.

References HandleButtons().

00051 { this->HandleButtons(8); }

void ScanCat::CloseWindow  ) 
 

Definition at line 120 of file ScanCat.cxx.

00120 { delete this; }

void ScanCat::DoClose  ) 
 

Definition at line 124 of file ScanCat.cxx.

00124 { this->SendCloseMessage(); }

void ScanCat::HandleButtons int  id  ) 
 

Definition at line 86 of file ScanCat.cxx.

References fScanCat, fScanCatButton, and kMaxCat.

Referenced by Cat0(), Cat1(), Cat2(), Cat3(), Cat4(), Cat5(), Cat6(), Cat7(), and Cat8().

00087 {
00088   for (int i=0; i<kMaxCat; ++i) {
00089     if (i!=id) fScanCatButton[i]->SetState(kButtonUp);
00090   }
00091   fScanCat = id;
00092 }

void ScanCat::NextEvt  ) 
 

Definition at line 96 of file ScanCat.cxx.

References fScanCat, and GetEventNumbers().

00097 {
00098   int  run;
00099   int  event;
00100   char file[256];
00101 
00102   GetEventNumbers(run, event);
00103   
00104   sprintf(file, "scan.%.6d.txt", run);
00105   FILE* fp = fopen(file, "a");
00106   fprintf(fp, "%9d %6d %d\n", event, run, fScanCat);
00107   fclose(fp);
00108 
00109   IoModule::Instance()->Advance();
00110 }

evdb::ScanCat::RQ_OBJECT "evdb::ScanCat"   )  [private]
 


Member Data Documentation

TGCompositeFrame* evdb::ScanCat::fF1 [private]
 

Definition at line 55 of file ScanCat.h.

Referenced by ScanCat().

TGLayoutHints* evdb::ScanCat::fL1 [private]
 

Definition at line 56 of file ScanCat.h.

Referenced by ScanCat().

TGTextButton* evdb::ScanCat::fNextEvt [private]
 

Definition at line 60 of file ScanCat.h.

Referenced by ScanCat().

TGLabel* evdb::ScanCat::fRunEvtLabel [private]
 

Definition at line 58 of file ScanCat.h.

int evdb::ScanCat::fScanCat [private]
 

Definition at line 54 of file ScanCat.h.

Referenced by HandleButtons(), NextEvt(), and ScanCat().

TGRadioButton* evdb::ScanCat::fScanCatButton[kMaxCat] [private]
 

Definition at line 59 of file ScanCat.h.

Referenced by HandleButtons(), and ScanCat().


The documentation for this class was generated from the following files:
Generated on Thu Jul 24 12:01:17 2008 for NOvA Offline by doxygen 1.3.5