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

Public Member Functions | |
| RecMinos () | |
| RecMinos (RecMinosHdr *header) | |
| virtual | ~RecMinos () |
| virtual void | AdoptComponent (TObject *component) |
| virtual void | AdoptTemporary (TObject *temporary) |
| virtual const TObject * | FindComponent (const char *classname=0, const char *objname=0) const |
| virtual const TObject * | FindTemporary (const char *classname=0, const char *objname=0) const |
| virtual const RecMinosHdr * | GetHeader () const |
| virtual const VldContext * | GetVldContext () const |
| virtual const TObjArray & | GetComponents () const |
| virtual TObjArray & | GetTemporaries () |
| virtual Registry & | GetTempTags () |
| virtual const Registry & | GetTempTags () const |
| virtual bool | IsPersistedToOutputStream (const char *stream="", const char *file="", const char *tree="", int index=-1) const |
| virtual bool | IsTransient () const |
| virtual const RecJobHistory & | GetJobHistory () const |
| virtual void | Print (Option_t *option="") const |
| virtual void | HasBeenModified () |
| virtual void | PersistedToOutputStream (const char *stream, const char *file, const char *tree, int index) |
| virtual void | SetTransient (bool isTransient=true) |
Protected Member Functions | |
| virtual TObject * | RemoveComponent (TObject *component) |
| virtual TObject * | RemoveTemporary (TObject *temporary) |
Protected Attributes | |
| RecMinosHdr * | fHeader |
| TObjArray | fComponents |
| RecJobHistory | fJobHistory |
| TObjArray | fTemporaries |
| Registry | fTempTags |
| associated obj, but not output | |
|
|
Definition at line 21 of file RecMinos.cxx. 00022 : fHeader(new RecMinosHdr()) 00023 { 00024 // Default constructor 00025 fComponents.SetOwner(true); 00026 fTemporaries.SetOwner(true); 00027 }
|
|
|
Definition at line 30 of file RecMinos.cxx. References fComponents, and fTemporaries. 00031 : fHeader(header) 00032 { 00033 // normal ctor, adopts the RecMinosHdr for ownership 00034 fComponents.SetOwner(true); 00035 fTemporaries.SetOwner(true); 00036 }
|
|
|
Definition at line 40 of file RecMinos.cxx. References fComponents, fHeader, and fTemporaries. 00041 {
00042 // delete all owned sub-objects
00043 fComponents.Delete();
00044 fTemporaries.Delete();
00045
00046 if (fHeader) delete fHeader; fHeader = 0;
00047
00048 }
|
|
|
Reimplemented in RawRecord. Definition at line 51 of file RecMinos.cxx. References fComponents. Referenced by RawRecord::AdoptComponent(), RawRecord::AdoptRawBlock(), and CandRecord::SecureCandHandle(). 00052 {
00053 fComponents.Add(component);
00054 }
|
|
|
Definition at line 56 of file RecMinos.cxx. References fTemporaries. Referenced by Coroner::Reco(), and CandRecord::SwitchCandHandlePersToTemp(). 00057 {
00058 fTemporaries.Add(temporary);
00059 }
|
|
||||||||||||
|
Definition at line 73 of file RecMinos.cxx. References fComponents. Referenced by CandRecord::FindCandHandle(), RawRecord::FindRawBlock(), and Morgue::GetMorgue(). 00075 {
00076
00077 // Returns the *last* selected Component. If classname is a null ptr
00078 // or blank string, no class selection is done. If classname is
00079 // provided, the qualifying object must InheritFrom() or be a classname.
00080 // The objname is optional, but, if filled, will further qualify the
00081 // selection by requiring agreement with the GetName() method of the
00082 // selected object.
00083
00084 TString classtr("");
00085 if (classname)
00086 classtr.Append(TString(classname).Strip(TString::kBoth));
00087
00088 TString objstr("");
00089 if (objname)
00090 objstr.Append(TString(objname).Strip(TString::kBoth));
00091
00092 TObjArrayIter itr(&fComponents,kIterBackward);
00093 TObject *obj;
00094
00095 while ((obj = itr())) {
00096
00097 // First check whether object InheritsFrom "classname"
00098 if (classtr.IsNull() || obj->InheritsFrom(classtr)) {
00099
00100 // Then check whether object name equals "objname"
00101 if (objstr.IsNull() || (objstr == obj->GetName()))
00102 return obj;
00103 }
00104 }
00105 return 0;
00106
00107 }
|
|
||||||||||||
|
Definition at line 110 of file RecMinos.cxx. References fTemporaries. Referenced by CandRecord::FindCandHandle(), and Morgue::GetMorgue(). 00112 {
00113
00114 // Returns the *last* selected Temporary. If classname is a null ptr
00115 // or blank string, no class selection is done. If classname is
00116 // provided, the qualifying object must InheritFrom() or be a classname.
00117 // The objname is optional, but, if filled, will further qualify the
00118 // selection by requiring agreement with the GetName() method of the
00119 // selected object.
00120
00121 TString classtr("");
00122 if (classname)
00123 classtr.Append(TString(classname).Strip(TString::kBoth));
00124
00125 TString objstr("");
00126 if (objname)
00127 objstr.Append(TString(objname).Strip(TString::kBoth));
00128
00129 TObjArrayIter itr(&fTemporaries,kIterBackward);
00130 TObject *obj;
00131
00132 while ((obj = itr())) {
00133
00134 // First check whether object InheritsFrom "classname"
00135 if (classtr.IsNull() || obj->InheritsFrom(classtr)) {
00136
00137 // Then check whether object name equals "objname"
00138 if (objstr.IsNull() || (objstr == obj->GetName()))
00139 return obj;
00140 }
00141 }
00142 return 0;
00143
00144 }
|
|
|
Definition at line 74 of file RecMinos.h. Referenced by DataUtil::dump_mom(), CandRecord::GetCandHandleList(), and RawRecord::GetRawBlockList(). 00074 {return fComponents; }
|
|
|
|
Definition at line 47 of file RecMinos.h. Referenced by RotoObjectifier::BuildRecord(), RecordSetupModule::Get(), NtpStModule::Get(), DetSim::Get(), RawRecord::Print(), CandRecord::Print(), NtpTHModule::Reco(), and NtpSRModule::Reco(). 00047 { return fJobHistory; }
|
|
|
Definition at line 75 of file RecMinos.h. Referenced by DataUtil::dump_mom(). 00075 {return fTemporaries; }
|
|
|
Definition at line 77 of file RecMinos.h. 00077 { return fTempTags; }
|
|
|
|
|
Definition at line 176 of file RecMinos.cxx. References fTempTags, and Registry::RemoveKey(). 00176 {
00177 //
00178 // Purpose: Handle generic record tasks appropriate for when record
00179 // has been newly modified.
00180 //
00181 // Arguments: none.
00182 //
00183 // Return: none.
00184 //
00185 // Contact: S. Kasahara
00186 //
00187 // Notes: The default behavior provided by this method is to clear
00188 // the Registry value associated with the key "outstream" in
00189 // the Registry fTempTags data member. This indicates to
00190 // any output module(s) in the user's job path(s) that the modified
00191 // record should be re-persisted.
00192 //
00193
00194 fTempTags.RemoveKey("outstream");
00195 return;
00196
00197 }
|
|
||||||||||||||||||||
|
Definition at line 266 of file RecMinos.cxx. References fTempTags, Registry::Get(), and s(). Referenced by PerOutputStream::SetObject(). 00267 {
00268 //
00269 // Purpose: Check to see if record has been persisted to the output
00270 // stream/file/tree/tree index of interest.
00271 //
00272 // Arguments: stream/tree/file/tree index of interest. If a value is
00273 // left at default ("" for stream/tree/file, or -1 for index),
00274 // that argument will not be checked.
00275 //
00276 // Return: true or false. Result will be true if all non-default arguments
00277 // match those of one of the output streams to which this record
00278 // has been persisted.
00279 //
00280 // Contact: S. Kasahara
00281 //
00282
00283 std::string s(stream);
00284 std::string f(file);
00285 std::string t(tree);
00286
00287 Registry outStreamRegistry;
00288 int nout = 0;
00289 if ( fTempTags.Get("outstream",outStreamRegistry) ) {
00290 outStreamRegistry.Get("nout",nout);
00291 for ( int iout = 0; iout < nout; iout++) {
00292 char cioutkey[20];
00293 sprintf(cioutkey,"%i",iout);
00294 Registry outStream;
00295 outStreamRegistry.Get(cioutkey,outStream);
00296 bool isMatch = true;
00297 if ( !s.empty() ) {
00298 const char* cstream = 0;
00299 outStream.Get("stream",cstream);
00300 if ( std::string(cstream) != s ) isMatch = false;
00301 }
00302 if ( !f.empty() ) {
00303 const char* cfile = 0;
00304 outStream.Get("file",cfile);
00305 if ( std::string(cfile) != f ) isMatch = false;
00306 }
00307
00308 if ( !t.empty() ) {
00309 const char* ctree = 0;
00310 outStream.Get("tree",ctree);
00311 if ( std::string(ctree) != t ) isMatch = false;
00312 }
00313 if ( index > -1 ) {
00314 int storedindex = -1;
00315 outStream.Get("index",storedindex);
00316 if ( storedindex != index ) isMatch = false;
00317 }
00318 if ( isMatch ) {
00319 return true; // found match in registry
00320 }
00321 }
00322 }
00323
00324 return false; // failed to find match in registry
00325
00326 }
|
|
|
Definition at line 331 of file RecMinos.cxx. References fTempTags, and Registry::Get(). Referenced by MomNavigator::Clear(). 00331 {
00332 //
00333 // Purpose: If IsTransient (def), record will exist in memory for one
00334 // job cycle only.
00335 //
00336 // Arguments: none.
00337 //
00338 // Return: true or false.
00339 //
00340 // Contact: S. Kasahara
00341 //
00342
00343 int isTransient = 1;
00344 fTempTags.Get("isTransient",isTransient);
00345 return ( isTransient ) ? true : false;
00346
00347 }
|
|
||||||||||||||||||||
|
Definition at line 201 of file RecMinos.cxx. References fTempTags, Registry::Get(), Registry::LockValues(), Registry::Set(), and Registry::UnLockValues(). Referenced by PerOutputStream::Store(). 00202 {
00203 //
00204 // Purpose: Mark the record as having been stored in the named stream,file,
00205 // tree, tree index location.
00206 //
00207 // Arguments: stream name, file name, tree name, tree index to which record
00208 // was stored.
00209 //
00210 // Return: none.
00211 //
00212 // Contact: S. Kasahara
00213 //
00214 // Notes: The output stream,file,tree,treeindex will be stored in
00215 // Registry fTempTags in the following manner:
00216 // key type/value
00217 // === ==========
00218 // "outstream" Registry/see below:
00219 // key type/value
00220 // === ==========
00221 // "nout" int/# times this record has been persisted
00222 // "0" Registry/see below:
00223 // "1" Registry/ "
00224 // ... Registry/ "
00225 // "nout-1" Registry/ "
00226 // key type/value
00227 // === ==========
00228 // "stream" const char*/output stream name
00229 // "file" const char*/output file name
00230 // "tree" const char*/output tree name
00231 // "index" int /output tree index
00232 //
00233
00234 Registry outStreamRegistry;
00235 int nout = 0;
00236 if ( fTempTags.Get("outstream",outStreamRegistry) ) {
00237 outStreamRegistry.Get("nout",nout);
00238 }
00239 outStreamRegistry.UnLockValues();
00240
00241 // New output stream registry
00242 Registry newOutStream;
00243 newOutStream.Set("stream",stream);
00244 newOutStream.Set("file",file);
00245 newOutStream.Set("tree",tree);
00246 newOutStream.Set("index",index);
00247
00248 // Insert new output stream registry at key nout of "outstream" registry
00249 char cnoutkey[20];
00250 sprintf(cnoutkey,"%i",nout);
00251 outStreamRegistry.Set(cnoutkey,newOutStream);
00252 nout++;
00253 outStreamRegistry.Set("nout",nout);
00254 outStreamRegistry.LockValues();
00255
00256 // Store revised "outstream" registry
00257
00258 fTempTags.UnLockValues();
00259 fTempTags.Set("outstream",outStreamRegistry);
00260 fTempTags.LockValues();
00261
00262 }
|
|
|
Reimplemented in CandRecord, and RawRecord. Definition at line 157 of file RecMinos.cxx. References fComponents, fHeader, fJobHistory, and RecJobHistory::Print(). Referenced by RecValidate::TestReadRecordOld(). 00158 {
00159 cout << "RecMinos::Print Header: " << endl;
00160 if (fHeader) fHeader -> Print();
00161 else cout << " ... no RecMinosHdr" << endl;
00162 fJobHistory.Print();
00163
00164 TObject *obj;
00165
00166 cout << "RecMinos::Print Components: " << endl;
00167 TObjArrayIter itr(&fComponents);
00168 while ((obj = itr())) {
00169 cout << obj->ClassName() << " " << obj->GetName() << endl;
00170 }
00171
00172 }
|
|
|
Definition at line 62 of file RecMinos.cxx. References fComponents. Referenced by CandRecord::RemoveCandHandle(), and CandRecord::SwitchCandHandlePersToTemp(). 00063 {
00064 return fComponents.Remove(component);
00065 }
|
|
|
Definition at line 67 of file RecMinos.cxx. References fTemporaries. Referenced by CandRecord::RemoveCandHandle(). 00068 {
00069 return fTemporaries.Remove(temporary);
00070 }
|
|
|
Definition at line 352 of file RecMinos.cxx. References fTempTags, Registry::LockValues(), Registry::Set(), and Registry::UnLockValues(). 00352 {
00353 //
00354 // Purpose: Set transient state of record. If set true(def), record will
00355 // exist in memory for one job cycle only.
00356 //
00357 // Arguments: true or false.
00358 //
00359 // Return: none.
00360 //
00361 // Contact: S. Kasahara
00362 //
00363
00364 fTempTags.UnLockValues();
00365 if ( isTransient ) fTempTags.Set("isTransient",1);
00366 else fTempTags.Set("isTransient",0);
00367 fTempTags.LockValues();
00368 return;
00369
00370 }
|
|
|
Definition at line 63 of file RecMinos.h. Referenced by AdoptComponent(), FindComponent(), Print(), RecMinos(), RemoveComponent(), and ~RecMinos(). |
|
|
Definition at line 62 of file RecMinos.h. Referenced by Print(), and ~RecMinos(). |
|
|
Definition at line 64 of file RecMinos.h. Referenced by Print(). |
|
|
Definition at line 65 of file RecMinos.h. Referenced by AdoptTemporary(), FindTemporary(), RecMinos(), RemoveTemporary(), and ~RecMinos(). |
|
|
associated obj, but not output
Definition at line 66 of file RecMinos.h. Referenced by HasBeenModified(), IsPersistedToOutputStream(), IsTransient(), PersistedToOutputStream(), and SetTransient(). |
1.3.9.1