KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KVPartitionList Class Reference

Manage a list of partitions.

Cette classe a toute son utilité si on s'attend a avoir dans une liste de partitions

une part importante de partition identique un exmeple dans KVBreakUp

Via la methode Fill(KVIntegerList* ) on test la présence ou non d'une partition, si une partition identique est deja presente, on incremente la population de celle-ci KVIntegerList::AddPopulation() sinon on ajoute la partition dans la liste. Le nombre de partition totale est accessible via GetNbreTot()

et le nombre de partitions différentes via GetNbreDiff()

Apres le remplissage, l'utilisateur peut sauvegarder l'ensemble des partitions dans un arbre et l'ecrire dans un fichier root via la methode SaveAsTree

Definition at line 32 of file KVPartitionList.h.

Public Member Functions

 KVPartitionList ()
 Default constructor. More...
 
 KVPartitionList (const Char_t *name)
 constructor with name More...
 
virtual ~KVPartitionList ()
 Destructor. More...
 
virtual void Add (TObject *obj)
 
virtual void AddAfter (const TObject *after, TObject *obj)
 
virtual void AddAt (TObject *obj, Int_t idx)
 
virtual void AddBefore (const TObject *before, TObject *obj)
 
virtual void AddFirst (TObject *obj)
 
virtual void AddLast (TObject *obj)
 
void Clear (Option_t *option="")
 Mise a zero de la liste. More...
 
virtual Bool_t Fill (KVIntegerList *par)
 
Double_t GetNbreDiff ()
 
Double_t GetNbreTot ()
 
Bool_t IsInTheList ()
 
void SaveAsTree (const Char_t *filename, const Char_t *treename, Bool_t Compress=kTRUE, Option_t *option="recreate")
 
void Update ()
 Met a jour l'intervalle de multiplicité associées aux partitions dans la liste. More...
 
- Public Member Functions inherited from KVUniqueNameList
 KVUniqueNameList (Bool_t R=kFALSE)
 Default constructor. More...
 
virtual ~KVUniqueNameList ()
 Destructor. More...
 
Bool_t ObjectAdded () const
 
void ReplaceObjects (Bool_t yes=kTRUE)
 
- Public Member Functions inherited from KVHashList
 KVHashList (Int_t capacity=TCollection::kInitHashTableCapacity, Int_t rehash=2)
 
virtual ~KVHashList ()
 Destructor. More...
 
Float_t AverageCollisions () const
 
template<typename T >
Bool_t ContainsObjectWithName (const T &o)
 
const TListGetListForObject (const char *name) const
 
const TListGetListForObject (const TObject *obj) const
 
void Rehash (Int_t newCapacity=0)
 
void Sort (Bool_t order=kSortAscending)
 
- Public Member Functions inherited from KVSeqCollection
 KVSeqCollection ()
 Default constructor. More...
 
 KVSeqCollection (const Char_t *collection_classname)
 
 KVSeqCollection (const KVSeqCollection &)
 
virtual ~KVSeqCollection ()
 
virtual TObjectAfter (const TObject *obj) const
 
virtual TObjectAt (Int_t idx) const
 
virtual TObjectBefore (const TObject *obj) const
 
const Char_tCollectionClassName () const
 
virtual void Copy (TObject &obj) const
 
virtual void Delete (Option_t *option="")
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 
virtual TObjectFindObject (const char *name) const
 
virtual TObjectFindObject (const TObject *obj) const
 
virtual TObjectFindObjectAny (const Char_t *att, const Char_t *keys, Bool_t contains_all=kFALSE, Bool_t case_sensitive=kTRUE) const
 
TObjectFindObjectByClass (const Char_t *) const
 Return (first) object in embedded list with given class. More...
 
TObjectFindObjectByClass (const TClass *) const
 Return (first) object in embedded list with given class. More...
 
virtual TObjectFindObjectByLabel (const Char_t *) const
 
