Changeset 8617 for trunk/MagicSoft/Mars/mmain
- Timestamp:
- 06/28/07 20:49:30 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mmain
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmain/MEventDisplay.cc
r8611 r8617 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1.6 0 2007-06-26 16:59:21tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1.61 2007-06-28 19:49:30 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 95 95 // Container 96 96 // 97 #include "MSequence.h" // MSequence 98 #include "MDirIter.h" // MDirIter 97 99 #include "MHillas.h" // MHillas::Print(const MGeomCam&) 98 100 #include "MHillasExt.h" // MHillasExt::Print(const MGeomCam&) … … 118 120 // Constructor. 119 121 // 120 MEventDisplay::MEventDisplay(const char *fname ) : MStatusDisplay(), fEvtLoop(0)122 MEventDisplay::MEventDisplay(const char *fname, const char *path) : MStatusDisplay(), fEvtLoop(0) 121 123 { 122 124 // 123 125 // Setup Task list for hillas calculation 124 126 // 125 SetupTaskList("Events", fname );127 SetupTaskList("Events", fname, path); 126 128 127 129 // … … 163 165 { 164 166 TFile f(fname, "READ"); 167 if (f.IsZombie()) 168 return 0; // Not a root file 169 165 170 TTree *t = (TTree*)f.Get(tree); 166 171 if (!t) … … 181 186 // preprocess tasks and read in first event (process) 182 187 // 183 void MEventDisplay::SetupTaskList(const char *tname, const char *fname) 184 { 185 // MCalibrationChargeCam *ccam=0; 186 // MPedPhotCam *pcam=0; 187 188 void MEventDisplay::SetupTaskList(const char *tname, TString fname, const char *path) 189 { 188 190 MBadPixelsCam *badpix = new MBadPixelsCam; 189 191 190 constInt_t type = GetFileType(tname, fname);192 Int_t type = GetFileType(tname, fname); 191 193 switch (type) 192 194 { … … 195 197 case -2: gLog << err << "File type unknown... abort." << endl; return; 196 198 case -1: gLog << err << "Tree " << tname << " not found... abort." << endl; return; 197 } 199 case 0: gLog << inf << "Assuming Sequence file." << endl; break; 200 } 201 202 if (type==0 && !MSequence::InflatePath(fname)) 203 return; 204 205 // Check if file is a sequence... 206 MSequence *seq = type==0 ? new MSequence(fname, path) : new MSequence; 207 if (type==0) 208 type = 1; 198 209 199 210 // … … 209 220 plist->AddToList(tlist); 210 221 plist->AddToList(badpix); 211 212 MReadMarsFile *read = new MReadMarsFile(tname, fname); 222 plist->AddToList(seq); 223 224 MReadMarsFile *read = new MReadMarsFile(tname); 213 225 read->DisableAutoScheme(); 226 if (seq->IsValid()) 227 { 228 MDirIter iter; 229 if (seq->SetupDatRuns(iter, MSequence::kCalibrated)<=0) 230 return; 231 read->AddFiles(iter); 232 } 233 else 234 read->AddFile(fname); 214 235 tlist->AddToList(read); 215 236 -
trunk/MagicSoft/Mars/mmain/MEventDisplay.h
r6569 r8617 38 38 39 39 void UpdateDisplay(); 40 void SetupTaskList(const char *tname, const char *fname);40 void SetupTaskList(const char *tname, TString fname, const char *path); 41 41 42 42 void ReadFirstEvent(); … … 48 48 49 49 public: 50 MEventDisplay(const char *fname );50 MEventDisplay(const char *fname, const char *path=""); 51 51 ~MEventDisplay(); 52 52 -
trunk/MagicSoft/Mars/mmain/Makefile
r8611 r8617 23 23 -I../mfileio -I../mimage -I../mhistmc -I../mgbase -I../mfbase \ 24 24 -I../mdata -I../msignal -I../mcalib -I../mbadpixels \ 25 -I../mpointing -I../mpedestal -I../mmuon -I../mfilter 25 -I../mpointing -I../mpedestal -I../mmuon -I../mfilter -I../mjobs 26 26 27 27 SRCFILES = MBrowser.cc \
Note:
See TracChangeset
for help on using the changeset viewer.