]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
event type specification 35 defined for ReadPreprocessor event and handling implement...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Feb 2008 13:04:50 +0000 (13:04 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Feb 2008 13:04:50 +0000 (13:04 +0000)
HLT/BASE/AliHLTComponent.cxx
HLT/BASE/AliHLTComponent.h
HLT/BASE/AliHLTDataTypes.h
HLT/BASE/AliHLTMessage.h

index 5df05b06d00aaf428ca71a52c6fa7e28a2eb5e72..8a1e1ff93a06ee322fb92d3aa3ee4d7640f6fe87 100644 (file)
@@ -1163,7 +1163,8 @@ int AliHLTComponent::ProcessEvent( const AliHLTComponentEventData& evtData,
        indexUpdtDCSEvent=i;
       } else if (fpInputBlocks[i].fDataType==kAliHLTDataTypeEvent) {
        eventType=fpInputBlocks[i].fSpecification;
-       bSkipDataProcessing=fpInputBlocks[i].fSpecification==gkAliEventTypeConfiguration;
+       bSkipDataProcessing|=(fpInputBlocks[i].fSpecification==gkAliEventTypeConfiguration);
+       bSkipDataProcessing|=(fpInputBlocks[i].fSpecification==gkAliEventTypeReadPreprocessor);
       }
     }
     if (indexSOREvent>=0) {
@@ -1212,13 +1213,13 @@ int AliHLTComponent::ProcessEvent( const AliHLTComponentEventData& evtData,
        HLTWarning("reconfiguration of component %p (%s) failed with error code %d", this, GetComponentID(), tmpResult);
       }
     }
-    if (indexUpdtDCSEvent>=0) {
+    if (indexUpdtDCSEvent>=0 || eventType==gkAliEventTypeReadPreprocessor) {
       TString modules;
       if (fpInputBlocks[indexUpdtDCSEvent].fPtr!=NULL && fpInputBlocks[indexUpdtDCSEvent].fSize>0) {
        modules.Append(reinterpret_cast<const char*>(fpInputBlocks[indexUpdtDCSEvent].fPtr), fpInputBlocks[indexUpdtDCSEvent].fSize);
       }
-      HLTDebug("received preprocessor update command: detectors %s", modules.IsNull()?"none":modules.Data());
-      int tmpResult=ReadPreprocessorValues(modules[0]==0?NULL:modules.Data());
+      HLTDebug("received preprocessor update command: detectors %s", modules.IsNull()?"ALL":modules.Data());
+      int tmpResult=ReadPreprocessorValues(modules[0]==0?"ALL":modules.Data());
       if (tmpResult<0) {
        HLTWarning("preprocessor update of component %p (%s) failed with error code %d", this, GetComponentID(), tmpResult);
       }
index ac4cd551d92de4c11caa7cc1cbbcf58cb4d7773f..e646cb8a07141196b8ba20f29779472e6d5c7614 100644 (file)
@@ -638,7 +638,8 @@ class AliHLTComponent : public AliHLTLogging {
    * updated data points. The component has to implement the CDB access to
    * get the desired data points.
    * @param modules     detectors for which the Preprocessors have updated
-   *                    data points: TPC, TRD, ITS, PHOS, MUON
+   *                    data points: TPC, TRD, ITS, PHOS, MUON, or ALL if
+   *                    no argument was received.
    * @return neg. error code if failed
    */
   virtual int ReadPreprocessorValues(const char* modules);
index ade5c46b64af27aa2781e767317225ba918e850e..37901c5dedc5262e8675c497fdf30315b0a14d4e 100644 (file)
@@ -379,6 +379,8 @@ extern "C" {
   static const AliHLTUInt32_t gkAliEventTypeDataReplay=32;
   /** Configuration eventType specification */
   static const AliHLTUInt32_t gkAliEventTypeConfiguration=34;
+  /** Update DCS eventType specification */
+  static const AliHLTUInt32_t gkAliEventTypeReadPreprocessor=35;
   /** Tick eventType specification */ 
   static const AliHLTUInt32_t gkAliEventTypeTick=64;
   /** Max eventType specification */ 
index eee183671359f0aaef0d4a2008ff79d18fda5d73..90a89001a22c37348626777da214d4fa27d4c4ad 100644 (file)
  * data block received via the HOMER interface or from the file writer.
  * <pre>
  *  AliHLTMessage msg(buffer, size);
- *  TObject pObj=msg.ReadObject(msg.GetClass());
+ *  TObject* pObj=msg.ReadObject(msg.GetClass());
  * </pre>
+ *
+ * A simple test macro for a file can look like
+ * <pre>
+ *  const char* filename="TPC_804.ddl";
+ *  //const char* filename="TPC_768.ddl";
+ *  TString param=filename;
+ *  param+="?filetype=raw";
+ *  TFile file(param);
+ *  if (file.IsZombie()) {
+ *    cout << "can not open file " << filename << endl;
+ *    return;
+ *  }
+ *  
+ *  TArrayC buffer(file.GetSize());
+ *  TArrayC tgtbuffer(file.GetSize());
+ *  if (file.ReadBuffer(buffer.GetArray(), buffer.GetSize())) {
+ *    cout << "error reading file " << filename << endl;
+ *    return;
+ *  }
+ *
+ *  AliHLTMessage msg(buffer.GetArray(), buffer.GetSize());
+ *  TObject* pObj=msg.ReadObject(msg.GetClass());
+ * </pre>
+ *
+ * @see AliHLTRootFileWriterComponent for an easy way to save objects
+ * exported via AliHLTMessage in a ROOT file.
  */
 class AliHLTMessage 
 :