virtual TObjectFindObjectByName (const Char_t *name) const
 
virtual TObjectFindObjectByNumber (UInt_t num) const
 
virtual TObjectFindObjectByTitle (const Char_t *) const
 Will return object with given title (value of TObject::GetTitle() method). More...
 
virtual TObjectFindObjectByType (const Char_t *) const
 
virtual TObjectFindObjectWithMethod (const Char_t *retvalue, const Char_t *method) const
 
virtual TObjectFindObjectWithNameAndType (const Char_t *name, const Char_t *type) const
 
virtual TObjectFirst () const
 
template<typename T >
Tget_object (const char *name) const
 
TSeqCollectionGetCollection () const
 
virtual TObject ** GetObjectRef (const TObject *obj) const
 Return reference to object. More...
 
virtual Int_t GetSize () const
 
KVSeqCollectionGetSubListWithClass (const Char_t *class_name) const
 
KVSeqCollectionGetSubListWithClass (const TClass *_class) const
 
KVSeqCollectionGetSubListWithLabel (const Char_t *retvalue) const
 
KVSeqCollectionGetSubListWithMethod (const Char_t *retvalue, const Char_t *method) const
 
KVSeqCollectionGetSubListWithName (const Char_t *retvalue) const
 
KVSeqCollectionGetSubListWithType (const Char_t *retvalue) const
 
virtual Bool_t IsCleanup () const
 
virtual Bool_t IsSendingModifiedSignals () const
 
virtual Bool_t IsSortable () const
 
virtual Bool_t IsSorted () const
 
virtual TObjectLast () const
 
virtual TIteratorMakeIterator (Bool_t dir=kIterForward) const
 Make and return iterator for the list. More...
 
virtual void Modified ()
 
KVSeqCollectionoperator= (const KVSeqCollection &)
 
virtual void RecursiveRemove (TObject *obj)
 
virtual TObjectRemove (TObject *obj)
 Remove object from list. More...
 
virtual void SendModifiedSignals (Bool_t yes=kTRUE)
 
virtual void SetCleanup (Bool_t enable=kTRUE)
 
virtual void SetOwner (Bool_t enable=kTRUE)
 
- Public Member Functions inherited from TSeqCollection
virtual ~TSeqCollection ()
 
virtual Int_t GetLast () const
 
virtual Int_t IndexOf (const TObject *obj) const
 
Int_t LastIndex () const
 
Long64_t Merge (TCollection *list)
 
virtual void RemoveAfter (TObject *after)
 
virtual TObjectRemoveAt (Int_t idx)
 
virtual void RemoveBefore (TObject *before)
 
virtual void RemoveFirst ()
 
virtual void RemoveLast ()
 
void UnSort ()
 
- Public Member Functions inherited from TCollection
virtual ~TCollection ()
 
virtual void AddAll (const TCollection *col)
 
void AddVector (TObject *obj1,...)
 
Bool_t AssertClass (TClass *cl) const
 
TIter begin () const
 
void Browse (TBrowser *b)
 
Int_t Capacity () const
 
virtual TObjectClone (const char *newname="") const
 
Int_t Compare (const TObject *obj) const
 
Bool_t Contains (const char *name) const
 
Bool_t Contains (const TObject *obj) const
 
virtual void Draw (Option_t *option="")
 
virtual void Dump () const
 
TIter end () const
 
virtual Int_t GetEntries () const
 
virtual const char * GetName () const
 
virtual Int_t GrowBy (Int_t delta) const
 
ULong_t Hash () const
 
Bool_t IsArgNull (const char *where, const TObject *obj) const
 
virtual Bool_t IsEmpty () const
 
virtual Bool_t IsFolder () const
 
Bool_t IsOwner () const
 
R__ALWAYS_INLINE Bool_t IsUsingRWLock () const
 
virtual void ls (Option_t *option="") const
 
virtual TIteratorMakeReverseIterator () const
 
