TAgilentHistograms Class Reference

Class for making histograms of Agilent ampere data. More...

#include <TAgilentHistogram.h>

Inheritance diagram for TAgilentHistograms:
Inheritance graph
[legend]
Collaboration diagram for TAgilentHistograms:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TAgilentHistograms ()
 Reset the histograms for this canvas.
virtual ~TAgilentHistograms ()
void UpdateHistograms (TDataContainer &dataContainer)
 Update the histograms for this canvas.
void BeginRun (int transition, int run, int time)
 Take actions at begin run.
void EndRun (int transition, int run, int time)
 Take actions at end run.
TH1 * GetHistogram (unsigned int i)
 A helper method for accessing each histogram. Does bounds checking.
void SetNumberChannelsInGroup (int numberChannelsInGroups)
const int GetNumberChannelsInGroup ()
void SetGroupName (std::string name)
 Set name for the 'group'.
const std::string GetGroupName ()
void SetChannelName (std::string name)
 Set name for the 'channel'.
const std::string GetChannelName ()
void DisableAutoUpdate (bool DisableautoUpdate=true)
const bool GetDisableAutoUpdate ()
const bool HasAutoUpdate ()

Private Member Functions

void CreateHistograms ()
 Create Histograms and Fill.

Detailed Description

Class for making histograms of Agilent ampere data.

Definition at line 8 of file TAgilentHistogram.h.


Constructor & Destructor Documentation

TAgilentHistograms::TAgilentHistograms (  ) 

Reset the histograms for this canvas.

Definition at line 8 of file TAgilentHistogram.cxx.

References CreateHistograms().

00008                                       {  
00009   
00010   CreateHistograms();
00011 }

Here is the call graph for this function:

virtual TAgilentHistograms::~TAgilentHistograms (  )  [inline, virtual]

Definition at line 11 of file TAgilentHistogram.h.

00011 {};


Member Function Documentation

void TAgilentHistograms::BeginRun ( int  transition,
int  run,
int  time 
) [virtual]

Take actions at begin run.

Reimplemented from THistogramArrayBase.

Definition at line 63 of file TAgilentHistogram.cxx.

References CreateHistograms().

00063                                                                 {
00064 
00065   CreateHistograms();
00066 }

Here is the call graph for this function:

void TAgilentHistograms::CreateHistograms (  )  [private]

Create Histograms and Fill.

Definition at line 14 of file TAgilentHistogram.cxx.

References gDirectory, TDirectory::Get(), and Nchannels.

Referenced by BeginRun(), and TAgilentHistograms().

00014                                          {
00015   
00016   // Otherwise make histograms
00017   clear();
00018 
00019   std::cout << "Create Agilent Histos" << std::endl;
00020   for(int i = 0; i < Nchannels; i++){ // loop over channels    
00021 
00022     char name[100];
00023     char title[100];
00024     sprintf(name,"Agilent_%i_%i",0,i);
00025 
00026     // Delete old histograms, if we already have them
00027     TH1D *old = (TH1D*)gDirectory->Get(name);
00028     if (old){
00029       delete old;
00030     }
00031 
00032     // Create new histograms
00033     sprintf(title,"Agilent histogram for channel=%i",i);
00034     
00035     TH1D *tmp = new TH1D(name,title,10000,0,10);
00036     tmp->SetXTitle("Current (uA)");
00037     push_back(tmp);
00038    }
00039 
00040 }

Here is the call graph for this function:

Here is the caller graph for this function:

void THistogramArrayBase::DisableAutoUpdate ( bool  DisableautoUpdate = true  )  [inline, inherited]

Define whether the histogram gets automatically updated by rootana display. 'True' means that rootana display will NOT call UpdateHistograms automatically.

Definition at line 74 of file THistogramArrayBase.h.

References THistogramArrayBase::fDisableAutoUpdate, and THistogramArrayBase::fHasAutoUpdate.

Referenced by TAnaManager::TAnaManager().

00074 { fDisableAutoUpdate = DisableautoUpdate; fHasAutoUpdate = true;}  

Here is the caller graph for this function:

void TAgilentHistograms::EndRun ( int  transition,
int  run,
int  time 
) [virtual]

Take actions at end run.

Reimplemented from THistogramArrayBase.

Definition at line 69 of file TAgilentHistogram.cxx.

