LCOV - code coverage report
Current view: top level - STEER/STEERBase - AliFileTag.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 21 44 47.7 %
Date: 2016-06-14 17:26:59 Functions: 8 11 72.7 %

          Line data    Source code
       1             : /**************************************************************************
       2             :  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       3             :  *                                                                        *
       4             :  * Author: The ALICE Off-line Project.                                    *
       5             :  * Contributors are mentioned in the code where appropriate.              *
       6             :  *                                                                        *
       7             :  * Permission to use, copy, modify and distribute this software and its   *
       8             :  * documentation strictly for non-commercial purposes is hereby granted   *
       9             :  * without fee, provided that the above copyright notice appears in all   *
      10             :  * copies and that both the copyright notice and this permission notice   *
      11             :  * appear in the supporting documentation. The authors make no claims     *
      12             :  * about the suitability of this software for any purpose. It is          *
      13             :  * provided "as is" without express or implied warranty.                  *
      14             :  **************************************************************************/
      15             : 
      16             : /* $Id: AliFileTag.cxx 14745 2006-08-04 15:48:44Z panos $ */
      17             : 
      18             : //-----------------------------------------------------------------
      19             : //           Implementation of the FileTag class
      20             : //   This is the class to deal with the tags in the file level
      21             : //   Origin: Adam Kisiel, CERN, Adam.Kisiel@cern.ch
      22             : //-----------------------------------------------------------------
      23             : 
      24             : #include "AliFileTag.h"
      25             : #include <stdlib.h>
      26             : 
      27         176 : ClassImp(AliFileTag)
      28             : 
      29             : //___________________________________________________________________________
      30             : AliFileTag::AliFileTag() : 
      31           8 :   TObject(),  
      32           8 :   fGUID(""),
      33           8 :   fPath(""),
      34           8 :   fsize(0),
      35           8 :   fmd5(""),
      36           8 :   fturl(""),
      37           8 :   fEventTags(1000)
      38          40 : {
      39             :   // AliFileTag default constructor
      40             :   
      41          16 : }
      42             : 
      43             : AliFileTag::AliFileTag(const AliFileTag &tag):
      44           0 :   TObject(tag),
      45           0 :   fGUID(tag.fGUID),
      46           0 :   fPath(tag.fPath),
      47           0 :   fsize(tag.fsize),
      48           0 :   fmd5(tag.fmd5),
      49           0 :   fturl(tag.fturl),
      50           0 :   fEventTags(10000)
      51           0 : {
      52           0 :   for (int iev=0; iev<tag.GetNEvents(); iev++)
      53           0 :     AddEventTag(*(tag.GetEventTag(iev)));
      54           0 : }
      55             : 
      56             : AliFileTag &AliFileTag::operator=(const AliFileTag &tag)
      57             : {
      58           0 :   if (this != &tag) {
      59           0 :     TObject::operator=(tag);
      60             : 
      61           0 :     SetGUID(tag.GetGUID());
      62           0 :     SetPath(tag.GetPath());
      63           0 :     SetSize(tag.GetSize());
      64           0 :     SetMD5(tag.GetMD5());
      65           0 :     SetTURL(tag.GetTURL());
      66             :     
      67           0 :     for (int iev=0; iev<tag.GetNEvents(); iev++)
      68           0 :       AddEventTag(*(tag.GetEventTag(iev)));
      69           0 :   }
      70             : 
      71           0 :   return *this;
      72           0 : }
      73             : 
      74             : //___________________________________________________________________________
      75          12 : AliFileTag::~AliFileTag() {
      76             :   // AliEventTag destructor
      77             :   //  fEventTag.Delete();
      78           2 :   fEventTags.Delete();
      79           6 : }
      80             : 
      81             : //___________________________________________________________________________
      82             : void AliFileTag::AddEventTag(const AliEventTag & EvTag) {
      83             :   //Adds an entry to the event tag TClonesArray
      84             : 
      85          48 :   fEventTags.Add(new AliEventTag(EvTag));
      86          16 : }
      87             : 
      88             : void AliFileTag::CopyFileInfo(const AliFileTag &tag)
      89             : {
      90           6 :   SetGUID(tag.GetGUID());
      91           4 :   SetPath(tag.GetPath());
      92           2 :   SetSize(tag.GetSize());
      93           4 :   SetMD5(tag.GetMD5());
      94           4 :   SetTURL(tag.GetTURL());
      95           2 : }

Generated by: LCOV version 1.11