virtual Bool_t Notify ()
 
TObjectoperator() (const char *name) const
 
virtual void Paint (Option_t *option="")
 
virtual void Print (Option_t *option, const char *wildcard, Int_t recurse=1) const
 
virtual void Print (Option_t *option, Int_t recurse) const
 
virtual void Print (Option_t *option, TPRegexp &regexp, Int_t recurse=1) const
 
virtual void Print (Option_t *option="") const
 
void RemoveAll ()
 
virtual void RemoveAll (TCollection *col)
 
void SetCurrentCollection ()
 
void SetName (const char *name)
 
virtual bool UseRWLock ()
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 
virtual ~TObject ()
 
void AbstractMethod (const char *method) const
 
virtual void AppendPad (Option_t *option="")
 
ULong_t CheckedHash ()
 
virtual const char * ClassName () const
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 
virtual void DrawClass () const
 
virtual TObjectDrawClone (Option_t *option="") const
 
virtual void Error (const char *method, const char *msgfmt,...) const
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 
virtual Option_tGetDrawOption () const
 
virtual const char * GetIconName () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 
virtual UInt_t GetUniqueID () const
 
virtual Bool_t HandleTimer (TTimer *timer)
 
Bool_t HasInconsistentHash () const
 
virtual void Info (const char *method, const char *msgfmt,...) const
 
virtual Bool_t InheritsFrom (const char *classname) const
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 
virtual void Inspect () const
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
void MayNotUse (const char *method) const
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 
void operator delete (void *ptr)
 
void operator delete[] (void *ptr)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 
virtual void Pop ()
 
virtual Int_t Read (const char *name)
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 
virtual void SetDrawOption (Option_t *option="")
 
virtual void SetUniqueID (UInt_t uid)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 

Protected Member Functions

TTreeGenereTree (const Char_t *treename, Bool_t Compress=kTRUE)
 
void init ()
 
void ValidateEntrance (KVIntegerList *il)
 
- Protected Member Functions inherited from KVSeqCollection
void _GetSubListWithClass (KVSeqCollection *, TCollection *, const TClass *) const
 
virtual void _GetSubListWithMethod (KVSeqCollection *, TCollection *, const Char_t *, const Char_t *) const
 
virtual void Changed ()
 
virtual KVSeqCollectionNewCollectionLikeThisOne () const
 
virtual void PrintCollectionHeader (Option_t *option) const
 Overrides TCollection::PrintCollectionHeader to show the class name of the embedded list. More...
 
virtual void SetCollection (const Char_t *)
 
- Protected Member Functions inherited from TSeqCollection
 TSeqCollection ()
 
- Protected Member Functions inherited from TCollection
 TCollection ()
 
virtual const char * GetCollectionEntryName (TObject *entry) const
 
virtual void PrintCollectionEntry (TObject *entry, Option_t *option, Int_t recurse) const
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 
void MakeZombie ()
 

Protected Attributes

Bool_t atrouve
 
Double_t knbre_diff
 Nbre de partitions differentes. More...
 
Double_t knbre_tot
 Nbre de partitions totales. More...
 
KVPartitionmult_range
 Permet d'extraire la gamme en multiplicité More...
 
- Protected Attributes inherited from KVSeqCollection
TSeqCollectionfCollection
 Pointer to embedded ROOT collection. More...
 
- Protected Attributes inherited from TSeqCollection
Bool_t fSorted
 
- Protected Attributes inherited from TCollection
TString fName
 
Int_t fSize
 
 kIsOwner
 
 kUseRWLock
 
- Protected Attributes inherited from TObject
 kOnlyPrepStep
 

Additional Inherited Members

- Public Types inherited from TObject
enum  EDeprecatedStatusBits
 
enum  EStatusBits
 
- Static Public Member Functions inherited from KVSeqCollection
static KVSeqCollectionMakeListFromFile (TFile *file)
 
