FairRoot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
FairFileHeader.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
// -------------------------------------------------------------------------
9
// ----- FairFileHeader source file -----
10
// ----- Created 20/04/11 M.Al-Turany -----
11
// -------------------------------------------------------------------------
12
13
#include "
FairFileHeader.h
"
14
15
#include "
FairFileInfo.h
"
// for FairFileInfo
16
17
#include <TIterator.h>
// for TIterator
18
#include <TList.h>
// for TList
19
#include <TObjString.h>
// for TObjString
20
#include <TObject.h>
// for TObject
21
class
TFile;
22
23
FairFileHeader::FairFileHeader
()
24
: TNamed()
25
, fRunId(0)
26
, fTaskList(new TList())
27
, fFileList(new TList())
28
{}
29
30
void
FairFileHeader::AddTaskClassName
(TString taskname) {
fTaskList
->AddLast(
new
TObjString(taskname)); }
31
32
void
FairFileHeader::AddInputFile
(TFile* f, UInt_t
id
, UInt_t ChId)
33
{
34
fFileList
->AddLast(
new
FairFileInfo
(f,
id
, ChId));
35
}
36
37
FairFileInfo
*
FairFileHeader::GetFileInfo
(UInt_t
id
, UInt_t ChId)
38
{
39
TIterator* Iter =
fFileList
->MakeIterator();
40
Iter->Reset();
41
TObject* obj = 0;
42
FairFileInfo
* info = 0;
43
while
((obj = Iter->Next())) {
44
info =
dynamic_cast<
FairFileInfo
*
>
(obj);
45
if
(info && info->
GetIdentifier
() ==
id
&& info->
GetOrderInChain
() == ChId) {
46
return
info;
47
}
48
}
49
delete
Iter;
50
return
0;
51
}
52
53
FairFileHeader::~FairFileHeader
() {}
54
55
ClassImp
(
FairFileHeader
);
FairFileHeader::FairFileHeader
FairFileHeader()
Definition:
FairFileHeader.cxx:23
FairFileHeader::AddTaskClassName
void AddTaskClassName(TString taskname)
Definition:
FairFileHeader.cxx:30
FairFileInfo.h
FairFileHeader
Definition:
FairFileHeader.h:28
ClassImp
ClassImp(FairEventBuilder)
FairFileHeader::fTaskList
TList * fTaskList
Definition:
FairFileHeader.h:62
FairFileInfo::GetIdentifier
UInt_t GetIdentifier()
Definition:
FairFileInfo.h:29
FairFileHeader.h
FairFileHeader::AddInputFile
void AddInputFile(TFile *f, UInt_t id, UInt_t ChId)
Definition:
FairFileHeader.cxx:32
FairFileInfo
Definition:
FairFileInfo.h:20
FairFileHeader::GetFileInfo
FairFileInfo * GetFileInfo(UInt_t id, UInt_t ChId)
Definition:
FairFileHeader.cxx:37
FairFileHeader::~FairFileHeader
virtual ~FairFileHeader()
Definition:
FairFileHeader.cxx:53
FairFileHeader::fFileList
TList * fFileList
Definition:
FairFileHeader.h:65
FairFileInfo::GetOrderInChain
UInt_t GetOrderInChain()
Definition:
FairFileInfo.h:30
FairRoot
base
event
FairFileHeader.cxx
Generated on Mon Mar 8 2021 12:14:05 for FairRoot by
1.8.5