Changeset 9270 for trunk/MagicSoft/Mars/msimcamera
- Timestamp:
- 01/26/09 11:59:12 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/msimcamera
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msimcamera/MSimReadout.cc
r9256 r9270 33 33 // 34 34 // Input Containers: 35 // MGeomCam 35 36 // MAnalogChannels 36 37 // TriggerPos [MParameterD] … … 53 54 #include "MParameters.h" 54 55 56 #include "MGeomCam.h" 57 55 58 #include "MRawRunHeader.h" 56 59 #include "MRawEvtHeader.h" … … 104 107 } 105 108 106 107 109 fRunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 108 110 if (!fRunHeader) … … 112 114 } 113 115 114 // -----------------------------------------------------------------------115 116 116 fData = (MRawEvtData*)pList->FindCreateObj("MRawEvtData"); 117 117 if (!fData) 118 118 return kFALSE; 119 120 return kTRUE; 121 } 122 123 Bool_t MSimReadout::ReInit(MParList *plist) 124 { 125 MGeomCam *cam = (MGeomCam*)plist->FindObject("MGeomCam"); 126 if (!cam) 127 { 128 *fLog << err << "MGeomCam not found... aborting." << endl; 129 return kFALSE; 130 } 131 132 fRunHeader->InitPixels(cam->GetNumPixels()); 119 133 120 134 fData->InitRead(fRunHeader); … … 134 148 if (fData->GetNumLoGainSamples()>0) 135 149 { 136 *fLog << err << "ERROR - Lo-gains not implemented yet." << endl;150 *fLog << err << "ERROR - MSimReadout: Lo-gains not implemented yet." << endl; 137 151 return kERROR; 138 152 } … … 141 155 const UInt_t npix = fData->GetNumPixels(); 142 156 143 // Sanity check 144 if (fData->GetNumPixels()!=fCamera->GetNumChannels()) 145 { 146 *fLog << err << "ERROR - Number of analog channels doen't match number of pixels." << endl; 157 if (npix!=fCamera->GetNumChannels()) 158 { 159 *fLog << err; 160 *fLog << "ERROR - Number of analog channels " << fCamera->GetNumChannels(); 161 *fLog << " doesn't match number of pixels " << fData->GetNumPixels() << endl; 147 162 return kERROR; 148 163 } … … 150 165 if (fTrigger->GetVal()<0) 151 166 { 152 *fLog << err << "ERROR - MSimReadout executed for an event which has no trigger." << endl;167 *fLog << err << "ERROR - MSimReadout: MSimReadout executed for an event which has no trigger." << endl; 153 168 return kERROR; 154 169 } -
trunk/MagicSoft/Mars/msimcamera/MSimReadout.h
r9256 r9270 23 23 24 24 // MTask 25 Int_t PreProcess(MParList *pList); 26 Int_t Process(); 25 Int_t PreProcess(MParList *pList); 26 Int_t Process(); 27 Bool_t ReInit(MParList *pList); 27 28 28 29 public:
Note:
See TracChangeset
for help on using the changeset viewer.