static KVSeqCollectionMakeListFromFileWithClass (TFile *file, const Char_t *class_name)
 
static KVSeqCollectionMakeListFromFileWithClass (TFile *file, const TClass *_class)
 
static KVSeqCollectionMakeListFromFileWithMethod (TFile *file, const Char_t *retvalue, const Char_t *method)
 
static void RehashCleanupList ()
 
- Static Public Member Functions inherited from TSeqCollection
static Int_t ObjCompare (TObject *a, TObject *b)
 
static void QSort (TObject **a, Int_t first, Int_t last)
 
static void QSort (TObject **a, Int_t nBs, TObject ***b, Int_t first, Int_t last)
 
static void QSort (TObject **a, TObject **b, Int_t first, Int_t last)
 
- Static Public Member Functions inherited from TCollection
static void EmptyGarbageCollection ()
 
static void GarbageCollect (TObject *obj)
 
static TCollectionGetCurrentCollection ()
 
static void StartGarbageCollection ()
 
- Static Public Member Functions inherited from TObject
static Longptr_t GetDtorOnly ()
 
static Bool_t GetObjectStat ()
 
static void SetDtorOnly (void *obj)
 
static void SetObjectStat (Bool_t stat)
 
- Public Attributes inherited from TCollection
 kInitCapacity
 
 kInitHashTableCapacity
 
- Public Attributes inherited from TObject
 kBitMask
 
 kCanDelete
 
 kCannotPick
 
 kHasUUID
 
 kInconsistent
 
 kInvalidObject
 
 kIsOnHeap
 
 kIsReferenced
 
 kMustCleanup
 
 kNoContextMenu
 
 kNotDeleted
 
 kObjInCanvas
 
 kOverwrite
 
 kSingleKey
 
 kWriteDelete
 
 kZombie
 
- Protected Types inherited from TCollection
enum  EStatusBits
 

#include <KVPartitionList.h>

Inheritance diagram for KVPartitionList:
Inheritance graph
[legend]

Constructor & Destructor Documentation

◆ KVPartitionList() [1/2]

KVPartitionList::KVPartitionList ( const Char_t name)

constructor with name

Definition at line 44 of file KVPartitionList.cpp.

◆ KVPartitionList() [2/2]

KVPartitionList::KVPartitionList ( )

Default constructor.

Definition at line 33 of file KVPartitionList.cpp.

◆ ~KVPartitionList()

KVPartitionList::~KVPartitionList ( )
virtual

Destructor.

Definition at line 56 of file KVPartitionList.cpp.

Member Function Documentation

◆ Add()

void KVPartitionList::Add ( TObject obj)
virtual

Add an object to the list if it is not already in it (no object with same name in list)

if it is in, the population of it is incremented

Reimplemented from KVUniqueNameList.

Definition at line 157 of file KVPartitionList.cpp.

◆ AddAfter()

void KVPartitionList::AddAfter ( const TObject after,
TObject obj 
)
virtual

Add an object to the list if it is not already in it (no object with same name in list) if it is in, the population of it is incremented

Reimplemented from KVUniqueNameList.

Definition at line 274 of file KVPartitionList.cpp.

◆ AddAt()

void KVPartitionList::AddAt ( TObject obj,
Int_t  idx 
)
virtual

Add an object to the list if it is not already in it (no object with same name in list) if it is in, the population of it is incremented

Reimplemented from KVUniqueNameList.

Definition at line 250 of file KVPartitionList.cpp.

◆ AddBefore()

void KVPartitionList::AddBefore ( const TObject before,
TObject obj 
)
virtual

Add an object to the list if it is not already in it (no object with same name in list) if it is in, the population of it is incremented

Reimplemented from KVUniqueNameList.

Definition at line 298 of file KVPartitionList.cpp.

◆ AddFirst()

void KVPartitionList::AddFirst ( TObject obj)
virtual