00069                                                               {
00070   printf("in end run for TAgilent\n");
00071 }

const std::string THistogramArrayBase::GetChannelName (  )  [inline, inherited]

Definition at line 70 of file THistogramArrayBase.h.

References THistogramArrayBase::fChannelName.

00070 { return fChannelName;  }

const bool THistogramArrayBase::GetDisableAutoUpdate (  )  [inline, inherited]

Definition at line 75 of file THistogramArrayBase.h.

References THistogramArrayBase::fDisableAutoUpdate.

00075 { return fDisableAutoUpdate; }  

const std::string THistogramArrayBase::GetGroupName (  )  [inline, inherited]

Definition at line 66 of file THistogramArrayBase.h.

References THistogramArrayBase::fGroupName.

00066 { return fGroupName;  }

TH1* THistogramArrayBase::GetHistogram ( unsigned int  i  )  [inline, inherited]

A helper method for accessing each histogram. Does bounds checking.

Definition at line 44 of file THistogramArrayBase.h.

Referenced by TV1730RawWaveform::Reset(), TV1730DppWaveform::Reset(), TV1720Waveform::Reset(), TDT724Waveform::Reset(), TV792Histograms::UpdateHistograms(), TV1730RawWaveform::UpdateHistograms(), TV1730DppWaveform::UpdateHistograms(), TV1720Waveform::UpdateHistograms(), TV1190Histograms::UpdateHistograms(), TL2249Histograms::UpdateHistograms(), TDT724Waveform::UpdateHistograms(), and UpdateHistograms().

00044                                    {
00045     if(i < 0 || i >= size()){
00046       std::cerr << "Invalid index (=" << i 
00047                 << ") requested in THistogramArrayBase::GetHistogram(int i) " << std::endl;
00048       return 0;
00049     }
00050     return (*this)[i];
00051   }

Here is the caller graph for this function:

const int THistogramArrayBase::GetNumberChannelsInGroup (  )  [inline, inherited]

Definition at line 62 of file THistogramArrayBase.h.

References THistogramArrayBase::fNumberChannelsInGroups.

00062 { return fNumberChannelsInGroups; }

const bool THistogramArrayBase::HasAutoUpdate (  )  [inline, inherited]

Definition at line 76 of file THistogramArrayBase.h.

References THistogramArrayBase::fHasAutoUpdate.

00076 { return fHasAutoUpdate; }  

void THistogramArrayBase::SetChannelName ( std::string  name  )  [inline, inherited]

Set name for the 'channel'.

Definition at line 69 of file THistogramArrayBase.h.

References THistogramArrayBase::fChannelName.

00069 {  fChannelName = name;  }

void THistogramArrayBase::SetGroupName ( std::string  name  )  [inline, inherited]

Set name for the 'group'.

Definition at line 65 of file THistogramArrayBase.h.

References THistogramArrayBase::fGroupName.

00065 {  fGroupName = name;  }

void THistogramArrayBase::SetNumberChannelsInGroup ( int  numberChannelsInGroups  )  [inline, inherited]

Function to define the number of channels in group and allow user to treat the array as 2D array.

Definition at line 61 of file THistogramArrayBase.h.

References THistogramArrayBase::fNumberChannelsInGroups.

00061 { fNumberChannelsInGroups = numberChannelsInGroups; }

void TAgilentHistograms::UpdateHistograms ( TDataContainer dataContainer  )  [virtual]

Update the histograms for this canvas.

Implements THistogramArrayBase.

Definition at line 47 of file TAgilentHistogram.cxx.

References TGenericData::GetData64(), TDataContainer::GetEventData(), THistogramArrayBase::GetHistogram(), and Nchannels.

Referenced by TAnaManager::ProcessMidasEvent().

00047                                                                       {
00048 
00049 
00050 
00051     TGenericData *bert = dataContainer.GetEventData<TGenericData>("BERT");
00052     if(bert ){ 
00053       for(int i = 0; i < Nchannels; i++){
00054         GetHistogram(i)->Fill(100*((double*)bert->GetData64())[i]);
00055 
00056       }
00057     }
00058 }

Here is the call graph for this function:

Here is the caller graph for this function:


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

Generated on 12 Feb 2016 for ROOT Analyzer by  doxygen 1.6.1