adding first sketch of a DCS publisher component for global HLT data points
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Mar 2010 08:34:14 +0000 (08:34 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Mar 2010 08:34:14 +0000 (08:34 +0000)
not yet activated, needs to be finalized

HLT/global/AliHLTGlobalDCSPublisherComponent.cxx [new file with mode: 0644]
HLT/global/AliHLTGlobalDCSPublisherComponent.h [new file with mode: 0644]
HLT/libAliHLTGlobal.pkg

diff --git a/HLT/global/AliHLTGlobalDCSPublisherComponent.cxx b/HLT/global/AliHLTGlobalDCSPublisherComponent.cxx
new file mode 100644 (file)
index 0000000..8112dca
--- /dev/null
@@ -0,0 +1,131 @@
+// $Id$
+
+//**************************************************************************
+//* This file is property of and copyright by the ALICE HLT Project        * 
+//* ALICE Experiment at CERN, All rights reserved.                         *
+//*                                                                        *
+//* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no>        *
+//*                  for The ALICE HLT Project.                            *
+//*                                                                        *
+//* Permission to use, copy, modify and distribute this software and its   *
+//* documentation strictly for non-commercial purposes is hereby granted   *
+//* without fee, provided that the above copyright notice appears in all   *
+//* copies and that both the copyright notice and this permission notice   *
+//* appear in the supporting documentation. The authors make no claims     *
+//* about the suitability of this software for any purpose. It is          *
+//* provided "as is" without express or implied warranty.                  *
+//**************************************************************************
+
+/** @file   AliHLTGlobalDCSPublisherComponent.cxx
+    @author Matthias Richter
+    @date   20010-03-10
+    @brief  DIM publisher component for global HLT data
+*/
+
+#include "AliHLTGlobalDCSPublisherComponent.h"
+#include "AliHLTDimServer.h"
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTGlobalDCSPublisherComponent)
+
+AliHLTGlobalDCSPublisherComponent::AliHLTGlobalDCSPublisherComponent()
+  : AliHLTDataSink()
+  , fpServer(NULL)
+{
+  // see header file for class documentation
+  // or
+  // refer to README to build package
+  // or
+  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+}
+
+AliHLTGlobalDCSPublisherComponent::~AliHLTGlobalDCSPublisherComponent()
+{
+  // see header file for class documentation
+
+  // file list and file name list are owner of their objects and
+  // delete all the objects
+}
+
+const char* AliHLTGlobalDCSPublisherComponent::GetComponentID()
+{
+  // see header file for class documentation
+  return "DCSPublisher";
+}
+
+void AliHLTGlobalDCSPublisherComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
+{
+  // see header file for class documentation
+  list.clear();
+  list.push_back(kAliHLTAnyDataType);
+}
+
+AliHLTComponent* AliHLTGlobalDCSPublisherComponent::Spawn()
+{
+  // see header file for class documentation
+  return new AliHLTGlobalDCSPublisherComponent;
+}
+
+int AliHLTGlobalDCSPublisherComponent::DoInit( int argc, const char** argv )
+{
+  // see header file for class documentation
+  int iResult=0;
+  iResult=ConfigureFromArgumentString(argc, argv);
+
+  return iResult;
+}
+
+int AliHLTGlobalDCSPublisherComponent::ScanConfigurationArgument(int argc, const char** argv)
+{
+  // see header file for class documentation
+  int iResult=0;
+
+  // -servername
+  if (argc==0) return 0;
+  int i=0;
+  const char* serverName=NULL;
+  const char* dimdns=NULL;
+  TString argument=argv[0];
+  if (argument.CompareTo("-servername")==0) {
+    if (++i>=argc) return -EPROTO;
+    serverName=argv[i];
+
+    // --dimdns
+  } else if (argument.BeginsWith("-dimdns")) {
+    if (++i>=argc) return -EPROTO;
+    dimdns=argv[i];
+
+  } else {
+    return -EINVAL;
+  }
+
+  fpServer=new AliHLTDimServer(serverName);
+  if (!fpServer) return -ENOMEM;
+  if ((iResult=fpServer->Init(dimdns))>=0) {
+    // add services
+
+    iResult=fpServer->Start();
+  }
+
+  return iResult;
+}
+
+int AliHLTGlobalDCSPublisherComponent::DoDeinit()
+{
+  // see header file for class documentation
+  int iResult=0;
+  if (!fpServer) return -ENODEV;
+  fpServer->Stop();
+  delete fpServer;
+  fpServer=NULL;
+
+  return iResult;
+}
+
+int AliHLTGlobalDCSPublisherComponent::DumpEvent( const AliHLTComponentEventData& /*evtData*/,
+                                                 AliHLTComponentTriggerData& /*trigData*/ )
+{
+  // see header file for class documentation
+  int iResult=0;
+  return iResult;
+}
diff --git a/HLT/global/AliHLTGlobalDCSPublisherComponent.h b/HLT/global/AliHLTGlobalDCSPublisherComponent.h
new file mode 100644 (file)
index 0000000..36bf9e3
--- /dev/null
@@ -0,0 +1,67 @@
+//-*- Mode: C++ -*-
+// $Id$
+
+#ifndef ALIHLTGLOBALDCSPUBLISHERCOMPONENT_H
+#define ALIHLTGLOBALDCSPUBLISHERCOMPONENT_H
+
+//* This file is property of and copyright by the ALICE HLT Project        * 
+//* ALICE Experiment at CERN, All rights reserved.                         *
+//* See cxx source for full Copyright notice                               *
+
+/** @file   AliHLTGlobalDCSPublisherComponent.h
+    @author Matthias Richter
+    @date   20010-03-10
+    @brief  DIM publisher component for global HLT data
+*/
+#include "AliHLTDataSink.h"
+
+class AliHLTDimServer;
+
+/**
+ * @class AliHLTGlobalDCSPublisherComponent
+ * DIM Publisher component for global HLT data.
+ * It implements a DIM server which publishes global HLT data through the
+ * following services:
+ * - Vertex_X
+ * - Vertex_Y
+ * - Vertex_Z
+ * - ResVertex_X
+ * - ResVertex_Y
+ * - ResVertex_Z
+ * 
+ */
+class AliHLTGlobalDCSPublisherComponent : public AliHLTDataSink {
+public:
+  AliHLTGlobalDCSPublisherComponent();
+  ~AliHLTGlobalDCSPublisherComponent();
+
+  virtual const char* GetComponentID();
+  virtual void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
+  virtual AliHLTComponent* Spawn();
+
+ protected:
+  /// component initialization
+  int DoInit( int argc, const char** argv );
+
+  /// component cleanup
+  int DoDeinit();
+
+  /// Data processing method for the component.
+  virtual int DumpEvent( const AliHLTComponentEventData& evtData,
+                        AliHLTComponentTriggerData& trigData );
+
+  using AliHLTDataSink::DumpEvent;
+
+  int ScanConfigurationArgument(int argc, const char** argv);
+
+private:
+  /// copy constructor not permitted
+  AliHLTGlobalDCSPublisherComponent(const AliHLTGlobalDCSPublisherComponent&);
+  /// assignment operator not permitted
+  AliHLTGlobalDCSPublisherComponent& operator=(const AliHLTGlobalDCSPublisherComponent&);
+
+  AliHLTDimServer* fpServer; //! dim server instance
+
+  ClassDef(AliHLTGlobalDCSPublisherComponent, 0)
+};
+#endif
index 5cae14197bed936a35bf74f04588e6647821ffdb..19f715a68a5fa0936c606fe5f918e8e41d38f91b 100644 (file)
@@ -5,6 +5,7 @@ CLASS_HDRS:=    AliHLTGlobalEsdConverterComponent.h \
                AliHLTGlobalTrackMergerComponent.h \
                AliHLTGlobalTrackMerger.h \
                AliHLTGlobalAgent.h \
+               AliHLTGlobalDCSPublisherComponent.h \
                AliHLTGlobalVertexerComponent.h \
                AliHLTGlobalTrackMatcher.h \
                AliHLTGlobalTrackMatcherComponent.h \