LCOV - code coverage report
Current view: top level - HLT/BASE - AliHLTTriggerMenuSymbol.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 13 39 33.3 %
Date: 2016-06-14 17:26:59 Functions: 6 9 66.7 %

          Line data    Source code
       1             : // $Id$
       2             : /**************************************************************************
       3             :  * This file is property of and copyright by the ALICE HLT Project        *
       4             :  * ALICE Experiment at CERN, All rights reserved.                         *
       5             :  *                                                                        *
       6             :  * Primary Authors: Artur Szostak <artursz@iafrica.com>                   *
       7             :  *                  for The ALICE HLT Project.                            *
       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   AliHLTTriggerMenuSymbol.cxx
      19             : /// @author Artur Szostak <artursz@iafrica.com>
      20             : /// @date   28 Dec 2008
      21             : /// @brief  Implementation of the AliHLTTriggerMenuSymbol class.
      22             : ///
      23             : /// The AliHLTTriggerMenuSymbol contains information about a symbol used in the
      24             : /// global HLT trigger menu.
      25             : 
      26             : #include "AliHLTTriggerMenuSymbol.h"
      27             : #include "Riostream.h"
      28             : 
      29         126 : ClassImp(AliHLTTriggerMenuSymbol)
      30             : 
      31             : 
      32             : AliHLTTriggerMenuSymbol::AliHLTTriggerMenuSymbol() :
      33          48 :   TObject(),
      34          48 :   fName(),
      35          48 :   fType(),
      36          48 :   fBlockType(kAliHLTAnyDataType),
      37          48 :   fClass(),
      38          48 :   fAssignExpr(),
      39          48 :   fDefaultValue(),
      40          48 :   fRealName()
      41         240 : {
      42             :   // Default constructor.
      43          96 : }
      44             : 
      45             : 
      46             : AliHLTTriggerMenuSymbol::~AliHLTTriggerMenuSymbol()
      47          12 : {
      48             :   // Default destructor.
      49           6 : }
      50             : 
      51             : 
      52             : void AliHLTTriggerMenuSymbol::Print(Option_t* option) const
      53             : {
      54             :   // Prints the contents of the trigger menu item.
      55             :   
      56           0 :   TString opt = option;
      57           0 :   if (opt.Contains("compact"))
      58             :   {
      59           0 :     cout << "{fRealName = \"" << fRealName.Data()
      60           0 :          << "\", fType = \"" << fType.Data()
      61           0 :          << "\", fBlockType = \"";
      62           0 :     fBlockType.Print("noendl");
      63           0 :     cout << "\", fClass = \"" << fClass
      64           0 :          << "\", fAssignExpr = \"" << fAssignExpr
      65           0 :          << "\", fDefaultValue = \"" << fDefaultValue
      66           0 :          << "\"}" << endl;
      67             :   }
      68             :   else
      69             :   {
      70           0 :     cout << "                    Name = " << Name() << endl;
      71           0 :     cout << "                RealName = " << RealName() << endl;
      72           0 :     cout << "               Data type = " << Type() << endl;
      73           0 :     cout << "              Block type = "; fBlockType.Print();
      74           0 :     cout << "              Class type = " << ObjectClass() << endl;
      75           0 :     cout << "   Assignment expression = " << AssignExpression() << endl;
      76           0 :     cout << "Default value expression = " << DefaultValue() << endl;
      77             :   }
      78           0 : }
      79             : 
      80             : 
      81             : const char* AliHLTTriggerMenuSymbol::RealName() const
      82             : {
      83             :   // return the real name of the symbol which can contain '-'
      84             : 
      85             :   // backward compatibility with old versions of the class
      86           0 :   if (fRealName.IsNull()) return fName;
      87           0 :   return fRealName;
      88           0 : }
      89             : 
      90             : void AliHLTTriggerMenuSymbol::Name(const char* value)
      91             : {
      92             :   // sets the name and real name of the symbol
      93             :   // replaces '-' and '.' in the real name with '_' in order to comply with
      94             :   // C++ conventions.
      95           0 :   fRealName = value;
      96           0 :   fName = value;
      97           0 :   fName.ReplaceAll("-", "_");
      98           0 :   fName.ReplaceAll(".", "_");
      99           0 : }

Generated by: LCOV version 1.11