Changeset 991 for trunk/MagicSoft/Mars
- Timestamp:
- 10/26/01 10:11:30 (23 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r990 r991 1 1 -*-*- END -*-*- 2 3 2001/10/26: Thomas Bretz 4 5 * Makefile.rules: 6 - changed output 7 8 * readraw.cc: 9 - changed name and description in TROOT 10 - removed argument in MMcEvt::Print() 11 12 * manalysis/MCerPhotEvt.[h,cc], manalysis/MCerPhotPix.[h,cc], 13 manalysis/MHillas.[h,cc], mmc/MMcEvt.[hxx,cxx], 14 mmc/MMcFadcHeader.[hxx,cxx], mmc/MMcTrig.[hxx,cxx], 15 mmc/MMcTrigHeader.[hxx,cxx]: 16 - according to root 3.01 made Print const 17 18 * mbase/BaseLinkDef.h: 19 - added MPrint 20 21 * mbase/MPrint.[h,cc]: 22 - added 23 24 * mbase/MClone.[h,cc]: 25 - changed MParContainer to a more general TObject 26 27 * mbase/Makefile: 28 - MPrint.cc added 29 30 * meventdisp/MGCamDisplay.[h,cc], meventdisp/MGEvtDisplay.[h,cc], 31 meventdisp/MGFadcDisp.[h,cc]: 32 - introduced fInitOk for the case PreProcessing failed 33 34 * mmain/MMonteCarlo.cc: 35 - added correction for use of several trigger conditions 36 - speedup threshold calc by usage of UseLeaf 37 38 2 39 3 40 2001/10/23: Thomas Bretz -
trunk/MagicSoft/Mars/Makefile.rules
r654 r991 9 9 10 10 $(CINT)Cint.cc: $(HEADERS) 11 @echo12 11 @echo " - Generating dictionary $(CINT)Cint.cc ..." 13 12 … … 16 15 17 16 .cxx.o: 18 @echo " Compiling " $<17 @echo " - Compiling " $< 19 18 $(CXX) $(CXXFLAGS) -c $< -o $@ 20 19 21 20 .cc.o: 22 @echo " Compiling " $<21 @echo " - Compiling " $< 23 22 $(CXX) $(CXXFLAGS) -c $< -o $@ 24 23 25 24 .c.o: 26 @echo " Compiling " $<25 @echo " - Compiling " $< 27 26 $(CC) $(CFLAGS) -c $< -o $@ 28 27 # -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
r959 r991 82 82 { 83 83 // TClonesArray -> 'operator new with placement' should be used 84 new ((*fPixels)[fNumPixels++]) MCerPhotPix( 84 new ((*fPixels)[fNumPixels++]) MCerPhotPix(id, nph, err); 85 85 } 86 86 … … 91 91 void MCerPhotEvt::Clear(Option_t *) 92 92 { 93 fNumPixels = 0 94 fPixels->Clear() 93 fNumPixels = 0; 94 fPixels->Clear(); 95 95 } 96 96 … … 99 99 // Dump the cerenkov photon event to *fLog 100 100 // 101 void MCerPhotEvt::Print(Option_t *) 101 void MCerPhotEvt::Print(Option_t *) const 102 102 { 103 103 const Int_t entries = fPixels->GetEntries(); -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
r959 r991 31 31 32 32 void Clear(Option_t *opt=NULL); 33 void Print(Option_t *opt=NULL) ;33 void Print(Option_t *opt=NULL) const; 34 34 35 35 Bool_t IsPixelExisting(Int_t id) const; -
trunk/MagicSoft/Mars/manalysis/MCerPhotPix.cc
r857 r991 56 56 // Print information to gLog. 57 57 // 58 void MCerPhotPix::Print(Option_t *) 58 void MCerPhotPix::Print(Option_t *) const 59 59 { 60 60 gLog << "MCerPhotPix: Pixel: "<< fPixId ; -
trunk/MagicSoft/Mars/manalysis/MCerPhotPix.h
r967 r991 24 24 MCerPhotPix(Int_t pix = -1, Float_t phot=0., Float_t errphot=0.); 25 25 26 void Print(Option_t *opt = NULL) ;26 void Print(Option_t *opt = NULL) const; 27 27 28 28 Int_t GetPixId() const { return fPixId; } -
trunk/MagicSoft/Mars/manalysis/MHillas.cc
r977 r991 92 92 // Print the hillas Parameters to *fLog 93 93 // 94 void MHillas::Print(Option_t *) 94 void MHillas::Print(Option_t *) const 95 95 { 96 96 *fLog << "Hillas Parameter:" << endl; -
trunk/MagicSoft/Mars/manalysis/MHillas.h
r857 r991 31 31 Bool_t Calc(const MGeomCam &geom, const MCerPhotEvt &pix); 32 32 33 void Print(Option_t *opt=NULL) ;33 void Print(Option_t *opt=NULL) const; 34 34 void Draw(Option_t *opt=NULL); 35 35 void Paint(Option_t *opt=NULL); -
trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
r967 r991 32 32 33 33 #pragma link C++ class MClone; 34 #pragma link C++ class MPrint; 34 35 35 36 #pragma link C++ class MReadTree; -
trunk/MagicSoft/Mars/mbase/MClone.cc
r967 r991 69 69 *fTitle = title ? title : "Task to clone a parameter container for later usage"; 70 70 71 fClone 72 f ParContainer= NULL;71 fClone = NULL; 72 fObject = NULL; 73 73 } 74 74 … … 77 77 // Constructor. Remembers the name to search for in the parameter list. 78 78 // 79 MClone::MClone(const char * par, const char *name, const char *title)79 MClone::MClone(const char *obj, const char *name, const char *title) 80 80 { 81 81 Init(name, title); 82 82 83 f ParContainerName = par;83 fObjName = obj; 84 84 } 85 85 … … 88 88 // Constructor. Remember the pointer of the object which has to be cloned. 89 89 // 90 MClone::MClone(const MParContainer *par, const char *name, const char *title)90 MClone::MClone(const TObject *obj, const char *name, const char *title) 91 91 { 92 92 Init(name, title); 93 93 94 f ParContainer = par;94 fObject = obj; 95 95 } 96 96 … … 114 114 // The pointer is already given by the user. 115 115 // 116 if (f ParContainer)116 if (fObject) 117 117 return kTRUE; 118 118 … … 120 120 // Try to find the parameter container with the given name in the list 121 121 // 122 f ParContainer = (MParContainer*)pList->FindObject(fParContainerName);123 if (f ParContainer)122 fObject = pList->FindObject(fObjName); 123 if (fObject) 124 124 return kTRUE; 125 125 … … 127 127 // If it couldn't get found stop Eventloop 128 128 // 129 *fLog << dbginf << f ParContainerName << " not found... aborting." << endl;129 *fLog << dbginf << fObjName << " not found... aborting." << endl; 130 130 return kFALSE; 131 131 } … … 165 165 // Clone the given parameter container 166 166 // 167 fClone = f ParContainer->Clone();167 fClone = fObject->Clone(); 168 168 169 169 return kTRUE; -
trunk/MagicSoft/Mars/mbase/MClone.h
r961 r991 15 15 { 16 16 private: 17 const MParContainer *fParContainer; // pointer to container which has to be cloned18 TString f ParContainerName;// given name to search for in the parameterlist17 const TObject *fObject; // pointer to container which has to be cloned 18 TString fObjName; // given name to search for in the parameterlist 19 19 20 TObject* fClone; 20 TObject* fClone; // pointer to the cloned object. deletion is handled by MClone 21 21 22 22 void Init(const char *name, const char *title); 23 23 24 24 public: 25 MClone(const char * par,const char *name=NULL, const char *title=NULL);26 MClone(const MParContainer *par, const char *name=NULL, const char *title=NULL);25 MClone(const char *obj, const char *name=NULL, const char *title=NULL); 26 MClone(const TObject *obj, const char *name=NULL, const char *title=NULL); 27 27 ~MClone(); 28 28 -
trunk/MagicSoft/Mars/mbase/MReadTree.cc
r988 r991 83 83 84 84 fVetoList = new TArrayC; 85 85 86 // 86 87 // open the input stream -
trunk/MagicSoft/Mars/mbase/Makefile
r959 r991 47 47 MArrayS.cc \ 48 48 MTime.cc \ 49 MLog.cc \50 49 MHtml.cc \ 51 50 MClone.cc \ 51 MPrint.cc \ 52 MLog.cc \ 52 53 MLogManip.cc 53 54 -
trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.cc
r961 r991 117 117 plist->AddToList(pedest); 118 118 119 fEvtLoop->PreProcess(); 120 GetTaskList()->Process(); 119 fInitOk = fEvtLoop->PreProcess(); 120 121 if (fInitOk) 122 GetTaskList()->Process(); 121 123 122 124 return geom; … … 177 179 void MGCamDisplay::UpdateDisplay() 178 180 { 179 if (!f Display)181 if (!fInitOk) 180 182 return; 181 183 -
trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.cc
r961 r991 333 333 const TGWindow *p, const TGWindow *main, 334 334 UInt_t w, UInt_t h) 335 : TGTransientFrame(p, main, w, h) 335 : TGTransientFrame(p, main, w, h), fInitOk(kFALSE) 336 336 { 337 337 // … … 398 398 void MGEvtDisplay::ReadinEvent(UInt_t iEvt) 399 399 { 400 if (!fInitOk) 401 return; 402 400 403 Int_t buttons = 4; 401 404 Int_t retval = 0; -
trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.h
r961 r991 51 51 TGVerticalFrame *fMidFrame; 52 52 53 Bool_t fInitOk; 54 53 55 MParList *GetParList() const; 54 56 MTaskList *GetTaskList() const; -
trunk/MagicSoft/Mars/meventdisp/MGFadcDisp.cc
r961 r991 125 125 // preprocess eventloop and read in first event (process) 126 126 // 127 fEvtLoop->PreProcess(); 128 GetTaskList()->Process(); 127 fInitOk = fEvtLoop->PreProcess(); 128 129 if (fInitOk) 130 GetTaskList()->Process(); 129 131 130 132 // … … 168 170 { 169 171 MRawEvtData *data = GetEvent(); 172 173 if (!data) 174 return; 170 175 171 176 MRawEvtPixelIter pixel(data); … … 215 220 void MGFadcDisp::UpdateDisplay() 216 221 { 222 if (!fInitOk) 223 return; 224 217 225 const Int_t lastsel = fPixelList->GetSelected(); 218 226 -
trunk/MagicSoft/Mars/mmain/MMonteCarlo.cc
r989 r991 290 290 // macro yet) 291 291 // 292 TObjArray hists(MParList::CreateObjList("MHMcRate", dim)); 292 const UInt_t from = dim>0 ? 1 : -dim; 293 const UInt_t to = dim>0 ? dim : -dim; 294 const Int_t num = to-from+1; 295 296 TObjArray hists(MParList::CreateObjList("MHMcRate", from, to)); 293 297 hists.SetOwner(); 294 298 … … 296 300 // Check if the list really contains the right number of histograms 297 301 // 298 if (hists.GetEntriesFast() != dim && dim)302 if (hists.GetEntriesFast() != num) 299 303 return; 300 304 … … 367 371 // and store the histograms in an TObjArray 368 372 // 369 TObjArray hists(MParList::CreateObjList("MHMcEnergy", dim)); 373 const UInt_t from = dim>0 ? 1 : -dim; 374 const UInt_t to = dim>0 ? dim : -dim; 375 const Int_t num = to-from+1; 376 377 TObjArray hists(MParList::CreateObjList("MHMcEnergy", from, to)); 370 378 hists.SetOwner(); 371 379 … … 373 381 // Check if the list really contains the right number of histograms 374 382 // 375 if (hists.GetEntriesFast() != dim)383 if (hists.GetEntriesFast() != num) 376 384 return; 377 385 … … 391 399 // 392 400 MReadTree read("Events", fInputFile); 393 read. VetoBranch("MRawEvtData");394 read. VetoBranch("MRawEvtHeader");401 read.UseLeaf("fEnergy"); 402 read.UseLeaf("fNumFirstLevel"); 395 403 396 404 MMcThresholdCalc calc(dim); -
trunk/MagicSoft/Mars/readraw.cc
r654 r991 48 48 // initialize ROOT (this is obligatory here) 49 49 // 50 TROOT simple(" Readraw","Mars - Merging and Preprocessing Program");50 TROOT simple("readraw","Mars - Read and print raw data file"); 51 51 52 52 // … … 152 152 evttree->GetEvent(i); 153 153 154 evtmc->Print( "") ;154 evtmc->Print(); 155 155 156 156 evtheader->Print();
Note:
See TracChangeset
for help on using the changeset viewer.