* provided "as is" without express or implied warranty. *
**************************************************************************/
+
#include "AliTPCPreprocessor.h"
#include "AliCDBMetaData.h"
#include <TTimeStamp.h>
+const char kFname[]="$ALICE_ROOT/TPC";
+const char kAmandaStringTemp[] = "tpc_PT_%d.Temperature";
+
//
// This class is the SHUTTLE preprocessor for the TPC detector.
// It contains several components, this far the part containing
{
// constructor
}
+//______________________________________________________________________________________________
+// AliTPCPreprocessor::AliTPCPreprocessor(const AliTPCPreprocessor& org) :
+// AliPreprocessor(org),
+// fTemp(0)
+// {
+// // copy constructor not implemented
+// // -- missing underlying copy constructor in AliPreprocessor
+//
+// Fatal("AliTPCPreprocessor", "copy constructor not implemented");
+//
+// // fTemp = new AliTPCSensorTempArray(*(org.fTemp));
+// }
//______________________________________________________________________________________________
AliTPCPreprocessor::~AliTPCPreprocessor()
delete fTemp;
}
+//______________________________________________________________________________________________
+AliTPCPreprocessor& AliTPCPreprocessor::operator = (const AliTPCPreprocessor& )
+{
+ Fatal("operator =", "assignment operator not implemented");
+ return *this;
+}
+
//______________________________________________________________________________________________
void AliTPCPreprocessor::Initialize(Int_t run, UInt_t startTime,
TTimeStamp(startTime).AsString(),
TTimeStamp(endTime).AsString()));
- fTemp = new AliTPCSensorTempArray(fStartTime, fEndTime);
+ fTemp = new AliTPCSensorTempArray(fStartTime, fEndTime, kFname);
+ fTemp->SetAmandaString(kAmandaStringTemp);
}
//______________________________________________________________________________________________
// Amanda servers provide information directly through dcsAliasMap
// Temperature sensors are processed by AliTPCCalTemp
-
+
UInt_t tempResult = MapTemperature(dcsAliasMap);
UInt_t result=tempResult;
// extract DCS temperature maps. Perform fits to save space
+ UInt_t result=0;
TMap *map = fTemp->ExtractDCS(dcsAliasMap);
if (map) {
fTemp->MakeSplineFit(map);
} else {
AliError(Form("No temperature map extracted.\n"));
Log("AliTPCPreprocsessor: no temperature map extracted. \n");
+ result=9;
}
delete map;
// Now store the final CDB file
- AliCDBMetaData metaData;
+ if ( result == 0 ) {
+ AliCDBMetaData metaData;
metaData.SetBeamPeriod(0);
metaData.SetResponsible("Haavard Helstrup");
metaData.SetComment("Preprocessor AliTPC data base entries.");
- UInt_t result = Store("TPC/Calib/Temperature", "Data", fTemp, &metaData, 0, 0);
- delete fTemp;
- fTemp = 0;
+ result = Store("Calib", "Temperature", fTemp, &metaData, 0, 0);
+ if ( result == 1 ) {
+ result = 0;
+ } else {
+ result = 1;
+ } // revert to new return code conventions
+ }
return result;
}
#ifndef ALI_TPC_PREPROCESSOR_H
#define ALI_TPC_PREPROCESSOR_H
-#include "AliTPCPreprocessor.h"
+#include "AliPreprocessor.h"
+
// test preprocessor that writes data to AliTestDataDCS
class AliTestDataDCS;
+class AliTPCSensorTempArray;
class AliTPCPreprocessor : public AliPreprocessor
{
public:
AliTPCPreprocessor(const char* detector, AliShuttleInterface* shuttle);
+// AliTPCPreprocessor(const AliTPCPreprocessor &org);
virtual ~AliTPCPreprocessor();
protected:
virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);
virtual UInt_t Process(TMap* dcsAliasMap);
- UInt_t AliTPCPreprocessor::MapTemperature(TMap* dcsAliasMap);
-
+ UInt_t MapTemperature(TMap* dcsAliasMap);
+ AliTPCPreprocessor& operator = (const AliTPCPreprocessor& rhs);
private:
AliTPCSensorTempArray *fTemp; // CDB class for temperature sensors
- ClassDef(AliTPCPreprocessor, 0);
+ ClassDef(AliTPCPreprocessor, 1)
};
#endif