CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
RootStreamBuffer Class Reference
Inheritance diagram for RootStreamBuffer:

Public Member Functions

void copy (std::ostream &destForData, std::ostream &destForStreamerInfo)
 
void ForceWriteInfo (TVirtualStreamerInfo *sinfo, Bool_t)
 
void read (void *destinationInstance, const TClass *ptrClass)
 
 RootStreamBuffer ()
 
 RootStreamBuffer (const std::string &dataSource, const std::string &streamerInfoSource)
 
void TagStreamerInfo (TVirtualStreamerInfo *sinfo)
 
void write (const void *obj, const TClass *ptrClass)
 

Private Attributes

TList m_streamerInfo
 
TBufferFile m_streamerInfoBuff
 

Detailed Description

Definition at line 36 of file Serialization.cc.

Constructor & Destructor Documentation

RootStreamBuffer::RootStreamBuffer ( )
inline

Definition at line 38 of file Serialization.cc.

38  :
39  TBufferFile( TBufferFile::kWrite ),
40  m_streamerInfoBuff( TBufferFile::kWrite ){
41  }
TBufferFile m_streamerInfoBuff
RootStreamBuffer::RootStreamBuffer ( const std::string &  dataSource,
const std::string &  streamerInfoSource 
)
inline

Definition at line 43 of file Serialization.cc.

43  :
44  TBufferFile( TBufferFile::kRead, dataSource.size(), const_cast<char*>( dataSource.c_str()), kFALSE ),
45  m_streamerInfoBuff( TBufferFile::kRead, streamerInfoSource.size(), const_cast<char*>( streamerInfoSource.c_str()), kFALSE ){
46  }
TBufferFile m_streamerInfoBuff

Member Function Documentation

void RootStreamBuffer::copy ( std::ostream &  destForData,
std::ostream &  destForStreamerInfo 
)
inline

Definition at line 103 of file Serialization.cc.

References m_streamerInfoBuff.

Referenced by cond::RootOutputArchive::write().

103  {
104  destForData.write( static_cast<const char*>(Buffer()),Length() );
105  destForStreamerInfo.write( static_cast<const char*>(m_streamerInfoBuff.Buffer()),m_streamerInfoBuff.Length() );
106  }
TBufferFile m_streamerInfoBuff
void RootStreamBuffer::ForceWriteInfo ( TVirtualStreamerInfo *  sinfo,
Bool_t   
)
inline

Definition at line 48 of file Serialization.cc.

References m_streamerInfo.

48  {
49  m_streamerInfo.Add( sinfo );
50  }
void RootStreamBuffer::read ( void *  destinationInstance,
const TClass *  ptrClass 
)
inline

Definition at line 67 of file Serialization.cc.

References info(), list(), m_streamerInfoBuff, and GetRecoTauVFromDQM_MC_cff::next.

Referenced by Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::goto(), and Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::setFilterBranches().

67  {
68  // first "load" the available streaminfo(s)
69  // code imported from TSocket::RecvStreamerInfos
70  TList *list = 0;
71  if(m_streamerInfoBuff.Length()){
72  list = (TList*)m_streamerInfoBuff.ReadObject( TList::Class() );
73  TIter next(list);
74  TStreamerInfo *info;
75  TObjLink *lnk = list->FirstLink();
76  // First call BuildCheck for regular class
77  while (lnk) {
78  info = (TStreamerInfo*)lnk->GetObject();
79  TObject *element = info->GetElements()->UncheckedAt(0);
80  Bool_t isstl = element && strcmp("This",element->GetName())==0;
81  if (!isstl) {
82  info->BuildCheck();
83  }
84  lnk = lnk->Next();
85  }
86  // Then call BuildCheck for stl class
87  lnk = list->FirstLink();
88  while (lnk) {
89  info = (TStreamerInfo*)lnk->GetObject();
90  TObject *element = info->GetElements()->UncheckedAt(0);
91  Bool_t isstl = element && strcmp("This",element->GetName())==0;
92  if (isstl) {
93  info->BuildCheck();
94  }
95  lnk = lnk->Next();
96  }
97  }
98  // then read the object data
99  StreamObject(destinationInstance, ptrClass);
100  if( list ) delete list;
101  }
static const TGPicture * info(bool iBackgroundIsBlack)
TBufferFile m_streamerInfoBuff
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
void RootStreamBuffer::TagStreamerInfo ( TVirtualStreamerInfo *  sinfo)
inline

Definition at line 52 of file Serialization.cc.

References m_streamerInfo.

52  {
53  m_streamerInfo.Add( sinfo );
54  }
void RootStreamBuffer::write ( const void *  obj,
const TClass *  ptrClass 
)
inline

Definition at line 56 of file Serialization.cc.

References m_streamerInfo, and m_streamerInfoBuff.

Referenced by pkg.AbstractPkg::generate(), and cond::RootOutputArchive::write().

56  {
57  m_streamerInfo.Clear();
58  // this will populate the streamerInfo list 'behind the scenes' - calling the TagStreamerInfo method
59  StreamObject(const_cast<void*>(obj), ptrClass);
60  // serialize the StreamerInfo
61  if(m_streamerInfo.GetEntries() ){
62  m_streamerInfoBuff.WriteObject( &m_streamerInfo );
63  }
64  m_streamerInfo.Clear();
65  }
TBufferFile m_streamerInfoBuff

Member Data Documentation

TList RootStreamBuffer::m_streamerInfo
private

Definition at line 110 of file Serialization.cc.

Referenced by ForceWriteInfo(), TagStreamerInfo(), and write().

TBufferFile RootStreamBuffer::m_streamerInfoBuff
private

Definition at line 109 of file Serialization.cc.

Referenced by copy(), read(), and write().