]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Include processing of Goofie points from DCS in Shuttle/preprocessor setup
authorhaavard <haavard@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Aug 2008 14:22:47 +0000 (14:22 +0000)
committerhaavard <haavard@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Aug 2008 14:22:47 +0000 (14:22 +0000)
TPC/AliTPCPreprocessor.cxx
TPC/AliTPCPreprocessor.h
TPC/Config/Goofie/Run0_999999999_v0_s0.root [new file with mode: 0644]

index 6b0b270d7af9d470015b52a3cb731b5c89b981fb..76e2e18da849828a214a186e8c4728dc908202e7 100644 (file)
@@ -59,7 +59,7 @@ ClassImp(AliTPCPreprocessor)
 //______________________________________________________________________________________________
 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();
@@ -79,7 +79,7 @@ AliTPCPreprocessor::AliTPCPreprocessor(AliShuttleInterface* shuttle) :
 //______________________________________________________________________________________________
  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");
@@ -180,6 +180,25 @@ void AliTPCPreprocessor::Initialize(Int_t run, UInt_t startTime,
         }
         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);
+      }
+
+
 }
 
 //______________________________________________________________________________________________
@@ -236,6 +255,18 @@ UInt_t AliTPCPreprocessor::Process(TMap* dcsAliasMap)
    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");
@@ -462,6 +493,41 @@ UInt_t AliTPCPreprocessor::MapHighVoltage(TMap* dcsAliasMap)
 
 }
 
+//______________________________________________________________________________________________
+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;
+
+}
+
 
 //______________________________________________________________________________________________
 
index 26d3e03e339bd486dd6e4c1834672a5179161530..0c8839951d110eee025df4c1995440dd9b8c7597 100644 (file)
@@ -24,6 +24,7 @@ class AliTPCPreprocessor : public AliPreprocessor
     virtual UInt_t Process(TMap* dcsAliasMap);
     UInt_t  MapTemperature(TMap* dcsAliasMap);
     UInt_t  MapHighVoltage(TMap* dcsAliasMap);
+    UInt_t  MapGoofie(TMap* dcsAliasMap);
     UInt_t  ExtractPedestals(Int_t sourceFXS);
     UInt_t  ExtractPulser(Int_t sourceFXS);
     UInt_t  ExtractCE(Int_t sourceFXS);
@@ -35,10 +36,11 @@ class AliTPCPreprocessor : public AliPreprocessor
     AliTPCSensorTempArray  *fTemp;     // CDB class for temperature sensors
     AliDCSSensorArray      *fHighVoltage; // DCS high voltage measurements
     AliDCSSensorArray      *fHighVoltageStat; // DCS high voltage status
+    AliDCSSensorArray      *fGoofie;   // Goofie values from DCS
     Bool_t                 fConfigOK;  // Identify succesful reading of OCDB Config
     AliTPCROC              *fROC;      // TPC Read-Out configuration
 
-    ClassDef(AliTPCPreprocessor, 2)
+    ClassDef(AliTPCPreprocessor, 3)
 };
 
 #endif
diff --git a/TPC/Config/Goofie/Run0_999999999_v0_s0.root b/TPC/Config/Goofie/Run0_999999999_v0_s0.root
new file mode 100644 (file)
index 0000000..34d9b72
Binary files /dev/null and b/TPC/Config/Goofie/Run0_999999999_v0_s0.root differ