Changeset 7188 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 07/13/05 19:06:26 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MGeomApply.cc
r5844 r7188 133 133 { 134 134 MCamEvent *cam = dynamic_cast<MCamEvent*>(o); 135 if (cam) 136 cam->Init(geom); 135 if (!cam) 136 continue; 137 138 // If the MGeomApply task has a serial number >0 (indicating most likely 139 // a specific telescope in a multi-telescope file), then apply the 140 // geometry only to objects with the same serial number. This is important 141 // for stereo setups in which the telescopes have cameras with different 142 // numbers of pixels. If the MGeomApply task has serial number 0 (default), 143 // it will apply the geometry to all found objects as it used to do. 144 const TString name(o->GetName()); 145 146 // Extract serial number from name: 147 const Int_t serial = atoi(name.Data()+name.Last(';')+1); 148 149 // Compare with the serial number of this task: 150 if (serial>0 && serial!=GetSerialNumber()) 151 continue; 152 153 // Initialize object according to camera geometry: 154 cam->Init(geom); 137 155 } 138 156 } … … 186 204 187 205 // FIXME, workaround: this call to CalcPixRatio is here just to allow 188 // the use of some camera files from the 0.7 beta version in which the206 // the use of some MC camera files from the 0.7 beta version in which the 189 207 // array containing pixel ratios is not initialized. 190 208 geom->CalcPixRatio(); -
trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc
r7005 r7188 95 95 Bool_t MMcCalibrationUpdate::CheckRunType(MParList *pList) const 96 96 { 97 const MRawRunHeader *run = (MRawRunHeader*)pList->FindObject( "MRawRunHeader");97 const MRawRunHeader *run = (MRawRunHeader*)pList->FindObject(AddSerialNumber("MRawRunHeader")); 98 98 if (!run) 99 99 { … … 176 176 } 177 177 178 MMcRunHeader* mcrunh = (MMcRunHeader*) pList->FindObject("MMcRunHeader"); 178 MMcRunHeader* mcrunh = (MMcRunHeader*) pList->FindObject(AddSerialNumber("MMcRunHeader")); 179 if (!mcrunh) 180 { 181 *fLog << err << AddSerialNumber("MMcRunHeader") << " not found... aborting." << endl; 182 return kFALSE; 183 } 179 184 180 185 // … … 247 252 // perpendicular to the camera plane. 248 253 // 249 // FIXME! We look for AddSerialNumber("MMcConfigRunHeader") but250 // for the moment the stereo version of camera does not write one such251 // header per telescope (it should!)254 // As it happens with most containers, we look for AddSerialNumber("MMcConfigRunHeader") 255 // because in the stereo option the camera simulation writes one such header 256 // per telescope. 252 257 // 253 258 MMcConfigRunHeader* mcconfig = (MMcConfigRunHeader*) pList->FindObject(AddSerialNumber("MMcConfigRunHeader")); -
trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2Calc.cc
r3795 r7188 17 17 ! 18 18 ! Author(s): Antonio Stamerra 1/2003 <mailto:antono.stamerra@pi.infn.it> 19 ! Author(s): Marcos Lopez 1/2003 <mailto:marcos@gae.ucm.es>20 19 ! 21 20 ! Copyright: MAGIC Software Development, 2000-2003 … … 71 70 // run type 72 71 // 73 Bool_t MMcTriggerLvl2Calc:: CheckRunType(MParList *pList) const72 Bool_t MMcTriggerLvl2Calc::IsMCRun(MParList *pList) const 74 73 { 75 74 const MRawRunHeader *run = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); … … 90 89 Bool_t MMcTriggerLvl2Calc::ReInit(MParList *pList) 91 90 { 92 //93 // If it is no MC file skip this function...94 //95 if (!CheckRunType(pList))96 {97 *fLog << inf << "This is no MC file... skipping." << endl;98 return kTRUE;99 }100 101 //102 // Check all necessary containers103 //104 fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt");105 if (!fMcEvt)106 {107 *fLog << err << dbginf << "MMcEvt not found... exit." << endl;108 return kFALSE;109 }110 111 fMcTrig = (MMcTrig*)pList->FindObject("MMcTrig");112 if (!fMcTrig)113 {114 *fLog << err << dbginf << "MMcTrig not found... exit." << endl;115 return kFALSE;116 }117 118 fCam = (MGeomCam*)pList->FindObject("MGeomCam");119 if (!fCam)120 {121 *fLog << dbginf << "MGeomCam not found (no geometry information available)... aborting." << endl;122 return kFALSE;123 }124 // Check if fCam is a Magic geometry: only MGeomCamMagic geometry and125 // geometries with 577 pixels are now accepted by MMcTriggerLvl2126 if (fCam->GetNumPixels()!= 577)127 {128 *fLog << dbginf << "MGeomCam has a wrong geometry; only MAGIC geometry (577 pixels) is accepted by now... aborting" <<endl;129 return kFALSE;130 }131 132 91 return kTRUE; 133 92 } 93 134 94 135 95 … … 168 128 *fLog << "Compact pixel is set with at least "<<fMMcTriggerLvl2->GetCompactNN() << " NN" <<endl; 169 129 130 //------------------------------------------------------------ 131 // 132 // If it is no MC file skip this function... 133 // 134 if (!IsMCRun(pList)) 135 { 136 *fLog << inf << "Reading a data file...skipping the rest of PreProcess()" << endl; 137 return kTRUE; 138 } 139 140 // 141 // Check all necessary containers in case of a MC run 142 // 143 fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt"); 144 if (!fMcEvt) 145 { 146 *fLog << err << dbginf << "MMcEvt not found... exit." << endl; 147 return kFALSE; 148 } 149 150 fMcTrig = (MMcTrig*)pList->FindObject("MMcTrig"); 151 if (!fMcTrig) 152 { 153 *fLog << err << dbginf << "MMcTrig not found... exit." << endl; 154 return kFALSE; 155 } 156 157 fCam = (MGeomCam*)pList->FindObject("MGeomCam"); 158 if (!fCam) 159 { 160 *fLog << err << "MGeomCam not found (no geometry information available)... aborting." << endl; 161 return kFALSE; 162 } 163 // Check if fCam is a Magic geometry: only MGeomCamMagic geometry and 164 // geometries with 577 pixels are now accepted by MMcTriggerLvl2 165 if (fCam->GetNumPixels()!= 577) 166 { 167 *fLog << warn << "MGeomCam has a wrong geometry; only MAGIC geometry (577 pixels) is accepted by now... the Task is skipped." <<endl; 168 return kSKIP; 169 } 170 170 171 171 return kTRUE; 172 172 173 } 173 174 -
trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2Calc.h
r3795 r7188 33 33 34 34 Bool_t ReInit(MParList *pList); 35 Bool_t CheckRunType(MParList *pList) const;35 Bool_t IsMCRun(MParList *pList) const; 36 36 37 37 public:
Note:
See TracChangeset
for help on using the changeset viewer.