]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - GRP/TestGRPPreprocessor.C
modifications to satisfy the coding conventions
[u/mrichter/AliRoot.git] / GRP / TestGRPPreprocessor.C
index 22eba1f587970cbb7832b502b4071c32eb5e6aec..b57d737eb3debac41c8fbc0353ba4967ad798f07 100644 (file)
@@ -7,7 +7,9 @@
 //   ReadDCSAliasMap() reads from a file
 //   CreateInputFilesMap() creates a list of local files, that can be accessed by the shuttle
   
-
+#include <iostream>
+#include <fstream>
+using namespace std;
 
 void TestGRPPreprocessor()
 {
@@ -58,14 +60,30 @@ void TestGRPPreprocessor()
   // Three files originating from different LDCs but with the same id are also added
   // Note that the test preprocessor name is TPC. The name of the detector's preprocessor must follow
   // the "online" naming convention ALICE-INT-2003-039.
-  shuttle->AddInputFile(AliShuttleInterface::kDAQ, "GRP", "Period_test000.tag.root", "GDC0", "runTags01.root");
-  shuttle->AddInputFile(AliShuttleInterface::kDAQ, "GRP", "Period_test001.tag.root", "GDC1", "runTags02.root");
-  shuttle->AddInputFile(AliShuttleInterface::kDAQ, "GRP", "Period_test002.tag.root", "GDC2", "runTags03.root");
-  
-  shuttle->AddInputFile(AliShuttleInterface::kDCS, "GRP", "CTP_runconfig", "DCS FXS", gSystem->ExpandPathName("$ALICE_ROOT/GRP/CTP/p-p.cfg"));
+  //shuttle->AddInputFile(AliShuttleInterface::kDAQ, "GRP", "Period_test000.tag.root", "GDC0", "runTags01.root");
+  //shuttle->AddInputFile(AliShuttleInterface::kDAQ, "GRP", "Period_test001.tag.root", "GDC1", "runTags02.root");
+  //shuttle->AddInputFile(AliShuttleInterface::kDAQ, "GRP", "Period_test002.tag.root", "GDC2", "runTags03.root");
+
+  shuttle->AddInputFile(AliShuttleInterface::kDAQ, "GRP", "run000021390_GRP_gdc0_Period_TDSMtest.Seq_0.tag.root", "GDC0", "$ALICE_ROOT/GRP/ShuttleInput/run000021390_GRP_gdc0_Period_TDSMtest.Seq_0.tag.root");
+  shuttle->AddInputFile(AliShuttleInterface::kDAQ, "GRP", "run000021390_GRP_gdc1_Period_TDSMtest.Seq_0.tag.root", "GDC1", "$ALICE_ROOT/GRP/ShuttleInput/run000021390_GRP_gdc0_Period_TDSMtest.Seq_0.tag.root");
+  shuttle->AddInputFile(AliShuttleInterface::kDAQ, "GRP", "run000021391_GRP_gdc0_Period_TDSMtest.Seq_0.tag.root", "GDC0", "$ALICE_ROOT/GRP/ShuttleInput/run000021391_GRP_gdc0_Period_TDSMtest.Seq_0.tag.root");
+  shuttle->AddInputFile(AliShuttleInterface::kDAQ, "GRP", "run000021391_GRP_gdc1_Period_TDSMtest.Seq_0.tag.root", "GDC1", "$ALICE_ROOT/GRP/ShuttleInput/run000021391_GRP_gdc1_Period_TDSMtest.Seq_0.tag.root");
+       
+  shuttle->AddInputFile(AliShuttleInterface::kDCS, "GRP", "CTP_runconfig", "", gSystem->ExpandPathName("$ALICE_ROOT/GRP/CTP/p-p.cfg"));
   shuttle->AddInputFile(AliShuttleInterface::kDCS, "GRP", "CTP_xcounters", "DCS FXS", gSystem->ExpandPathName("$ALICE_ROOT/GRP/CTP/xcounters.txt"));
   
-
+  Char_t * filename = gSystem->ExpandPathName("$ALICE_ROOT/GRP/CTP/p-p.cfg");
+  ifstream is;
+  is.open(filename);
+  is.seekg(0,ios::end);
+  int length = is.tellg();
+  const char *buffer = new char[length];
+  is.seekg(0,ios::beg);
+  is.read(buffer,length);
+  is.close();
+
+  shuttle->SetInputTriggerConfiguration(buffer);
+  
   // The shuttle can read run type stored in the DAQ logbook.
   // To test it, we must provide the run type manually. They will be retrieved in the preprocessor
   // using GetRunType function.
@@ -120,7 +138,7 @@ void TestGRPPreprocessor()
   chkEntry->GetObject()->Print();
   printf("\n\n");
 
-  AliDCSSensor* sen = (AliDCSSensor*)(((TMap*)chkEntry->GetObject())->GetValue("fMeyrinPressure"));
+  AliDCSSensor* sen = (AliDCSSensor*)(((TMap*)chkEntry->GetObject())->GetValue("fP2Pressure"));
   if(sen)
     sen->GetFit()->MakeGraph(1.5, 9.5, 15)->Draw();
 
@@ -143,7 +161,7 @@ TMap* CreateDCSAliasMap()
   //     <valueList> is a TObjArray of AliDCSValue
   //     An AliDCSValue consists of timestamp and a value in form of a AliSimpleValue
   
-  const Int_t fgknDCSDP = 11;
+  const Int_t fgknDCSDP = 10;
   const char* fgkDCSDataPoints[AliGRPPreprocessor::fgknDCSDP] = {
                    "LHCState",
                    "L3Polarity",
@@ -154,8 +172,7 @@ TMap* CreateDCSAliasMap()
                    "DipoleCurrent",
                    "CavernTemperature",
                    "CavernAtmosPressure",
-                   "gva_cr5AtmosphericPressure",
-                   "gva_meyrinAtmosphericPressure"
+                   "SurfaceAtmosPressure"
                  };
 
   TMap* aliasMap;
@@ -188,7 +205,8 @@ TMap* CreateDCSAliasMap()
   
   TRandom random;
 
-  for( int nAlias=3; nAlias<fgknDCSDP-2; nAlias++)  {
+  //  for( int nAlias=3; nAlias<fgknDCSDP-1; nAlias++)  {
+  for( int nAlias=3; nAlias<fgknDCSDP; nAlias++)  {
     valueSet = new TObjArray;
     valueSet->SetOwner(1);