#include "AliTRDptrgParam.h"
+using std::ifstream;
ClassImp(AliTRDptrgParam)
AliTRDptrgParam *AliTRDptrgParam::fgInstance = 0;
return kFALSE;
}
for (Int_t iValue = 0; iValue < arr.GetEntries(); iValue++) {
- this->fFEBT0Thresholds[0][iValue] =
- (dynamic_cast<TObjString*>(arr[iValue])->GetString()).Atoi();
+ TObjString *ostrng = dynamic_cast<TObjString*>(arr[iValue]);
+ if (ostrng) {
+ this->fFEBT0Thresholds[0][iValue] = (ostrng->GetString()).Atoi();
+ }
AliDebug(5, Form("FEB/T0/A/THR[%d]=%d", iValue,
this->fFEBT0Thresholds[0][iValue]));
}
return kFALSE;
}
for (Int_t iValue = 0; iValue < arr.GetEntries(); iValue++) {
- this->fFEBT0Thresholds[1][iValue] =
- (dynamic_cast<TObjString*>(arr[iValue])->GetString()).Atoi();
+ TObjString *ostrng = dynamic_cast<TObjString*>(arr[iValue]);
+ if (ostrng) {
+ this->fFEBT0Thresholds[1][iValue] = (ostrng->GetString()).Atoi();
+ }
AliDebug(5, Form("FEB/T0/C/THR[%d]=%d", iValue,
this->fFEBT0Thresholds[1][iValue]));
}
return kFALSE;
}
for (Int_t iValue = 0; iValue < arr.GetEntries(); iValue++) {
- this->fFEBV0Thresholds[0][cardID][iValue] =
- (dynamic_cast<TObjString*>(arr[iValue])->GetString()).Atoi();
+ TObjString *ostrng = dynamic_cast<TObjString*>(arr[iValue]);
+ if (ostrng) {
+ this->fFEBV0Thresholds[0][cardID][iValue] =
+ (ostrng->GetString()).Atoi();
+ }
AliDebug(5, Form("FEB/V0/A%d/THR[%d]=%d", cardID, iValue,
this->fFEBV0Thresholds[0][cardID][iValue]));
}
return kFALSE;
}
for (Int_t iValue = 0; iValue < arr.GetEntries(); iValue++) {
- this->fFEBV0Thresholds[1][cardID][iValue] =
- (dynamic_cast<TObjString*>(arr[iValue])->GetString()).Atoi();
+ TObjString *ostrng = dynamic_cast<TObjString*>(arr[iValue]);
+ if (ostrng) {
+ this->fFEBV0Thresholds[1][cardID][iValue] = (ostrng->GetString()).Atoi();
+ }
AliDebug(5, Form("FEB/V0/C%d/THR[%d]=%d", cardID, iValue,
this->fFEBV0Thresholds[1][cardID][iValue]));
}
SplitUpValues(value, arr);
- TString t0 = (dynamic_cast<TObjString*>(arr[0]))->GetString();
- TString t1 = (dynamic_cast<TObjString*>(arr[1]))->GetString();
+ TObjString *ostrng0 = dynamic_cast<TObjString*>(arr[0]);
+ TObjString *ostrng1 = dynamic_cast<TObjString*>(arr[1]);
+
+ if (ostrng0 && ostrng1) {
+
+ TString t0 = ostrng0->GetString();
+ TString t1 = ostrng1->GetString();
- this->fTLMUmultiplicity[index][0] = t0.Atoi();
- this->fTLMUmultiplicity[index][1] = t1.Atoi();
+ this->fTLMUmultiplicity[index][0] = t0.Atoi();
+ this->fTLMUmultiplicity[index][1] = t1.Atoi();
- AliDebug(5, Form("%d: %d %d", index, this->fTLMUmultiplicity[index][0],
- this->fTLMUmultiplicity[index][1]));
+ AliDebug(5, Form("%d: %d %d", index, this->fTLMUmultiplicity[index][0],
+ this->fTLMUmultiplicity[index][1]));
+
+ }
return kTRUE;
}
}
for (Int_t iEntry = 0; iEntry < arr.GetEntries(); iEntry++) {
- TString t = (dynamic_cast<TObjString*>(arr[iEntry]))->GetString();
+
+ TObjString *ostrng = dynamic_cast<TObjString*>(arr[iEntry]);
+ if (ostrng) {
+
+ TString t = ostrng->GetString();
- TString indexStr = t(2,1);
- if (t.Index("CM") == 0) { // coincidence matrix
- this->fTLMUoutput[iEntry][0] = indexStr.Atoi();
- }
- else if (t.Index("MC") == 0) { // multiplicity
- this->fTLMUoutput[iEntry][1] = indexStr.Atoi();
+ TString indexStr = t(2,1);
+ if (t.Index("CM") == 0) { // coincidence matrix
+ this->fTLMUoutput[iEntry][0] = indexStr.Atoi();
+ }
+ else if (t.Index("MC") == 0) { // multiplicity
+ this->fTLMUoutput[iEntry][1] = indexStr.Atoi();
+ }
+
}
+
AliDebug(5, Form("TLMU output: cm = %d, mc = %d",
this->fTLMUoutput[iEntry][0],
this->fTLMUoutput[iEntry][1]));
if ((partResult1 == 0x0) || (partResult2 == 0x0) ||
(signalsInvolved1 == 0x0) || (signalsInvolved2 == 0x0)) {
AliError("fatal logical equation processing error!");
+ return;
}
// allocate results and signalsInvolved
ConvertLogicalEqToBitVectors(eq, results, signalsInvolved);
// generate bit vectors
+
+ if ((results != 0x0) && (signalsInvolved != 0x0)) {
- CheckSignalsInvolved(results, signalsInvolved, inputWidth);
- // add bit vectors for signals which are not taken into account
+ CheckSignalsInvolved(results, signalsInvolved, inputWidth);
+ // add bit vectors for signals which are not taken into account
- Int_t lutSize = 0x1 << inputWidth; // 2^inputwidth elements
- Int_t* resultingLUT = new Int_t[lutSize]; // create LUT
- for (Int_t iLUTentry = 0; iLUTentry < lutSize; iLUTentry++) { // init LUT
- resultingLUT[iLUTentry] = 0;
- }
- for (Int_t iEntry = 0; iEntry < results->GetSize(); iEntry++) {
- resultingLUT[(*results)[iEntry]] = initValue;
- }
+ Int_t lutSize = 0x1 << inputWidth; // 2^inputwidth elements
+ Int_t* resultingLUT = new Int_t[lutSize]; // create LUT
+ for (Int_t iLUTentry = 0; iLUTentry < lutSize; iLUTentry++) { // init LUT
+ resultingLUT[iLUTentry] = 0;
+ }
+ for (Int_t iEntry = 0; iEntry < results->GetSize(); iEntry++) {
+ resultingLUT[(*results)[iEntry]] = initValue;
+ }
- if (results != 0x0) {
delete results;
results = 0x0;
- }
- if (signalsInvolved != 0x0) {
+
delete signalsInvolved;
signalsInvolved = 0x0;
- }
- return resultingLUT;
+ return resultingLUT;
+
+ }
+ else {
+
+ return 0x0;
+
+ }
+
}
//______________________________________________________________________________