Changeset 1118 for trunk/MagicSoft/Mars
- Timestamp:
- 12/18/01 12:07:26 (23 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1114 r1118 1 1 -*-*- END -*-*- 2 3 2001/12/18: Thomas Bretz 4 5 * manalysis/MMcPedestalCopy.cc: 6 - changed output 7 8 * manalysis/MMcPedestalNSB.cc: 9 - changed output 10 - simplified initialization in PreProcess 11 12 * mbase/MAGIC.h: 13 - added kSKIP 14 15 * mbase/MParList.cc: 16 - added a check for the correct inheritance in FindCreateObj 17 18 * mbase/MTask.cc: 19 - added support for kSKIP in PreProcess 20 21 * mbase/MTaskList.[h,cc] 22 - added support for kSKIP in PreProcess 23 - added Remove function (private) 24 25 26 27 2001/12/17: Thomas Bretz 28 29 * .rootrc: 30 - added Root.Html.DescriptionStyle 31 - added Root.Html.SearchEngine 32 33 * macros/dohtml.C: 34 - changed to use THtml (root >= 3.02/06 only) 35 36 * manalysis/Makefile: 37 - changed order to get rid of some wranings 38 39 * mbase/BaseLinkDef.h: 40 - removed MHtml 41 42 * mbase/MEvtLoop.cc: 43 - exchanged gSystem->ProcessEvents() by gClient->ProcessEventsFor() 44 to make gui update faster 45 46 * mbase/MGList.cc: 47 - added a missing sanity check (workaround for a root bug) 48 49 * mbase/MReadTree.cc: 50 - uncomment EnableBranchCoosing for AutoEnablingScheme 51 (don't know why there was a comment which made things realy slow) 52 - changed the auto enabling scheme, so that a branch isn't enabled 53 more than once. This doesn't hurt, but the output may confuse the 54 users. 55 56 * mbase/MTask.cc: 57 - added a simple not really necessary check whether the branch is 58 already in the list 59 60 * mbase/MWriteRootFile.cc: 61 - changed kFillTree to a local const 62 63 * mbase/Makefile: 64 - removed MHtml.cc 65 66 * mfilter/MFTriggerLvl1.cc: 67 - changed AddBranchToList to use the correct container name 68 69 2 70 3 71 2001/12/14: Thomas Bretz -
trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.cc
r1112 r1118 65 65 MRawRunHeader *run = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 66 66 if (run) 67 {68 67 if (run->GetRunType() != kRTMonteCarlo) 69 68 { 70 *fLog << "No Monte Carlo File - MMcPedestalCopy skipped." << endl;71 return k TRUE;69 *fLog << warn << dbginf << "MMcPedestalCopy is for Monte Carlo files only... removing this task from list." << endl; 70 return kSKIP; 72 71 } 73 } 72 else 73 *fLog << warn << dbginf << "Warning - cannot check file type, MRawRunHeader not found." << endl; 74 74 75 75 const MMcFadcHeader *mcped = (MMcFadcHeader*)pList->FindObject("MMcFadcHeader"); 76 76 if (!mcped) 77 77 { 78 *fLog << dbginf << "MMcFadcHeader not found... aborting." << endl;78 *fLog << warn << dbginf << "MMcFadcHeader not found... aborting." << endl; 79 79 return kFALSE; 80 80 } -
trunk/MagicSoft/Mars/manalysis/MMcPedestalNSB.cc
r1097 r1118 60 60 AddToBranchList("fElecNoise"); 61 61 62 fdnsb_pixel =difnsb;62 fdnsb_pixel = difnsb; 63 63 } 64 64 … … 66 66 { 67 67 MRawRunHeader *run = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 68 if ( run)68 if (!run) 69 69 { 70 if (run->GetRunType() != kRTMonteCarlo){ 71 *fLog << dbginf << "This task is only for Monte Carlo files, therefore the RunType should be "<<kRTMonteCarlo<<" and it is: "<<run->GetRunType()<<" ... aborting"<<endl; 72 return kFALSE; 73 } 74 } 75 else 76 { 77 *fLog << dbginf << "MRawRunHeader not found... aborting." << endl; 70 *fLog << err << dbginf << "MRawRunHeader not found... aborting." << endl; 78 71 return kFALSE; 79 72 } 80 73 74 if (run->GetRunType() != kRTMonteCarlo) 75 { 76 *fLog << warn << dbginf << "Warning - MMcPedestalNSB is for Monte Carlo files only... removing this task from list." << endl; 77 return kSKIP; 78 } 79 81 80 const MMcFadcHeader *mcped = (MMcFadcHeader*)pList->FindObject("MMcFadcHeader"); 82 83 81 if (!mcped) 84 82 { 85 *fLog << dbginf << "MMcFadcHeader not found... aborting." << endl;83 *fLog << err << dbginf << "MMcFadcHeader not found... aborting." << endl; 86 84 return kFALSE; 87 85 } 88 86 89 87 MMcRunHeader *mcrun = (MMcRunHeader*)pList->FindObject("MMcRunHeader"); 88 if (!mcrun && fdnsb_pixel < 0) 89 { 90 *fLog << err << dbginf << "Using the default argument of MMcPedestalNSB::MMcPedestalNSB() "; 91 *fLog << "only allowed if MMcRunHeader is available... aborting." << endl; 92 return kFALSE; 93 } 94 90 95 if (mcrun) 91 96 { 92 if (fdnsb_pixel >= 0 && fdnsb_pixel != mcrun->GetNumPheFromDNSB()){ 93 *fLog<< dbginf <<endl<< "The MC file has been generated with diffuse nsb : "<<mcrun->GetNumPheFromDNSB()<<" but you set up the diffuse NSB to :"<<fdnsb_pixel<<endl; 94 fdnsb_pixel = fdnsb_pixel*50.0/15.0; 95 } 96 else 97 fdnsb_pixel = mcrun->GetNumPheFromDNSB()*50.0/15.0; 97 if (fdnsb_pixel >= 0 && fdnsb_pixel != mcrun->GetNumPheFromDNSB()) 98 { 99 *fLog << warn << dbginf << "The MC file has been generated with diffuse nsb " << mcrun->GetNumPheFromDNSB(); 100 *fLog <<" but you set up the diffuse NSB to " << fdnsb_pixel << endl; 101 } 102 103 fdnsb_pixel = mcrun->GetNumPheFromDNSB(); 98 104 } 99 else 100 { 101 if (fdnsb_pixel < 0 ){ 102 *fLog << dbginf << "MMcRunHeader not found... aborting." << endl; 103 return kFALSE; 104 } 105 else { 106 *fLog<< dbginf <<endl<< "The MC file has been generated with diffuse nsb : "<<mcrun->GetNumPheFromDNSB()<<" but you set up the diffuse NSB to :"<<fdnsb_pixel<<endl; 107 fdnsb_pixel = fdnsb_pixel*50.0/15.0; 108 } 109 } 105 106 fdnsb_pixel *= 50.0/15.0; 110 107 111 108 MPedestalCam *pedcam = (MPedestalCam*)pList->FindCreateObj("MPedestalCam"); … … 122 119 123 120 const Float_t pedrms = mcped->GetPedestalRms(i); 121 const Float_t sigrms = pedrms/sqrt(run->GetNumSamplesHiGain()*2); 122 const Float_t ampl = mcped->GetAmplitud(); 124 123 125 const Float_t sigrms = pedrms/sqrt(run->GetNumSamplesHiGain()*2); 124 // 125 // check for central pixel (i<397) 126 // 126 127 127 if (i<397) // Central Pixels 128 { 129 pix.SetPedestalRms(sqrt(pedrms*pedrms+fdnsb_pixel*mcped->GetAmplitud()*mcped->GetAmplitud()), sigrms); 130 } 131 else 132 { 133 pix.SetPedestalRms(sqrt(pedrms*pedrms+fdnsb_pixel*mcped->GetAmplitud()*mcped->GetAmplitud()*4), sigrms); 134 } 128 const Double_t value = pedrms*pedrms + fdnsb_pixel*ampl*ampl; 135 129 130 pix.SetPedestalRms(sqrt(i<397 ? value : value*4), sigrms); 136 131 } 137 132 138 133 return kTRUE; 139 134 } 140 141 142 -
trunk/MagicSoft/Mars/mbase/MAGIC.h
r1027 r1118 17 17 // 18 18 const Int_t kCONTINUE = 2; 19 const Int_t kSKIP = 2; 19 20 20 21 // -
trunk/MagicSoft/Mars/mbase/MTask.cc
r1116 r1118 138 138 fNumExecutions = 0; 139 139 140 if (!PreProcess(plist)) 140 switch (PreProcess(plist)) 141 { 142 case kFALSE: 141 143 return kFALSE; 142 144 143 fIsPreprocessed = kTRUE; 144 return kTRUE; 145 case kTRUE: 146 fIsPreprocessed = kTRUE; 147 return kTRUE; 148 149 case kSKIP: 150 return kSKIP; 151 } 152 153 *fLog << err << dbginf << "PreProcess of " << GetDescriptor(); 154 *fLog << " returned an unknown value... aborting." << endl; 155 156 return kFALSE; 145 157 } 146 158 -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r1108 r1118 245 245 // -------------------------------------------------------------------------- 246 246 // 247 // removes a task from the list (used in PreProcess). 248 // if kIsOwner is set the task is deleted. (see SetOwner()) 249 // 250 void MTaskList::Remove(MTask *task) 251 { 252 TObject *obj = fTasks->Remove(task); 253 254 if (TestBit(kIsOwner)) 255 delete obj; 256 } 257 258 // -------------------------------------------------------------------------- 259 // 247 260 // do pre processing (before eventloop) of all tasks in the task-list 248 261 // … … 267 280 *fLog << all << task->GetName() << "... " << flush; 268 281 269 if (!task->CallPreProcess(fParList)) 282 switch (task->CallPreProcess(fParList)) 283 { 284 case kFALSE: 270 285 return kFALSE; 286 287 case kTRUE: 288 continue; 289 290 case kSKIP: 291 Remove(task); 292 continue; 293 } 294 295 *fLog << err << dbginf << "PreProcess of " << task->GetDescriptor(); 296 *fLog << " returned an unknown value... aborting." << endl; 297 return kFALSE; 271 298 } 272 299
Note:
See TracChangeset
for help on using the changeset viewer.