From 27a53fea3bb570e823777e7db61e1855e55bdc65 Mon Sep 17 00:00:00 2001 From: arcelli Date: Wed, 18 Apr 2007 17:45:37 +0000 Subject: [PATCH] Updated setting of the storages --- TOF/TOFPreprocessor.C | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/TOF/TOFPreprocessor.C b/TOF/TOFPreprocessor.C index 7e4d9069865..a252f2fa009 100644 --- a/TOF/TOFPreprocessor.C +++ b/TOF/TOFPreprocessor.C @@ -10,6 +10,7 @@ $Id$ // ReadDCSAliasMap() reads from a file // CreateInputFilesMap() creates a list of local files, that can be accessed by the shuttle +extern TBenchmark *gBenchmark; void TOFPreprocessor() { gSystem->Load("$ALICE/SHUTTLE/TestShuttle/libTestShuttle.so"); @@ -18,15 +19,14 @@ void TOFPreprocessor() AliTestShuttle::SetMainCDB("local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB"); AliTestShuttle::SetMainRefStorage("local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestReference"); - // create AliTestShuttle instance AliTestShuttle* shuttle = new AliTestShuttle(0, 0, 1000); // Generation of "fake" input DCS data - TMap* dcsAliasMap = CreateDCSAliasMap(); + TMap* dcsAliasMap = CreateDCSAliasMap(); // now give the alias map to the shuttle - shuttle->SetDCSInput(dcsAliasMap); + shuttle->SetDCSInput(dcsAliasMap); // processing files. for the time being, the files are local. shuttle->AddInputFile(AliTestShuttle::kDAQ, "TOF", "DELAYS", "MON", "$ALICE_ROOT/TOF/ShuttleInput/Total.root"); @@ -36,17 +36,21 @@ void TOFPreprocessor() AliPreprocessor* pp = new AliTOFPreprocessor(shuttle); // preprocessing + gBenchmark->Start("process"); shuttle->Process(); + gBenchmark->Stop("process"); + gBenchmark->Print("process"); // checking the file which should have been created - AliCDBEntry* entry = AliCDBManager::Instance()->Get("TOF/Calib/OnlineDelay", 0); - if (!entry) + AliCDBEntry* chkEntry = AliCDBManager::Instance()->GetStorage(AliShuttleInterface::GetMainCDB()) + ->Get("TOF/Calib/OnlineDelay", 0); + if (!chkEntry) { printf("The file is not there. Something went wrong.\n"); return; } - AliTOFDataDCS* output = dynamic_cast (entry->GetObject()); + AliTOFDataDCS* output = dynamic_cast (chkEntry->GetObject()); // If everything went fine, draw the result if (output) output->Draw(); @@ -57,11 +61,14 @@ TMap* CreateDCSAliasMap() { // Creates a DCS structure // The structure is the following: - // TMap (key --> value) - // --> - // is a string - // is a TObjArray of AliDCSValue + // TMap (key --> value) + // --> + // is a string + // is a TObjArray of AliDCSValue + // An AliDCSValue consists of timestamp and a value in form of a AliSimpleValue + // In this example 6 aliases exists: DCSAlias1 ... DCSAlias6 + // Each contains 1000 values randomly generated by TRandom::Gaus + 5*nAlias TMap* aliasMap = new TMap; aliasMap->SetOwner(1); @@ -74,6 +81,14 @@ TMap* CreateDCSAliasMap() delete datime; Int_t iseed = TMath::Abs(10000 * pid + time - date); + //Float_t thrHVv=7.75, thrHVc=3, thrLVv=2.75, thrLVc=2.5, + //thrFEEthr=1.5, thrFEEt=10, thrTemp=35, thrPress=1000; + //Float_t tentHVv=6.75, tentHVc=2, tentLVv=1.75, tentLVc=1.5, + // tentFEEthr=0.5, te result=0; + //ntFEEt=20, tentTemp=25, tentPress=900; + //Float_t sigmaHVv=1, sigmaHVc=0.25, sigmaLVv=0.25, sigmaLVc=0.25, + // sigmaFEEthr=0.05, sigmaFEEt=5, sigmaTemp=1, sigmaPress=10; + Float_t tentHVv=6500, tentHVi=80, tentLVv=2.7, tentLVi=4.5, tentLVv33=3.3, tentLVv50=5.0, tentLVv48=48, tentLVi33=100, tentLVi50=3.0, tentLVi48=10, -- 2.43.0