Line data Source code
1 : // $Id$
2 :
3 : //**************************************************************************
4 : //* This file is property of and copyright by the ALICE HLT Project *
5 : //* ALICE Experiment at CERN, All rights reserved. *
6 : //* *
7 : //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8 : //* for The ALICE HLT Project. *
9 : //* *
10 : //* Permission to use, copy, modify and distribute this software and its *
11 : //* documentation strictly for non-commercial purposes is hereby granted *
12 : //* without fee, provided that the above copyright notice appears in all *
13 : //* copies and that both the copyright notice and this permission notice *
14 : //* appear in the supporting documentation. The authors make no claims *
15 : //* about the suitability of this software for any purpose. It is *
16 : //* provided "as is" without express or implied warranty. *
17 : //**************************************************************************
18 :
19 : /// @file AliHLTObjectCompressionComponent.cxx
20 : /// @author Matthias Richter
21 : /// @date 2009-11-09
22 : /// @brief Component for compression adaption of TObjects
23 : ///
24 :
25 : //#include <cstdlib>
26 : //#include <cassert>
27 : #include "AliHLTObjectCompressionComponent.h"
28 :
29 : /** ROOT macro for the implementation of ROOT specific class methods */
30 8 : ClassImp(AliHLTObjectCompressionComponent)
31 :
32 : AliHLTObjectCompressionComponent::AliHLTObjectCompressionComponent()
33 3 : : AliHLTProcessor()
34 15 : {
35 : // see header file for class documentation
36 : // or
37 : // refer to README to build package
38 : // or
39 : // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
40 6 : }
41 :
42 : AliHLTObjectCompressionComponent::~AliHLTObjectCompressionComponent()
43 12 : {
44 : // see header file for class documentation
45 12 : }
46 :
47 : void AliHLTObjectCompressionComponent::GetInputDataTypes(AliHLTComponentDataTypeList& list)
48 : {
49 : // see header file for class documentation
50 0 : list.clear();
51 0 : list.push_back(kAliHLTAnyDataType);
52 0 : }
53 :
54 : AliHLTComponentDataType AliHLTObjectCompressionComponent::GetOutputDataType()
55 : {
56 : // see header file for class documentation
57 0 : return kAliHLTAnyDataType;
58 : }
59 :
60 : void AliHLTObjectCompressionComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
61 : {
62 : // see header file for class documentation
63 0 : constBase=0;
64 0 : inputMultiplier=2.0; // have to adjust an upper limit according to compression level
65 0 : }
66 :
67 : int AliHLTObjectCompressionComponent::DoInit( int argc, const char** argv )
68 : {
69 : // see header file for class documentation
70 : int iResult=0;
71 :
72 0 : iResult=ConfigureFromArgumentString(argc, argv);
73 :
74 0 : return iResult;
75 : }
76 :
77 : int AliHLTObjectCompressionComponent::ScanConfigurationArgument(int argc, const char** argv)
78 : {
79 : // see header file for class documentation
80 0 : if (argc<=0) return 0;
81 : int i=0;
82 0 : TString argument=argv[i];
83 :
84 : // -verbose
85 0 : if (argument.CompareTo("-verbose")==0) {
86 : //
87 0 : return 1;
88 : }
89 :
90 0 : return 0;
91 0 : }
92 :
93 : int AliHLTObjectCompressionComponent::DoDeinit()
94 : {
95 : // see header file for class documentation
96 : int iResult=0;
97 0 : return iResult;
98 : }
99 :
100 : int AliHLTObjectCompressionComponent::DoEvent(const AliHLTComponentEventData& /*evtData*/,
101 : AliHLTComponentTriggerData& /*trigData*/)
102 : {
103 : // see header file for class documentation
104 : int iResult=0;
105 0 : for (const TObject* pObject=GetFirstInputObject();
106 0 : pObject!=NULL;
107 0 : pObject=GetNextInputObject()) {
108 0 : PushBack(pObject, GetDataType(), GetSpecification());
109 : }
110 :
111 0 : return iResult;
112 : }
|