FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairFileInfo.cxx
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 // FairFileInfo.cxx
9 // Created by Mohammad Al-Turany on 6/21/11.
10 //
11 #include "FairFileInfo.h"
12 
13 #include <TFile.h> // for TFile
14 #include <TSystem.h> // for TSystem, gSystem
15 #include <stdio.h> // for printf
16 
17 //__________________________________________________________________________
19  : TNamed()
20  , fPath("")
21  , fSize(0)
22  , fIdentifier(0)
23  , fInChainId(0)
24 {}
25 //__________________________________________________________________________
26 FairFileInfo::FairFileInfo(TFile* file, UInt_t id, UInt_t ChId)
27  : TNamed(file->GetName(), "Inputfile")
28  , fPath("")
29  , fSize(file->GetSize())
30  , fIdentifier(id)
31  , fInChainId(ChId)
32 {
33  fPath += gSystem->WorkingDirectory();
34  fPath += fName;
35 }
36 //__________________________________________________________________________
38 //__________________________________________________________________________
39 void FairFileInfo::Print(Option_t*) const
40 {
41  printf("Printing FairFileInfo for : %s \n", fName.Data());
42  printf("File full path : %s \n", fPath.Data());
43  printf("File Size in Byte : %i \n", fSize);
44  printf("File Identifier : %i \n", fIdentifier);
45  printf("File order in input chain : %i \n", fInChainId);
46 }
47 //__________________________________________________________________________
UInt_t fInChainId
Definition: FairFileInfo.h:47
ClassImp(FairEventBuilder)
virtual ~FairFileInfo()
TString fPath
Definition: FairFileInfo.h:41
UInt_t fSize
Definition: FairFileInfo.h:43
UInt_t fIdentifier
Definition: FairFileInfo.h:45
void Print(Option_t *option="") const