10 #include "KVDP2toIDGridConvertor.h"
14 #include "KVIDGridManager.h"
56 if (!fGridClass)
Error(KV__ERROR(SetGridClass),
"Unknown grid class %s", cl);
67 if (fGrids) fGrids->Clear();
68 else fGrids =
new TList;
71 else Error(KV__ERROR(Convert),
"gIDGridManager=0x0: create an ID grid manager first!");
86 Error(KV__ERROR(ReadFile),
87 "Set class of ID grids to generate first!");
94 if (!datfile.good()) {
95 Error(KV__ERROR(ReadFile),
96 "Problem reading file %s",
filename);
103 while (datfile.good()) {
110 if (!s.BeginsWith(
'#')) {
111 int ring, modu, frun, lrun, totpoints;
112 if (sscanf(s.Data(),
"%d %d %d %d", &ring, &modu, &frun, &lrun) !=
114 Error(KV__ERROR(ReadFile),
"Problem reading file %s\nLast line read: %s",
133 for (
int i = 0; i < nlines; i++) {
135 datfile >> z >>
a >> npoints;
136 totpoints += 2 * npoints;
152 ReadLineCoords(grid, datfile);
176 for (
int i = 0; i <
line->GetN(); i++) {
185 for (
int i = 0; i <
line->GetN(); i++) {
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
Converts dp2-format grids to KVIDGrids.
virtual void SetGridClass(const Char_t *cl)
virtual ~KVDP2toIDGridConvertor()
Destructor.
virtual void ReadFile(const Char_t *filename)
Read grids in file and add to fGrids list.
void Convert(const Char_t *filename)
virtual void ReadLineCoords(KVIDGrid *, std::ifstream &)
void Add(TString, KVIDentifier *)
const KVList * GetCuts() const
const KVNameValueList * GetParameters() const
virtual KVIDentifier * New(const Char_t *)
Create new object of class "id_class" which derives from KVIDentifier.
const KVList * GetIdentifiers() const
Abstract base class for 2D identification grids in e.g. (dE,E) maps.
virtual void CalculateLineWidths()
KVIDLine * NewLine(const Char_t *idline_class="")
Base class for lines/cuts used for particle identification in 2D data maps.
Base class for graphical cuts used in particle identification.
void SetValue(const Char_t *name, value_type value)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
static TClass * GetClass(Bool_t load=kTRUE, Bool_t silent=kFALSE)
virtual void AddAll(const TCollection *col)