CMS 3D CMS Logo

DQMFlagXML Class Reference

XML format flag. More...

#include <CalibTracker/SiStripRunSummary/interface/DQMFlagXML.h>

Inheritance diagram for DQMFlagXML:

FlagXML Flag Clonable Identifiable

List of all members.

Public Member Functions

 DQMFlagXML (const DQMFlagTxt *poDQM_FLAGTXT)
 Construct XML format flag from Txt formatted one.
 DQMFlagXML ()

Protected Member Functions

virtual Clonableclone () const
 Clone method is used in copying Tree.
virtual ClonablecloneTxt () const
 Convert XML format flag to Txt.
virtual ClassIDBase::ID getID () const
 Used in (de)serialization process to get class ID.
virtual int isChildValid (const FlagXML *poCHILD_CANDIDATE) const
 Override current method in case flag may have any children.

Private Member Functions

template<class Archive>
void serialize (Archive &roArchive, const unsigned int &rnVERSION)

Friends

class boost::serialization::access
 --[ BEGIN ]-- Serialization section: XML format


Detailed Description

XML format flag.

Tasks: 1. Define cloning 2. Implement identification (get class ID) 3. Specify allowed children 4. Serialization part: a) (de)serialization through base class b) register class in boost/serialization 5. flag output in ostream (print, display).

Definition at line 35 of file DQMFlagXML.h.


Constructor & Destructor Documentation

DQMFlagXML::DQMFlagXML (  )  [inline]

Definition at line 37 of file DQMFlagXML.h.

Referenced by clone().

00037 {}

DQMFlagXML::DQMFlagXML ( const DQMFlagTxt poDQM_FLAGTXT  ) 

Construct XML format flag from Txt formatted one.

Parameters:
poDQM_FLAGTXT Txt format flag to be used as source

Definition at line 20 of file DQMFlagXML.cc.

00021   : FlagXML( *( dynamic_cast<const FlagTxt *>( poDQM_FLAGTXT) ) ) {}


Member Function Documentation

virtual Clonable* DQMFlagXML::clone ( void   )  const [inline, protected, virtual]

Clone method is used in copying Tree.

Should be implemented by each flag individually. Flag should be created on a heap store.

Returns:
Pointer to newly created flag.

Implements Clonable.

Definition at line 56 of file DQMFlagXML.h.

References DQMFlagXML().

00056                                            {
00057       return new DQMFlagXML( *this);
00058     }

Clonable * DQMFlagXML::cloneTxt (  )  const [protected, virtual]

Convert XML format flag to Txt.

Txt flag should be created on a heap store and constructed out of XML formatted one.

Returns:
Pointer to newly created flag.

Reimplemented from Clonable.

Definition at line 24 of file DQMFlagXML.cc.

00024                                      {
00025   return new DQMFlagTxt( this);
00026 }

ClassIDBase::ID DQMFlagXML::getID (  )  const [protected, virtual]

Used in (de)serialization process to get class ID.

Returns:
ID of current class.

Implements Identifiable.

Definition at line 28 of file DQMFlagXML.cc.

References ClassID< T >::get().

00028                                       {
00029   return ClassID<DQMFlagXML>::get();
00030 }

int DQMFlagXML::isChildValid ( const FlagXML poCHILD_CANDIDATE  )  const [protected, virtual]

Override current method in case flag may have any children.

Parameters:
poCHILD_CANDIDATE Pointer to flag to be checked if it is allowed.
Returns:
Number of children allowed (refer to base class for details)

Reimplemented from FlagXML.

Definition at line 32 of file DQMFlagXML.cc.

00032                                                                     {
00033   return dynamic_cast<const TECFlagXML *>( poCHILD_CANDIDATE) ||
00034          dynamic_cast<const TIBFlagXML *>( poCHILD_CANDIDATE) ||
00035          dynamic_cast<const TIDFlagXML *>( poCHILD_CANDIDATE) ||
00036          dynamic_cast<const TOBFlagXML *>( poCHILD_CANDIDATE) ?
00037          1 :
00038          0;
00039 }

template<class Archive>
void DQMFlagXML::serialize ( Archive &  roArchive,
const unsigned int rnVERSION 
) [inline, private]

Definition at line 99 of file DQMFlagXML.h.

00099                                                                          {
00100         roArchive & BOOST_SERIALIZATION_BASE_OBJECT_NVP( FlagXML);
00101       }


Friends And Related Function Documentation

friend class boost::serialization::access [friend]

--[ BEGIN ]-- Serialization section: XML format

Reimplemented from FlagXML.

Definition at line 96 of file DQMFlagXML.h.


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:18:34 2009 for CMSSW by  doxygen 1.5.4