//______________________________________________________________________________________________
AliTPCPreprocessor::AliTPCPreprocessor(AliShuttleInterface* shuttle) :
AliPreprocessor("TPC",shuttle),
- fConfEnv(0), fTemp(0), fHighVoltage(0), fHighVoltageStat(0), fConfigOK(kTRUE), fROC(0)
+ fConfEnv(0), fTemp(0), fHighVoltage(0), fHighVoltageStat(0), fGoofie(0), fConfigOK(kTRUE), fROC(0)
{
// constructor
fROC = AliTPCROC::Instance();
//______________________________________________________________________________________________
AliTPCPreprocessor::AliTPCPreprocessor(const AliTPCPreprocessor& ) :
AliPreprocessor("TPC",0),
- fConfEnv(0), fTemp(0), fHighVoltage(0), fHighVoltageStat(0), fConfigOK(kTRUE), fROC(0)
+ fConfEnv(0), fTemp(0), fHighVoltage(0), fHighVoltageStat(0), fGoofie(0), fConfigOK(kTRUE), fROC(0)
{
Fatal("AliTPCPreprocessor", "copy constructor not implemented");
}
fHighVoltageStat = new AliDCSSensorArray(startTimeLocal, endTimeLocal, confTree);
}
+
+ // Goofie values
+
+ TString goofieConf = fConfEnv->GetValue("Goofie","ON");
+ goofieConf.ToUpper();
+ if (goofieConf != "OFF" ) {
+ confTree=0;
+ entry=0;
+ entry = GetFromOCDB("Config", "Goofie");
+ if (entry) confTree = (TTree*) entry->GetObject();
+ if ( confTree==0 ) {
+ Log("AliTPCPreprocsessor: Goofie Config OCDB entry missing.\n");
+ fConfigOK = kFALSE;
+ return;
+ }
+ fGoofie = new AliDCSSensorArray(startTimeLocal, endTimeLocal, confTree);
+ }
+
+
}
//______________________________________________________________________________________________
resultArray->Add(status);
}
+ // Goofie values
+
+
+ TString goofieConf = fConfEnv->GetValue("Goofie","ON");
+ goofieConf.ToUpper();
+ if (goofieConf != "OFF" ) {
+ UInt_t goofieResult = MapGoofie(dcsAliasMap);
+ result+=goofieResult;
+ status = new TParameter<int>("goofieResult",goofieResult);
+ resultArray->Add(status);
+ }
+
// Other calibration information will be retrieved through FXS files
// examples:
// TList* fileSourcesDAQ = GetFile(AliShuttleInterface::kDAQ, "pedestals");
numSources = 1;
Int_t qaSource[2] = {AliShuttleInterface::kDAQ,AliShuttleInterface::kHLT} ;
- TString source = fConfEnv->GetValue("QA","DAQ");
+ source = fConfEnv->GetValue("QA","DAQ");
source.ToUpper();
if ( source != "OFF" ) {
if ( source == "HLT") qaSource[0] = AliShuttleInterface::kHLT;
}
+//______________________________________________________________________________________________
+UInt_t AliTPCPreprocessor::MapGoofie(TMap* dcsAliasMap)
+{
+
+ // extract DCS Goofie maps. Do not perform fits (low update rate)
+
+ UInt_t result=0;
+
+ TMap *map = fGoofie->ExtractDCS(dcsAliasMap);
+ if (map) {
+ fGoofie->ClearFit();
+ fGoofie->SetGraph(map);
+ } else {
+ Log("No Goofie recordings extracted. \n");
+ result=9;
+ }
+ delete map;
+
+ // Now store the final CDB file
+
+ if ( result == 0 ) {
+ AliCDBMetaData metaData;
+ metaData.SetBeamPeriod(0);
+ metaData.SetResponsible("Haavard Helstrup");
+ metaData.SetComment("Preprocessor AliTPC data base entries.");
+
+ Bool_t storeOK = Store("Calib", "Goofie", fGoofie, &metaData, 0, kFALSE);
+ if ( !storeOK ) result=1;
+
+ }
+
+ return result;
+
+}
+
//______________________________________________________________________________________________
AliTPCCalibCE *calCE;
f->GetObject("tpcCalibCE",calCE);
+ if (!calCE) {
+ Log ("No valid calibCE object.");
+ result=2;
+ break;
+ }
// replace entries for the sectors available in the present file
for (Int_t sector=0; sector<nSectors; sector++) {
TFile *f = TFile::Open(fileName);
if (!f) {
Log ("Error opening QA file.");
- result =2;
- }
- f->GetObject("tpcCalibQA",calQA);
-
- f->Close();
- }
+ result =2;
+ } else {
+ f->GetObject("tpcCalibQA",calQA);
+ if ( calQA ) {
//
// Store updated pedestal entry to OCDB
//
- AliCDBMetaData metaData;
- metaData.SetBeamPeriod(0);
- metaData.SetResponsible("Haavard Helstrup");
- metaData.SetComment("Preprocessor AliTPC data base entries.");
-
- Bool_t storeOK = Store("Calib", "QA", calQA, &metaData, 0, kTRUE);
- if ( !storeOK ) ++result;
-
+ AliCDBMetaData metaData;
+ metaData.SetBeamPeriod(0);
+ metaData.SetResponsible("Haavard Helstrup");
+ metaData.SetComment("Preprocessor AliTPC data base entries.");
+
+ Bool_t storeOK = Store("Calib", "QA", calQA, &metaData, 0, kTRUE);
+ if ( !storeOK ) ++result;
+ }
+ }
+ } else {
+ Log ("Error: no QA files on FXS!");
+ result = 2;
+ }
} else {
- Log ("Error: no entries!");
+ Log ("Error: no QA entries in FXS list!");
result = 1;
}
-
return result;
}