Revision: | 1.6 |
Committed: | Mon Sep 21 19:29:59 2009 UTC (15 years, 7 months ago) by loizides |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, V07-05-00, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, ConvRejection-10-06-09, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a, Mit_008, HEAD |
Branch point for: | Mit_025c_branch |
Changes since 1.5: | +6 -2 lines |
Log Message: | Provided independent access to compress/decompress functions. |
# | Content |
---|---|
1 | //-------------------------------------------------------------------------------------------------- |
2 | // $Id: OptInt.h,v 1.5 2009/03/04 07:24:49 loizides Exp $ |
3 | // |
4 | // OptInt |
5 | // |
6 | // Interface to set some of the optimized IO parameters. Use Compress or Decompress |
7 | // to compress or decompress data. |
8 | // |
9 | // The following zip modes are supported: |
10 | // Set ZipMode to be used in R__zip. Supported values range from 1 to 5, where |
11 | // 1 == gzip (http://www.gzip.org/, standard in ROOT) |
12 | // 2 == bzip2 (http://www.bzip.org/) |
13 | // 3 == lzo (http://www.oberhumer.com/opensource/lzo/) |
14 | // 4 == rle (http://bcl.comli.eu/) |
15 | // 5 == lzma (http://www.7-zip.org/sdk.html) |
16 | // 99 == combination of 1 to 5. |
17 | // |
18 | // Additionally you can specify the compression fraction that must be reached to accept result of |
19 | // the "heavy" compression algorithms. Negative values turn off usage of the specific compression |
20 | // algorithm in ZipMode=99. |
21 | // |
22 | // In order to make use of all of this, make sure you preload MitCommonOptIO.so. This can be |
23 | // achieved by setting LD_PRELOAD to $CMSSW_BASE/lib/$SCRAM_ARCH/libMitCommonOptIO.so. |
24 | // |
25 | // In additon, you can use .rootrc, for example like |
26 | // Root.ZipMode: 5 |
27 | // Root.OptIO.Verbose: 0 |
28 | // Root.OptIO.SMalloc: 0 |
29 | // Root.OptIO.LzoFraction: 1 |
30 | // Root.OptIO.GzipFraction: 1 |
31 | // Root.OptIO.BzipFraction: 1 |
32 | // Root.OptIO.LzmaFraction: 1 |
33 | // |
34 | // Authors: C.Loizides |
35 | //-------------------------------------------------------------------------------------------------- |
36 | |
37 | #ifndef MITCOMMON_OPTIO_OPTINT_H |
38 | #define MITCOMMON_OPTIO_OPTINT_H |
39 | |
40 | #include <TObject.h> |
41 | |
42 | namespace mithep |
43 | { |
44 | class OptInt |
45 | { |
46 | public: |
47 | OptInt() {} |
48 | |
49 | static Int_t Compress(Int_t srcsize, char *src, Int_t tgtsize, char *tgt, |
50 | Int_t cl, Int_t method=-1); |
51 | static Int_t DeCompress(Int_t srcsize, char *src, Int_t tgtsize, char *tgt); |
52 | static Bool_t IsActivated(); |
53 | static void SetAlgoFractions(Double_t lzo, Double_t gz, Double_t bz, Double_t lzma); |
54 | static void SetBzipFraction(Double_t f); |
55 | static void SetGzipFraction(Double_t f); |
56 | static void SetLzmaFraction(Double_t f); |
57 | static void SetLzoFraction(Double_t f); |
58 | static void SetStaticMalloc(Bool_t b); |
59 | static void SetVerbose(Int_t vl); |
60 | static void SetZipMode(Int_t zm); |
61 | |
62 | ClassDef(OptInt, 0) // Interface to OptIO parameters |
63 | }; |
64 | } |
65 | #endif |