Changeset 9270
- Timestamp:
- 01/26/09 11:59:12 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MEventRateCalc.cc
r7804 r9270 141 141 } 142 142 143 // -------------------------------------------------------------------------- 144 // 145 // This resets the calculation whenever a new file is opened. 146 // 143 147 Bool_t MEventRateCalc::ReInit(MParList *pList) 144 148 { -
trunk/MagicSoft/Mars/mbase/MParEnv.cc
r9269 r9270 165 165 rc = kTRUE; 166 166 TString cls = GetEnvValue(env, prefix, "Class", ""); 167 cont = GetNewObject( fName, cls);167 cont = GetNewObject(cls, fClassName); 168 168 } 169 169 -
trunk/MagicSoft/Mars/melectronics/MAnalogChannels.cc
r9243 r9270 134 134 // Return the number of channels. 135 135 // 136 Int_t MAnalogChannels::GetNumChannels() const136 UInt_t MAnalogChannels::GetNumChannels() const 137 137 { 138 138 return fArray ? fArray->GetEntriesFast() : 0; … … 143 143 // Return the number of samples per channel 144 144 // 145 Int_t MAnalogChannels::GetNumSamples() const145 UInt_t MAnalogChannels::GetNumSamples() const 146 146 { 147 147 return operator()(0) ? operator()(0)->GetSize() : 0; -
trunk/MagicSoft/Mars/melectronics/MAnalogChannels.h
r9242 r9270 29 29 void Init(UInt_t n, UInt_t len); 30 30 31 void InitNumChannels(UInt_t n) { Init(n, GetNumSamples()); } 32 void InitLenChannels(UInt_t l) { Init(GetNumChannels(), l); } 33 31 34 MAnalogSignal &operator[](UInt_t i); 32 35 MAnalogSignal *operator()(UInt_t i); … … 35 38 const MAnalogSignal *operator()(UInt_t i) const; 36 39 37 Int_t GetNumChannels() const;38 Int_t GetNumSamples() const;40 UInt_t GetNumChannels() const; 41 UInt_t GetNumSamples() const; 39 42 40 43 void SetValidRange(Int_t min, Int_t max) { fValidRangeMin=min; fValidRangeMax=max; } -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
r9229 r9270 1151 1151 // Init a camera 1152 1152 // 1153 void MRawRunHeader::InitCamera(UShort_t type )1153 void MRawRunHeader::InitCamera(UShort_t type, UShort_t pix) 1154 1154 { 1155 1155 switch (type) … … 1163 1163 fNumPixInCrate = 703; 1164 1164 break; 1165 case (UShort_t)-1: 1166 fNumCrates = 1; 1167 fNumPixInCrate = pix; 1168 break; 1165 1169 } 1166 1170 -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.h
r9261 r9270 100 100 */ 101 101 void InitFadcType(UShort_t type); 102 void InitCamera(UShort_t type); 102 void InitCamera(UShort_t type, UShort_t pix=0); 103 void InitPixels(UShort_t pix) { InitCamera((UShort_t)-1, pix); } 103 104 void SetRunInfo(UShort_t type, UShort_t tel, UInt_t run, UInt_t file=0); 104 105 void SetSourceInfo(const char src[80], char epoch='J', UShort_t date=2000); -
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.