read from the run logbook.
TestShuttle setup updated.
TRD data point configuration updated.
Log("ERROR: No DCS map provided by SHUTTLE!");
return 1;
}
-
+
// The processing of the DCS input data is forwarded to AliTestDataDCS
fData->ProcessData(*dcsAliasMap);
// Example of how to retrieve the list of sources that produced the file with id DRIFTVELOCITY
TList* sourceList = GetFileSources(kDAQ, "DRIFTVELOCITY");
+ sourceList = GetFileSources(kHLT, "HLTData");
if (!sourceList)
{
- Log("Error: No sources found for id DRIFTVELOCITY!");
- return 1;
+ Log("Error retrieving list of sources from FXS!");
+ return 1;
}
-
- // TODO We have the list of sources that produced the files with Id DRIFTVELOCITY.
+
+ if (sourceList->GetEntries() == 0)
+ {
+ Log("No sources found for id HLTData!");
+ // TODO What to do now depends on the expected behaviour of the
+ // online DA: if it expected to produce data for the FXS every run, then
+ // if no sources are found it means a problem happened and you should return error;
+ // if DA may or may not send files to FXS, then you shouldn't return error
+ // and go on with the analysis!
+ return 1;
+ }
+
+ // TODO We have the list of sources that produced the files with Id DRIFTVELOCITY.
// Now we will loop on the list and we'll query the files one by one.
Log("The following sources produced files with the id DRIFTVELOCITY");
sourceList->Print();
delete sourceList;
+ // Example of retrieving files from HLT, including how to query HLT status
+
+ Bool_t hltStatus = GetHLTStatus(); // 1 = HLT ON (=> Query HLT), 0 = HLT OFF (=> skip HLT query)
+
+ if (hltStatus)
+ {
+ Log("HLT is ON, let's query our files");
+ sourceList = GetFileSources(kHLT, "HLTData");
+ if (!sourceList)
+ {
+ Log("Error retrieving list of sources from FXS!");
+ return 1;
+ }
+
+ if (sourceList->GetEntries() == 0)
+ {
+ Log("No sources found for id HLTData!");
+ // TODO What to do now depends on the expected behaviour of the
+ // online DA: if it expected to produce data for the FXS every run, then
+ // if no sources are found it means a problem happened and you should return error;
+ // if DA may or may not send files to FXS, then you shouldn't return error
+ // and go on with the analysis!
+ return 1;
+ }
+ Log("The following sources produced files with the id HLTData");
+
+ sourceList->Print();
+
+ TIter iter(sourceList);
+ TObjString *source = 0;
+ while((source=dynamic_cast<TObjString*> (iter.Next()))){
+ TString fileName = GetFile(kHLT, "HLTData", source->GetName());
+ if (fileName.Length() > 0)
+ Log(Form("Got the file %s from HLT, now we can extract some values.", fileName.Data()));
+ }
+
+ delete sourceList;
+
+ } else {
+ Log("HLT is OFF, skipping query...");
+ }
+
// Example of how to retrieve the list of sources that produced files
sourceList = GetFileSources(kDAQ);
if (!sourceList)
{
Log("No object found in OCDB!");
} else {
- TObjString *obj = dynamic_cast<TObjString*> (entry->GetObject());
- Log(Form("Got TPC/Calib/Data object from OCDB. The object says: %s",obj->GetName()));
+ Log("Got TPC/Calib/Data object from OCDB. The object's metadata is: ");
+ entry->PrintMetaData();
}
/*
$Log$
+Revision 1.13 2007/05/30 06:35:21 jgrosseo
+Adding functionality to the Shuttle/TestShuttle:
+o) Function to retrieve list of sources from a given system (GetFileSources with id=0)
+o) Function to retrieve list of IDs for a given source (GetFileIDs)
+These functions are needed for dealing with the tag files that are saved for the GRP preprocessor
+Example code has been added to the TestProcessor in TestShuttle
+
Revision 1.12 2007/04/27 07:06:48 jgrosseo
GetFileSources returns empty list in case of no files, but successful query
No mails sent in testmode
// get a run parameter
//
- return fRunType;
+ return fRunType.Data();
}
//______________________________________________________________________________________________
void SetDCSInput(TMap* dcsAliasMap) { fDcsAliasMap = dcsAliasMap; }
void AddInputRunParameter(const char* key, const char* value);
void SetInputRunType(const char* runType) { fRunType = runType; }
+ void SetInputHLTStatus(Bool_t status) { fHLTStatus = status; }
Bool_t AddInputCDBEntry(AliCDBEntry* entry);
void Process();
virtual const char* GetRunParameter(const char* key);
virtual AliCDBEntry* GetFromOCDB(const char* detector, const AliCDBPath& path);
virtual const char* GetRunType();
+ virtual Bool_t GetHLTStatus() {return fHLTStatus;}
virtual void Log(const char* detector, const char* message);
virtual void RegisterPreprocessor(AliPreprocessor* preprocessor);
TMap* fInputFiles; // files for GetFile, GetFileSources
TMap* fRunParameters; // run parameters
TString fRunType; // run type
+ Bool_t fHLTStatus; // HLT status for current run (on=1/off=0)
TObjArray* fPreprocessors; // list of preprocessors that are to be tested
TMap* fDcsAliasMap; // DCS data for testing
shuttle->AddInputFile(AliShuttleInterface::kDAQ, "TPC", "DRIFTVELOCITY", "LDC0", "file2a.root");
shuttle->AddInputFile(AliShuttleInterface::kDAQ, "TPC", "DRIFTVELOCITY", "LDC1", "file2b.root");
shuttle->AddInputFile(AliShuttleInterface::kDAQ, "TPC", "DRIFTVELOCITY", "LDC2", "file2c.root");
+ shuttle->AddInputFile(AliShuttleInterface::kHLT, "TPC", "HLTData", "source1", "hlt_file1.root");
+ shuttle->AddInputFile(AliShuttleInterface::kHLT, "TPC", "HLTData", "source2", "hlt_file2.root");
// TODO(3)
//
// TODO(5)
//
- // The shuttle can query condition parameters valid from the current run from the OCDB
- // To test it, we must first store the object into the OCDB. It will be retrieved in the preprocessor
- // using GetFromOCDB function.
+ // The shuttle can read run parameters stored in the DAQ run logbook.
+ // To test it, we must provide the run parameters manually. They will be retrieved in the preprocessor
+ // using GetRunParameter function.
+ shuttle->AddInputRunParameter("totalEvents", "30000");
+ shuttle->AddInputRunParameter("NumberOfGDCs", "15");
- TObjString obj("This is a condition parameter stored in OCDB");
- AliCDBId id("TPC/Calib/Data", 0, AliCDBRunRange::Infinity());
- AliCDBMetaData md;
- AliCDBEntry entry(&obj, id, &md);
+ // TODO(6) NEW!
+ //
+ // This is for preprocessor that require data from HLT.
+ // Since HLT may be switched off, the preprocessor should first query the Run logbook where
+ // the HLT status is stored. SHUTTLE implements a shortcut function (GetHLTStatus) that returns
+ // a bool directly. 1 = HLT ON, 0 = HLT OFF
+ //
- shuttle->AddInputCDBEntry(&entry);
+ Bool_t hltStatus=kTRUE;
+ shuttle->SetInputHLTStatus(hltStatus);
- // TODO(6)
+ // TODO(7)
// Create the preprocessor that should be tested, it registers itself automatically to the shuttle
AliPreprocessor* test = new AliTestPreprocessor(shuttle);
// Test the preprocessor
shuttle->Process();
- // TODO(7)
+ // TODO(8)
// In the preprocessor AliShuttleInterface::Store should be called to put the final
// data to the CDB. To check if all went fine have a look at the files produced in
// $ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB/<detector>/SHUTTLE/Data
objectClass: AliShuttleDetector
det: TRD
StrictRunOrder: 0
-responsible: not_yet_set
+responsible: r.bailhache@gsi.de
DCSHost: aldcs052.cern.ch
DCSPort: 4242
DCSalias: trd_chamberByteStatus[000..539]
DCSalias: trd_goofyHv
-DCSalias: trd_goofyPeakPos00
-DCSalias: trd_goofyPeakPos01
+DCSalias: trd_goofyPeakPos[00..01]
DCSalias: trd_goofyPeakArea[00..01]
DCSalias: trd_goofyTemp[00..01]
DCSalias: trd_goofyPressure
DCSalias: trd_hvAnodeUmon[000..539]
DCSalias: trd_hvDriftUmon[000..539]
DCSalias: trd_adcClkPhase
-DCSalias: trd_atmPressure
-DCSalias: trd_luminosity
-DCSalias: trd_magneticField
-#DCSalias: trd_preTrigger