3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project *
5 //* ALICE Experiment at CERN, All rights reserved. *
7 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8 //* for The ALICE HLT Project. *
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 //**************************************************************************
19 /// @file AliHLTRecoParamComponent.cxx
20 /// @author Matthias Richter
22 /// @brief Online HLT RecoParam generator component
27 #include "AliHLTRecoParamComponent.h"
28 #include "AliHLTReadoutList.h"
30 /** ROOT macro for the implementation of ROOT specific class methods */
31 ClassImp(AliHLTRecoParamComponent)
33 AliHLTRecoParamComponent::AliHLTRecoParamComponent()
34 : AliHLTCalibrationProcessor()
38 // see header file for class documentation
40 // refer to README to build package
42 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
46 AliHLTRecoParamComponent::~AliHLTRecoParamComponent()
48 // see header file for class documentation
51 void AliHLTRecoParamComponent::GetInputDataTypes(AliHLTComponentDataTypeList& list)
53 // see header file for class documentation
54 list.push_back(kAliHLTAnyDataType);
57 AliHLTComponentDataType AliHLTRecoParamComponent::GetOutputDataType()
59 // see header file for class documentation
60 return kAliHLTDataTypeFXSCalib;
63 void AliHLTRecoParamComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier)
65 // see header file for class documentation
66 const UInt_t streamerInfoEstSize = 1024; // Estimated size of streamer info
67 // total size: FXSHeader + StreamerInfo + XML configuration
68 constBase = AliHLTCalibrationProcessor::fgkFXSProtocolHeaderSize +
69 streamerInfoEstSize + fOutputSize;
73 void AliHLTRecoParamComponent::GetOCDBObjectDescription( TMap* const /*targetArray*/)
75 // see header file for class documentation
78 int AliHLTRecoParamComponent::InitCalibration()
80 // see header file for class documentation
87 int AliHLTRecoParamComponent::DeinitCalibration()
89 // see header file for class documentation
96 int AliHLTRecoParamComponent::ProcessCalibration( const AliHLTComponentEventData& /*evtData*/,
97 AliHLTComponentTriggerData& /*trigData*/ )
99 // see header file for class documentation
105 int AliHLTRecoParamComponent::ShipDataToFXS( const AliHLTComponentEventData& /*evtData*/,
106 AliHLTComponentTriggerData& /*trigData*/)
108 // see header file for class documentation
110 AliHLTReadoutList rdList(AliHLTReadoutList::kHLT);
111 PushToFXS(&fOnlineConfig, "HLT", "OnlineRecoParam", &rdList);
115 int AliHLTRecoParamComponent::ScanConfigurationArgument(int argc, const char** argv)
117 // see header file for class documentation
122 int argLen = strlen(argv[0]);
123 char argument[argLen+1];
124 strncpy(argument, argv[0], argLen+1);
125 argument[argLen] = '\0';
126 if (strstr(argument, "-configfile")) {
127 strtok(argument, "=");
128 configFile = strtok(0, "=");
130 result = fOnlineConfig.LoadConfiguration(configFile);
132 fOutputSize = result; // configuration file was successfully read
138 HLTError("Missing argument -configfile");
141 else if (result < 0) {
142 HLTError("Could not read configuration file %s", configFile);