Changeset 991 for trunk/MagicSoft
- Timestamp:
- 10/26/01 10:11:30 (23 years ago)
- Location:
- trunk/MagicSoft
- Files:
-
- 2 added
- 27 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(); -
trunk/MagicSoft/include-Classes/MMcFormat/MMcEvt.cxx
r736 r991 1 #include "MMcEvt.hxx" 2 1 3 #include <iostream.h> 2 #include "MMcEvt.hxx"3 4 4 5 … … 12 13 13 14 14 ClassImp(MMcEvt) 15 ClassImp(MMcEvt); 15 16 16 17 … … 137 138 138 139 fPartId = usPId ; 139 fEnergy 140 fEnergy = fEner ; 140 141 141 fTheta 142 fPhi 142 fTheta = fThet ; 143 fPhi = fPhii ; 143 144 144 fCoreD 145 fCoreX 146 fCoreY 147 fImpact 145 fCoreD = fCorD ; 146 fCoreX = fCorX ; 147 fCoreY = fCorY ; 148 fImpact = fImpa ; 148 149 149 150 fPhotIni = uiPin ; … … 157 158 158 159 159 void MMcEvt::Print(Option_t *Option) {160 void MMcEvt::Print(Option_t *Option) const { 160 161 // 161 162 // print out the data member on screen 162 163 // 163 cout <<endl << "Monte Carlo output:" <<endl; 164 cout << " Particle Id : " << fPartId ; 165 cout << " Energy (GeV) : " << fEnergy ; 166 cout << " Impactpar. (m) : " << fImpact ; 167 cout << " Photoelectrons : " << fPhotElfromShower ; 168 cout << endl ; 164 cout << endl; 165 cout << "Monte Carlo output:" << endl; 166 cout << " Particle Id: " << fPartId; 167 cout << " Energy (GeV): " << fEnergy; 168 cout << " Impactpar. (m): " << fImpact; 169 cout << " Photoelectrons: " << fPhotElfromShower; 170 cout << endl; 169 171 } -
trunk/MagicSoft/include-Classes/MMcFormat/MMcEvt.hxx
r883 r991 2 2 #define __MMcEvt__ 3 3 4 #include <stdlib.h> 5 #include <stdio.h> 6 #include <string.h> 7 #include <unistd.h> 8 #include <fcntl.h> 4 #ifndef MPARCONTAINER_H 5 #include "MParContainer.h" 6 #endif 9 7 10 #include <iostream.h> 11 #include "MParContainer.h" 8 class MMcEvt : public MParContainer 9 { 10 private: 11 UShort_t fPartId; // Type of particle 12 Float_t fEnergy; // Energy in GeV 12 13 14 Float_t fTheta; // Theta angle of event 15 Float_t fPhi; // Phi angle of event 13 16 14 class MMcEvt : public MParContainer{ 15 private:16 UShort_t fPartId; // Type of particle17 Float_t f Energy; // Energy in GeV17 Float_t fCoreD; // Core d pos 18 Float_t fCoreX; // Core x pos 19 Float_t fCoreY; // Core y pos 20 Float_t fImpact; // impact parameter 18 21 19 Float_t fTheta; // Theta angle of event 20 Float_t fPhi; // Phi angle of event 21 22 Float_t fCoreD; // Core d pos 23 Float_t fCoreX; // Core x pos 24 Float_t fCoreY; // Core y pos 25 Float_t fImpact; // impact parameter 26 27 UInt_t fPhotIni; // Initial number of photons 28 UInt_t fPassPhotAtm; // Passed atmosphere 29 UInt_t fPassPhotRef; // Passed reflector(reflectivity + effective area) 30 UInt_t fPassPhotCone; // Passed glas 31 UInt_t fPhotElfromShower; // Passed qe coming from the shower 32 UInt_t fPhotElinCamera; // usPhotElfromShower + mean of phe 33 // from NSB 22 UInt_t fPhotIni; // Initial number of photons 23 UInt_t fPassPhotAtm; // Passed atmosphere 24 UInt_t fPassPhotRef; // Passed reflector(reflectivity + effective area) 25 UInt_t fPassPhotCone; // Passed glas 26 UInt_t fPhotElfromShower; // Passed qe coming from the shower 27 UInt_t fPhotElinCamera; // usPhotElfromShower + mean of phe 28 // from NSB 34 29 35 30 public: … … 49 44 50 45 51 void Print(Option_t * );46 void Print(Option_t *opt=NULL) const; 52 47 53 48 Short_t GetPartId() const { return fPartId; } //Get Type of particle -
trunk/MagicSoft/include-Classes/MMcFormat/MMcFadcHeader.cxx
r693 r991 1 #include <iostream.h>2 1 #include "MMcFadcHeader.hxx" 3 2 3 #include <iostream.h> 4 4 5 5 //========== … … 13 13 14 14 15 ClassImp(MMcFadcHeader) 15 ClassImp(MMcFadcHeader); 16 16 17 17 … … 41 41 42 42 43 void MMcFadcHeader::Print(Option_t *Option) {43 void MMcFadcHeader::Print(Option_t *Option) const { 44 44 // 45 45 // print out the data member on screen 46 46 // 47 48 cout << endl << "Monte Carlo Fadc output:" <<endl;49 cout << " Shape type of the signal : "<<fFadcShape<<endl;50 cout << " Amplitude of the trigger in mV : "<<fAmplFadc<<endl;51 cout << " Width of the signal in nsec : "<<fFwhmFadc<<endl;52 cout << " Pedestals and ElecNoise in fadc counts : "<<endl;47 cout << endl; 48 cout << "Monte Carlo Fadc output:" << endl; 49 cout << " Shape type of the signal: " << fFadcShape << endl; 50 cout << " Amplitude of the trigger in mV: " << fAmplFadc << endl; 51 cout << " Width of the signal in nsec: " << fFwhmFadc << endl; 52 cout << " Pedestals and ElecNoise in fadc counts: " << endl; 53 53 for (int i=0;i<MFADC_CHANNELS;i++){ 54 cout << " Pixel "<<i<<" 54 cout << " Pixel "<<i<<": "<<fPedesMean[i]<<" "<<fElecNoise[i]<<endl; 55 55 } 56 56 cout << endl ; -
trunk/MagicSoft/include-Classes/MMcFormat/MMcFadcHeader.hxx
r859 r991 2 2 #define __MMcFadcHeader__ 3 3 4 #include <stdlib.h> 5 #include <stdio.h> 6 #include <string.h> 7 #include <unistd.h> 8 #include <fcntl.h> 4 #ifndef MPARCONTAINER_H 5 #include "MParContainer.h" 6 #endif 9 7 10 #include <iostream.h>11 #include "MParContainer.h"12 13 #include "MTriggerDefine.h"14 8 #include "MFadcDefine.h" 15 9 … … 33 27 ~MMcFadcHeader(); 34 28 35 void Print(Option_t * );29 void Print(Option_t *opt=NULL) const; 36 30 37 31 void SetShape(Float_t shape){ -
trunk/MagicSoft/include-Classes/MMcFormat/MMcTrig.cxx
r686 r991 1 #include "MMcTrig.hxx" 2 1 3 #include <iostream.h> 2 #include "MMcTrig.hxx"3 4 4 5 … … 12 13 13 14 14 ClassImp(MMcTrig) 15 ClassImp(MMcTrig); 15 16 16 17 … … 49 50 } 50 51 52 inline void MMcTrig::SetTime(Float_t t, Int_t i) 53 { 54 if (i>TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1 || i<1) 55 { 56 cout << "fNumFirstLevel out of range. Time will be -99" << endl; 57 return; 58 } 59 60 fTimeFirst[i-1]=t; 61 } 62 51 63 void MMcTrig::Clear(Option_t *opt) { 52 64 // … … 71 83 } 72 84 73 void MMcTrig::Print(Option_t *Option) {85 void MMcTrig::Print(Option_t *Option) const { 74 86 // 75 87 // print out the data member on screen … … 78 90 79 91 cout <<endl << "Monte Carlo Trigger output:" <<endl; 80 cout << " First Level Trigger in this Event 81 cout << " Times of first Level Trigger in this Event 92 cout << " First Level Trigger in this Event: "<<fNumFirstLevel<<endl; 93 cout << " Times of first Level Trigger in this Event: "; 82 94 for (i=0;i<fNumFirstLevel;i++){ 83 95 cout<< fTimeFirst[i]<<"-"; … … 91 103 } 92 104 cout<<endl; 93 cout << " Second Level Trigger in this Event 105 cout << " Second Level Trigger in this Event: " << fNumSecondLevel << endl; 94 106 cout << endl ; 95 107 } -
trunk/MagicSoft/include-Classes/MMcFormat/MMcTrig.hxx
r859 r991 2 2 #define __MMcTrig__ 3 3 4 #include <stdlib.h> 5 #include <stdio.h> 6 #include <string.h> 7 #include <unistd.h> 8 #include <fcntl.h> 9 10 #include <iostream.h> 4 #ifndef MPARCONTAINER_H 11 5 #include "MParContainer.h" 6 #endif 12 7 13 8 #include "MTriggerDefine.h" … … 32 27 void Clear(Option_t *opt=NULL); 33 28 34 void Print(Option_t * );29 void Print(Option_t *opt=NULL) const; 35 30 36 31 void SetFirstLevel ( Short_t nTr ) { … … 41 36 } 42 37 43 void SetTime( Float_t t, Int_t i){ 44 if (i>TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1 || i<1){ 45 cout<<"fNumFirstLevel out of range. Time will be -99"<<endl; 46 } 47 else{ 48 fTimeFirst[i-1]=t; 49 } 50 } 38 void SetTime( Float_t t, Int_t i); 51 39 52 40 void SetMapPixels(Byte_t *map,Int_t nfirst){ -
trunk/MagicSoft/include-Classes/MMcFormat/MMcTrigHeader.cxx
r613 r991 1 #include "MMcTrigHeader.hxx" 2 1 3 #include <iostream.h> 2 #include "MMcTrigHeader.hxx"3 4 4 5 … … 13 14 14 15 15 ClassImp(MMcTrigHeader) 16 ClassImp(MMcTrigHeader); 16 17 17 18 … … 47 48 48 49 49 void MMcTrigHeader::Print(Option_t * Option){50 void MMcTrigHeader::Print(Option_t *opt) const { 50 51 // 51 52 // print out the data member on screen 52 53 // 53 54 cout << endl << "Monte Carlo Trigger output:" <<endl;55 cout << " XSTopology Trigger in this run : "<<fTopology<<endl;56 cout << " Multiplicity Trigger in this run : "<<fMultiplicity<<endl;57 cout << " Trigger Pattern in this run : "<<fTrigPattern[0]<<58 fTrigPattern[1]<<endl;59 cout << endl 54 cout << endl; 55 cout << "Monte Carlo Trigger output:" << endl; 56 cout << " XSTopology Trigger in this run: " << fTopology << endl; 57 cout << " Multiplicity Trigger in this run: " << fMultiplicity << endl; 58 cout << " Trigger Pattern in this run: "; 59 cout << fTrigPattern[0] << ", " << fTrigPattern[1] << endl; 60 cout << endl; 60 61 } -
trunk/MagicSoft/include-Classes/MMcFormat/MMcTrigHeader.hxx
r847 r991 2 2 #define __MMcTrigHeader__ 3 3 4 #include <stdlib.h> 5 #include <stdio.h> 6 #include <string.h> 7 #include <unistd.h> 8 #include <fcntl.h> 9 10 #include <iostream.h> 4 #ifndef MPARCONTAINER_H 11 5 #include "MParContainer.h" 6 #endif 12 7 13 8 #include "MTriggerDefine.h" … … 37 32 ~MMcTrigHeader(); 38 33 39 void Print(Option_t * );34 void Print(Option_t *opt=NULL) const; 40 35 41 36 void SetTopology(Short_t nTop) {
Note:
See TracChangeset
for help on using the changeset viewer.