Changeset 858 for trunk/MagicSoft
- Timestamp:
- 07/06/01 14:31:04 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 4 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
r852 r858 24 24 #pragma link C++ class MParList; 25 25 26 #pragma link C++ class MFilter; 27 #pragma link C++ class MFilterList; 28 26 29 #pragma link C++ class MEvtLoop; 27 30 -
trunk/MagicSoft/Mars/mbase/MArray.cc
r749 r858 38 38 #include "MArray.h" 39 39 40 ClassImp(MArray) 40 ClassImp(MArray); 41 41 -
trunk/MagicSoft/Mars/mbase/MArrayB.cc
r749 r858 19 19 #include "MArrayB.h" 20 20 21 ClassImp(MArrayB) 21 ClassImp(MArrayB); 22 22 -
trunk/MagicSoft/Mars/mbase/MArrayS.cc
r749 r858 35 35 #include "MArrayS.h" 36 36 37 ClassImp(MArrayS) 37 ClassImp(MArrayS); 38 38 -
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r852 r858 59 59 #include "MTaskList.h" 60 60 61 ClassImp(MEvtLoop) 61 ClassImp(MEvtLoop); 62 62 63 63 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mbase/MLog.cc
r752 r858 48 48 #include "MLogManip.h" 49 49 50 ClassImp(MLog) 50 ClassImp(MLog); 51 51 52 52 // … … 108 108 AllocateFile(fname); 109 109 CheckFlag(eFile, flag); 110 } 111 112 // -------------------------------------------------------------------------- 113 // 114 // copyt constructor 115 // 116 MLog::MLog(MLog &log) 117 { 118 fOutputLevel = log.fOutputLevel; 119 fDebugLevel = log.fDebugLevel; 120 fDevice = log.fDevice; 110 121 } 111 122 -
trunk/MagicSoft/Mars/mbase/MLog.h
r765 r858 51 51 MLog(const char *fname, int flag=-1); 52 52 53 MLog(MLog &log) { }53 MLog(MLog &log); 54 54 55 55 ~MLog() -
trunk/MagicSoft/Mars/mbase/MParContainer.h
r855 r858 48 48 MParContainer& operator=(const MParContainer& rhs); 49 49 50 void SetLogStream(MLog *l og) { fLog = log; }50 void SetLogStream(MLog *lg) { fLog = lg; } 51 51 52 52 virtual ~MParContainer() { -
trunk/MagicSoft/Mars/mbase/MParList.cc
r855 r858 47 47 #include "MLogManip.h" 48 48 49 ClassImp(MParList) 49 ClassImp(MParList); 50 50 51 51 // -------------------------------------------------------------------------- … … 144 144 TObject *MParList::FindObject(const char *name) const 145 145 { 146 return (TObject*)fContainer.FindObject(name); 146 return fContainer.FindObject(name); 147 } 148 149 // -------------------------------------------------------------------------- 150 // 151 // check if the object is in the list or not 152 // 153 TObject *MParList::FindObject(TObject *obj) const 154 { 155 return fContainer.FindObject(obj); 147 156 } 148 157 … … 282 291 void MParList::Reset() 283 292 { 284 return;285 293 TIter Next(&fContainer); 286 294 … … 290 298 // loop over all tasks for preproccesing 291 299 // 292 while ( (cont=(MParContainer*)Next()))300 while ((cont=(MParContainer*)Next())) 293 301 cont->Reset(); 294 302 } -
trunk/MagicSoft/Mars/mbase/MParList.h
r855 r858 42 42 43 43 TObject *FindObject(const char *name) const; 44 TObject *FindObject(TObject *obj) const; 44 45 MParContainer *FindCreateObj(const char *classname, const char *objname=NULL); 45 46 -
trunk/MagicSoft/Mars/mbase/MReadTree.cc
r855 r858 55 55 #include "MParList.h" 56 56 57 ClassImp(MReadTree) 57 ClassImp(MReadTree); 58 58 59 59 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mbase/MTask.cc
r752 r858 61 61 #include "MTask.h" 62 62 63 ClassImp(MTask) 63 ClassImp(MTask); 64 64 65 65 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mbase/MTask.h
r698 r858 14 14 #endif 15 15 16 class MFilter; 16 17 class MParList; 17 18 18 19 class MTask : public MInputStreamID 19 20 { 21 private: 22 const MFilter *fFilter; 23 20 24 public: 25 MTask() : fFilter(NULL) {} 21 26 ~MTask() 22 27 { 23 28 } 29 30 const MFilter *GetFilter() const { return fFilter; } 31 void SetFilter(const MFilter *filter) { fFilter=filter; } 24 32 25 33 virtual Bool_t PreProcess(MParList *pList); -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r855 r858 34 34 35 35 #include "MLog.h" 36 #include "MLogManip.h" 37 #include "MFilter.h" 36 38 #include "MParList.h" 37 39 #include "MInputStreamID.h" 38 40 39 ClassImp(MTaskList) 41 ClassImp(MTaskList); 40 42 41 43 // -------------------------------------------------------------------------- … … 79 81 // loop over all tasks for preproccesing 80 82 // 81 while ( (task=(MTask*)Next()))83 while ((task=(MTask*)Next())) 82 84 task->SetLogStream(log); 83 85 … … 102 104 if (fTasks.FindObject(task)) 103 105 { 104 *fLog << "WARNING: MTaskList::AddToList:Task already existing." << endl;106 *fLog << dbginf << "Task already existing." << endl; 105 107 return kTRUE; 106 108 } … … 108 110 if (fTasks.FindObject(name)) 109 111 { 110 *fLog << "WARNING: MTaskList::AddToList:'" << name << "' exists in List already." << endl;112 *fLog << dbginf << "'" << name << "' exists in List already." << endl; 111 113 return kTRUE; 112 114 } … … 116 118 if (!fTasks.FindObject(where)) 117 119 { 118 printf("ERROR: MTaskList::AddToList: Cannot find task after which the new task should be scheduled!\n");120 *fLog << dbginf << "Cannot find task after which the new task should be scheduled!" << endl; 119 121 return kFALSE; 120 122 } … … 135 137 // do pre processing (before eventloop) of all tasks in the task-list 136 138 // 137 Bool_t MTaskList::PreProcess( MParList *pList)139 Bool_t MTaskList::PreProcess(MParList *pList) 138 140 { 139 141 *fLog << "Preprocessing... " << flush; … … 199 201 200 202 // 203 // Check for the existance of a filter. If a filter is existing 204 // check for its value. If the value is kFALSE don't execute 205 // this task. 206 // 207 const MFilter *filter = task->GetFilter(); 208 209 const Bool_t rc = filter ? filter->IsExpressionTrue() : kTRUE; 210 211 if (!rc) 212 continue; 213 214 // 201 215 // if it has the right stream id execute the Process() function 202 216 // and check what the result of it is. … … 273 287 void MTaskList::Print(Option_t *t) 274 288 { 275 *fLog << "TaskList: " << this->GetName() << " <" << this->GetTitle() << ">" << endl;276 277 fTasks.Print();278 279 *fLog << endl;280 } 281 289 *fLog << "TaskList: " << this->GetName() << " <" << this->GetTitle() << ">" << endl; 290 291 fTasks.Print(); 292 293 *fLog << endl; 294 } 295 -
trunk/MagicSoft/Mars/mbase/MTaskList.h
r843 r858 40 40 Bool_t PostProcess(); 41 41 42 void Print(Option_t * t = NULL);42 void Print(Option_t *opt = ""); 43 43 44 44 ClassDef(MTaskList, 0) //collection of tasks to be performed in the eventloop -
trunk/MagicSoft/Mars/mbase/MTime.cc
r749 r858 37 37 #include "MLog.h" 38 38 39 ClassImp(MTime) 39 ClassImp(MTime); 40 40 41 41 void MTime::Print(Option_t *) -
trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc
r855 r858 46 46 #include "MParList.h" 47 47 48 ClassImp(MWriteAsciiFile) 48 ClassImp(MWriteAsciiFile); 49 49 50 50 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mbase/MWriteFile.cc
r852 r858 44 44 #include "MParList.h" 45 45 46 ClassImp(MWriteFile) 46 ClassImp(MWriteFile); 47 47 48 48 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc
r855 r858 43 43 #include "MParList.h" 44 44 45 ClassImp(MWriteRootFile) 45 ClassImp(MWriteRootFile); 46 46 47 47 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mbase/Makefile
r852 r858 35 35 MParContainer.cc \ 36 36 MParList.cc \ 37 MFilter.cc \ 38 MFilterList.cc \ 37 39 MInputStreamID.cc \ 38 40 MEvtLoop.cc \
Note:
See TracChangeset
for help on using the changeset viewer.