Experiment Class Reference

An experiment which collected some data stored in the database. More...

Inheritance diagram for Experiment:

Inheritance graph
[legend]

Collaboration diagram for Experiment:

Collaboration graph
[legend]

List of all members.


Public Member Functions

 Experiment ()
 Default constructor.
 Experiment (String name)
 Named constructor.
 Experiment (String name, String informalName)
 Constructor which specifies both the formal and informal expt names.
String getName ()
 Get the experiment name.
Experiment setName (String name)
 Set the experiment name.
String getInformalName ()
 Get the informal name for this experiment.
Experiment setInformalName (String informalName)
 Set the informal name for this experiment.
String getCollider ()
 Get the associated collider.
Experiment setCollider (String collider)
 Set the associated collider.
String getLaboratory ()
 Get associated laboratory.
Experiment setLaboratory (String laboratory)
 Set associated laboratory.
String getComment ()
Experiment setComment (String comment)
int compareTo (Experiment other)
boolean equals (Object other)
int hashCode ()
String toString ()
 String representation.

Package Functions

Logger log ()
 Neat method to allow every class to get hold of a custom-named Logger.

Detailed Description

An experiment which collected some data stored in the database.

This object is specifically the particular run of an experiment, associated with a period of institutional funding, so for example CDF Run 1 and CDF Run 2 are different experiments in this scheme, as are NA48, NA482a, etc.

Author:
Andy Buckley
Version:
Date
2007-09-25 15:44:34 +0100 (Tue, 25 Sep 2007)
Revision
1077

Definition at line 18 of file Experiment.java.


Constructor & Destructor Documentation

Experiment (  ) 

Default constructor.

Definition at line 46 of file Experiment.java.

00046 { }

Experiment ( String  name  ) 

Named constructor.

Definition at line 50 of file Experiment.java.

References Experiment.setName().

00050                                    {
00051         this();
00052         setName(name);
00053     }

Experiment ( String  name,
String  informalName 
)

Constructor which specifies both the formal and informal expt names.

Definition at line 57 of file Experiment.java.

References Experiment.setInformalName().

00057                                                         {
00058         this(name);
00059         setInformalName(informalName);
00060     }


Member Function Documentation

String getName (  ) 

Get the experiment name.

Definition at line 67 of file Experiment.java.

Referenced by Experiment.compareTo(), Experiment.hashCode(), and Experiment.toString().

00067                             {
00068         return _name;
00069     }

Experiment setName ( String  name  ) 

Set the experiment name.

Definition at line 71 of file Experiment.java.

Referenced by Experiment.Experiment().

00071                                            {
00072         _name = name;
00073         return this;
00074     }

String getInformalName (  ) 

Get the informal name for this experiment.

Definition at line 78 of file Experiment.java.

Referenced by Experiment.hashCode().

00078                                     {
00079         return _informalName;
00080     }

Experiment setInformalName ( String  informalName  ) 

Set the informal name for this experiment.

Definition at line 82 of file Experiment.java.

Referenced by Experiment.Experiment().

00082                                                            {
00083         _informalName = informalName;
00084         return this;
00085     }

String getCollider (  ) 

Get the associated collider.

Definition at line 89 of file Experiment.java.

Referenced by Experiment.hashCode().

00089                                 {
00090         return _collider;
00091     }

Experiment setCollider ( String  collider  ) 

Set the associated collider.

Definition at line 93 of file Experiment.java.

00093                                                    {
00094         _collider = collider;
00095         return this;
00096     }

String getLaboratory (  ) 

Get associated laboratory.

Definition at line 100 of file Experiment.java.

Referenced by Experiment.hashCode().

00100                                   {
00101         return _laboratory;
00102     }

Experiment setLaboratory ( String  laboratory  ) 

Set associated laboratory.

Definition at line 104 of file Experiment.java.

00104                                                        {
00105         _laboratory = laboratory;
00106         return this;
00107     }

String getComment (  ) 

Definition at line 111 of file Experiment.java.

Referenced by Experiment.hashCode(), and Experiment.toString().

00111                                {
00112         return _comment;
00113     }

Experiment setComment ( String  comment  ) 

Definition at line 114 of file Experiment.java.

Referenced by Data.makeExampleExperiment().

00114                                                  {
00115         _comment = comment;
00116         return this;
00117     }

int compareTo ( Experiment  other  ) 

Definition at line 123 of file Experiment.java.

References Experiment.getName(), and Storeable.log().

00123                                            {
00124         log().debug("Comparing experiments...");
00125         return getName().compareTo(other.getName());
00126     }

boolean equals ( Object  other  ) 

Definition at line 129 of file Experiment.java.

References Experiment.hashCode().

00129                                         {
00130         if (this == other) return true;
00131         if (! (other instanceof Experiment)) return false;
00132         return hashCode() == other.hashCode();
00133     }

int hashCode (  ) 

Definition at line 136 of file Experiment.java.

References Experiment.getCollider(), Experiment.getComment(), Experiment.getInformalName(), Experiment.getLaboratory(), and Experiment.getName().

Referenced by Experiment.equals().

00136                           {
00137         int code = 61;
00138         if (getName() != null)         code ^= getName().hashCode();
00139         if (getInformalName() != null) code ^= getInformalName().hashCode();
00140         if (getCollider() != null)     code ^= getCollider().hashCode();
00141         if (getLaboratory() != null)   code ^= getLaboratory().hashCode();
00142         if (getComment() != null)      code ^= getComment().hashCode();
00143         return code;
00144     }

String toString (  ) 

String representation.

Reimplemented from Storeable.

Definition at line 151 of file Experiment.java.

References Experiment.getComment(), and Experiment.getName().

00151                              {
00152         StringBuffer s = new StringBuffer();
00153         s.append("Experiment: " + getName() + "\n");
00154         s.append("  Comment: " + getComment() + "\n");
00155         return s.toString();
00156     }

Logger log (  )  [package, inherited]


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


Generated on Tue Apr 21 15:54:46 2009 for HepData object model by  doxygen 1.5.5