4 #include "TDirectory.h"
22 std::cout <<
"Create Histos" << std::endl;
27 sprintf(name,
"V1190_%i_%i",0,i);
38 sprintf(title,
"V1190 histogram for channel=%i",i);
40 TH1D *tmp =
new TH1D(name,title,5000,0,500000);
41 tmp->SetXTitle(
"TDC value");
42 tmp->SetYTitle(
"Number of Entries");
60 for(
unsigned int i = 0; i < measurements.size(); i++){
62 int chan = measurements[i].GetChannel();
63 GetHistogram(chan)->Fill(measurements[i].GetMeasurement());
R__EXTERN TDirectory * gDirectory
T * GetEventData(const char *name)
Add a templated function that returns event data in the format that we want.
virtual TObject * Get(const char *namecycle)
virtual void SetSubTabName(std::string name)
Set the name of the sub-tab for these plots, if running DaqDisplay.
TH1 * GetHistogram(unsigned i)
A helper method for accessing each histogram. Does bounds checking.
std::vector< TDCMeasurement > & GetMeasurements()
Get the Vector of TDC Measurements.
void CreateHistograms()
Function to create histograms; users will want to implement this function.
void EndRun(int transition, int run, int time)
Take actions at end run
void UpdateHistograms(TDataContainer &dataContainer)
Update the histograms for this canvas.
TV1190Histograms()
Reset the histograms for this canvas.
void BeginRun(int transition, int run, int time)
Take actions at begin run.