3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE *
5 //* ALICE Experiment at CERN, All rights reserved. *
7 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
9 //* Permission to use, copy, modify and distribute this software and its *
10 //* documentation strictly for non-commercial purposes is hereby granted *
11 //* without fee, provided that the above copyright notice appears in all *
12 //* copies and that both the copyright notice and this permission notice *
13 //* appear in the supporting documentation. The authors make no claims *
14 //* about the suitability of this software for any purpose. It is *
15 //* provided "as is" without express or implied warranty. *
16 //**************************************************************************
18 /// @file AliHLTRecoParamComponent.cxx
19 /// @author Matthias Richter
21 /// @brief Online HLT RecoParam generator component
26 #include "AliHLTRecoParamComponent.h"
27 #include "AliHLTReadoutList.h"
29 /** ROOT macro for the implementation of ROOT specific class methods */
30 ClassImp(AliHLTRecoParamComponent)
32 AliHLTRecoParamComponent::AliHLTRecoParamComponent()
33 : AliHLTCalibrationProcessor()
37 // see header file for class documentation
39 // refer to README to build package
41 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
45 AliHLTRecoParamComponent::~AliHLTRecoParamComponent()
47 // see header file for class documentation
50 void AliHLTRecoParamComponent::GetInputDataTypes(AliHLTComponentDataTypeList& list)
52 // see header file for class documentation
53 list.push_back(kAliHLTAnyDataType);
56 AliHLTComponentDataType AliHLTRecoParamComponent::GetOutputDataType()
58 // see header file for class documentation
59 return kAliHLTDataTypeFXSCalib;
62 void AliHLTRecoParamComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier)
64 // see header file for class documentation
65 const UInt_t streamerInfoEstSize = 1024; // Estimated size of streamer info
66 // total size: FXSHeader + StreamerInfo + XML configuration
67 constBase = AliHLTCalibrationProcessor::fgkFXSProtocolHeaderSize +
68 streamerInfoEstSize + fOutputSize;
72 void AliHLTRecoParamComponent::GetOCDBObjectDescription( TMap* const /*targetArray*/)
74 // see header file for class documentation
77 int AliHLTRecoParamComponent::InitCalibration()
79 // see header file for class documentation
86 int AliHLTRecoParamComponent::DeinitCalibration()
88 // see header file for class documentation
95 int AliHLTRecoParamComponent::ProcessCalibration( const AliHLTComponentEventData& /*evtData*/,
96 AliHLTComponentTriggerData& /*trigData*/ )
98 // see header file for class documentation
104 int AliHLTRecoParamComponent::ShipDataToFXS( const AliHLTComponentEventData& /*evtData*/,
105 AliHLTComponentTriggerData& /*trigData*/)
107 // see header file for class documentation
109 AliHLTReadoutList rdList(AliHLTReadoutList::kHLT);
110 PushToFXS(&fOnlineConfig, "HLT", "OnlineRecoParam", &rdList);
114 int AliHLTRecoParamComponent::ScanConfigurationArgument(int argc, const char** argv)
116 // see header file for class documentation
121 int argLen = strlen(argv[0]);
122 char argument[argLen+1];
123 strncpy(argument, argv[0], argLen+1);
124 argument[argLen] = '\0';
125 if (strstr(argument, "-configfile")) {
126 strtok(argument, "=");
127 configFile = strtok(0, "=");
129 result = fOnlineConfig.LoadConfiguration(configFile);
131 fOutputSize = result; // configuration file was successfully read
137 HLTError("Missing argument -configfile");
140 else if (result < 0) {
141 HLTError("Could not read configuration file %s", configFile);