Changeset 4196
- Timestamp:
- 05/26/04 18:14:22 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mtemp/mpisa
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/mpisa/Changelog_pisa
r4185 r4196 18 18 19 19 -*-*- END OF LINE -*-*- 20 2004/05/24: Antonio Stamerra 21 22 * mpisa/classes/mtrigger/*, mpisa/classes/MTriggerReport.[h,cc] 23 - classes almost completed; compiles. 24 25 20 26 2004/05/24: Antonio Stamerra 21 27 -
trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.cc
r4195 r4196 126 126 Int_t gsNPrescFacts=8; 127 127 128 *fLog << warn << "Presca"<<endl; 128 str.Remove(0, 1); 129 *fLog << warn << str<<endl; 130 129 131 for (i=0;i<gsNPrescFacts;i++) 130 132 { 131 133 const Int_t ws = str.First(' '); 132 *fLog << str << endl;133 134 134 if (ws<=0) 135 135 { 136 *fLog << warn << "WARNING - Cannot determine name of L1 trigger table." << endl;136 *fLog << warn << "WARNING - Cannot determine Prescaling factor #" << i << " descriptor" << endl; 137 137 return kCONTINUE; 138 138 } 139 140 TString L1tablename = str(0, ws); 141 *fLog << "Presc " <<L1tablename <<endl; 139 TString descriptor = str(0, ws); 140 *fLog << descriptor <<endl; 142 141 str.Remove(0, ws); 143 142 144 143 n = sscanf(str.Data(), " %li %n", &fPrescFactor->fPrescFact[i], &len); 145 if (n!= 2)144 if (n!=1) 146 145 { 147 146 *fLog << warn << "WARNING - prescaler factor " << i << " missing." << endl; … … 153 152 str=str.Strip(TString::kLeading); 154 153 155 *fLog << warn << "PrescFact ok!" <<endl;156 154 return kTRUE; 157 155 } … … 166 164 Int_t len, n, i=0; 167 165 Int_t gsNScalers=5; 168 Int_t D_LSB, D_MSB,L_LSB, L_MSB; 169 170 const char *pos = str.Data(); 171 const char *end = str.Data() + gsNScalers; 172 173 while (pos < end) 174 { 175 i++; 176 n = sscanf(pos, " %d %d %d %d %n", &L_LSB, &L_MSB,&D_LSB, &D_MSB, &len); 166 Int_t dLSB, dMSB,lLSB, lMSB; 167 168 for (i=0;i<gsNScalers;i++) 169 { 170 n = sscanf(str.Data(), " %d %d %d %d %n", &lLSB, &lMSB,&dLSB, &dMSB, &len); 177 171 if (n!=4) 178 172 { … … 180 174 return kCONTINUE; 181 175 } 182 pos += len; 176 177 str.Remove(0, len); // Remove Live-Deadtimes from string 183 178 184 179 //convert to seconds and fill container 185 180 // (FIXME! only the MSB (seconds is now considered) 186 fLiveTime->fLiveTime[i] = L_MSB; 187 fLiveTime->fDeadTime[i] = D_MSB; 188 } 189 190 str.Remove(0, end-str.Data()); // Remove Live-Deadtimes from report string 191 str=str.Strip(TString::kLeading); 192 193 *fLog << warn << "LiveTime ok!" <<endl; 181 (fLiveTime->fLiveTime)[i] = lMSB; 182 (fLiveTime->fDeadTime)[i] = dMSB; 183 } 184 185 str=str.Strip(TString::kLeading); 186 194 187 return kTRUE; 195 188 } … … 205 198 Int_t gsNBits=20; 206 199 207 const char *pos = str.Data(); 208 const char *end = str.Data() + gsNBits; 209 210 while (pos < end) 211 { 212 n = sscanf(pos, " %f %n", &fBit->fBit[i++], &len); 200 for (i=0;i<gsNBits;i++) 201 { 202 n = sscanf(str.Data(), " %f %n", &fBit->fBit[i], &len); 213 203 if (n!=1) 214 204 { … … 216 206 return kCONTINUE; 217 207 } 218 pos += len; 219 } 220 221 str.Remove(0, end-str.Data()); // Remove output bit rates from report string 222 str=str.Strip(TString::kLeading); 223 224 *fLog << warn << "Bit ok!" <<endl; 208 str.Remove(0, len); // Remove output bit rates from string 209 } 210 211 str=str.Strip(TString::kLeading); 212 225 213 return kTRUE; 226 214 } … … 242 230 243 231 TString L1tablename = str(0, wsL1); 244 *fLog << "L1: " <<L1tablename <<endl;245 232 str.Remove(0, wsL1); 246 233 … … 265 252 } 266 253 TString L2tablename = str(0, wsL2); 267 *fLog << "L2: " <<L2tablename <<endl;268 254 str.Remove(0,wsL2); 269 255 str.Strip(TString::kBoth); … … 283 269 Int_t dummy; 284 270 285 const char *pos = str.Data(); 286 const char *end = str.Data() + gsNDummies; 287 288 while (pos < end) 289 { 290 n = sscanf(pos, " %d %n", &dummy, &len); 271 for (i=0;i<gsNDummies;i++) 272 { 273 n = sscanf(str.Data(), " %d %n", &dummy, &len); 291 274 if (n!=1) 292 275 { … … 294 277 return kCONTINUE; 295 278 } 296 pos += len; 297 } 298 299 str.Remove(0, end-str.Data()); // Remove dummies from report string 300 str=str.Strip(TString::kLeading); 301 302 *fLog << warn << "Dummy ok!" <<endl; 279 str.Remove(0, len); // Remove dummies from report string 280 } 281 282 str=str.Strip(TString::kLeading); 283 303 284 return kTRUE; 304 285 } … … 378 359 379 360 /* 380 for (int i=0; i < 19; i++)381 {382 n = sscanf(pos, " %f %n", &fPrescalerRates[i], &len);383 if (n!=1)384 {385 *fLog << warn << "WARNING - Cell Scaler Value #" << i << " missing." << endl;386 return kCONTINUE;387 }388 pos += len;389 }390 n = sscanf(pos, " %f %f %n", &fL2BeforePrescaler, &fL2AfterPrescaler, &len);391 if (n!=2)392 {393 *fLog << warn << "WARNING - Couldn't read Trigger rates." << endl;394 return kFALSE;395 }396 pos += len;397 */398 /*399 361 400 362 // Read Individual pixel rates … … 415 377 } 416 378 417 379 */ 418 380 419 381 str.Remove(0,len); -
trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.h
r4195 r4196 19 19 { 20 20 private: 21 Byte_t fStatus; // Trigger status22 21 23 Float_t fL2BeforePrescaler; // L2 trigger rate before prescaler24 Float_t fL2AfterPrescaler; // L2 trigger rate after prescaler22 Float_t fL2BeforePrescaler; //! L2 trigger rate before prescaler 23 Float_t fL2AfterPrescaler; //! L2 trigger rate after prescaler 25 24 26 MTriggerBit *fBit; // container of the L2 prescaler rates 27 MTriggerIPR *fPixel; // container of the IPR 28 //TArrayF fRates; //[Hz] IPR (Individual Pixel Rates) 29 MTriggerCell *fCell; // container of the L1 cell trigger rates 30 MTriggerPrescFact *fPrescFactor; //container of the L2 prescaling factors 31 MTriggerLiveTime *fLiveTime; //container of the scaler live-deadtime 25 MTriggerBit *fBit; //! container of the L2 prescaler rates 26 MTriggerIPR *fPixel; //! container of the IPR 27 MTriggerCell *fCell; //! container of the L1 cell trigger rates 28 MTriggerPrescFact *fPrescFactor; //! container of the L2 prescaling factors 29 MTriggerLiveTime *fLiveTime; //! container of the scaler live-deadtime 32 30 33 31 Bool_t SetupReading(MParList &plist); … … 46 44 MReportTrigger(); 47 45 48 Byte_t GetStatus() const { return fStatus; }49 50 46 Float_t GetL2BeforePrescaler() const { return fL2BeforePrescaler; } 51 47 Float_t GetL2AfterPrescaler() const { return fL2AfterPrescaler; } -
trunk/MagicSoft/Mars/mtemp/mpisa/classes/mtrigger/MTriggerBit.h
r4195 r4196 18 18 19 19 private: 20 Byte_t fStatus; // Monitor of the L2T status21 20 22 21 static const Int_t gsNBits=20; // number of output bits -
trunk/MagicSoft/Mars/mtemp/mpisa/classes/mtrigger/MTriggerCell.h
r4185 r4196 17 17 friend class MReportTrigger; 18 18 private: 19 Byte_t fStatus; // Monitor of the L2T status20 21 19 static const Int_t gsNCells=32; //Number of fields with cell rates 22 20 // 19 cells and 12 dummy -
trunk/MagicSoft/Mars/mtemp/mpisa/classes/mtrigger/MTriggerIPR.h
r4185 r4196 17 17 friend class MReportTrigger; 18 18 private: 19 Byte_t fStatus; // Monitor of the L2T status20 21 19 TArrayL fIPR; // [Hz] IPR (Individual Pixel Rates) 22 20 -
trunk/MagicSoft/Mars/mtemp/mpisa/classes/mtrigger/MTriggerLiveTime.h
r4185 r4196 18 18 19 19 private: 20 Byte_t fStatus; // Monitor of the L2T status21 22 20 static const Int_t gsNScalers=5; // number of scalers 23 21 … … 26 24 27 25 public: 28 MTriggerLiveTime() : fLiveTime(gsNScalers) 26 MTriggerLiveTime() : fLiveTime(gsNScalers), fDeadTime(gsNScalers) 29 27 { 30 28 fName = "MTriggerLiveTime"; -
trunk/MagicSoft/Mars/mtemp/mpisa/classes/mtrigger/MTriggerPrescFact.h
r4185 r4196 18 18 19 19 private: 20 Byte_t fStatus; // Monitor of the L2T status21 20 22 21 static const Int_t gsNPrescFacts=8; // number of factors
Note:
See TracChangeset
for help on using the changeset viewer.