CMS 3D CMS Logo

XMLHTRZeroSuppressionLoader Class Reference

Description: <one line="" class="" summary>="">. More...

#include <CaloOnlineTools/HcalOnlineDb/interface/XMLHTRZeroSuppressionLoader.h>

Inheritance diagram for XMLHTRZeroSuppressionLoader:

XMLDOMBlock

List of all members.

Public Types

typedef
XMLHTRZeroSuppressionLoader::_datasetDBConfig 
datasetDBConfig
typedef struct
XMLHTRZeroSuppressionLoader::_loaderBaseConfig 
loaderBaseConfig

Public Member Functions

int addZS (datasetDBConfig *config, string templateFileName="HCAL_HTR_ZERO_SUPPRESSION.dataset.template")
 XMLHTRZeroSuppressionLoader (loaderBaseConfig *config, string templateBase="HCAL_HTR_ZERO_SUPPRESSION.XMLloader.template")
 XMLHTRZeroSuppressionLoader ()
virtual ~XMLHTRZeroSuppressionLoader ()

Private Member Functions

const XMLHTRZeroSuppressionLoaderoperator= (const XMLHTRZeroSuppressionLoader &)
 XMLHTRZeroSuppressionLoader (const XMLHTRZeroSuppressionLoader &)

Classes

struct  _datasetDBConfig
struct  _loaderBaseConfig


Detailed Description

Description: <one line="" class="" summary>="">.

Usage: <usage>

Definition at line 30 of file XMLHTRZeroSuppressionLoader.h.


Member Typedef Documentation

typedef XMLHTRZeroSuppressionLoader::_datasetDBConfig XMLHTRZeroSuppressionLoader::datasetDBConfig

typedef struct XMLHTRZeroSuppressionLoader::_loaderBaseConfig XMLHTRZeroSuppressionLoader::loaderBaseConfig


Constructor & Destructor Documentation

XMLHTRZeroSuppressionLoader::XMLHTRZeroSuppressionLoader (  ) 

XMLHTRZeroSuppressionLoader::XMLHTRZeroSuppressionLoader ( loaderBaseConfig config,
string  templateBase = "HCAL_HTR_ZERO_SUPPRESSION.XMLloader.template" 
)

Definition at line 65 of file XMLHTRZeroSuppressionLoader.cc.

References name, run_type, XMLDOMBlock::setTagAttribute(), and XMLDOMBlock::setTagValue().

00065                                                                                                          : XMLDOMBlock( templateBase )
00066 {
00067   setTagValue( "EXTENSION_TABLE_NAME", config -> extention_table_name );
00068   setTagValue( "NAME", config -> name );
00069   setTagValue( "RUN_TYPE", config -> run_type );
00070   setTagValue( "RUN_NUMBER", config -> run_number );
00071   char timebuf[50];
00072   strftime( timebuf, 50, "%Y-%m-%d %H:%M:%S.0", gmtime( &(config -> run_begin_timestamp) ) );
00073   setTagValue( "COMMENT_DESCRIPTION", config -> comment_description );
00074   setTagAttribute( "DATA_SET", "id", config -> data_set_id );
00075   setTagAttribute( "IOV", "id", config -> iov_id );
00076   setTagValue( "INTERVAL_OF_VALIDITY_BEGIN", config -> iov_begin );
00077   setTagValue( "INTERVAL_OF_VALIDITY_END", config -> iov_end );
00078   setTagAttribute( "TAG", "id", config -> tag_id );
00079   setTagAttribute( "TAG", "mode", config -> tag_mode );
00080   setTagValue( "TAG_NAME", config -> tag_name );
00081   setTagValue( "DETECTOR_NAME", config -> detector_name );
00082   setTagValue( "COMMENT_DESCRIPTION", config -> elements_comment_description, 1 );
00083 
00084   setTagAttribute( "TAG", "idref", config -> tag_id, 1 );
00085   setTagAttribute( "IOV", "idref", config -> iov_id, 1 );
00086   setTagAttribute( "DATA_SET", "idref", config -> data_set_id, 1 );
00087 }

XMLHTRZeroSuppressionLoader::~XMLHTRZeroSuppressionLoader (  )  [virtual]

Definition at line 94 of file XMLHTRZeroSuppressionLoader.cc.

00095 {
00096 }

XMLHTRZeroSuppressionLoader::XMLHTRZeroSuppressionLoader ( const XMLHTRZeroSuppressionLoader  )  [private]


Member Function Documentation

int XMLHTRZeroSuppressionLoader::addZS ( datasetDBConfig config,
string  templateFileName = "HCAL_HTR_ZERO_SUPPRESSION.dataset.template" 
)

Definition at line 113 of file XMLHTRZeroSuppressionLoader.cc.

References XMLDOMBlock::document, eta, XMLDOMBlock::getDocument(), phi, pydbsAccessor::root, XMLDOMBlock::setTagValue(), version(), and z.

00114 {
00115   DOMElement * root = document -> getDocumentElement();
00116 
00117   XMLDOMBlock dataSetDoc( templateFileName );
00118   DOMDocument * dataSet = dataSetDoc . getDocument();
00119 
00120   // changes to the HTR Zero Suppression <data_set> node
00121   setTagValue( "VERSION", config -> version, 0, dataSet );
00122   setTagValue( "SUBVERSION", config -> subversion, 0, dataSet );
00123   char timebuf[50];
00124   //strftime( timebuf, 50, "%c", gmtime( &(config -> create_timestamp) ) );
00125   strftime( timebuf, 50, "%Y-%m-%d %H:%M:%S.0", gmtime( &(config -> create_timestamp) ) );
00126   setTagValue( "CREATE_TIMESTAMP", timebuf , 0, dataSet );
00127 
00128   setTagValue( "CREATED_BY_USER", config -> created_by_user, 0, dataSet );
00129   setTagValue( "COMMENT_DESCRIPTION", config -> comment_description, 0, dataSet );
00130   setTagValue( "EXTENSION_TABLE_NAME", config -> extention_table_name, 0, dataSet );
00131 
00132   setTagValue( "ETA", config -> eta, 0, dataSet );
00133   setTagValue( "PHI", config -> phi, 0, dataSet );
00134   setTagValue( "DEPTH", config -> depth, 0, dataSet );
00135   setTagValue( "Z", config -> z, 0, dataSet );
00136   setTagValue( "HCAL_CHANNEL_ID", config -> hcal_channel_id, 0, dataSet );
00137   setTagValue( "DETECTOR_NAME", config -> detector_name, 0, dataSet );
00138   setTagValue( "ZERO_SUPPRESSION", config -> zero_suppression, 0, dataSet );
00139 
00140   // copy the <data_set> node into the final XML
00141   DOMNode * cloneDataSet = document -> importNode( dataSet -> getDocumentElement(), true );
00142   root -> appendChild( cloneDataSet );
00143 
00144   return 0;
00145 }

const XMLHTRZeroSuppressionLoader& XMLHTRZeroSuppressionLoader::operator= ( const XMLHTRZeroSuppressionLoader  )  [private]


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