]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding new functionality (possibility of having
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 19 Apr 2007 13:17:42 +0000 (13:17 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 19 Apr 2007 13:17:42 +0000 (13:17 +0000)
different Amanda strings for the TPC temperature sensor identification)
(Haavard, Marian)

TPC/AliTPCPreprocessor.cxx
TPC/AliTPCPreprocessor.h

index 923cba7e6c21a08704dd99439fd7750f1afda590..0fad5e53c9f8661a5cfaed3aeecbe56bad6468c7 100644 (file)
@@ -13,6 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+
 #include "AliTPCPreprocessor.h"
 
 #include "AliCDBMetaData.h"
@@ -22,6 +23,9 @@
 
 #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 
@@ -37,6 +41,18 @@ AliTPCPreprocessor::AliTPCPreprocessor(const char* detector, AliShuttleInterface
 {
   // 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()
@@ -45,6 +61,13 @@ 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,
@@ -58,7 +81,8 @@ 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);
 }
 
 //______________________________________________________________________________________________
@@ -71,7 +95,7 @@ UInt_t AliTPCPreprocessor::Process(TMap* dcsAliasMap)
   // Amanda servers provide information directly through dcsAliasMap
 
   // Temperature sensors are processed by AliTPCCalTemp
-  
+
   UInt_t tempResult = MapTemperature(dcsAliasMap);
   UInt_t result=tempResult;
   
@@ -92,6 +116,7 @@ UInt_t AliTPCPreprocessor::MapTemperature(TMap* dcsAliasMap)
 
    // extract DCS temperature maps. Perform fits to save space
 
+  UInt_t result=0;
   TMap *map = fTemp->ExtractDCS(dcsAliasMap);
   if (map) {
     fTemp->MakeSplineFit(map);
@@ -99,18 +124,24 @@ UInt_t AliTPCPreprocessor::MapTemperature(TMap* dcsAliasMap)
   } 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;
 }
index 5afc60168df9c5c9a7dc9d2f375bbe1995586040..9df6bc8e256779e9fffec1100c5ccded67a47178 100644 (file)
@@ -1,28 +1,31 @@
 #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