4#include "KVRawDataAnalyser.h"
5#include "KVMultiDetArray.h"
6#include "KVClassFactory.h"
25 TotalEntriesToRead = 0;
98 cout << endl <<
"Reading all events from file " <<
raw_file.Data() << endl;
101 cout << endl <<
"Reading " <<
nevents <<
" events from file " <<
raw_file.Data() << endl;
104 cout <<
"Starting analysis of run " <<
fRunNumber <<
" on : ";
129 cout <<
"Ending analysis of run " <<
fRunNumber <<
" on : ";
132 cout << endl <<
"Finished reading " <<
fEventNumber - 1 <<
" events from file " <<
raw_file.Data() << endl << endl;
197 Info(
"Terminate",
"both");
205 Info(
"Terminate",
"histo");
211 Info(
"Terminate",
"tree");
216 else Info(
"Terminate",
"none");
263 Error(
"AddTree",
"You must call CreateTreeFile(const Char_t*) before using this method!");
406 while ((obj = next())) {
409 if (((
TH1*)obj)->GetEntries() > 0) {
458 kTRUE,
"RawAnalysisTemplate");
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
R__EXTERN TSystem * gSystem
static void CombineFiles(const Char_t *file1, const Char_t *file2, const Char_t *newfilename, Bool_t keep=kTRUE)
Factory class for generating skeleton files for new classes.
void GenerateCode()
Generate header and implementation file for currently-defined class.
void AddImplIncludeFile(const Char_t *filename)
ULong64_t GetEvents() const
virtual void Print(Option_t *option="") const
const KVString & GetUserClassOptions() const
virtual void postEndRun()
void DoStatusUpdate(Long64_t nevents) const
Print infos on events treated, disk usage, memory usage.
virtual void preInitAnalysis()
virtual void postAnalysis()
virtual Bool_t CheckStatusUpdateInterval(Long64_t nevents) const
virtual void preAnalysis()
const KVString & GetDataType() const
virtual void postInitRun()
static Bool_t AbortProcessingLoop()
Long64_t GetNbEventToRead(void) const
virtual void postEndAnalysis()
virtual void preEndAnalysis()
virtual void preInitRun()
virtual void postInitAnalysis()
const KVNumberList & GetRunList() const
const KVDataSet * GetDataSet() const
FileType * OpenRunfile(const Char_t *type, Int_t run)
TString GetFullPathToRunfile(const Char_t *type, Int_t run) const
KVDBRun * GetDBRun(Int_t number) const
virtual void InitialiseRawDataReading(KVRawDataReader *)
static KVMultiDetArray * MakeMultiDetector(const Char_t *dataset_name, Int_t run=-1, TString classname="KVMultiDetArray")
virtual Bool_t HandleRawDataEvent(KVRawDataReader *)
Abstract base class for user analysis of raw data.
virtual Bool_t Analysis()=0
Long64_t TotalEntriesToRead
const KVHashList * GetHistoList() const
KVHashList fHistoList
list of histograms of user analysis
KVRawDataReader * fRunFile
currently analysed run file
void FillTProfile(TProfile *h1, Double_t one, Double_t two, Double_t three)
Int_t fRunNumber
run number of current file
virtual void SaveHistos(const Char_t *filename="", Option_t *option="recreate", Bool_t onlyfilled=kFALSE)
void FillTProfile2D(TProfile2D *h2, Double_t one, Double_t two, Double_t three, Double_t four)
KVHashList fTreeList
list of trees of user analysis
KVString fCombinedOutputFile
optional name for single results file with trees and histos
Long64_t fEventNumber
event number in current run
virtual void EndAnalysis()=0
Bool_t CreateTreeFile(const Char_t *filename="")
void FillTree(const Char_t *sname="")
TTree * GetTree(const Char_t *name) const
void FillTH3(TH3 *h3, Double_t one, Double_t two, Double_t three, Double_t four)
void FillHisto(const Char_t *sname, Double_t one, Double_t two=1, Double_t three=1, Double_t four=1)
virtual ~KVRawDataAnalyser()
Destructor.
static void Make(const Char_t *kvsname="MyOwnRawDataAnalyser")
Automatic generation of derived class for raw data analysis.
void FillTH1(TH1 *h1, Double_t one, Double_t two)
void AddHisto(TH1 *histo)
TH1 * GetHisto(const Char_t *name) const
virtual void InitAnalysis()=0
void CalculateTotalEventsToRead()
loop over runs and calculate total events
KVDBRun * fCurrentRun
poiner to current run
KVUserAnalysisOptionList fOptionList
list of options set by user for analysis
void FillTH2(TH2 *h2, Double_t one, Double_t two, Double_t three)
void AddTree(TTree *tree)
void AbortDuringRunProcessing()
Method called to abort analysis during processing of a run.
Abstract base class for reading raw (DAQ) data.
virtual Bool_t GetNextEvent()=0
virtual TObject * FindObject(const char *name) const
virtual void Execute(const char *method, const char *params, Int_t *error=0)
virtual void Add(TObject *obj)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void ParseOptions(const KVString &optlist)
virtual Int_t GetEntries() const
const char * AsString() const
Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsiz=0) const override
virtual Int_t Fill(const char *name, Double_t w)
const char * GetName() const override
virtual const char * ClassName() const
virtual void Warning(const char *method, const char *msgfmt,...) const
R__ALWAYS_INLINE Bool_t IsZombie() const
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
virtual Bool_t InheritsFrom(const char *classname) const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
const char * Data() const
void Form(const char *fmt,...)
virtual int Rename(const char *from, const char *to)