101 out <<
"//--- tree viewer record"<<std::endl;
102 out <<
" tv_record = tv_session->AddRecord(kTRUE);"<<std::endl;
103 out <<
" tv_session->SetRecordName("<<quote<<
GetName()<<quote<<
");"<<std::endl;
104 out <<
" tv_record->fX = "<<quote<<
fX.
Data()<<quote<<
";"<<std::endl;
105 out <<
" tv_record->fY = "<<quote<<
fY.
Data()<<quote<<
";"<<std::endl;
106 out <<
" tv_record->fZ = "<<quote<<
fZ.
Data()<<quote<<
";"<<std::endl;
107 out <<
" tv_record->fCut = "<<quote<<
fCut.
Data()<<quote<<
";"<<std::endl;
108 out <<
" tv_record->fXAlias = "<<quote<<
fXAlias.
Data()<<quote<<
";"<<std::endl;
109 out <<
" tv_record->fYAlias = "<<quote<<
fYAlias.
Data()<<quote<<
";"<<std::endl;
110 out <<
" tv_record->fZAlias = "<<quote<<
fZAlias.
Data()<<quote<<
";"<<std::endl;
111 out <<
" tv_record->fCutAlias = "<<quote<<
fCutAlias.
Data()<<quote<<
";"<<std::endl;
112 out <<
" tv_record->fOption = "<<quote<<
fOption.
Data()<<quote<<
";"<<std::endl;
114 out <<
" tv_record->fScanRedirected = kTRUE;"<<std::endl;
116 out <<
" tv_record->fScanRedirected = kFALSE;"<<std::endl;
118 out <<
" tv_record->fCutEnabled = kTRUE;"<<std::endl;
120 out <<
" tv_record->fCutEnabled = kFALSE;"<<std::endl;
122 out <<
" tv_record->SetUserCode(\""<<
fUserCode.
Data()<<
"\");"<<std::endl;
124 out <<
" tv_record->SetAutoexec();"<<std::endl;
163 if (!fromFile) newrec->
FormFrom(fViewer);
164 fCurrent = fRecords - 1;
169 if (strlen(newrec->
GetZ())) name += newrec->
GetZ();
170 if (strlen(newrec->
GetY())) {
171 if (name.
Length()) name +=
":";
172 name += newrec->
GetY();
174 if (strlen(newrec->
GetX())) {
175 if (name.
Length()) name +=
":";
176 name += newrec->
GetX();
178 SetRecordName(name.
Data());
188 if (!fRecords)
return 0;
190 if (i < 0) fCurrent = 0;
191 if (i > fRecords-1) fCurrent = fRecords - 1;
192 if (fCurrent>0 && fCurrent<fRecords-1)
198 if (fCurrent == fRecords-1) {
202 fViewer->SetCurrentRecord(fCurrent);
203 return (
TTVRecord *)fList->UncheckedAt(fCurrent);
211 Int_t crt = fCurrent;
212 TTVRecord *current = GetRecord(fCurrent);
214 fViewer->UpdateCombo();
216 fViewer->SetCurrentRecord(fCurrent);
224 if (!fRecords)
return;
227 fList->RemoveAt(fRecords--);
228 if (fCurrent > fRecords-1) fCurrent = fRecords - 1;
229 Int_t crt = fCurrent;
230 fViewer->UpdateCombo();
245 fViewer->ExecuteDraw();
247 fViewer->SetHistogramTitle(rec->
GetName());
255 out<<
"//--- session object"<<std::endl;
256 out<<
" TTVSession* tv_session = new TTVSession(treeview);"<<std::endl;
257 out<<
" treeview->SetSession(tv_session);"<<std::endl;
259 for (
Int_t i=0; i<fRecords; i++) {
260 record = GetRecord(i);
263 out<<
"//--- Connect first record"<<std::endl;
264 out<<
" tv_session->First();"<<std::endl;
const char * GetTrueName()
TTVRecord()
TTVRecord default constructor.
const char * GetZ() const
const char * GetX() const
void RemoveLastRecord()
Remove current record from list.
friend class TClonesArray
void SetRecordName(const char *name)
Set record name.
virtual const char * GetName() const
Returns name of object.
A graphic user interface designed to handle ROOT trees and to take advantage of TTree class features...
const char * GetGrOpt()
Get graph option.
void SaveSource(std::ofstream &out)
Save the TTVSession in a C++ macro file.
void SetName(const char *name="")
void SetCutMode(Bool_t enabled=kTRUE)
void SetExpression(const char *name, const char *alias, Bool_t cutType=kFALSE)
Set the true name, alias and type of the expression, then refresh it.
I/O classes for TreeViewer session handling.
TTVRecord * GetRecord(Int_t i)
Return record at index i.
TTVLVEntry * ExpressionItem(Int_t index)
Get the item from a specific position.
This class represent entries that goes into the TreeViewer listview container.
Bool_t MustExecuteCode() const
void SaveSource(std::ofstream &out)
Save the TTVRecord in a C++ macro file.
Bool_t HasUserCode() const
const char * GetY() const
void FormFrom(TTreeViewer *tv)
Populate members from treeviewer tv.
void SetSmallPic(const TGPicture *spic)
Set small picture.
void PlugIn(TTreeViewer *tv)
Change treeviewer status to this record.
void SetGrOpt(const char *option)
Set graph option.
void SetScanRedirect(Bool_t mode)
Set the state of Scan check button.
I/O classes for TreeViewer session handling.
void UpdateRecord(const char *name)
Updates current record according to new X, Y, Z settings.
An array of clone (identical) objects.
TTVRecord * AddRecord(Bool_t fromFile=kFALSE)
Add a record.
void ExecuteUserCode()
Execute user-defined code.
void Show(TTVRecord *rec)
Display record rec.
Bool_t IsScanRedirected()
Return kTRUE if scan is redirected.
const char * Data() const