#include <TConsumerInfo.h>
Public Types | |
| enum | { Okay, Warning, Error } |
Public Member Functions | |
| TConsumerInfo (const char *const consumername="", int runnumber=0) | |
| ~TConsumerInfo () | |
| const char * | consumername () const |
| void | setConsumername (const char *name) |
| void | addObject (const TString &name, const TString &path, int status, TObject *obj=NULL) |
| void | removeObject (const TString &name) |
| void | removeObject (TObject *obj) |
| void | emptyWarningFolder () |
| void | setPath (const TString &name, const TString &path) |
| void | setStatus (const TString &name, int status) |
| void | setAddress (const TString &name, TObject *obj) |
| TString | getPath (const TString &name) |
| Int_t | getStatus (const TString &name) |
| TObject * | getAddress (const TString &name) |
| void | setNevents (int nevents) |
| void | setRunNumber (int number) |
| int | runnumber () const |
| int | nevents () const |
| bool | isModified () const |
| void | setModified (bool modified) |
| void | setInputName (const TString &inputname) |
| const TString & | getInputName () const |
| long | estimatedSize () const |
| TList * | list () |
| void | updateListTree (TGListTree *listtree) |
| void | updateList (TList *list, TSocket *sock) |
| void | print (std::ostream &output=std::cout) const |
Private Attributes | |
| bool | _modified |
| Int_t | _runnumber |
| Int_t | _nevents |
| long | _estimatedsize |
| TString | _inputname |
| TList * | _list |
| std::map< TString, psa > | _objectlist |
Friends | |
| class | TIterConsumerInfo |
|
|
Definition at line 72 of file TConsumerInfo.h. 00073 {
00074 Okay,
00075 Warning,
00076 Error
00077 };
|
|
||||||||||||
|
Definition at line 40 of file TConsumerInfo.cxx. 00041 : TNamed("ConsumerInfo",consumername), 00042 _runnumber(runnumber),_nevents(0), 00043 _estimatedsize(100000),_inputname(), 00044 _list(new TList) 00045 { 00046 }
|
|
|
Definition at line 49 of file TConsumerInfo.cxx. References emptyWarningFolder(). 00050 {
00051 emptyWarningFolder();
00052 delete _list;
00053 }
|
|
||||||||||||||||||||
|
Definition at line 138 of file TConsumerInfo.cxx. References _estimatedsize, _list, _modified, and _objectlist. Referenced by CDFMonitoringModuleImp::AddObject(), main(), and HistoDisplay::MakeConsumerInfo(). 00139 {
00140 //cout << "adding object " << name << " to " << path << endl;
00141 // check if entry exists
00142 //cout << _objectlist[name].path << endl;
00143 if(_objectlist[name].path != "")
00144 {
00145 if (_objectlist[name].path == "Warning!/")
00146 {
00147 cout << "TConsumerInfo: object" << name << " already in Warning folder!" << endl;
00148 assert(0);
00149 return;
00150 }
00151 else
00152 cout << "TConsumerInfo: replacing existing entry for " << name << endl;
00153 }
00154 _objectlist[name] = psa(path,status,obj);
00155 if(obj)
00156 {
00157 _list->Add(obj);
00158 // increase estimatedsize
00159 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,15,1)
00160 TBufferFile testbuffer(TBuffer::kWrite);
00161 #else
00162 TBuffer testbuffer(TBuffer::kWrite);
00163 #endif
00164 obj->Streamer(testbuffer);
00165 _estimatedsize += testbuffer.BufferSize();
00166 _estimatedsize += 10000;
00167 }
00168 _modified = true;
00169 }
|
|
|
Definition at line 40 of file TConsumerInfo.h. 00040 {return GetTitle();}
|
|
|
Definition at line 199 of file TConsumerInfo.cxx. References _objectlist, TConsumerInfo::psa::address, TConsumerInfo::psa::path, and removeObject(). Referenced by ~TConsumerInfo(). 00200 {
00201 //cout << "removing error objects" << endl;
00202 for(std::map<TString,psa>::const_iterator iter=_objectlist.begin() ;
00203 iter != _objectlist.end() ; ++iter)
00204 {
00205 psa pns = iter->second;
00206 if(pns.path == "Warning!/")
00207 {
00208 //cout << "removing object" << iter->first << endl;
00209 --iter;
00210 removeObject(pns.address);
00211 delete pns.address;
00212 //cout << "object removed" << endl;
00213 }
00214 }
00215 }
|
|
|
Definition at line 64 of file TConsumerInfo.h. 00064 {return _estimatedsize;}
|
|
|
Definition at line 120 of file TConsumerInfo.cxx. References _objectlist, and TConsumerInfo::psa::address. Referenced by removeObject(). 00121 {
00122 psa pns = _objectlist[name];
00123 return pns.address;
00124 }
|
|
|
Definition at line 133 of file TConsumerInfo.cxx. 00134 {
00135 return _inputname;
00136 }
|
|
|
Definition at line 108 of file TConsumerInfo.cxx. References _objectlist, and TConsumerInfo::psa::path. Referenced by HistoDisplay::AddTreeItemsOfInput(). 00109 {
00110 psa pns = _objectlist[name];
00111 return pns.path;
00112 }
|
|
|
Definition at line 114 of file TConsumerInfo.cxx. References _objectlist, and TConsumerInfo::psa::status. 00115 {
00116 psa pns = _objectlist[name];
00117 return pns.status;
00118 }
|
|
|
Definition at line 60 of file TConsumerInfo.h. Referenced by ConsumerExport::send(). 00060 { return _modified;}
|
|
|
Definition at line 65 of file TConsumerInfo.h. Referenced by ConsumerExport::send(). 00065 {return _list;}
|
|
|
Definition at line 59 of file TConsumerInfo.h. Referenced by timer(), and DisplayServer::updateStateManager(). 00059 {return _nevents;}
|
|
|
Definition at line 279 of file TConsumerInfo.cxx. References _nevents, _objectlist, _runnumber, TConsumerInfo::psa::path, and TConsumerInfo::psa::status. 00280 {
00281 cout << endl;
00282 output << fName << " " << fTitle << endl;
00283 output << "run:" << _runnumber << " number of events:" << _nevents << endl;
00284 cout << "objects:" << endl;
00285 for(std::map<TString,psa>::const_iterator iter=_objectlist.begin() ; iter != _objectlist.end() ; ++iter)
00286 cout << iter->second.path << iter->first << " "
00287 << iter->second.status << endl;
00288 //cout << "list:" << endl;
00289 //_list->ls();
00290 cout << endl << endl;
00291 }
|
|
|
Definition at line 182 of file TConsumerInfo.cxx. References _estimatedsize, _list, _modified, and _objectlist. 00183 {
00184 //cout << "removing object " << obj->GetName() << endl;
00185 // remove objects from the lists
00186 _list->Remove(obj);
00187 _objectlist.erase(obj->GetName());
00188 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,15,1)
00189 TBufferFile testbuffer(TBuffer::kWrite);
00190 #else
00191 TBuffer testbuffer(TBuffer::kWrite);
00192 #endif
00193 obj->Streamer(testbuffer);
00194 _estimatedsize -= testbuffer.BufferSize();
00195 _estimatedsize -= 10000;
00196 _modified = true;
00197 }
|
|
|
Definition at line 171 of file TConsumerInfo.cxx. References _modified, _objectlist, and getAddress(). Referenced by emptyWarningFolder(), and main(). 00172 {
00173 TObject* add = getAddress(name);
00174 if(! add)
00175 {
00176 _objectlist.erase(name);
00177 _modified = true;
00178 }
00179 else removeObject(getAddress(name));
00180 }
|
|
|
Definition at line 58 of file TConsumerInfo.h. Referenced by timer(), and DisplayServer::updateStateManager(). 00058 {return _runnumber;}
|
|
||||||||||||
|
Definition at line 101 of file TConsumerInfo.cxx. References _objectlist, and TConsumerInfo::psa::address. 00102 {
00103 psa pns = _objectlist[name];
00104 pns.address = obj;
00105 _objectlist[name] = pns;
00106 }
|
|
|
Definition at line 41 of file TConsumerInfo.h. 00041 {SetTitle(name);}
|
|
|
Definition at line 127 of file TConsumerInfo.cxx. References _inputname. Referenced by HistoDisplay::MakeConsumerInfo(). 00128 {
00129 _inputname = inputname;
00130 }
|
|
|
Definition at line 61 of file TConsumerInfo.h. References _modified. Referenced by ConsumerExport::send(). 00061 { _modified = modified;}
|
|
|
Definition at line 217 of file TConsumerInfo.cxx. References _nevents. Referenced by main(), and HistoDisplay::MakeConsumerInfo(). 00218 {
00219 _nevents = nevents;
00220 }
|
|
||||||||||||
|
Definition at line 86 of file TConsumerInfo.cxx. References _objectlist, and TConsumerInfo::psa::path. 00087 {
00088 psa pns = _objectlist[name];
00089 pns.path = path;
00090 _objectlist[name] = pns;
00091 }
|
|
|
Definition at line 222 of file TConsumerInfo.cxx. References _runnumber. Referenced by HistoDisplay::MakeConsumerInfo(). 00223 {
00224 _runnumber = number;
00225 }
|
|
||||||||||||
|
Definition at line 94 of file TConsumerInfo.cxx. References _objectlist, and TConsumerInfo::psa::status. 00095 {
00096 psa pns = _objectlist[name];
00097 pns.status = status;
00098 _objectlist[name] = pns;
00099 }
|
|
||||||||||||
|
Definition at line 55 of file TConsumerInfo.cxx. References _objectlist. Referenced by HistoDisplay::MakeHistoListS(). 00056 {
00057 TMessage *mess = NULL;
00058 TObject *obj;
00059 for(std::map<TString,psa>::const_iterator iter=_objectlist.begin() ;
00060 iter != _objectlist.end() ; ++iter)
00061 {
00062 //cout << "requesting " << iter->first << endl;
00063 sock->Send(iter->first);
00064 sock->Recv(mess);
00065 if (mess->What() == kMESS_OBJECT)
00066 {
00067 obj = (TObject*)mess->ReadObject(mess->GetClass());
00068 delete mess;
00069 if (obj->InheritsFrom(TH1::Class())||
00070 obj->InheritsFrom(TCanvas::Class()))
00071 list->Add(obj);
00072 }
00073 else delete mess;
00074 }
00075 }
|
|
|
Definition at line 78 of file TConsumerInfo.cxx. 00079 {
00080 //TGListTreeItem *consitem = listtree->FindChildByName(NULL,consumername);
00081 //if(consitem) listtree->DeleteItem(consitem);
00082 //consitem = listtree->AddItem(NULL,consumername);
00083 }
|
|
|
Definition at line 34 of file TConsumerInfo.h. |
|
|
Definition at line 83 of file TConsumerInfo.h. Referenced by addObject(), and removeObject(). |
|
|
Definition at line 85 of file TConsumerInfo.h. Referenced by setInputName(). |
|
|
Definition at line 87 of file TConsumerInfo.h. Referenced by addObject(), and removeObject(). |
|
|
Definition at line 80 of file TConsumerInfo.h. Referenced by addObject(), removeObject(), and setModified(). |
|
|
Definition at line 82 of file TConsumerInfo.h. Referenced by print(), and setNevents(). |
|
|
Definition at line 97 of file TConsumerInfo.h. Referenced by addObject(), emptyWarningFolder(), getAddress(), getPath(), getStatus(), TIterConsumerInfo::Next(), print(), removeObject(), setAddress(), setPath(), setStatus(), and updateList(). |
|
|
Definition at line 81 of file TConsumerInfo.h. Referenced by print(), and setRunNumber(). |
1.3.9.1