15 #ifndef FAIRMULTILINKEDDATA_H_
16 #define FAIRMULTILINKEDDATA_H_
34 const std::vector<Int_t>& links,
37 Bool_t persistanceCheck = kTRUE,
38 Bool_t bypass = kFALSE,
41 const std::vector<Int_t>& links,
44 Bool_t persistanceCheck = kTRUE,
45 Bool_t bypass = kFALSE,
56 virtual std::vector<FairLink>
77 Bool_t bypass = kFALSE,
83 Bool_t bypass = kFALSE,
112 virtual void DeleteLink(Int_t type, Int_t index);
120 for (Int_t i = 0; i <
GetNLinks(); i++) {
144 const std::vector<Int_t>& links,
148 for (UInt_t i = 0; i < links.size(); i++) {
virtual ~FairMultiLinkedData()
virtual void SimpleAddLinks(Int_t fileId, Int_t evtId, Int_t dataType, const std::vector< Int_t > &links, Bool_t, Float_t)
virtual Bool_t IsLinkInList(FairLink link)
Test if a given link is in fLinks.
TObject * GetData(FairLink &myLink)
Get the TObject the Link is pointing to.
ClassDef(FairMultiLinkedData, 4)
virtual void AddAllWeights(Double_t weight)
Adds weight to all Links.
virtual void SetEntryNr(FairLink entry)
virtual std::vector< FairLink > GetSortedMCTracks()
Gives you a list of all FairLinks pointing to a "MCTrack" sorted by their weight. ...
virtual void SetLinks(FairMultiLinkedData links, Float_t mult=1.0)
Sets the links as vector of FairLink.
virtual FairLink GetEntryNr() const
gives back the entryNr
virtual void SetPersistanceCheck(Bool_t check)
Controls if a persistance check of a link is done or not.
std::set< FairLink > fLinks
virtual void ResetLinks()
Clears fLinks.
virtual Int_t LinkPosInList(FairLink link)
returns position of link in fLinks. If it is not in the list -1 is returned
virtual void SetAllWeights(Double_t weight)
Sets a common weight for Links.
virtual void MultiplyAllWeights(Double_t weight)
Multiplies all Links with weight.
friend std::ostream & operator<<(std::ostream &out, const FairMultiLinkedData &data)
Output.
virtual void InsertHistory(FairLink link)
Adds the FairLinks of the inserted link to the set of links of this object.
virtual void InsertLink(FairLink link)
Inserts a link into the list of links without persistance checking.
Bool_t GetPersistanceCheck()
Returns the value of PersistanceCheck.
std::ostream & PrintLinkInfo(std::ostream &out=std::cout) const
Output.
virtual void AddLinks(FairMultiLinkedData links, Float_t mult=1.0)
Adds a List of FairLinks (FairMultiLinkedData) to fLinks.
void PrintLinkInfo(std::ostream &out=std::cout) const
FairMultiLinkedData()
Default constructor.
virtual void SetLink(FairLink link, Bool_t bypass=kFALSE, Float_t mult=1.0)
Sets the Links with a single FairLink.
virtual void DeleteLink(FairLink link)
Deletes a link ouf of fLinks.
Int_t GetVerbose()
Returns the verbosity level.
virtual Int_t GetNLinks() const
returns the number of stored links
virtual void SetInsertHistory(Bool_t val)
Toggles if history of a link is inserted or not.
Bool_t GetInsertHistory() const
virtual FairLink GetLink(Int_t pos) const
returns the FairLink at the given position
virtual void SetVerbose(Int_t level)
Sets the verbosity level.
virtual void AddLink(FairLink link, Bool_t bypass=kFALSE, Float_t mult=1.0)
virtual Int_t GetDefaultType()
virtual std::set< FairLink > GetLinks() const
returns stored links as FairLinks
virtual void SetDefaultType(Int_t type)
virtual FairMultiLinkedData GetLinksWithType(Int_t type) const
Gives you a list of links which contain the given type.