]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
adding skeleton of wrapper class for HLT online configuration to be stored
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 28 Sep 2010 12:16:00 +0000 (12:16 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 28 Sep 2010 12:16:00 +0000 (12:16 +0000)
in OCDB, class needs to be implemented

HLT/BASE/AliHLTOnlineConfiguration.cxx [new file with mode: 0644]
HLT/BASE/AliHLTOnlineConfiguration.h [new file with mode: 0644]
HLT/BASE/HLTbaseLinkDef.h
HLT/libHLTbase.pkg

diff --git a/HLT/BASE/AliHLTOnlineConfiguration.cxx b/HLT/BASE/AliHLTOnlineConfiguration.cxx
new file mode 100644 (file)
index 0000000..261f6a1
--- /dev/null
@@ -0,0 +1,106 @@
+// $Id$
+
+//**************************************************************************
+//* This file is property of and copyright by the ALICE HLT Project        * 
+//* ALICE Experiment at CERN, All rights reserved.                         *
+//*                                                                        *
+//* Primary Authors:                                                       *
+//*                  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   
+/// @author 
+/// @date   
+/// @brief  
+///
+
+#include "AliHLTOnlineConfiguration.h"
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTOnlineConfiguration)
+
+AliHLTOnlineConfiguration::AliHLTOnlineConfiguration()
+  : TObject()
+  , fXMLBuffer()
+{
+  // see header file for class documentation
+  // or
+  // refer to README to build package
+  // or
+  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+}
+
+AliHLTOnlineConfiguration::~AliHLTOnlineConfiguration()
+{
+  // destructor
+}
+
+int AliHLTOnlineConfiguration::LoadConfiguration(const char* /*filename*/)
+{
+  /// load configuration from file
+
+  return 0;
+}
+
+int AliHLTOnlineConfiguration::Compress()
+{
+  /// compress the xml buffer
+
+  return 0;
+}
+
+int AliHLTOnlineConfiguration::Uncompress()
+{
+  /// compress the xml buffer
+
+  return 0;
+}
+
+void AliHLTOnlineConfiguration::Print(const char* options) const
+{
+  /// overloaded from TObject, print info
+
+  TObject::Print(options);
+}
+
+void AliHLTOnlineConfiguration::Dump() const
+{
+  /// overloaded from TObject, more crude data dump
+
+  TObject::Dump();
+}
+
+void AliHLTOnlineConfiguration::Clear(Option_t * option)
+{
+  /// overloaded from TObject, clear object
+
+  TObject::Clear(option);
+}
+
+TObject * AliHLTOnlineConfiguration::Clone(const char *newname) const
+{
+  /// overloaded from TObject, clone object
+
+  return TObject::Clone(newname);
+}
+
+void AliHLTOnlineConfiguration::Copy(TObject &object) const
+{
+  /// overloaded from TObject, copy object
+
+  TObject::Copy(object);
+}
+
+void AliHLTOnlineConfiguration::Draw(Option_t */*option*/)
+{
+  /// overloaded from TObject, draw graph of the configuration
+}
diff --git a/HLT/BASE/AliHLTOnlineConfiguration.h b/HLT/BASE/AliHLTOnlineConfiguration.h
new file mode 100644 (file)
index 0000000..68f5ef0
--- /dev/null
@@ -0,0 +1,86 @@
+//-*- Mode: C++ -*-
+// $Id$
+
+#ifndef ALIHLTONLINECONFIGURATION_H
+#define ALIHLTONLINECONFIGURATION_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   AliHLTOnlineConfiguration.h
+//  @author 
+//  @date   
+//  @brief  
+//  @note   
+
+#include "TObject.h"
+#include "TArrayC.h"
+
+/**
+ * @class AliHLTOnlineConfiguration
+ * @brief Description of the HLT online configuration
+ * This class wraps an online HLT configuration file for storage in a
+ * CDB object.
+ *
+ * Ideas:
+ * The class provides easy access to the XML tags of the configuration through
+ * an XML parser.
+ *
+ * The online configuration is translated into a tree like configuration
+ * structure. The Draw function can be used to create a graph.
+ *
+ * The xml configuration is loaded into an internal TArrayC buffer, which
+ * is automatically compressed depending on the compression level used for
+ * root file storage. Later extension will be the implementation of a custom
+ * Streamer function implementing the most efficient compression.
+ */
+class AliHLTOnlineConfiguration : public TObject {
+ public:
+  /// standard constructor
+  AliHLTOnlineConfiguration();
+  /// destructor
+  virtual ~AliHLTOnlineConfiguration();
+
+  /// load configuration from file
+  int LoadConfiguration(const char* filename);
+
+  /// compress the xml buffer
+  int Compress();
+
+  /// compress the xml buffer
+  int Uncompress();
+
+  /// overloaded from TObject, print info
+  virtual void        Print(const char* options) const;
+
+  /// overloaded from TObject, more crude data dump
+  virtual void        Dump() const;
+
+  /// overloaded from TObject, clear object
+  virtual void        Clear(Option_t * option="");
+
+  /// overloaded from TObject, clone object
+  virtual TObject    *Clone(const char *newname="") const;
+
+  /// overloaded from TObject, copy object
+  virtual void        Copy(TObject &object) const;
+
+  /// overloaded from TObject, draw graph of the configuration
+  virtual void        Draw(Option_t *option="");
+
+  /// custom status bits of TObject
+  /// bit 14 to 23 can be freely used
+  /// use functions SetBit, ResetBit, TestBit
+  enum {
+    kLoaded          = BIT(14),   // xml buffer is loaded
+    kCompressed      = BIT(15),   // xml buffer is compressed
+    kParsed          = BIT(16),   // already parsed
+  };
+
+ private:
+  TArrayC fXMLBuffer; // buffer for XML configuration
+
+  ClassDef(AliHLTOnlineConfiguration, 1); // description of HLT online configuration
+};
+
+#endif
index 9ece9676bea854d88beaa65f9b85292ad6a03e55..fa7dd2b6fcc2e1862caec5cdd7b524d4bb6a8ad9 100644 (file)
@@ -12,6 +12,7 @@
 #pragma link C++ class AliHLTCalibrationProcessor+;
 #pragma link C++ class AliHLTConfiguration+;
 #pragma link C++ class AliHLTConfigurationHandler+;
+#pragma link C++ class AliHLTOnlineConfiguration+;
 #pragma link C++ class AliHLTTTreeProcessor+;
 #pragma link C++ class AliHLTTask+;
 #pragma link C++ class AliHLTDumpTask+;
index 54b60f351139ba4e24110a5658aec3198855d3dd..745b6993e9eef39aabab638cb0578e68309ba41a 100644 (file)
@@ -13,6 +13,7 @@ CLASS_HDRS:=          AliHLTComponent.h \
                AliHLTCalibrationProcessor.h \
                AliHLTConfiguration.h \
                AliHLTConfigurationHandler.h \
+               AliHLTOnlineConfiguration.h \
                AliHLTTTreeProcessor.h \
                AliHLTTask.h \
                AliHLTDumpTask.h \