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

evdb::IoModule Class Reference

Wrap the I/O module to emit signals to the event display. More...

#include <IoModule.h>

List of all members.

Public Member Functions

 ~IoModule ()
io::ReadWriteModuleIoMod ()
int AddFile (const char *file_regexp)
int RemoveFile (const char *file_regexp)
int GoToFile (const char *file)
int AdvanceFile (int n=1)
int RewindFile (int n=1)
int GoTo (int run, int event)
int Advance (int n=1)
int Rewind (int n=1)
int Reload ()
void SetOutputFileName (const char *n)
edm::EventHandleGetEvent ()
int WriteEvent ()
const char * CurrentFile () const
const char * FileName (int i) const
void StartAutoAdvance ()
void StopAutoAdvance ()
void NewEvent ()

Static Public Member Functions

IoModuleInstance ()

Private Member Functions

 RQ_OBJECT ("evdb::IoModule")
 IoModule ()
void Warn (const char *w)

Private Attributes

edm::EventfEvent
io::ReadWriteModulefIoMod
bool fAutoAdvanceOption


Detailed Description

Wrap the I/O module to emit signals to the event display.

Definition at line 22 of file IoModule.h.


Constructor & Destructor Documentation

IoModule::~IoModule  ) 
 

Definition at line 65 of file IoModule.cxx.

00065 { }

IoModule::IoModule  )  [private]
 

Definition at line 58 of file IoModule.cxx.

References fIoMod.

Referenced by Instance().

00059 {
00060   fIoMod = new io::ReadWriteModule();
00061 }


Member Function Documentation

int IoModule::AddFile const char *  file_regexp  ) 
 

Definition at line 69 of file IoModule.cxx.

References io::ReadWriteModule::AddFile(), fIoMod, io::ReadWriteModule::Report(), and Warn().

00070 {
00071   int n = 0;
00072   if (file_regexp) n = fIoMod->AddFile(file_regexp);
00073   if (n==0) {
00074     std::string s;
00075     s += "Add: No files matching '";
00076     if (file_regexp) s += file_regexp;
00077     else             s += "0x0";
00078     s += "' openned.";
00079     this->Warn(s.c_str());
00080   }
00081   fIoMod->Report();
00082 
00083   return n;
00084 }

int IoModule::Advance int  n = 1  ) 
 

Definition at line 143 of file IoModule.cxx.

References io::ReadWriteModule::Advance(), fIoMod, and NewEvent().

00144 {
00145   int istat = fIoMod->Advance(n);
00146   JobInterface::ProcEvent(this->GetEvent());
00147   this->NewEvent();
00148   return istat;
00149 }

int IoModule::AdvanceFile int  n = 1  ) 
 

Definition at line 113 of file IoModule.cxx.

References io::ReadWriteModule::AdvanceFile(), fIoMod, and NewEvent().

00114 {
00115   int istat = fIoMod->AdvanceFile(n);
00116   JobInterface::ProcEvent(this->GetEvent());
00117   this->NewEvent();
00118   return istat;
00119 }

const char * IoModule::CurrentFile  )  const
 

Definition at line 198 of file IoModule.cxx.

References io::ReadWriteModule::CurrentFile(), and fIoMod.

00199 {
00200   return fIoMod->CurrentFile();
00201 }

const char * IoModule::FileName int  i  )  const
 

Definition at line 205 of file IoModule.cxx.

References io::ReadWriteModule::FileName(), and fIoMod.

00206 {
00207   return fIoMod->FileName(i);
00208 }

edm::EventHandle & IoModule::GetEvent  ) 
 

Definition at line 180 of file IoModule.cxx.

References fIoMod, and io::ReadWriteModule::GetEvent().

00181 {
00182   return fIoMod->GetEvent();
00183 }

int IoModule::GoTo int  run,
int  event
 

Definition at line 133 of file IoModule.cxx.

References fIoMod, io::ReadWriteModule::GoTo(), and NewEvent().

00134 {
00135   int istat = fIoMod->GoTo(run,event);
00136   JobInterface::ProcEvent(this->GetEvent());
00137   this->NewEvent();
00138   return istat;
00139 }

int IoModule::GoToFile const char *  file  ) 
 

Definition at line 103 of file IoModule.cxx.

References fIoMod, io::ReadWriteModule::GoToFile(), and NewEvent().

00104 {
00105   int istat = fIoMod->GoToFile(file);
00106   JobInterface::ProcEvent(this->GetEvent());
00107   this->NewEvent();
00108   return istat;
00109 }

IoModule * IoModule::Instance  )  [static]
 

Definition at line 49 of file IoModule.cxx.

References IoModule().

