Histogram Groups
A histogram group, as specified in the base class HistogramGroup, consists off a set of histogram that usually will be printed onto one canvas.
A class of type HistogramGroup is responsible for creating, deleting, filling, resetting, and drawing of its histograms. It also holds information about the detector groups and event groups for which the group should be active two unsigned int (Jeff L ).
When processing event from the event pool, the online monitoring is examining every histogram group whether its detector and event group match current event’s respective groups. Only if a match if found, the HistogramGroup is filled. The fill function is passed pointers to the evpReader and the to data: virtual bool fill(evpReader*, char* datap)
With every new run, a HistogramGroups reset() function is called.
HistogramGroup.h:#ifndef HistogramGroup_h
#define HistogramGroup_h
#include "TH1.h"
#include "TH2.h"
#include "TH3.h"
#include "TCanvas.h"
#include "TString.h"
class evpReader;
class TMapFile;
#include <map>
#include <set>
#include <list>
#include <vector>
#include <string>
using namespace std;
#include "Rtypes.h"
class HistogramGroup : public TObject {
public:
HistogramGroup(const char* group, const char* subGroup, const char* trigger="any", const char* detector="any");
// HistogramGroup(const HistogramGroup&);
virtual ~HistogramGroup() { }
virtual bool fill(evpReader* evp, char* datap) { return true; }
virtual void draw(TCanvas* cc);
virtual void reset() {}
public:
const char* groupName() const { return mGroupName.Data(); }
const char* subGroupName() const { return mSubGroupName.Data(); }
const char* triggerName() const { return mTriggerName.Data(); }
const char* detectorName() const { return mDetectorName.Data(); }
const char* id() const { return mId.Data(); }
bool operator<(const HistogramGroup& hg) const;
protected:
TString mGroupName;
TString mSubGroupName;
TString mTriggerName;
TString mDetectorName;
TString mId;
public:
bool testBits(unsigned int trigger, unsigned int detector);
void setActive(bool b) { mActive = b; }
bool active() { return mActive; }
protected:
char* pre(const char* a);
void pre(vector<TH1*>& );
unsigned int mTriggerBits;
unsigned int mDetectorBits;
bool mActive;
ClassDef(HistogramGroup,1) ;
};
#endif
- Printer-friendly version
- Login or register to post comments