FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairMCEntry.h
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  * FairMCEntry.h
10  *
11  * Created on: Dec 22, 2009
12  * Author: stockman
13  */
14 
15 #ifndef FAIRMCENTRY_H_
16 #define FAIRMCENTRY_H_
17 
18 #include "FairLink.h" // for FairLink
19 #include "FairMultiLinkedData.h" // for FairMultiLinkedData
20 
21 #include <Rtypes.h> // for Int_t, FairMCEntry::Class, etc
22 #include <iosfwd> // for ostream
23 #include <set> // for set
24 
26 {
27  public:
28  FairMCEntry();
29  FairMCEntry(std::set<FairLink> links, Int_t source = -1, Int_t pos = -1)
30  : FairMultiLinkedData(links)
31  , fSource(source)
32  , fPos(pos)
33  {
34  SetPersistanceCheck(kFALSE);
35  }
36 
37  FairMCEntry(FairMultiLinkedData links, Int_t source = -1, Int_t pos = -1)
38  : FairMultiLinkedData(links)
39  , fSource(source)
40  , fPos(pos)
41  {
42  SetPersistanceCheck(kFALSE);
43  }
44 
45  void SetSource(Int_t source) { fSource = source; }
46  void SetPos(Int_t pos) { fPos = pos; }
47 
48  Int_t GetSource() const { return fSource; }
49  Int_t GetPos() const { return fPos; }
50 
51  void RemoveType(Int_t type);
52 
53  virtual ~FairMCEntry();
54 
55  virtual void PrintInfo(std::ostream& out) { out << *this; }
56 
57  friend std::ostream& operator<<(std::ostream& out, const FairMCEntry& link)
58  {
59  (static_cast<FairMultiLinkedData>(link)).PrintLinkInfo(out);
60  return out;
61  }
62 
63  private:
64  Int_t fSource;
65  Int_t fPos;
66 
67  ClassDef(FairMCEntry, 1);
68 };
69 
70 #endif
friend std::ostream & operator<<(std::ostream &out, const FairMCEntry &link)
Definition: FairMCEntry.h:57
virtual void SetPersistanceCheck(Bool_t check)
Controls if a persistance check of a link is done or not.
void SetSource(Int_t source)
Definition: FairMCEntry.h:45
void RemoveType(Int_t type)
Definition: FairMCEntry.cxx:29
virtual ~FairMCEntry()
Definition: FairMCEntry.cxx:27
void SetPos(Int_t pos)
Definition: FairMCEntry.h:46
FairMCEntry(std::set< FairLink > links, Int_t source=-1, Int_t pos=-1)
Definition: FairMCEntry.h:29
Int_t GetPos() const
Definition: FairMCEntry.h:49
virtual void PrintInfo(std::ostream &out)
Definition: FairMCEntry.h:55
Int_t GetSource() const
Definition: FairMCEntry.h:48
FairMCEntry(FairMultiLinkedData links, Int_t source=-1, Int_t pos=-1)
Definition: FairMCEntry.h:37