#include <CObject.h>
Inheritance diagram for CObject:

Public Member Functions | |
| CObject () | |
| CObject (TObject *obj, const TObject *inputsource) | |
| CObject (const CObject &cobj) | |
| virtual | ~CObject () |
| CObject & | operator= (const CObject &obj) |
| const char * | GetName () const |
| const char * | GetTitle () const |
| Bool_t | IsSortable () const |
| ULong_t | Hash () const |
| Bool_t | IsEqual (const TObject *obj2) const |
| Int_t | Compare (const TObject *obj) const |
| TObject * | GetTObject () const |
| const TObject * | GetInputSource () const |
| void | SetTObject (TObject *obj) |
| void | SetInputSource (const TObject *obj) |
| virtual void | Draw (Option_t *option="") |
| virtual void | Paint (Option_t *option="") |
| virtual void | ReadObject () |
Protected Attributes | |
| TObject * | fTObject |
| const TObject * | fInputSource |
| TString | fName |
Private Member Functions | |
| TObject * | GetNewObj (const char *, const TObject *) |
| void | free () |
| void | ResetAllkCanDelete (TVirtualPad *pad) |
|
|
Definition at line 40 of file CObject.cxx. 00040 :TObject() {}
|
|
||||||||||||
|
Definition at line 42 of file CObject.cxx. References fName, and fTObject. 00042 : 00043 fTObject(obj), fInputSource(inputsource) { 00044 00045 if ( fTObject ) fName = fTObject->GetName(); 00046 }
|
|
|
Definition at line 48 of file CObject.cxx. References fName, and fTObject. 00048 : 00049 TObject(cobj), fTObject(cobj.fTObject), fInputSource(cobj.fInputSource) { 00050 00051 if ( fTObject ) fName = fTObject->GetName(); 00052 }
|
|
|
Definition at line 55 of file CObject.cxx. References free(). 00056 {
00057 free();
00058 }
|
|
|
Definition at line 89 of file CObject.cxx. References GetName(). 00090 {
00091 if (this == obj) return 0;
00092 if (CObject::Class() != obj->IsA()) return -1;
00093 return TString(GetName()).CompareTo(obj->GetName());
00094 }
|
|
|
Reimplemented in CHistogram. Definition at line 106 of file CObject.cxx. References option. Referenced by HistoDisplay::DrawTH1(). 00107 {
00108 if ( ! fTObject ) return;
00109
00110 ResetBit( kCanDelete );
00111 AppendPad( option );
00112
00113 }
|
|
|
Reimplemented in CHistogram. Definition at line 199 of file CObject.cxx. References fTObject, and ResetAllkCanDelete(). Referenced by SetTObject(), and ~CObject(). 00200 {
00201 //cout << " In CObject free " << endl;
00202 if ( !fTObject ) return;
00203
00204 if ( fTObject->InheritsFrom( TPad::Class() ) )
00205 ResetAllkCanDelete( (TPad*)fTObject );
00206
00207 delete fTObject;
00208 fTObject = 0;
00209
00210 }
|
|
|
Definition at line 59 of file CObject.h. Referenced by CHistogram::CHistogram(), CHistogram::copy(), HistoDisplay::DrawUpdatedPad(), HistoDisplay::GetCObjFromListItem(), and HistoDisplay::UpdateHistoList(). 00059 { return fInputSource; }
|
|
|
Definition at line 60 of file CObject.cxx. References fName. Referenced by HistoDisplay::ChangeCanvasNameTitle(), Compare(), HistoDisplay::GetNewObj(), HistoDisplay::PrintCanvas(), and ReadObject(). 00061 {
00062 return fName.Data();
00063 }
|
|
||||||||||||
|
Definition at line 130 of file CObject.cxx. References count. Referenced by ReadObject(). 00131 {
00132
00133 //cout << " In GetNewObj" << endl;
00134
00135 TObject *obj = 0;
00136
00137 if (inputobj) {
00138
00139 if ( inputobj->IsA() == TMapFile::Class() ) {
00140 TMapFile *mfile = (TMapFile*)inputobj;
00141 if (mfile) obj = (TObject*)mfile->Get( objName );
00142 }
00143 else if ( inputobj->IsA() == TFile::Class() ) {
00144 TFile *rfile = (TFile*)inputobj;
00145 if (rfile) obj = (TObject*)rfile->Get( objName );
00146 }
00147 else if ( inputobj->IsA() == TSocket::Class() ) {
00148 TSocket *socket = (TSocket*)inputobj;
00149
00150 if ( socket && socket->IsValid() ) {
00151
00152 Int_t count = 0;
00153 Int_t maxcount = 5;
00154
00155 while ( !obj && count < maxcount ) {
00156
00157 socket->Send( objName );
00158 TMessage *message = NULL;
00159 socket->Recv(message);
00160 if ( message && message->What() == kMESS_OBJECT) {
00161 obj = (TObject*)message->ReadObject(message->GetClass());
00162 }
00163 delete message;
00164
00165 count++;
00166 } //while ( !obj && count < maxcount )
00167
00168
00169 if ( ! obj ) {
00170 cout << " Failed to get " << objName
00171 << " after " << maxcount << " tries." << endl;
00172 } //if ( ! obj )
00173 else {
00174 if ( count > 1 ) cout << " The object " << objName
00175 << " is sent from the socket by " << count
00176 << " tries." << endl;
00177 } //else of if ( ! obj )
00178
00179 } //if ( socket && socket->IsValid() )
00180 else {
00181 cout << "no connection to socket..." << endl;
00182 } //else // if ( socket && socket->IsValid() )
00183
00184 } // TMapFile,TFile, TSocket
00185
00186 else {
00187
00188 cout << " No inputobj " << endl;
00189
00190 } // else // TMapFile,TFile, TSocket
00191
00192 } // if(inputobj)
00193
00194 return obj;
00195
00196 }
|
|
|
Definition at line 48 of file CObject.h. References fTObject. Referenced by HistoDisplay::GetCObjFromListItem(), and HistoDisplay::RefreshTreeItem(). 00048 { return fTObject->GetTitle(); };
|
|
|
Definition at line 58 of file CObject.h. Referenced by HistoDisplay::AddSubtractHisto(), CHistogram::CHistogram(), CHistogram::copy(), HistoDisplay::DrawHisto(), HistoDisplay::DrawUpdatedPad(), and IsEqual(). 00058 { return fTObject; }
|
|
|
Definition at line 65 of file CObject.cxx. References fTObject. 00066 {
00067 if ( fTObject ) return fTObject->Hash();
00068 else return 0;
00069 }
|
|
|
Definition at line 72 of file CObject.cxx. References fTObject, and GetTObject(). 00073 {
00074 //if ( !obj2 || ! obj2->InheritsFrom(CObject::Class()) ) return kFALSE;
00075 //return fTObject->IsEqual(((CObject*)obj2)->GetTObject());
00076 if ( obj2 && obj2->InheritsFrom( CObject::Class() ) ) {
00077 if ( fTObject &&
00078 fTObject->IsEqual( ((CObject*)obj2)->GetTObject() ) )
00079 return kTRUE;
00080 else return kFALSE;
00081 }
00082 else {
00083 return kFALSE;
00084 }
00085
00086 }
|
|
|
Definition at line 50 of file CObject.h. 00050 {return kTRUE; }
|
|
|
Definition at line 231 of file CObject.cxx. References fInputSource, fTObject, and SetTObject(). 00232 {
00233 if (this != &cobj) {
00234 //if ( fTObject ) delete fTObject;
00235 //fTObject = cobj.fTObject;
00236 SetTObject( cobj.fTObject );
00237 fInputSource = cobj.fInputSource;
00238 }
00239 return *this;
00240 }
|
|
|
Reimplemented in CHistogram. Definition at line 115 of file CObject.cxx. References fTObject, and option. 00116 {
00117 if ( ! fTObject ) return;
00118 fTObject->Paint( option );
00119 }
|
|
|
Definition at line 123 of file CObject.cxx. References fInputSource, GetName(), GetNewObj(), and SetTObject(). Referenced by HistoDisplay::GetNewObj(). 00124 {
00125 SetTObject( GetNewObj( GetName(), fInputSource ) );
00126 }
|
|
|
Definition at line 213 of file CObject.cxx. Referenced by free(). 00214 {
00215 if ( !pad ) return;
00216
00217 TObjLink *link = pad->GetListOfPrimitives()->FirstLink();
00218
00219 while( link ) {
00220 TObject *obj = link->GetObject();
00221 if ( obj ) {
00222 if ( ! obj->TestBit( kCanDelete ) ) obj->SetBit( kCanDelete );
00223 if ( obj->InheritsFrom( TPad::Class() ) )
00224 ResetAllkCanDelete( (TPad*) obj );
00225 }
00226 link = link->Next();
00227 } // while( link )
00228
00229 }
|
|
|
Definition at line 62 of file CObject.h. References fInputSource. Referenced by HistoDisplay::GetCObjFromListItem(), and HistoDisplay::UpdateHistoList(). 00062 { fInputSource = obj; }
|
|
|
Definition at line 97 of file CObject.cxx. References free(), and fTObject. Referenced by HistoDisplay::AddPadHistosToHistoList(), operator=(), ReadObject(), and HistoDisplay::UpdateHistoList(). 00098 {
00099 if ( fTObject != obj ) {
00100 free();
00101 fTObject = obj;
00102 } //if ( fTObject != obj )
00103 }
|
|
|
Definition at line 33 of file CObject.h. Referenced by operator=(), ReadObject(), and SetInputSource(). |
|
|
|
|
|
Definition at line 32 of file CObject.h. Referenced by CObject(), CHistogram::copy(), free(), GetTitle(), Hash(), IsEqual(), operator=(), Paint(), and SetTObject(). |
1.3.9.1