Updates to include status maps for high voltage sensors
authorhaavard <haavard@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Apr 2008 11:24:13 +0000 (11:24 +0000)
committerhaavard <haavard@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Apr 2008 11:24:13 +0000 (11:24 +0000)
TPC/AliTPCPreprocessor.cxx
TPC/AliTPCPreprocessor.h
TPC/Config/HighVoltageStat/Run0_999999999_v0_s0.root [new file with mode: 0644]

index 6354f71..aa49fa0 100644 (file)
@@ -57,7 +57,7 @@ ClassImp(AliTPCPreprocessor)
 //______________________________________________________________________________________________
 AliTPCPreprocessor::AliTPCPreprocessor(AliShuttleInterface* shuttle) :
   AliPreprocessor("TPC",shuttle),
-  fConfEnv(0), fTemp(0), fHighVoltage(0), fConfigOK(kTRUE), fROC(0)
+  fConfEnv(0), fTemp(0), fHighVoltage(0), fHighVoltageStat(0), fConfigOK(kTRUE), fROC(0)
 {
   // constructor
   fROC = AliTPCROC::Instance();
@@ -76,7 +76,7 @@ AliTPCPreprocessor::AliTPCPreprocessor(AliShuttleInterface* shuttle) :
 //______________________________________________________________________________________________
  AliTPCPreprocessor::AliTPCPreprocessor(const AliTPCPreprocessor&  ) :
    AliPreprocessor("TPC",0),
-   fConfEnv(0), fTemp(0), fHighVoltage(0), fConfigOK(kTRUE), fROC(0)
+   fConfEnv(0), fTemp(0), fHighVoltage(0), fHighVoltageStat(0), fConfigOK(kTRUE), fROC(0)
  {
 
    Fatal("AliTPCPreprocessor", "copy constructor not implemented");
@@ -158,6 +158,19 @@ void AliTPCPreprocessor::Initialize(Int_t run, UInt_t startTime,
            return;
         }
         fHighVoltage = new AliDCSSensorArray(startTimeLocal, fEndTime, confTree);
+
+   // High voltage status values
+     
+        confTree=0;
+        entry=0;
+        entry = GetFromOCDB("Config", "HighVoltageStat");
+        if (entry) confTree = (TTree*) entry->GetObject();
+        if ( confTree==0 ) {
+           Log("AliTPCPreprocsessor: High Voltage Status Config OCDB entry missing.\n");
+           fConfigOK = kFALSE;
+           return;
+        }
+        fHighVoltageStat = new AliDCSSensorArray(startTimeLocal, fEndTime, confTree);
       }
 }
 
@@ -281,10 +294,10 @@ UInt_t AliTPCPreprocessor::Process(TMap* dcsAliasMap)
 
   // Central Electrode processing
 
-//  if( runType == kPhysicsRunType || runType == kStandAloneRunType || 
-//      runType == kDaqRunType ) {    
+  if( runType == kPhysicsRunType || runType == kStandAloneRunType || 
+      runType == kDaqRunType ) {    
 
-   if (true) {                 // do CE processing for all run types
+//   if (true) {                 // do CE processing for all run types
     Int_t numSources = 1;
     Int_t ceSource[2] = {AliShuttleInterface::kDAQ,AliShuttleInterface::kHLT} ;
     TString source = fConfEnv->GetValue("CE","DAQ");
@@ -382,6 +395,20 @@ UInt_t AliTPCPreprocessor::MapHighVoltage(TMap* dcsAliasMap)
     result=9;
   }
   delete map;
+
+  TMap *map2 = fHighVoltageStat->ExtractDCS(dcsAliasMap);
+  if (map2) {
+    fHighVoltageStat->StoreGraph(map2);
+  } else {
+    Log("No high voltage status recordings extracted. \n");
+    result=9;
+  }
+  delete map2;
+
+  // add status maps to high voltage sensor array
+
+  fHighVoltage->AddSensors(fHighVoltageStat);
+
   // Now store the final CDB file
 
   if ( result == 0 ) {
index 9e0c54e..3d5ba9b 100644 (file)
@@ -16,7 +16,7 @@ class AliTPCPreprocessor : public AliPreprocessor
 {
   public:
     AliTPCPreprocessor(AliShuttleInterface* shuttle);
-    AliTPCPreprocessor(const AliTPCPreprocessor &);
+    AliTPCPreprocessor(const AliTPCPreprocessor &org);
     virtual ~AliTPCPreprocessor();
 
   protected:
@@ -33,6 +33,7 @@ class AliTPCPreprocessor : public AliPreprocessor
     TEnv                   *fConfEnv;  // Preprocessor configuration map
     AliTPCSensorTempArray  *fTemp;     // CDB class for temperature sensors
     AliDCSSensorArray      *fHighVoltage; // DCS high voltage measurements
+    AliDCSSensorArray      *fHighVoltageStat; // DCS high voltage status
     Bool_t                 fConfigOK;  // Identify succesful reading of OCDB Config
     AliTPCROC              *fROC;      // TPC Read-Out configuration
 
diff --git a/TPC/Config/HighVoltageStat/Run0_999999999_v0_s0.root b/TPC/Config/HighVoltageStat/Run0_999999999_v0_s0.root
new file mode 100644 (file)
index 0000000..eaca8f5
Binary files /dev/null and b/TPC/Config/HighVoltageStat/Run0_999999999_v0_s0.root differ