Changeset 1032
- Timestamp:
- 11/06/01 13:27:04 (23 years ago)
- Location:
- trunk/MagicSoft
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1031 r1032 1 1 -*-*- END -*-*- 2 2 2001/11/06: Thomas Bretz 3 4 * Makefile.conf.linux, Makefile.conf.linux-gnu: 5 - removed -g flag 3 6 4 7 * mraw/MRawCrateArray.[h,cc]: … … 13 16 - changed so, that the arrays are dreed and allocated only 14 17 as less as possible 18 - removed (by comment) AddPixel 15 19 16 20 * mraw/MRawFileRead.[h,cc]: … … 23 27 - removed '.' from Branch names (each tree contains only one master 24 28 branch with equal subbranches) 29 30 * macros/readCT1.C: 31 - fixed a small bug 32 33 * manalysis/MCerPhotCalc.cc: 34 - removed Clear from Process (done by Reset now) 35 36 * manalysis/MCerPhotEvt.[h,cc]: 37 - added reset-function 38 - some small changes to the code layout 39 40 * mmc/MMcFadcHeader.[h,cc], mmc/MMcTrig.[h,cc]: 41 - chenged constructor to support fName and fTitle 42 43 * mbase/MReadTree.cc: 44 - removes '.' from a branch name now before searching/creating the object 25 45 26 46 -
trunk/MagicSoft/Mars/Makefile.conf.linux
r1018 r1032 20 20 # 21 21 22 OPTIM = -O2 -Wall -fno-rtti -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs 23 DEBUG = -g22 OPTIM = -O2 -Wall -fno-rtti -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs 23 DEBUG = 24 24 ARCHDEF = -D__LINUX__ 25 25 -
trunk/MagicSoft/Mars/Makefile.conf.linux-gnu
r1018 r1032 21 21 22 22 OPTIM = -O2 -Wall -fno-rtti -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs 23 DEBUG = -g23 DEBUG = 24 24 ARCHDEF = -D__LINUX__ 25 25 -
trunk/MagicSoft/Mars/macros/readCT1.C
r948 r1032 32 32 MTaskList tlist; 33 33 34 plist ->AddToList(&geomcam);35 plist ->AddToList(&hillas);36 plist ->AddToList(&tlist);34 plist.AddToList(&geomcam); 35 plist.AddToList(&hillas); 36 plist.AddToList(&tlist); 37 37 38 MCT1ReadAscii read(" CT1_99_off1.dat");38 MCT1ReadAscii read("data/CT1_97_off1.dat"); 39 39 MImgCleanStd clean; 40 40 MHillasCalc hcalc; … … 54 54 Int_t icount = 0; 55 55 MCamDisplay display(&geomcam); 56 display.DrawPhotNum(&phevt); 57 56 display.Draw(); 58 57 59 58 while (read.Process()) -
trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc
r1010 r1032 62 62 63 63 AddToBranchList("fHiGainPixId"); 64 //AddToBranchList("fLoGainPixId");64 AddToBranchList("fLoGainPixId"); 65 65 AddToBranchList("fHiGainFadcSamples"); 66 //AddToBranchList("fLoGainFadcSamples"); 66 AddToBranchList("fLoGainFadcSamples"); 67 67 68 } 68 69 … … 77 78 // - MCerPhotEvt 78 79 // 79 Bool_t MCerPhotCalc::PreProcess( MParList *pList)80 Bool_t MCerPhotCalc::PreProcess(MParList *pList) 80 81 { 81 82 fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData"); … … 107 108 Bool_t MCerPhotCalc::Process() 108 109 { 109 fCerPhotEvt->Clear();110 111 110 MRawEvtPixelIter pixel(fRawEvt); 112 111 113 112 while (pixel.Next()) 114 113 { 114 115 115 const UInt_t pixid = pixel.GetPixelId(); 116 116 -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
r1003 r1032 44 44 MCerPhotEvt::MCerPhotEvt(const char *name, const char *title) : fNumPixels(0) 45 45 { 46 47 fName = name ? name : "MCerPhotEvt"; 48 fTitle = title ? title : "(Number of Photon)-Event Information"; 49 50 fPixels = new TClonesArray ("MCerPhotPix", 577) ; 51 52 // 53 // FIXME: is this really necessary? 54 // 55 fPixels->Clear(); 46 fName = name ? name : "MCerPhotEvt"; 47 fTitle = title ? title : "(Number of Photon)-Event Information"; 48 49 fPixels = new TClonesArray ("MCerPhotPix", 577); 50 51 // 52 // FIXME: is this really necessary? 53 // 54 Reset(); 56 55 } 57 56 … … 82 81 { 83 82 // TClonesArray -> 'operator new with placement' should be used 83 84 fPixels->ExpandCreate(fNumPixels); 84 85 new ((*fPixels)[fNumPixels++]) MCerPhotPix(id, nph, err); 85 86 } … … 89 90 // reset counter and delete netries in list. 90 91 // 91 void MCerPhotEvt:: Clear(Option_t *)92 void MCerPhotEvt::Reset() 92 93 { 93 94 fNumPixels = 0; 94 fPixels->Clear();95 // fPixels->Delete(); 95 96 } 96 97 … … 108 109 << endl ; 109 110 110 for (Int_t i l=0; il<entries; il++ )111 (*this)[i l].Print();111 for (Int_t i=0; i<entries; i++ ) 112 (*this)[i].Print(); 112 113 } 113 114 … … 120 121 const Int_t entries = fPixels->GetEntries(); 121 122 122 for (Int_t i l=0; il<entries; il++)123 { 124 if (id == (*this)[i l].GetPixId())123 for (Int_t i=0; i<entries; i++) 124 { 125 if (id == (*this)[i].GetPixId()) 125 126 return kTRUE; 126 127 } … … 137 138 const Int_t entries = fPixels->GetEntries(); 138 139 139 for (Int_t i l=0; il<entries; il++)140 { 141 MCerPhotPix &pix = (*this)[il];140 for (Int_t i=0; i<entries; i++) 141 { 142 const MCerPhotPix &pix = (*this)[i]; 142 143 143 144 if (id == pix.GetPixId() && pix.IsPixelUsed()) … … 156 157 const Int_t entries = fPixels->GetEntries(); 157 158 158 for (Int_t i l=0; il<entries; il++)159 { 160 MCerPhotPix &pix = (*this)[il];159 for (Int_t i=0; i<entries; i++) 160 { 161 const MCerPhotPix &pix = (*this)[i]; 161 162 162 163 if (id == pix.GetPixId() && pix.IsCorePixel()) … … 178 179 Float_t minval = (*this)[0].GetNumPhotons(); 179 180 180 Float_t testval;181 181 for (UInt_t i=1; i<fNumPixels; i++) 182 182 { 183 testval = (*this)[i].GetNumPhotons();183 const Float_t testval = (*this)[i].GetNumPhotons(); 184 184 185 185 if (testval < minval) … … 201 201 Float_t maxval = (*this)[0].GetNumPhotons(); 202 202 203 Float_t testval;204 203 for (UInt_t i=1; i<fNumPixels; i++) 205 204 { 206 testval = (*this)[i].GetNumPhotons();205 const Float_t testval = (*this)[i].GetNumPhotons(); 207 206 208 207 if (testval > maxval) -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
r1014 r1032 21 21 ~MCerPhotEvt() { delete fPixels; } 22 22 23 void Draw(Option_t* option = "");24 25 23 UInt_t GetNumPixels() const { return fNumPixels; } 26 27 void AddPixel(Int_t id, Float_t nph, Float_t err); 28 29 void Clear(Option_t *opt=NULL); 30 void Print(Option_t *opt=NULL) const; 24 void AddPixel(Int_t id, Float_t nph, Float_t err); 31 25 32 26 Bool_t IsPixelExisting(Int_t id) const; … … 40 34 MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->At(i)); } 41 35 36 void Reset(); 37 38 void Draw(Option_t* option = ""); 39 void Print(Option_t *opt=NULL) const; 40 void Clear(Option_t *opt=NULL) { Reset(); } 41 42 42 ClassDef(MCerPhotEvt, 1) // class for an event containing cerenkov photons 43 43 }; -
trunk/MagicSoft/Mars/mbase/MReadTree.cc
r1030 r1032 302 302 { 303 303 // 304 // Get Name of Branch 305 // 306 const char *name = branch->GetName(); 304 // Get Name of Branch and Object 305 // 306 const char *bname = branch->GetName(); 307 308 TString oname(bname); 309 310 if (oname.EndsWith(".")) 311 oname.Remove(oname.Length()-1); 307 312 308 313 // 309 314 // Check if enabeling the branch is allowed 310 315 // 311 if (fVetoList->FindObject( name))316 if (fVetoList->FindObject(oname)) 312 317 { 313 *fLog << "Master branch " << name << " has veto... skipped." << endl;318 *fLog << "Master branch " << bname << " has veto... skipped." << endl; 314 319 DisableSubBranches(branch); 315 320 continue; … … 326 331 // check if object is existing in the list 327 332 // 328 *pcont=pList->FindCreateObj( name);333 *pcont=pList->FindCreateObj(oname); 329 334 330 335 if (!*pcont) … … 334 339 // we cannot proceed reading this branch 335 340 // 336 *fLog << dbginf << "Warning: Class '" << name << "' not existing in dictionary. Branch skipped." << endl;341 *fLog << dbginf << "Warning: Class '" << oname << "' not existing in dictionary. Branch skipped." << endl; 337 342 DisableSubBranches(branch); 338 343 continue; … … 343 348 // the actual branch should be stored - enable branch. 344 349 // 345 fChain->SetBranchAddress(name, pcont); 346 347 *fLog << "Master branch address " << name << " setup for reading." << endl; 350 fChain->SetBranchAddress(bname, pcont); 351 *fLog << "Master branch address " << bname << " setup for reading." << endl; 352 353 //*fLog << "Branch " << bname << " autodel: " << (int)branch->IsAutoDelete() << endl; 354 branch->SetAutoDelete(); 348 355 349 356 num++; -
trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
r1031 r1032 350 350 fPosInArray = 0; 351 351 } 352 352 /* 353 353 // -------------------------------------------------------------------------- 354 354 // … … 370 370 if (nSamp && ns!=nSamp) 371 371 { 372 *fLog << "RawEvtData:: FillPixel: Error, number of samples in ";372 *fLog << "RawEvtData::AddPixel: Error, number of samples in "; 373 373 *fLog << "TArrayC doesn't match actual number" << endl; 374 374 return; … … 395 395 arrsam->AddAt((Byte_t*)data->GetArray(), arrsam->GetSize()-ns, ns); 396 396 } 397 397 */ 398 398 // -------------------------------------------------------------------------- 399 399 // -
trunk/MagicSoft/Mars/mraw/MRawEvtData.h
r1031 r1032 52 52 void DeletePixels(Bool_t flag=kFALSE); 53 53 void ResetPixels() { DeletePixels(kTRUE); } 54 void AddPixel(UShort_t nOfPixel, TArrayC *data, Bool_t lflag=kFALSE);54 // void AddPixel(UShort_t nOfPixel, TArrayC *data, Bool_t lflag=kFALSE); 55 55 56 56 Byte_t GetNumHiGainSamples() const; -
trunk/MagicSoft/include-Classes/MMcFormat/MMcFadcHeader.cxx
r991 r1032 17 17 18 18 19 MMcFadcHeader::MMcFadcHeader( ) {19 MMcFadcHeader::MMcFadcHeader(const char *name, const char *title) { 20 20 // 21 21 // default constructor 22 23 fName = name ? name : "MMcFadcHeader"; 24 fTitle = title ? title : "Fadc Header Information from Monte Carlo"; 25 22 26 // set all values to zero 23 27 -
trunk/MagicSoft/include-Classes/MMcFormat/MMcFadcHeader.hxx
r991 r1032 23 23 24 24 public: 25 MMcFadcHeader( );25 MMcFadcHeader(const char *name=NULL, const char *title=NULL); 26 26 27 27 ~MMcFadcHeader(); -
trunk/MagicSoft/include-Classes/MMcFormat/MMcTrig.cxx
r1027 r1032 17 17 18 18 19 MMcTrig::MMcTrig( ) {19 MMcTrig::MMcTrig(const char *name, const char *title) { 20 20 // 21 21 // default constructor … … 23 23 24 24 25 fName = "MMcTrig";26 fTitle = "Trigger info from Monte Carlo";25 fName = name ? name : "MMcTrig"; 26 fTitle = title ? title : "Trigger info from Monte Carlo"; 27 27 28 28 -
trunk/MagicSoft/include-Classes/MMcFormat/MMcTrig.hxx
r991 r1032 21 21 22 22 public: 23 MMcTrig( );23 MMcTrig(const char *name=NULL, const char *title=NULL); 24 24 25 25 ~MMcTrig();
Note:
See TracChangeset
for help on using the changeset viewer.