Referenced by evd::DetectorView::Draw(), evd::PlaneView::DrawFilament(), evd::PlaneView::DrawMC(), evd::PlaneView::DrawMCHits(), evd::PlaneView::DrawPlaneClusters(), evd::PlaneView::DrawRawDigit(), evd::PlaneView::DrawTracks(), and main().

00050 {
00051   static IoModule* iom = 0;
00052   if (iom==0) iom = new IoModule();
00053   return iom; 
00054 }

io::ReadWriteModule & IoModule::IoMod  ) 
 

Definition at line 45 of file IoModule.cxx.

References fIoMod.

00045 { return *fIoMod; }

void IoModule::NewEvent  ) 
 

Definition at line 220 of file IoModule.cxx.

Referenced by Advance(), AdvanceFile(), GoTo(), GoToFile(), Reload(), Rewind(), and RewindFile().

00221 {
00222   Emit("NewEvent()"); 
00223 }

int IoModule::Reload  ) 
 

Definition at line 163 of file IoModule.cxx.

References fIoMod, NewEvent(), and io::ReadWriteModule::Reload().

00164 {
00165   int istat = fIoMod->Reload();
00166   JobInterface::ProcEvent(this->GetEvent());
00167   this->NewEvent();
00168   return istat;
00169 }

int IoModule::RemoveFile const char *  file_regexp  ) 
 

Definition at line 88 of file IoModule.cxx.

References fIoMod, io::ReadWriteModule::RemoveFile(), and Warn().

00089 {
00090   int n = fIoMod->RemoveFile(file_regexp);
00091   if (n==0) {
00092     std::string s;
00093     s += "Remove: No files match '";
00094     s += file_regexp;
00095     s += "'.";
00096     this->Warn(s.c_str());
00097   }
00098   return n;
00099 }

int IoModule::Rewind int  n = 1  ) 
 

Definition at line 153 of file IoModule.cxx.

References fIoMod, NewEvent(), and io::ReadWriteModule::Rewind().

00154 {
00155   int istat = fIoMod->Rewind(n);
00156   JobInterface::ProcEvent(this->GetEvent());
00157   this->NewEvent();
00158   return istat;
00159 }

int IoModule::RewindFile int  n = 1  ) 
 

Definition at line 123 of file IoModule.cxx.

References fIoMod, NewEvent(), and io::ReadWriteModule::RewindFile().

00124 {
00125   int istat = fIoMod->RewindFile(n);
00126   JobInterface::ProcEvent(this->GetEvent());
00127   this->NewEvent();
00128   return istat;
00129 }

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

void IoModule::SetOutputFileName const char *  n  ) 
 

Definition at line 173 of file IoModule.cxx.

References fIoMod, and io::ReadWriteModule::SetOutputFileName().

00174 {
00175   fIoMod->SetOutputFileName(n);
00176 }

void IoModule::StartAutoAdvance  ) 
 

Definition at line 29 of file IoModule.cxx.

References gsAutoAdvance.

00030 {
00031   if (gsAutoAdvance==0) gsAutoAdvance = new AutoAdvance();
00032 }

void IoModule::StopAutoAdvance  ) 
 

Definition at line 36 of file IoModule.cxx.

References gsAutoAdvance.

00037 {
00038   if (gsAutoAdvance==0) return;
00039   delete gsAutoAdvance;
00040   gsAutoAdvance = 0;
00041 }

void IoModule::Warn const char *  w  )  [private]
 

Definition at line 212 of file IoModule.cxx.

Referenced by AddFile(), RemoveFile(), and WriteEvent().

00213 {
00214   new TGMsgBox(evdb::TopWindow(), evdb::TopWindow(), 
00215                "Warning", w, kMBIconExclamation);
00216 }

int IoModule::WriteEvent  ) 
 

Definition at line 187 of file IoModule.cxx.

References fIoMod, Warn(), and io::ReadWriteModule::WriteEvent().

00188 {
00189   int istat = fIoMod->WriteEvent();
00190   if (istat == 0) {
00191     this->Warn("Write failed.\n");
00192   }
00193   return istat;
00194 }


Member Data Documentation

bool evdb::IoModule::fAutoAdvanceOption [private]
 

Definition at line 61 of file IoModule.h.

edm::Event* evdb::IoModule::fEvent [private]
 

Definition at line 59 of file IoModule.h.

io::ReadWriteModule* evdb::IoModule::fIoMod [private]
 

Definition at line 60 of file IoModule.h.

Referenced by AddFile(), Advance(), AdvanceFile(), CurrentFile(), FileName(), GetEvent(), GoTo(), GoToFile(), IoMod(), IoModule(), Reload(), RemoveFile(), Rewind(), RewindFile(), SetOutputFileName(), and WriteEvent().


The documentation for this class was generated from the following files:
Generated on Fri Jul 25 02:05:53 2008 for NOvA Offline by doxygen 1.3.5