]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/AliHLTOnlineConfiguration.h
implementing the copy contructors for two helper classes because compiler on macos...
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTOnlineConfiguration.h
1 //-*- Mode: C++ -*-
2 // $Id$
3
4 #ifndef ALIHLTONLINECONFIGURATION_H
5 #define ALIHLTONLINECONFIGURATION_H
6 //* This file is property of and copyright by the ALICE HLT Project        * 
7 //* ALICE Experiment at CERN, All rights reserved.                         *
8 //* See cxx source for full Copyright notice                               *
9
10 //  @file   AliHLTOnlineConfiguration.h
11 //  @author 
12 //  @date   
13 //  @brief  
14 //  @note   
15
16 #include "TObject.h"
17 #include "TArrayC.h"
18
19 /**
20  * @class AliHLTOnlineConfiguration
21  * @brief Description of the HLT online configuration
22  * This class wraps an online HLT configuration file for storage in a
23  * CDB object.
24  *
25  * Ideas:
26  * The class provides easy access to the XML tags of the configuration through
27  * an XML parser.
28  *
29  * The online configuration is translated into a tree like configuration
30  * structure. The Draw function can be used to create a graph.
31  *
32  * The xml configuration is loaded into an internal TArrayC buffer, which
33  * is automatically compressed depending on the compression level used for
34  * root file storage. Later extension will be the implementation of a custom
35  * Streamer function implementing the most efficient compression.
36  */
37 class AliHLTOnlineConfiguration : public TObject {
38  public:
39   /// standard constructor
40   AliHLTOnlineConfiguration();
41   /// destructor
42   virtual ~AliHLTOnlineConfiguration();
43
44   /// load configuration from file
45   int LoadConfiguration(const char* filename);
46
47   /// compress the xml buffer
48   int Compress();
49
50   /// compress the xml buffer
51   int Uncompress();
52
53   /// overloaded from TObject, print info
54   virtual void        Print(const char* options) const;
55
56   /// overloaded from TObject, more crude data dump
57   virtual void        Dump() const;
58
59   /// overloaded from TObject, clear object
60   virtual void        Clear(Option_t * option="");
61
62   /// overloaded from TObject, clone object
63   virtual TObject    *Clone(const char *newname="") const;
64
65   /// overloaded from TObject, copy object
66   virtual void        Copy(TObject &object) const;
67
68   /// overloaded from TObject, draw graph of the configuration
69   virtual void        Draw(Option_t *option="");
70
71   /// custom status bits of TObject
72   /// bit 14 to 23 can be freely used
73   /// use functions SetBit, ResetBit, TestBit
74   enum {
75     kLoaded          = BIT(14),   // xml buffer is loaded
76     kCompressed      = BIT(15),   // xml buffer is compressed
77     kParsed          = BIT(16),   // already parsed
78   };
79
80  private:
81   TArrayC fXMLBuffer; // buffer for XML configuration
82   UInt_t fXMLSize;
83
84   ClassDef(AliHLTOnlineConfiguration, 1); // description of HLT online configuration
85 };
86
87 #endif