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 27 of file Serialization.cc.

Constructor & Destructor Documentation

RootStreamBuffer::RootStreamBuffer ( )
inline

Definition at line 29 of file Serialization.cc.

29  :
30  TBufferFile( TBufferFile::kWrite ),
31  m_streamerInfoBuff( TBufferFile::kWrite ){
32  }
TBufferFile m_streamerInfoBuff
RootStreamBuffer::RootStreamBuffer ( const std::string &  dataSource,
const std::string &  streamerInfoSource 
)
inline

Definition at line 34 of file Serialization.cc.

34  :
35  TBufferFile( TBufferFile::kRead, dataSource.size(), const_cast<char*>( dataSource.c_str()), kFALSE ),
36  m_streamerInfoBuff( TBufferFile::kRead, streamerInfoSource.size(), const_cast<char*>( streamerInfoSource.c_str()), kFALSE ){
37  }
TBufferFile m_streamerInfoBuff

Member Function Documentation

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

Definition at line 94 of file Serialization.cc.

References m_streamerInfoBuff.

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

94  {
95  destForData.write( static_cast<const char*>(Buffer()),Length() );
96  destForStreamerInfo.write( static_cast<const char*>(m_streamerInfoBuff.Buffer()),m_streamerInfoBuff.Length() );
97  }
TBufferFile m_streamerInfoBuff
void RootStreamBuffer::ForceWriteInfo ( TVirtualStreamerInfo *  sinfo,
Bool_t   
)
inline

Definition at line 39 of file Serialization.cc.

References m_streamerInfo.

39  {
40  m_streamerInfo.Add( sinfo );
41  }
void RootStreamBuffer::read ( void *  destinationInstance,
const TClass *  ptrClass 
)
inline

Definition at line 58 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().

58  {
59  // first "load" the available streaminfo(s)
60  // code imported from TSocket::RecvStreamerInfos
61  TList *list = 0;
62  if(m_streamerInfoBuff.Length()){
63  list = (TList*)m_streamerInfoBuff.ReadObject( TList::Class() );
64  TIter next(list);
65  TStreamerInfo *info;
66  TObjLink *lnk = list->FirstLink();
67  // First call BuildCheck for regular class
68  while (lnk) {
69  info = (TStreamerInfo*)lnk->GetObject();
70  TObject *element = info->GetElements()->UncheckedAt(0);
71  Bool_t isstl = element && strcmp("This",element->GetName())==0;
72  if (!isstl) {
73  info->BuildCheck();
74  }
75  lnk = lnk->Next();
76  }
77  // Then call BuildCheck for stl class
78  lnk = list->FirstLink();
79  while (lnk) {
80  info = (TStreamerInfo*)lnk->GetObject();
81  TObject *element = info->GetElements()->UncheckedAt(0);
82  Bool_t isstl = element && strcmp("This",element->GetName())==0;
83  if (isstl) {
84  info->BuildCheck();
85  }
86  lnk = lnk->Next();
87  }
88  }
89  // then read the object data
90  StreamObject(destinationInstance, ptrClass);
91  if( list ) delete list;
92  }
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 43 of file Serialization.cc.

References m_streamerInfo.

43  {
44  m_streamerInfo.Add( sinfo );
45  }
void RootStreamBuffer::write ( const void *  obj,
const TClass *  ptrClass 
)
inline

Definition at line 47 of file Serialization.cc.

References m_streamerInfo, and m_streamerInfoBuff.

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

47  {
48  m_streamerInfo.Clear();
49  // this will populate the streamerInfo list 'behind the scenes' - calling the TagStreamerInfo method
50  StreamObject(const_cast<void*>(obj), ptrClass);
51  // serialize the StreamerInfo
52  if(m_streamerInfo.GetEntries() ){
53  m_streamerInfoBuff.WriteObject( &m_streamerInfo );
54  }
55  m_streamerInfo.Clear();
56  }
TBufferFile m_streamerInfoBuff

Member Data Documentation

TList RootStreamBuffer::m_streamerInfo
private

Definition at line 101 of file Serialization.cc.

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

TBufferFile RootStreamBuffer::m_streamerInfoBuff
private

Definition at line 100 of file Serialization.cc.

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