28 fZtarget = fAtarget = fZbeam = fAbeam = 0;
58 KVDBSystem::~KVDBSystem()
199 if (!(other_runs = other_sys->
GetRuns()))
203 return (
first == other_first ? 0 : (other_first >
first ? -1 : 1));
222 while ((db = (
KVDBRun*) nxt()))
240 while ((run = (
KVDBRun*)next())) {
285 f <<
"Runs: " << runlist.
AsString() << endl;
317 fEbeam = target_thickness = 0;
320 char next_char =
f.peek();
321 if (next_char ==
'+') {
325 cout <<
"New System : " <<
line.Data() << endl;
328 Error(
"Load",
"Should read system name : %s\n",
line.Data());
331 next_char =
f.peek();
332 while (next_char !=
'+' &&
f.good() && !
f.eof()) {
333 if ((next_char >=
'0') && (next_char <=
'9')) {
336 cout <<
"Zproj = " <<
fZbeam <<
" Ztarg = " <<
fZtarget <<
" targ_thick = " << target_thickness <<
" Ebeam = " <<
fEbeam << endl;
344 if (
line.BeginsWith(
"Target")) {
346 line.Remove(0,
line.Index(
":") + 1);
349 sscanf(
line.Data(),
"%d %f", &nlay, &angle);
352 for (
int i = 0; i < nlay; i++) {
354 sscanf(
line.Data(),
"%s %f", mat, &thick);
360 else if (
line.BeginsWith(
"Runs")) {
361 line.Remove(0,
line.Index(
":") + 1);
363 cout <<
"Runs : " <<
line.Data() << endl;
365 else if (
line.BeginsWith(
"Run Range")) {
366 line.Remove(0,
line.Index(
":") + 1);
368 sscanf(
line.Data(),
"%i %i", &frun, &lrun);
369 runlist.
Add(
Form(
"%i-%i", frun, lrun));
370 cout <<
"Run range : " <<
line.Data() << endl;
373 next_char =
f.peek();
403 run_number = rl.
Next();
416 Info(
"SetRuns",
"Could not add link for run %d", run_number);
441 Error(
"AddRun",
"Called with pointer to an object of class %s; should inherit from KVDBRun!",
453 Info(
"AddRun",
"Could not add link for run %d", run->
GetNumber());
521 cout <<
"________________________________________________________" <<
522 endl <<
"System : " <<
GetName() << endl;
525 cout <<
"Runs : " <<
r.AsString() << endl;
526 cout <<
" Zbeam : " <<
fZbeam
527 << endl <<
" Abeam : " <<
fAbeam << endl <<
" Ebeam : " <<
fEbeam
528 <<
" A.MeV" << endl <<
" Ztarget : " <<
fZtarget << endl <<
529 " Atarget : " <<
fAtarget << endl <<
" Target Thickness : " <<
534 "________________________________________________________" << endl;
546 cout <<
"KVDBSystem : " <<
GetName() <<
" Runs : " <<
r.AsString() << endl;
652 while (i < 3 && !name.
End()) {
654 if (i < 2) tmp +=
" ";
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
char * Form(const char *fmt,...)
Relativistic binary kinematics calculator.
void SetTarget(const KVNucleus &)
Set target for reaction.
void SetProjectile(const KVNucleus &)
Set projectile for reaction.
void CalculateKinematics()
KVNucleus * GetNucleus(Int_t i) const
Double_t GetCMEnergy() const
Return available kinetic energy in centre of mass.
virtual const Char_t * GetType() const
Cross-reference in a KVDataBase.
virtual void SetUniqueStatus(Bool_t unique)
Record folder for the database.
virtual Bool_t AddKey(KVDBKey *key, Bool_t check=kTRUE)
TString fFullPathTable
full path to parent table in folder structure
virtual Bool_t AddLink(const Char_t *key_name, KVDBRecord *rec, Bool_t linkback=kTRUE)
virtual void RemoveLink(const Char_t *key_name, KVDBRecord *rec, Bool_t linkback=kTRUE)
Remove the link between this record and the record "rec" in the DB table"key_name".
virtual KVRList * GetLinks(const Char_t *key) const
Returns the list of records linked to this record in table "key".
virtual void RemoveAllLinks(const Char_t *key)
Remove all links between this record and the records in the DB table"key_name".
virtual Int_t GetNumber() const
Description of an experimental run in database ,.
KVDBSystem * GetSystem() const
Database class used to store information on different colliding systems studied during an experiment.
UInt_t GetZtarget() const
.............. inline functions ...............
virtual void Print(Option_t *option="") const
Bool_t IsCollision() const
retourne kTRUE, si le systeme est une collision ie projectile+cible
Int_t Compare(const TObject *) const
UInt_t GetAtarget() const
void SetRuns(KVNumberList &)
KVUnownedList * _GetRuns()
Float_t fEbeam
Energy of the beam in MeV/nucleon.
KVUnownedList * GetRuns() const
Returns a sorted list of all the runs associated with this system.
void RemoveRun(KVDBRecord *)
virtual void Save(std::ostream &) const
Float_t GetTargetThickness() const
void AddRun(KVDBRecord *)
TString GetBatchNameWithoutEnergy()
KV2Body * GetKinematics()
KVUnownedList * fRunlist
used to store pointer to sorted list of runs
UInt_t fAbeam
Mass of the projectile nucleus.
Double_t GetZVtot() const
virtual void ls(Option_t *option="*") const
virtual void Load(std::istream &)
TString GetReactionNameWithoutEnergy()
KVDBTable * GetRunsTable()
Int_t fRuns
temporary variable used to stock number of associated runs
KV2Body * fCinema
used to calculate kinematics of entrance channel
UInt_t fZtarget
charge of the target nucleus
KVTarget * fTarget
physical target used for experiment run
virtual void GetRunList(KVNumberList &) const
Fills the KVNumberList object with the list of all run numbers associated with this system.
UInt_t fZbeam
charge of the projectile nucleus
UInt_t fAtarget
Mass of the target nucleus.
virtual KVDBRecord * GetRecord(const Char_t *rec_name) const
Extended TList class which owns its objects by default.
void Sort(Bool_t order=kSortAscending)
Description of physical materials used to construct detectors & targets; interface to range tables.
Double_t GetAreaDensity() const
Bool_t IsIsotopic() const
Description of properties and kinematics of atomic nuclei.
const Char_t * GetSymbol(Option_t *opt="") const
Strings used to represent a set of ranges of values.
const Char_t * AsString(Int_t maxchars=0) const
void SetList(const TString &)
void Add(Int_t)
Add value 'n' to the list.
void Clear(Option_t *="")
Empty number list, reset it to initial state.
TVector3 GetMomentum() const
void SetEnergy(Double_t e)
Wrapper for TRefArray adding some functionality.
virtual TObject * At(Int_t idx) const
virtual void Add(TObject *obj)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
Calculation/correction of energy losses of particles through an experimental target.
void Print(Option_t *opt="") const
Show information on this material.
void SetAngleToBeam(Double_t a)
Int_t NumberOfLayers() const
void AddLayer(const Char_t *material, Double_t thick)
KVList * GetLayers() const
Double_t GetAngleToBeam()
Gives angle of target to incident beam direction in degrees.
Extended TList class which does not own its objects by default.
virtual const char * GetName() const
virtual void SetTitle(const char *title="")
virtual void SetName(const char *name)
virtual const char * ClassName() const
virtual Bool_t InheritsFrom(const char *classname) const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
const char * Data() const
TString & ReplaceAll(const char *s1, const char *s2)