LCOV - code coverage report
Current view: top level - HLT/BASE/util - AliHLTRecoParamComponent.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 8 43 18.6 %
Date: 2016-06-14 17:26:59 Functions: 6 15 40.0 %

          Line data    Source code
       1             : // $Id$
       2             : 
       3             : //**************************************************************************
       4             : //* This file is property of and copyright by the ALICE                    * 
       5             : //* ALICE Experiment at CERN, All rights reserved.                         *
       6             : //*                                                                        *
       7             : //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no>        *
       8             : //*                                                                        *
       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             : //**************************************************************************
      17             : 
      18             : /// @file   AliHLTRecoParamComponent.cxx
      19             : /// @author Matthias Richter
      20             : /// @date   2010-10-18
      21             : /// @brief  Online HLT RecoParam generator component
      22             : ///
      23             : 
      24             : #include <cstring>
      25             : 
      26             : #include "AliHLTRecoParamComponent.h"
      27             : #include "AliHLTReadoutList.h"
      28             : 
      29             : /** ROOT macro for the implementation of ROOT specific class methods */
      30           8 : ClassImp(AliHLTRecoParamComponent)
      31             : 
      32             : AliHLTRecoParamComponent::AliHLTRecoParamComponent()
      33           3 :   : AliHLTCalibrationProcessor()
      34           3 :   , fOnlineConfig()
      35           3 :   , fOutputSize(0)
      36          15 : {
      37             :   // see header file for class documentation
      38             :   // or
      39             :   // refer to README to build package
      40             :   // or
      41             :   // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
      42             : 
      43           6 : }
      44             : 
      45             : AliHLTRecoParamComponent::~AliHLTRecoParamComponent()
      46          18 : {
      47             :   // see header file for class documentation
      48           9 : }
      49             : 
      50             : void AliHLTRecoParamComponent::GetInputDataTypes(AliHLTComponentDataTypeList& list)
      51             : {
      52             :   // see header file for class documentation
      53           0 :   list.push_back(kAliHLTAnyDataType);
      54           0 : }
      55             : 
      56             : AliHLTComponentDataType AliHLTRecoParamComponent::GetOutputDataType()
      57             : {
      58             :   // see header file for class documentation
      59           0 :   return kAliHLTDataTypeFXSCalib;
      60             : }
      61             : 
      62             : void AliHLTRecoParamComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier)
      63             : {
      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           0 :   constBase = AliHLTCalibrationProcessor::fgkFXSProtocolHeaderSize +
      68           0 :     streamerInfoEstSize + fOutputSize;
      69           0 :   inputMultiplier = 0;
      70           0 : }
      71             : 
      72             : void AliHLTRecoParamComponent::GetOCDBObjectDescription( TMap* const /*targetArray*/)
      73             : {
      74             :   // see header file for class documentation
      75           0 : }
      76             : 
      77             : int AliHLTRecoParamComponent::InitCalibration()
      78             : {
      79             :   // see header file for class documentation
      80             : 
      81             :   int iResult=0;
      82             : 
      83           0 :   return iResult;
      84             : }
      85             : 
      86             : int AliHLTRecoParamComponent::DeinitCalibration()
      87             : {
      88             :   // see header file for class documentation
      89             : 
      90             :   int iResult=0;
      91             : 
      92           0 :   return iResult;
      93             : }
      94             : 
      95             : int AliHLTRecoParamComponent::ProcessCalibration( const AliHLTComponentEventData& /*evtData*/,
      96             :                                                             AliHLTComponentTriggerData& /*trigData*/ )
      97             : {
      98             :   // see header file for class documentation
      99             :   int iResult=0;
     100             : 
     101           0 :   return iResult;
     102             : }
     103             : 
     104             : int AliHLTRecoParamComponent::ShipDataToFXS( const AliHLTComponentEventData& /*evtData*/,
     105             :                                                        AliHLTComponentTriggerData& /*trigData*/)
     106             : {
     107             :   // see header file for class documentation
     108             : 
     109           0 :   AliHLTReadoutList rdList(AliHLTReadoutList::kHLT);
     110           0 :   PushToFXS(&fOnlineConfig, "HLT", "OnlineRecoParam", &rdList);
     111             :   return 0;
     112           0 : }
     113             : 
     114             : int AliHLTRecoParamComponent::ScanConfigurationArgument(int argc, const char** argv)
     115             : {
     116             :   // see header file for class documentation
     117             :   int iResult=0;
     118             :   int result=0;
     119             :   char* configFile;
     120           0 :   if (argc == 1) {
     121           0 :     int argLen = strlen(argv[0]);
     122           0 :     char argument[argLen+1];
     123           0 :     strncpy(argument, argv[0], argLen+1);
     124           0 :     argument[argLen] = '\0';
     125           0 :     if (strstr(argument, "-configfile")) {
     126           0 :       strtok(argument, "=");
     127           0 :       configFile = strtok(0, "=");
     128           0 :       if (configFile)
     129           0 :         result = fOnlineConfig.LoadConfiguration(configFile);
     130           0 :       if (result > 0) {
     131           0 :         fOutputSize = result; // configuration file was successfully read
     132             :         iResult = 1;
     133           0 :       }
     134             :     }
     135           0 :   }
     136           0 :   if (result == 0) {
     137           0 :     HLTError("Missing argument -configfile");
     138             :     iResult = -EPROTO;
     139           0 :   }
     140           0 :   else if (result < 0) {
     141           0 :     HLTError("Could not read configuration file %s", configFile);
     142             :     iResult = -ENOENT;
     143           0 :   }
     144           0 :   return iResult;
     145             : }

Generated by: LCOV version 1.11