class TExperiment: public TNamed


The TExperiment provides the structure for holding a typical experiment at the NSCL. For each device a class is constructed. For example there is a class that represents HiRA (THiRA) and the S800 (TS800). An instance of these classes is then instanciated in TExperiment.

TExperiment is then a contruct that describes the entire experiment.

Run information can be displayed using the command, tree->GetUserInfo()->Print() This information can also be stored and used in any processing scripts written for this tree. For example, to get the number of times the run was paused we could do, Char_t *ch; ch = (Char_t*)tree->GetUserInfo->FindObject("Pauses")->GetTitle();

I. Unpacking

II. Important Data Members

III. Examples

 

Function Members (Methods)

public:
TExperiment()
TExperiment(const char* name)
virtual~TExperiment()
voidTObject::AbstractMethod(const char* method) const
voidAddTarget(const char* name, const char* title, Int_t ladder, Int_t ladderPos, Double_t thickness, Int_t Z, Int_t A)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
voidCalculate()
voidCalibrate()
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidClear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
Bool_tConvertEvtFile(Char_t* evtFileList)
Bool_tConvertEvtFile(Char_t* evtFile, Char_t* rootFile, Option_t* nBufs = "0")
virtual voidTNamed::Copy(TObject& named) const
voidCreateFolders()
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
TH2F*DrawSummary(TH2F* h, TBranch* b, unsigned short* d, Int_t c, Float_t range, Option_t* eventList = "")
TH2F*DrawSummary(TH2F* h, TBranch* b, short* d, Int_t c, Float_t range, Option_t* eventList = "")
TH2F*DrawSummary(TH2F* h, TBranch* b, int* d, Int_t c, Float_t range, Option_t* eventList = "")
TH2F*DrawSummary(TH2F* h, TBranch* b, float* d, Int_t c, Float_t range, Option_t* eventList = "")
TH2F*DrawSummary(TH2F* h, TBranch* b, double* d, Int_t c, Float_t range, Option_t* eventList = "")
virtual voidTObject::Dump() constMENU
voidDumpClassInfo()
voidDumpInfo()
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
voidInitClass()
voidInitTree(TTree* itree)
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
Long64_tLoadTree(Long64_t entry)
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TNamed&TNamed::operator=(const TNamed& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
Bool_tSetEventFilePath(Char_t* path)
Bool_tSetExperimentNumber(Char_t* number)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
Bool_tSetRootFilePath(Char_t* path)
voidSetTarget(const char* targetName)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
public:
TNamed*analysisState! Number indicating current TTree analysis state. 0=RAW 1=CAL etc.
TNamed*avgEventRate! Average number of events/s.
TNamed*avgType1EventRate! Average number of data events/s.
TNamed*avgType1WordRate! Average number of data words/s.
TNamed*avgWordRate! Average number of words/s.
TBranch*b_hira!
TNamed*dateCreated! Run creation date.
TNamed*dateEnded! Run end date.
TNamed*elapsedTime! Elapsed runtime (seconds).
Char_t*evtFilePath! Source of event files.
TNamed*evtSize! Event file size.
TNamed*expNumber! Experiment ID number.
TTree*fChain! Pointer to the analyzed TTree or TChain.
Int_tfCurrent! Current Tree number in a TChain.
TTarget*fTarget! Currently selected target.
TObjArray*fTargets! Array of fixed targets.
TFolderf_constants!
TFolderf_scaler!
TBufferHeader*headerBuffer header class.
THiRA*hira!
Bool_tkElogFill! Elog fill flag.
Bool_tkEpicsFill! Epics fill flag.
Bool_tkFourPiFill! 4Pi fill flag.
Bool_tkHiraCsIFill! HiRA CsI fill flag.
Bool_tkHiraFill! HiRA fill flag.
Bool_tkMcpFill! MCP fill flag.
Bool_tkS800Fill! S800 fill flag.
Bool_tkScalerFill! Scaler fill flag.
TMcp*mcp!
TNamed*nBuffers! Total number of Buffers.
TNamed*nPauses! Number of times run was paused.
TNamed*nResumes! Number of times run was resumed.
TNamed*nTotalEntities! Total number of entities.
TNamed*nTotalType1Entities! Total number of data entities.
TNamed*nTotalType1Words! Total number of used data words.
TNamed*nTotalWords! Total number of used words.
TNamed*note! Run note.
TObjArraynotesArray! Array to hold run notes.
TNamed*primaryBeam! Primary beam.
TNamed*primaryEnergy! Primary beam energy.
Char_t*rootFilePath! Destination of ROOT files.
TNamed*rootSize! Root file size.
TNamed*runComments! Run Comments.
TNamed*runNumber! Run number.
TNamed*runTitle! Run title.
TNamed*runType! Run type.
TS800*s800!
TScaler*scalers!
TNamed*secondaryBeam! Secondary beam.
TNamed*secondaryEnergy! Secondary beam energy.
TNamed*timeCreated! Run creation time.
TNamed*timeEnded! Run end time.
protected:
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
private:
TGeoManager*fGManager!
UShort_t*p! Pointer to event buffers.

Class Charts

Inheritance Chart:
TNamed
TExperiment

Function documentation

TExperiment(const char* name)
 -- Default constructor.
 If a sub-class inherits from TObject and you do not want the fBits and
 fUniqueID to be streamed out to the root file then it is advisable to
 add the line,
              MyClass::Class()->IgnoreTObjectStreamer();
 This will save, in some cases, a significant amount of disk space when
 writing a root file.
~TExperiment()
 --  Destructor

void AddTarget(const char* name, const char* title, Int_t ladder, Int_t ladderPos, Double_t thickness, Int_t Z, Int_t A)
 -- Add a target to the experimental setup.

void Calculate()
 -- Call to all Calculate methods.

void Calibrate()
 -- Calls all Calibrate methods.

void Clear(Option_t* option = "")
 -- Clear all member classes.

void CreateFolders()
 -- Create all initial folders.
 Folders can be useful for storing global constants, calibration file data,
 run information . . . among other things.

 This method should call all sub-class CreateFolders methods.
void DumpClassInfo()
 -- Output of currently built and fillable classes.

void DumpInfo()
 -- Output all run information.
 This output should include all information in the UserInfoList of the current TTree.
 In addition scaler values are output along with any quantities calculated with these
 values.
void InitClass()
 -- Initialize the class and sub-classes.
 The InitClass method of all member classes should be called here.  This
 method is responsible for setting all the defaults of the member classes.
void InitTree(TTree* itree)
 -- Initialze a tree.
 Set the branch addresses for all members of all classes.

 IMPORTANT:  This method assumes that classes are created using the object oriented
             method described in the ROOT Users Manual or that the corresponding
             class has a valid InitTree method.
Bool_t ConvertEvtFile(Char_t* evtFile, Char_t* rootFile, Option_t* nBufs = "0")
 -- Convert an event file to a ROOT file.
 An event file is opened for reading and a root file created for writing.
 A buffer is read and each entitiy in the buffer is looped over.  The buffer
 header is read and the buffer type is determined.

 NOTE:  If the root file already exist it will be overwritten!!!

 For additional information on the buffer structure please see,
 http://docs.nscl.msu.edu

Bool_t ConvertEvtFile(Char_t* evtFileList)
 -- Convert multiple event files to ROOT files.
 Note that the argument of this method is the name of a file containing the
 names of the event files to be converted.  IT SHOULD NOT CONTAIN THE FULL
 PATH!!!  The location of the event files is set by calling the method
 SetEventFilePath().
Long64_t LoadTree(Long64_t entry)
 -- Load an entry for a TChain.

void SetTarget(const char* targetName)
 -- Set the current target for this run.

Bool_t SetEventFilePath(Char_t* path)
 -- Sets the event file source path.
 This is the location from which event files will be read.
Bool_t SetExperimentNumber(Char_t* number)
 -- Sets the experiment number of this instance of TExperiment.
Bool_t SetRootFilePath(Char_t* path)
 -- Sets the root file destination path.
 Any root file generated from an event file will be written to this directory.
TH2F* DrawSummary(TH2F* h, TBranch* b, T *d, Int_t c, Float_t range, Option_t *eventList)
 -- Draw summary spectrum of selected branch.
 h: 2D histogram to be filled
 b: TBranch* pointer from which the data comes from
 d: Float_t* pointer to the array filled by the branch
 c: Number of slots to fill (dimension of d[] array and x-dimension of histogram)
TExperiment()
  Bool_t       ParseELOG();
{ }
template <class T> TH2F* DrawSummary(TH2F* h,TBranch* b,T *d, // Draw summary spectrum. Int_t c,Float_t range, Option_t *eventList = "")
 Define any templates here.
TH2F* DrawSummary(TH2F* h, TBranch* b, T *d, Int_t c, Float_t range, Option_t *eventList)

Author: Andrew M. Rogers, NSCL 07/01/2006
Last change: Tue Dec 16 22:01:06 2008
Last generated: 2008-12-16 22:01
Copyright (C) 2006-2010 Andrew M. Rogers

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.