}
-HistogramType::HistogramType(TString suffix, systemparam* gotsystempar, sensorinfostruct* gotsensorinfo, Bool_t threshold, Int_t gotcolor, Int_t gotstyle ) {
+HistogramType::HistogramType(TString suffix, systemparam* gotsystempar, sensorinfostruct* gotsensorinfo, TString gothumanreadablestr, Int_t gotcolor, Int_t gotstyle ) {
histogramdescription = suffix;
+ humanreadablestr = gothumanreadablestr;
cursystempar = gotsystempar;
cursensorinfo = gotsensorinfo;
- setThresholdType(threshold);
initHistograms(gotcolor, gotstyle);
};
// GETTER AND SETTER
//*****************
-void HistogramType::setThresholdType(Bool_t threshold) {
- if (threshold) {
- isthresholdclustertype = 1; }
- else {
- isthresholdclustertype = 0; }
-}
-
//*****************
// INIT FUNCTIONS
//*****************
}
void HistogramType::initHistogram(TH1F* &histogrampointer, TString prefix, Int_t color, Int_t style) {
- histogrampointer=new TH1F(prefix.Data(), prefix.Data(), cursystempar->nbins, 0, cursystempar->maxbin);
+ histogrampointer=new TH1F(prefix.Data(), Form("%s, %s",prefix.Data(), humanreadablestr.Data()), cursystempar->nbins, 0, cursystempar->maxbin);
histogrampointer->SetLineStyle(style);
histogrampointer->SetLineColor(color);
histogrampointer->SetStats(kTRUE);
~HistogramType(void);
/** @brief constructor */
- HistogramType(TString suffix, systemparam* gotsystempar, sensorinfostruct* gotsensorinfo, Bool_t threshold=0, Int_t gotcolor=0, Int_t gotstyle=0);
+ HistogramType(TString suffix, systemparam* gotsystempar, sensorinfostruct* gotsensorinfo, TString gothumanreadablestr, Int_t gotcolor=0, Int_t gotstyle=0);
//*****************
// TH HISTOGRAMS
//*****************
// GETTER AND SETTER
//*****************
- void setThresholdType(Bool_t threshold);
//*****************
// INIT FUNCTIONS
//*****************
// GENERAL HISTOGRAM PROPERTIES
//*****************
+ /// A string representing the current run database information in a human readable format
+ TString humanreadablestr="";
/// type in here what the histogram is intended for or how it is calculated, will be added to filenames
TString histogramdescription = "";
/// The gain used to rescale the histograms
cout << colorwhite << "init Histogram classes:" << endlr;
// default histogram class, no special cuts applied
- histogram = new HistogramType("", &cursystemparam, &cursensorinfo, 0, rootcolors[plotStyle], rootlinestyle[plotStyle] );
+ histogram = new HistogramType("", &cursystemparam, &cursensorinfo, humanreadablestr, rootcolors[plotStyle], rootlinestyle[plotStyle] );
HistogramClassVector.push_back(histogram);
// dynamical cluster threshold cut
- histogramthreshold = new HistogramType(" Threshold", &cursystemparam, &cursensorinfo, 1, rootcolors[plotStyle], rootlinestyle[plotStyle] );
+ histogramthreshold = new HistogramType(" Threshold", &cursystemparam, &cursensorinfo, humanreadablestr, rootcolors[plotStyle], rootlinestyle[plotStyle] );
HistogramClassVector.push_back(histogramthreshold);
// fixed threshold cut
- histogramfixedthreshold = new HistogramType(" fixed Threshold", &cursystemparam, &cursensorinfo, 1, rootcolors[plotStyle], rootlinestyle[plotStyle] );
+ histogramfixedthreshold = new HistogramType(" fixed Threshold", &cursystemparam, &cursensorinfo, humanreadablestr, rootcolors[plotStyle], rootlinestyle[plotStyle] );
HistogramClassVector.push_back(histogramfixedthreshold);
// dennis megacut
- dennismegacut = new HistogramType(" Dennis Mega Cut", &cursystemparam, &cursensorinfo, 0, rootcolors[plotStyle], rootlinestyle[plotStyle] );
+ dennismegacut = new HistogramType(" Dennis Mega Cut", &cursystemparam, &cursensorinfo, humanreadablestr, rootcolors[plotStyle], rootlinestyle[plotStyle] );
HistogramClassVector.push_back(dennismegacut);
debugDBreadout();
Bool_t Run::generateReadableRunCode()
{
humanreadablestr = Form("%s, %s, chip %s, %s, %sT=%.1f", labbook.source.Data(), labbook.chipGen.Data(), labbook.chip.Data(), labbook.matrix.Data(), humanreadablesuffix.Data(), labbook.temp);
+ for (vector<HistogramType*>::iterator curHistogramClass = HistogramClassVector.begin(); curHistogramClass != HistogramClassVector.end(); curHistogramClass++)
+ (*curHistogramClass)->humanreadablestr = humanreadablestr;
runcode = Form("%i_", labbook.runnumber);
if (labbook.chip.Length() < 2)