MODULE_DHDR:=
-EINCLUDE := HLT/pendolino HLT/BASE STEER
+EINCLUDE := HLT/pendolino HLT/BASE STEER TPC MUON
LIBRARY_DEP := -lHLTbase -lCDB
AliHLTPendolino::AliHLTPendolino(Int_t run, TString HCDBbase,
- TString runType, AliHLTPendolinoLogger* logger) {
+ TString runType, AliHLTPendolinoLogger* logger) :
+ fRunType(runType), fRunNumber(run),
+ fHCDBPath(""), fPredictionProcessorMap(),
+ fpLogger(0), fOwnLogger(kFALSE) {
// C-tor of AliHLTPendolino
- mRunType = runType;
- mRunNumber = run;
- mHCDBPath = kLOCAL_STORAGE_DEFINE + HCDBbase;
+ fHCDBPath = kLOCAL_STORAGE_DEFINE + HCDBbase;
if (logger == 0) {
- mpLogger = new AliHLTPendolinoLoggerOStream();
- mOwnLogger = kTRUE;
+ fpLogger = new AliHLTPendolinoLoggerOStream();
+ fOwnLogger = kTRUE;
} else {
- mpLogger = logger;
- mOwnLogger = kFALSE;
+ fpLogger = logger;
+ fOwnLogger = kFALSE;
}
}
AliHLTPendolino::~AliHLTPendolino() {
// D-tor of AliHLTPendolino
// clean up registered PredicitonProcs
- TMapIter iter(&mPredictionProcessorMap, kIterForward);
+ TMapIter iter(&fPredictionProcessorMap, kIterForward);
AliHLTPredictionProcessorInterface* aPredict;
TObject* key = 0;
try {
// get value for the key
aPredict = dynamic_cast<AliHLTPredictionProcessorInterface*>
- (mPredictionProcessorMap.GetValue(key));
+ (fPredictionProcessorMap.GetValue(key));
if (aPredict == 0) {
Log(kHLTInterfaceModule,
continue;
}
}
+ Log(kHLTInterfaceModule, " ### [DEBUG] Deleting of PredictionProcessors finished.");
// clean up logger
- if ((mOwnLogger) && (mpLogger != 0)) {
- delete mpLogger;
+ if ((fOwnLogger) && (fpLogger != 0)) {
+ delete fpLogger;
}
}
AliCDBManager* man = 0;
AliCDBStorage* local_hcdb = 0;
- startNumber = ((mRunNumber - validityStart) <= 0) ? 0 : (mRunNumber - validityStart);
- endNumber = (validityInfinite) ? AliCDBRunRange::Infinity() : mRunNumber;
+ startNumber = ((fRunNumber - validityStart) <= 0) ? 0 : (fRunNumber - validityStart);
+ endNumber = (validityInfinite) ? AliCDBRunRange::Infinity() : fRunNumber;
man = AliCDBManager::Instance();
if (man == 0) {
}
// contact local storage (HCDB)
- local_hcdb = man->GetStorage(mHCDBPath.Data());
+ local_hcdb = man->GetStorage(fHCDBPath.Data());
if (local_hcdb == 0) {
TString msg(" *** ERROR in initiating HCDB: ");
- msg += mHCDBPath;
+ msg += fHCDBPath;
Log(kHLTInterfaceModule, msg.Data());
man->DestroyActiveStorages();
return kFALSE;
// taken from AliShuttle
if (! dynamic_cast<TObjString*> (metaData->GetProperty("RunUsed(TObjString)"))) {
- TObjString runUsed = Form("%d", mRunNumber);
+ TObjString runUsed = Form("%d", fRunNumber);
metaData->SetProperty("RunUsed(TObjString)", runUsed.Clone());
}
// Version is set to current run, it will be used later to transfer data to Grid
// Why using current run number as version number ???
- AliCDBId entryID(path, startNumber, endNumber, mRunNumber, -1);
+ AliCDBId entryID(path, startNumber, endNumber, fRunNumber, -1);
if (local_hcdb->Put(object, entryID, metaData)) {
retVal = kTRUE;
Bool_t AliHLTPendolino::StoreReferenceData(const AliCDBPath& path,
- TObject* object, AliCDBMetaData* metaData) {
+ TObject* /*object*/, AliCDBMetaData* /*metaData*/) {
// Disabled Function inherited from interface
TString msg(" ~~~ PredictProc tries to store reference data to '"
+ path.GetPath() + "'. Discarding call in Pendolino.");
}
-const char* AliHLTPendolino::GetRunParameter(const char* lbEntry) {
+const char* AliHLTPendolino::GetRunParameter(const char* /*lbEntry*/) {
// getter for run parameter
// TODO
return NULL;
}
- AliCDBStorage *hcdb = man->GetStorage(mHCDBPath.Data());
+ AliCDBStorage *hcdb = man->GetStorage(fHCDBPath.Data());
if (hcdb == 0) {
TString msg(" *** ERROR, cannot acquire HCDB storage (");
- msg += mHCDBPath + ") for fetching data for Pendolino.";
+ msg += fHCDBPath + ") for fetching data for Pendolino.";
Log(kHLTInterfaceModule, msg.Data());
return NULL;
}
- entry = hcdb->Get(path, mRunNumber);
+ entry = hcdb->Get(path, fRunNumber);
if (entry == 0) {
TString msg(" ~~~ WARNING: no valid entry for '");
msg += path.GetPath() + "' in HCDB for run number ";
- msg += mRunNumber;
+ msg += fRunNumber;
Log(kHLTInterfaceModule, msg.Data());
}
/*
AliCDBEntry* entry = 0;
try {
- entry = dynamic_cast<AliCDBEntry*> (hcdb->Get(path, mRunNumber));
+ entry = dynamic_cast<AliCDBEntry*> (hcdb->Get(path, fRunNumber));
} catch (std::bad_cast) {
TString msg(" *** ERROR, bad cast of HCDB entry (");
msg += path.GetPath() + ") after fetching from HCDB.";
}
// outfile.seekp(-1, ios::end);
outfile << endl;
- outfile << "#HLT (Pendolino) - Run: " << mRunNumber << ", Time: " <<
+ outfile << "#HLT (Pendolino) - Run: " << fRunNumber << ", Time: " <<
ts.AsString() << endl;
outfile << entryPath.Data() << endl;
outfile.close();
<< endl << "#" << endl;
outfile << "# !!! DON'T EDIT THIS FILE (if you don't know what you are doing) !!!"
<< endl << endl;
- outfile << "#HLT (Pendolino) - Run: " << mRunNumber << ", Time: " <<
+ outfile << "#HLT (Pendolino) - Run: " << fRunNumber << ", Time: " <<
ts.AsString() << endl;
outfile << entryPath.Data() << endl;
outfile.close();
bRet = kTRUE;
} else {
- TString msg(" *** Unable to create Pendolino list file '");
+ msg=" *** Unable to create Pendolino list file '";
msg += filename + "' for Taxi. Continueing without list update...";
Log(kHLTInterfaceModule, msg.Data());
}
void AliHLTPendolino::Log(const char* detector, const char* message) {
// logging function
- mpLogger->log(detector, message);
+ fpLogger->log(detector, message);
// refer data to a Pendolino Logger, which can take care of it
}
TString detector(preprocessor->GetName());
- if (mPredictionProcessorMap.GetValue(detector.Data())) {
+ if (fPredictionProcessorMap.GetValue(detector.Data())) {
Log(kHLTInterfaceModule, " ~~~ Already registered PredictionProcessor '" +
detector + "'. Ignoring call.");
return;
}
// store as AliPreprocessor* and make cast to AliHLTPredictionProcessorInterface*
// later, when accesing them.
- mPredictionProcessorMap.Add(new TObjString(detector), preprocessor);
+ fPredictionProcessorMap.Add(new TObjString(detector), preprocessor);
/*
TString detector(preprocessor->GetName());
Log(kHLTInterfaceModule, " *** Exception in the registering of the PredictProc.");
}
- if (mPredictionProcessorMap.GetValue(detector.Data())) {
+ if (fPredictionProcessorMap.GetValue(detector.Data())) {
Log(kHLTInterfaceModule, " ~~~ Already registered PredictionProcessor '" +
detector + "'. Ignoring call.");
return;
}
- mPredictionProcessorMap.Add(new TObjString(detector), predictProc);
+ fPredictionProcessorMap.Add(new TObjString(detector), predictProc);
*/
}
UInt_t retVal = 0;
// get an iterator for the map
- TMapIter iter(&mPredictionProcessorMap, kIterForward);
+ TMapIter iter(&fPredictionProcessorMap, kIterForward);
AliHLTPredictionProcessorInterface* aPredict;
TObject* key = 0;
try {
// get value for the key
aPredict = dynamic_cast<AliHLTPredictionProcessorInterface*>
- (mPredictionProcessorMap.GetValue(key));
+ (fPredictionProcessorMap.GetValue(key));
if (aPredict == 0) {
Log(kHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
try {
// get the value for the key
- TObject* object = mPredictionProcessorMap.GetValue(detector.Data());
+ TObject* object = fPredictionProcessorMap.GetValue(detector.Data());
if (object == 0) {
Log(kHLTInterfaceModule, " *** No PredictionProcessor for '" +
try {
// get the value for the key
- TObject* object = mPredictionProcessorMap.GetValue(detector.Data());
+ TObject* object = fPredictionProcessorMap.GetValue(detector.Data());
if (object == 0) {
Log(kHLTInterfaceModule, " *** No PredictionProcessor for '" +
try {
// get the value for the key
- TObject* object = mPredictionProcessorMap.GetValue(detector.Data());
+ TObject* object = fPredictionProcessorMap.GetValue(detector.Data());
if (object == 0) {
Log(kHLTInterfaceModule, " *** No PredictionProcessor for '" +
try {
// get the value for the key
- TObject* object = mPredictionProcessorMap.GetValue(detector.Data());
+ TObject* object = fPredictionProcessorMap.GetValue(detector.Data());
if (object == 0) {
Log(kHLTInterfaceModule, " *** No PredictionProcessor for '" +
/**
* Stores the current run type
*/
- TString mRunType; // Stores the current run type
+ TString fRunType; // Stores the current run type
+
+ /**
+ * Stores the current run number
+ */
+ Int_t fRunNumber; // Stores the current run number
+
+ /**
+ * Stores the HCDBpath
+ */
+ TString fHCDBPath; // Stores the HCDBpath
/**
* Map that stores the all PredictionProcessors with their name
* (detector)
*/
- TMap mPredictionProcessorMap; // stores the all PredictionProcessors
+ TMap fPredictionProcessorMap; // stores the all PredictionProcessors
/**
* Pointer to the used Pendolino logger
*/
- AliHLTPendolinoLogger* mpLogger; // Pointer to the used Pendolino logger
-
- /**
- * Stores the current run number
- */
- Int_t mRunNumber; // Stores the current run number
-
- /**
- * Stores the HCDBpath
- */
- TString mHCDBPath; // Stores the HCDBpath
+ AliHLTPendolinoLogger* fpLogger; // Pointer to the used Pendolino logger
/**
* Indicates, if Logger is owned by Pendolino
*/
- Bool_t mOwnLogger; // Indicates, if Logger is owned by Pendolino
+ Bool_t fOwnLogger; // Indicates, if Logger is owned by Pendolino
- ClassDef(AliHLTPendolino, 4);
+ ClassDef(AliHLTPendolino, 5);
};
inline const char* AliHLTPendolino::GetRunType() {
// getter for run type
- return mRunType.Data();
+ return fRunType.Data();
}
inline Int_t AliHLTPendolino::GetRunNumber() {
// getter for run number
- return mRunNumber;
+ return fRunNumber;
}
inline Int_t AliHLTPendolino::getNumberOfPredictProc() {
// getter for number of registered PredictionProcessors
- return mPredictionProcessorMap.GetSize();
+ return fPredictionProcessorMap.GetSize();
}
AliHLTPredictionProcessorDummy::AliHLTPredictionProcessorDummy(
const char* detector, AliHLTPendolino* pendolino) :
- AliHLTPredictionProcessorInterface(detector, pendolino) {
+ AliHLTPredictionProcessorInterface(detector, pendolino),
+ fPredict(false), fRun(0), fStartTime(0), fEndTime(0) {
// C-tor of AliHLTPredictionProcessorDummy
- mPredict = false;
- mRun = 0;
- mStartTime = 0;
- mEndTime = 0;
}
UInt_t AliHLTPredictionProcessorDummy::makePrediction(Bool_t doPrediction) {
// switches prediction making on or off
Log("Prediction switched on");
- mPredict = doPrediction;
+ fPredict = doPrediction;
return 0;
}
void AliHLTPredictionProcessorDummy::Initialize(Int_t run, UInt_t startTime,
UInt_t endTime) {
// initializes AliHLTPredictionProcessorDummy
- mRun = run;
- mStartTime = startTime;
- mEndTime = endTime;
+ fRun = run;
+ fStartTime = startTime;
+ fEndTime = endTime;
TString msg("Initialized Dummy PredictProc. Run: ");
- msg += mRun;
+ msg += fRun;
msg += ", start time: ";
- msg += mStartTime;
+ msg += fStartTime;
msg += ", end time: ";
- msg += mEndTime;
+ msg += fEndTime;
msg += ".";
Log(msg.Data());
- if (mPredict) {
+ if (fPredict) {
Log("Dummy PredictProc has prediction switched ON.");
} else {
Log("Prediction is switched OFF.");
//transform dcsAliasMap to ROOT object
TString comment("Beam it up");
- if (mPredict) {
+ if (fPredict) {
comment += " with PREDICTION!";
}
- if (mRun > 3) {
+ if (fRun > 3) {
start = 3;
}
AliCDBMetaData meta(this->GetName(), 666, "unknownAliRoot",
/**
* Stores if prediction shall be made
*/
- Bool_t mPredict; // Stores if prediction shall be made
+ Bool_t fPredict; // Stores if prediction shall be made
/**
* Stores the run number
*/
- Int_t mRun; // Stores the run number
+ Int_t fRun; // Stores the run number
/**
* Stores the start time of the to process DCS data
*/
- UInt_t mStartTime; // Stores the start time of the to process DCS data
+ UInt_t fStartTime; // Stores the start time of the to process DCS data
/**
* Stores the end time of the to process DCS data
*/
- UInt_t mEndTime; // Stores the end time of the to process DCS data
+ UInt_t fEndTime; // Stores the end time of the to process DCS data
- ClassDef(AliHLTPredictionProcessorDummy, 0);
+ ClassDef(AliHLTPredictionProcessorDummy, 1);
};
AliHLTPredictionProcessorInterface::AliHLTPredictionProcessorInterface(
const char* detector, AliHLTPendolino* pendolino) :
AliPreprocessor(detector, reinterpret_cast<AliShuttleInterface*>
- (pendolino)),
- mPend(pendolino)
-
-{
+ (pendolino)), fpPend(pendolino) {
}
}
Int_t AliHLTPredictionProcessorInterface::GetRunNumber() {
- return mPend->GetRunNumber();
+ return fpPend->GetRunNumber();
}
Bool_t AliHLTPredictionProcessorInterface::includeAliCDBEntryInList(
const TString& entryPath) {
- return mPend->includeAliCDBEntryInList(entryPath);
+ return fpPend->includeAliCDBEntryInList(entryPath);
}
/**
* Stores pointer to Pendolino
*/
- AliHLTPendolino* mPend; // Stores pointer to Pendolino
+ AliHLTPendolino* fpPend; // Stores pointer to Pendolino
- ClassDef(AliHLTPredictionProcessorInterface, 5);
+ ClassDef(AliHLTPredictionProcessorInterface, 6);
};
AliHLTPredicProcTempMonitor::AliHLTPredicProcTempMonitor(
const char* detector, AliHLTPendolino* pendolino) :
- AliHLTPredictionProcessorInterface(detector, pendolino) {
+ AliHLTPredictionProcessorInterface(detector, pendolino),
+ fPredict(true), fRun(0), fStartTime(0), fEndTime(0), fBField("") {
// C-tor for AliHLTPredicProcTempMonitor
- mPredict = true;
- mRun = 0;
- mStartTime = 0;
- mEndTime = 0;
+// fPredict = true;
+// fRun = 0;
+// fStartTime = 0;
+// fEndTime = 0;
}
UInt_t AliHLTPredicProcTempMonitor::makePrediction(Bool_t doPrediction) {
// switch for prediction making in AliHLTPredicProcTempMonitor
Log("AliHLTPredicProcTempMonitor + B-Field extractor: prediction switched on");
- mPredict = doPrediction;
+ fPredict = doPrediction;
return 0;
}
void AliHLTPredicProcTempMonitor::Initialize(Int_t run, UInt_t startTime,
UInt_t endTime) {
// initializes AliHLTPredicProcTempMonitor
- mRun = run;
- mStartTime = startTime;
- mEndTime = endTime;
+ fRun = run;
+ fStartTime = startTime;
+ fEndTime = endTime;
TString msg("Initialized HLT PredictionProcessor; Run: ");
- msg += mRun;
+ msg += fRun;
msg += ", start time: ";
- msg += mStartTime;
+ msg += fStartTime;
msg += ", end time: ";
- msg += mEndTime;
+ msg += fEndTime;
msg += ".";
Log(msg.Data());
}
UInt_t AliHLTPredicProcTempMonitor::ExtractBField(TMap* dcsAliasMap) {
// extracts the B-field value from DCS value map
- TString stringId = "dcs_magnet:Magnet/ALICESolenoid.Current";
+ TString stringId = "L3Current"; // "dcs_magnet:Magnet/ALICESolenoid.Current";
Float_t BField = 0;
Bool_t bRet = GetSensorValue(dcsAliasMap,stringId.Data(),&BField);
if (bRet) {
BField = BField / 60000; // If we get field, take this away and change SensorValue
- TString dummy("-bfield ");
+ TString dummy("-solenoidBZ ");
dummy += BField;
TObjString dummy2(dummy.Data());
- mBField = dummy2;
- Log(Form("BField set to %s", mBField.String().Data()));
+ fBField = dummy2;
+ Log(Form("BField set to %s", fBField.String().Data()));
} else {
return 1;
}
TString comment("BField");
AliCDBMetaData meta(this->GetName(), 0, "unknownAliRoot", comment.Data());
- if (Store(path2.Data(), path3.Data(), (TObject*) (&mBField), &meta, start,
+ if (Store(path2.Data(), path3.Data(), (TObject*) (&fBField), &meta, start,
kTRUE)) {
Log(" +++ Successfully stored object ;-)");
} else {
resultMap = new TMap();
TTimeStamp tt;
Float_t fval = 33.3;
- TObjString* name = new TObjString("DummyData");
+ TObjString* name = new TObjString("L3Current");
AliDCSValue* val = new AliDCSValue(fval, tt.GetTime());
TObjArray* arr = new TObjArray();
arr->Add(val);
/**
* Stores if prediction shall be made
*/
- Bool_t mPredict; // flag for prediction making
+ Bool_t fPredict; // flag for prediction making
/**
* Stores the run number
*/
- Int_t mRun; // Stores the run number
+ Int_t fRun; // Stores the run number
/**
* Stores the start time of the to process DCS data
*/
- UInt_t mStartTime; // Stores the start time of the to process DCS data
+ UInt_t fStartTime; // Stores the start time of the to process DCS data
/**
* Stores the end time of the to process DCS data
*/
- UInt_t mEndTime; // Stores the end time of the to process DCS data
+ UInt_t fEndTime; // Stores the end time of the to process DCS data
/**
* Stores the extracted B-Field in a TObjString
*/
- TObjString mBField; // Stores the extracted B-Field in a TObjString
+ TObjString fBField; // Stores the extracted B-Field in a TObjString
/** ClassDef of AliHLTPredicProcTempMonitor for AliRoot */
- ClassDef(AliHLTPredicProcTempMonitor, 2);
+ ClassDef(AliHLTPredicProcTempMonitor, 4);
};
AliHLTPredictionProcessorHLT::AliHLTPredictionProcessorHLT(
const char* detector, AliHLTPendolino* pendolino) :
- AliHLTPredictionProcessorInterface(detector, pendolino) {
+ AliHLTPredictionProcessorInterface(detector, pendolino),
+ fPredict(true), fRun(0), fStartTime(0), fEndTime(0), fBField("") {
// C-tor for AliHLTPredictionProcessorHLT
- mPredict = false;
- mRun = 0;
- mStartTime = 0;
- mEndTime = 0;
- mBField = 0;
+// fPredict = false;
+// fRun = 0;
+// fStartTime = 0;
+// fEndTime = 0;
+// fBField = 0;
}
UInt_t AliHLTPredictionProcessorHLT::makePrediction(Bool_t doPrediction) {
// switch for prediction making
Log("Prediction switched on");
- mPredict = doPrediction;
+ fPredict = doPrediction;
return 0;
}
void AliHLTPredictionProcessorHLT::Initialize(Int_t run, UInt_t startTime,
UInt_t endTime) {
// initializes AliHLTPredictionProcessorHLT
- mRun = run;
- mStartTime = startTime;
- mEndTime = endTime;
+ fRun = run;
+ fStartTime = startTime;
+ fEndTime = endTime;
TString msg("Initialized HLT PredictProc. Run: ");
- msg += mRun;
+ msg += fRun;
msg += ", start time: ";
- msg += mStartTime;
+ msg += fStartTime;
msg += ", end time: ";
- msg += mEndTime;
+ msg += fEndTime;
msg += ".";
Log(msg.Data());
- if (mPredict) {
+ if (fPredict) {
Log("HLT PredictProc has prediction switched ON.");
} else {
Log("Prediction is switched OFF.");
TString comment("BField");
AliCDBMetaData meta(this->GetName(), 0, "unknownAliRoot",comment.Data());
- if (Store(path2.Data(),path3.Data(),(TObject*) &mBField,&meta,start,kTRUE)) {
+ if (Store(path2.Data(),path3.Data(),(TObject*) &fBField,&meta,start,kTRUE)) {
Log(" +++ Successfully stored object ;-)");
} else {
Log(" *** Storing of OBJECT failed!!");
if(bRet){
// new
BField = BField/60000; // If we get field, take this away and change SensorValue
- TString dummy("-solenoidBz");
+ TString dummy("-solenoidBz ");
dummy += BField;
TObjString dummy2(dummy.Data());
- mBField = dummy2;
+ fBField = dummy2;
- Log(Form("BField set to %s",mBField.String().Data()));
+ Log(Form("BField set to %s",fBField.String().Data()));
return 0;
}
resultMap = new TMap();
TTimeStamp tt;
Float_t fval = 33.3;
- TObjString* name = new TObjString("DummyData");
+ TObjString* name = new TObjString("L3Current");
AliDCSValue* val = new AliDCSValue(fval, tt.GetTime());
TObjArray* arr = new TObjArray();
arr->Add(val);
AliHLTPredictionProcessorHLT& operator=(
const AliHLTPredictionProcessorHLT& rhs);
-
- /**
- * TObjstring which stores the B-field value
- */
- TObjString mBField; // TObjstring which stores the B-field value
-
/**
* Stores if prediction shall be made
*/
- Bool_t mPredict; // flag for prediction making
+ Bool_t fPredict; // flag for prediction making
/**
* Stores the run number
*/
- Int_t mRun; // Stores the run number
+ Int_t fRun; // Stores the run number
/**
* Stores the start time of the to process DCS data
*/
- UInt_t mStartTime; // Stores the start time of the to process DCS data
+ UInt_t fStartTime; // Stores the start time of the to process DCS data
/**
* Stores the end time of the to process DCS data
*/
- UInt_t mEndTime; // Stores the end time of the to process DCS data
+ UInt_t fEndTime; // Stores the end time of the to process DCS data
+
+ /**
+ * TObjstring which stores the B-field value
+ */
+ TObjString fBField; // TObjstring which stores the B-field value
/**
* Function to extract the B-field from the DCS value map
*/
Bool_t GetSensorValue(TMap* dcsAliasMap,const char* stringId, Float_t * value);
- ClassDef(AliHLTPredictionProcessorHLT, 0);
+ ClassDef(AliHLTPredictionProcessorHLT, 1);
};