Pluto v6.3.0
Loading...
Searching...
No Matches
PDistributionManagerUtil.h
Go to the documentation of this file.
1// Author: I. Froehlich
2// Written: 26.7.2008
3// Revised:
4// Util class for common distributions
5
6#ifndef _PDISTRIBUTIONMANAGERUTIL_H_
7#define _PDISTRIBUTIONMANAGERUTIL_H_
8
9
10#include "TObjArray.h"
11#include "TF1.h"
12#include "TF2.h"
13#include "PParticle.h"
14#include "PDistribution.h"
15#include "PDynamicData.h"
16#include "PChannel.h"
17
18#define MAX_DISTRIBUTION_LIST 1000
19#define MAX_GROUP_LIST 100
20#define MAX_CORR_LIST 10000
21
23
26
27class PDistributionManagerUtil : public TObject {
28
29 public:
30
32 int Add(PDistribution *dist); //Adds user-defined distribution
33 int Add(PDistribution *dist, const Char_t *gr); //Adds user-defined distribution
34 int Add(TObjArray *arr); //Adds a bulk of user-defined distribution
35 void AlternativeTo(const char *a, const char *b);
36
37 void Print(const Option_t* delme="root") const;
38 Int_t PrintGroup(Int_t group_id, Int_t width, Int_t indent,
39 const Char_t *name,
40 Int_t *num_enabled_mods, Int_t *num_total_mods,
41 Int_t *num_subs, Int_t *will_print) const;
42
43 int Attach(PChannel *ch); //Attach the PChannel to the known distributions
44
45 Bool_t Disable(const Char_t *id); //Disable id, if possible
46 Bool_t Enable(const Char_t *id); //Enable id, if possible
47
48 PDistribution *GetDistribution(const Char_t *id);
49 void SetVerbose(Int_t v) {
50 verbosity=v;
51 };
52 void LinkDB(void); // Link the channel models to data base
53
54 void ExpandGroup(const char *, Int_t ex=1);
55
56
57 Int_t AddGroup(const Char_t *id, const Char_t *de);
58 void SetGroup(const Char_t *id); //set standard group for the next Add(PDistribution * dist)
59 Int_t AddSubGroup(const Char_t *id, const Char_t *de, const Char_t *sub);
60
61 Bool_t no_warning;
62
63 private:
64
65 Int_t position;
67 int alt_distribution[MAX_DISTRIBUTION_LIST];
68
69
70 Int_t group_position;
71 const Char_t *group_identifier[MAX_GROUP_LIST], *group_description[MAX_GROUP_LIST];
72 Int_t group_expanded[MAX_GROUP_LIST];
73 Int_t group_corr[MAX_GROUP_LIST];
74
75 Int_t GetGroup(const Char_t *id, Int_t warning=1); //get the group number from string
76 //return a "none" (=0) when id not found
77 Int_t current_group;
78 Int_t AddCorrelation(Int_t gr, Int_t dis); //correlates a certain group and distribution
79 Int_t corr_position;
80 Int_t corr_gr[MAX_CORR_LIST], corr_dis[MAX_CORR_LIST];
81 void DisableAlts(int id);
82 Int_t verbosity;
83 Int_t linkdb_done; //flag for linkdb freeze out BUGBUG: Needs to be checked in Add()
84
85 ClassDef(PDistributionManagerUtil,0) //Util class for the distribution manager
86
87};
88
89#endif
90
91
#define MAX_GROUP_LIST
PDistributionManagerUtil * makeDistributionManagerUtil()
#define MAX_DISTRIBUTION_LIST
#define MAX_CORR_LIST
PDistributionManagerUtil & fDistributionManagerUtil()
int Add(PDistribution *dist)
Int_t PrintGroup(Int_t group_id, Int_t width, Int_t indent, const Char_t *name, Int_t *num_enabled_mods, Int_t *num_total_mods, Int_t *num_subs, Int_t *will_print) const
int Add(PDistribution *dist, const Char_t *gr)
int Attach(PChannel *ch)
Int_t AddSubGroup(const Char_t *id, const Char_t *de, const Char_t *sub)
void AlternativeTo(const char *a, const char *b)
PDistribution * GetDistribution(const Char_t *id)
void Print(const Option_t *delme="root") const
void SetGroup(const Char_t *id)
Int_t AddGroup(const Char_t *id, const Char_t *de)
Bool_t Disable(const Char_t *id)
int Add(TObjArray *arr)
void ExpandGroup(const char *, Int_t ex=1)
Bool_t Enable(const Char_t *id)
PChannel * ch[]
Definition w_dalitz.C:22