Add an object to the list if it is not already in it (no object with same name in list) if it is in, the population of it is incremented

Reimplemented from KVUniqueNameList.

Definition at line 202 of file KVPartitionList.cpp.

◆ AddLast()

void KVPartitionList::AddLast ( TObject obj)
virtual

Add an object to the list if it is not already in it (no object with same name in list) if it is in, the population of it is incremented

Reimplemented from KVUniqueNameList.

Definition at line 226 of file KVPartitionList.cpp.

◆ Clear()

void KVPartitionList::Clear ( Option_t option = "")
virtual

Mise a zero de la liste.

Reimplemented from KVSeqCollection.

Reimplemented in KVBreakUp.

Definition at line 68 of file KVPartitionList.cpp.

◆ Fill()

Bool_t KVPartitionList::Fill ( KVIntegerList par)
virtual

Incrémente le nombre totale de partitions retourne kTRUE si une partition identique est déjà dans la liste

Definition at line 136 of file KVPartitionList.cpp.

◆ GenereTree()

TTree * KVPartitionList::GenereTree ( const Char_t treename,
Bool_t  Compress = kTRUE 
)
protected

Protected method Creation de l'arbre et remplissage de toutes les partitions

Definition at line 334 of file KVPartitionList.cpp.

◆ GetNbreDiff()

Double_t KVPartitionList::GetNbreDiff ( )

Retourne le nombre de partitions différentes

Exemple: si 3 partitions differentes et pop(i) leur population associée knbre_diff = 3

Definition at line 119 of file KVPartitionList.cpp.

◆ GetNbreTot()

Double_t KVPartitionList::GetNbreTot ( )

Retourne le nombre de partitions totales ie le nombre de fois ou la methode Fill a été appelée Exemple: si 3 partitions differentes et pop(i) leur population associée knbre_tot = pop(1) + pop(2) + pop(3)

Definition at line 101 of file KVPartitionList.cpp.

◆ init()

void KVPartitionList::init ( )
protected

◆ IsInTheList()

Bool_t KVPartitionList::IsInTheList ( )

retourne un booléen indiquant si la dernière partition utilisée dans les méthodes Add...() était déjà dans la liste (kTRUE) ou non (kFALSE)

Definition at line 84 of file KVPartitionList.cpp.

◆ SaveAsTree()

void KVPartitionList::SaveAsTree ( const Char_t filename,
const Char_t treename,
Bool_t  Compress = kTRUE,
Option_t option = "recreate" 
)

Open a file, save all the registered partitions in a tree format, and close the file filename -> name of the root file where the tree is stored treename -> name of the tree Compress -> if kTRUE : a branch associated to the population of the partition is created -> if kFALSE : all the partitions are written one by one option -> option for the file

Definition at line 399 of file KVPartitionList.cpp.

◆ Update()

void KVPartitionList::Update ( )

Met a jour l'intervalle de multiplicité associées aux partitions dans la liste.

Definition at line 320 of file KVPartitionList.cpp.

◆ ValidateEntrance()

void KVPartitionList::ValidateEntrance ( KVIntegerList il)
protected

Protected methode appelée dans le cas ou il y a une nouvelle partition

Definition at line 185 of file KVPartitionList.cpp.

Member Data Documentation

◆ atrouve

Bool_t KVPartitionList::atrouve
protected

Definition at line 35 of file KVPartitionList.h.

◆ knbre_diff

Double_t KVPartitionList::knbre_diff
protected

Nbre de partitions differentes.

Definition at line 36 of file KVPartitionList.h.

◆ knbre_tot

Double_t KVPartitionList::knbre_tot
protected

Nbre de partitions totales.

Definition at line 37 of file KVPartitionList.h.

◆ mult_range

KVPartition* KVPartitionList::mult_range
protected

Permet d'extraire la gamme en multiplicité

Definition at line 38 of file KVPartitionList.h.


The documentation for this class was generated from the following files: